From 10845934e8d311b7ff254013d095739a0a430994 Mon Sep 17 00:00:00 2001 From: xboard Date: Tue, 14 Jan 2025 18:35:09 +0800 Subject: [PATCH] fix: correct know file issues --- public/assets/admin/assets/index.css | 2 +- public/assets/admin/assets/index.js | 72 ++- public/assets/admin/assets/vendor.js | 317 +++++----- public/assets/admin/locales/en/common.json | 22 - public/assets/admin/locales/en/coupon.json | 103 ---- public/assets/admin/locales/en/dashboard.json | 134 ----- public/assets/admin/locales/en/group.json | 39 -- public/assets/admin/locales/en/knowledge.json | 46 -- public/assets/admin/locales/en/nav.json | 18 - public/assets/admin/locales/en/notice.json | 62 -- public/assets/admin/locales/en/order.json | 90 --- public/assets/admin/locales/en/payment.json | 92 --- public/assets/admin/locales/en/route.json | 45 -- public/assets/admin/locales/en/search.json | 9 - public/assets/admin/locales/en/server.json | 301 ---------- public/assets/admin/locales/en/settings.json | 538 ----------------- public/assets/admin/locales/en/sidebar.json | 18 - public/assets/admin/locales/en/subscribe.json | 133 ----- public/assets/admin/locales/en/theme.json | 42 -- public/assets/admin/locales/en/ticket.json | 52 -- public/assets/admin/locales/en/traffic.json | 15 - public/assets/admin/locales/en/user.json | 182 ------ public/assets/admin/locales/zh/common.json | 22 - public/assets/admin/locales/zh/coupon.json | 103 ---- public/assets/admin/locales/zh/dashboard.json | 121 ---- public/assets/admin/locales/zh/group.json | 39 -- public/assets/admin/locales/zh/knowledge.json | 46 -- public/assets/admin/locales/zh/nav.json | 18 - public/assets/admin/locales/zh/notice.json | 62 -- public/assets/admin/locales/zh/order.json | 90 --- public/assets/admin/locales/zh/payment.json | 92 --- public/assets/admin/locales/zh/route.json | 45 -- public/assets/admin/locales/zh/search.json | 9 - public/assets/admin/locales/zh/server.json | 276 --------- public/assets/admin/locales/zh/settings.json | 542 ------------------ public/assets/admin/locales/zh/sidebar.json | 18 - public/assets/admin/locales/zh/subscribe.json | 133 ----- public/assets/admin/locales/zh/theme.json | 42 -- public/assets/admin/locales/zh/ticket.json | 52 -- public/assets/admin/locales/zh/traffic.json | 15 - public/assets/admin/locales/zh/user.json | 182 ------ 41 files changed, 222 insertions(+), 4017 deletions(-) delete mode 100644 public/assets/admin/locales/en/common.json delete mode 100644 public/assets/admin/locales/en/coupon.json delete mode 100644 public/assets/admin/locales/en/dashboard.json delete mode 100644 public/assets/admin/locales/en/group.json delete mode 100644 public/assets/admin/locales/en/knowledge.json delete mode 100644 public/assets/admin/locales/en/nav.json delete mode 100644 public/assets/admin/locales/en/notice.json delete mode 100644 public/assets/admin/locales/en/order.json delete mode 100644 public/assets/admin/locales/en/payment.json delete mode 100644 public/assets/admin/locales/en/route.json delete mode 100644 public/assets/admin/locales/en/search.json delete mode 100644 public/assets/admin/locales/en/server.json delete mode 100644 public/assets/admin/locales/en/settings.json delete mode 100644 public/assets/admin/locales/en/sidebar.json delete mode 100644 public/assets/admin/locales/en/subscribe.json delete mode 100644 public/assets/admin/locales/en/theme.json delete mode 100644 public/assets/admin/locales/en/ticket.json delete mode 100644 public/assets/admin/locales/en/traffic.json delete mode 100644 public/assets/admin/locales/en/user.json delete mode 100644 public/assets/admin/locales/zh/common.json delete mode 100644 public/assets/admin/locales/zh/coupon.json delete mode 100644 public/assets/admin/locales/zh/dashboard.json delete mode 100644 public/assets/admin/locales/zh/group.json delete mode 100644 public/assets/admin/locales/zh/knowledge.json delete mode 100644 public/assets/admin/locales/zh/nav.json delete mode 100644 public/assets/admin/locales/zh/notice.json delete mode 100644 public/assets/admin/locales/zh/order.json delete mode 100644 public/assets/admin/locales/zh/payment.json delete mode 100644 public/assets/admin/locales/zh/route.json delete mode 100644 public/assets/admin/locales/zh/search.json delete mode 100644 public/assets/admin/locales/zh/server.json delete mode 100644 public/assets/admin/locales/zh/settings.json delete mode 100644 public/assets/admin/locales/zh/sidebar.json delete mode 100644 public/assets/admin/locales/zh/subscribe.json delete mode 100644 public/assets/admin/locales/zh/theme.json delete mode 100644 public/assets/admin/locales/zh/ticket.json delete mode 100644 public/assets/admin/locales/zh/traffic.json delete mode 100644 public/assets/admin/locales/zh/user.json diff --git a/public/assets/admin/assets/index.css b/public/assets/admin/assets/index.css index 7678ea1..a99b4c1 100644 --- a/public/assets/admin/assets/index.css +++ b/public/assets/admin/assets/index.css @@ -1 +1 @@ -*,: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{--header-height: 4rem;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%}.collapsibleDropdown{overflow:hidden}.collapsibleDropdown[data-state=open]{animation:slideDown .2s ease-out}.collapsibleDropdown[data-state=closed]{animation:slideUp .2s ease-out}@keyframes slideDown{0%{height:0}to{height:var(--radix-collapsible-content-height)}}@keyframes slideUp{0%{height:var(--radix-collapsible-content-height)}to{height:0}}*{border-color:hsl(var(--border))}body{min-height:100svh;width:100%;background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.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}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-right-5{right:-1.25rem}.-top-1\/2{top:-50%}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-4{left:1rem}.left-5{left:1.25rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-1\.5{right:.375rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-5{right:1.25rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-4{top:1rem}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[1\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.-m-0\.5{margin:-.125rem}.m-1{margin:.25rem}.m-auto{margin:auto}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-3{margin-left:-.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[16\/9\]{aspect-ratio:16/9}.aspect-square{aspect-ratio:1 / 1}.size-10{width:2.5rem;height:2.5rem}.size-2\.5{width:.625rem;height:.625rem}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-0{height:0px}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.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-\[180px\]{height:180px}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[300px\]{height:300px}.h-\[400px\]{height:400px}.h-\[90vh\]{height:90vh}.h-\[calc\(100\%-var\(--header-height\)\)\]{height:calc(100% - var(--header-height))}.h-\[calc\(100vh-280px\)\]{height:calc(100vh - 280px)}.h-\[var\(--header-height\)\]{height:var(--header-height)}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-0{max-height:0px}.max-h-12{max-height:3rem}.max-h-96{max-height:24rem}.max-h-\[300px\]{max-height:300px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[95\%\]{max-height:95%}.max-h-screen{max-height:100vh}.min-h-10{min-height:2.5rem}.min-h-6{min-height:1.5rem}.min-h-\[120px\]{min-height:120px}.min-h-\[200px\]{min-height:200px}.min-h-\[60px\]{min-height:60px}.w-0{width:0px}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/3{width:66.666667%}.w-28{width:7rem}.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-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[100px\]{width:100px}.w-\[120px\]{width:120px}.w-\[140px\]{width:140px}.w-\[150px\]{width:150px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-\[250px\]{width:250px}.w-\[300px\]{width:300px}.w-\[400px\]{width:400px}.w-\[50px\]{width:50px}.w-\[70px\]{width:70px}.w-\[80px\]{width:80px}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-0{min-width:0px}.min-w-20{min-width:5rem}.min-w-\[10em\]{min-width:10em}.min-w-\[300px\]{min-width:300px}.min-w-\[40px\]{min-width:40px}.min-w-\[4rem\]{min-width:4rem}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-32{max-width:8rem}.max-w-4xl{max-width:56rem}.max-w-52{max-width:13rem}.max-w-80{max-width:20rem}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[300px\]{max-width:300px}.max-w-\[500px\]{max-width:500px}.max-w-\[60\%\]{max-width:60%}.max-w-\[600px\]{max-width:600px}.max-w-\[90\%\]{max-width:90%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-none{max-width:none}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-\[1\.2\]{flex:1.2}.flex-\[1\]{flex:1}.flex-\[2\]{flex:2}.flex-\[4\]{flex:4}.flex-\[5\]{flex:5}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-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-full{--tw-translate-x: -100%;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-1\/2{--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))}.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-full{--tw-translate-x: 100%;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-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))}.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))}.-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))}.-rotate-90{--tw-rotate: -90deg;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))}.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))}.rotate-45{--tw-rotate: 45deg;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))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;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))}.scale-125{--tw-scale-x: 1.25;--tw-scale-y: 1.25;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 bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@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-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance: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-\[100px_1fr\]{grid-template-columns:100px 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.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-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-0\.5{row-gap:.125rem}.gap-y-2{row-gap:.5rem}.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-2\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.625rem * var(--tw-space-x-reverse));margin-left:calc(.625rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * 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-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-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-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))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-wrap{text-wrap:wrap}.text-nowrap{text-wrap:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.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-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-l-lg{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius)}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-lg{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-bl-none{border-bottom-left-radius:0}.rounded-br-none{border-bottom-right-radius:0}.rounded-tl-lg{border-top-left-radius:var(--radius)}.rounded-tl-none{border-top-left-radius:0}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-tr-lg{border-top-right-radius:var(--radius)}.rounded-tr-none{border-top-right-radius:0}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-500\/50{border-color:#3b82f680}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-foreground\/10{border-color:hsl(var(--foreground) / .1)}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-muted-foreground\/25{border-color:hsl(var(--muted-foreground) / .25)}.border-orange-500\/50{border-color:#f9731680}.border-primary{border-color:hsl(var(--primary))}.border-primary\/40{border-color:hsl(var(--primary) / .4)}.border-primary\/50{border-color:hsl(var(--primary) / .5)}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-l-slate-500{--tw-border-opacity: 1;border-left-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-r-muted{border-right-color:hsl(var(--muted))}.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{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.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-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-destructive\/15{background-color:hsl(var(--destructive) / .15)}.bg-destructive\/80{background-color:hsl(var(--destructive) / .8)}.bg-emerald-500\/80{background-color:#10b981cc}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / 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-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / 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\/70{background-color:#22c55eb3}.bg-inherit{background-color:inherit}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/50{background-color:hsl(var(--secondary) / .5)}.bg-slate-100\/80{background-color:#f1f5f9cc}.bg-transparent{background-color:transparent}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/80{background-color:#eab308cc}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-background\/95{--tw-gradient-from: hsl(var(--background) / .95) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-background\/80{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background) / .8) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-background\/60{--tw-gradient-to: hsl(var(--background) / .6) var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-primary{fill:hsl(var(--primary))}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.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-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.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-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}.pb-0\.5{padding-bottom:.125rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-4{padding-right:1rem}.pr-7{padding-right:1.75rem}.pr-8{padding-right:2rem}.pr-9{padding-right:2.25rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.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-\[0\.625rem\]{font-size:.625rem}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[7rem\]{font-size:7rem}.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-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.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-10{line-height:2.5rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / 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-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-foreground{color:hsl(var(--foreground))}.text-foreground\/70{color:hsl(var(--foreground) / .7)}.text-foreground\/90{color:hsl(var(--foreground) / .9)}.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-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/70{color:hsl(var(--muted-foreground) / .7)}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / 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-primary\/90{color:hsl(var(--primary) / .9)}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / 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-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / 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-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.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-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)}.shadow-destructive\/50{--tw-shadow-color: hsl(var(--destructive) / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-emerald-500\/50{--tw-shadow-color: rgb(16 185 129 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-500\/50{--tw-shadow-color: rgb(234 179 8 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--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)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--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)}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity, 1))}.ring-gray-300\/20{--tw-ring-color: rgb(209 213 219 / .2)}.ring-green-500\/20{--tw-ring-color: rgb(34 197 94 / .2)}.ring-primary\/20{--tw-ring-color: hsl(var(--primary) / .2)}.ring-offset-2{--tw-ring-offset-width: 2px}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.ring-offset-white{--tw-ring-offset-color: #fff}.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-\[1px\]{--tw-backdrop-blur: blur(1px);-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-\[margin\]{transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[max-height\,padding\]{transition-property:max-height,padding;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-\[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-shadow{transition-property:box-shadow;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-150{transition-delay:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.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-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.duration-700{animation-duration:.7s}.delay-100{animation-delay:.1s}.delay-150{animation-delay:.15s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html{overflow-y:scroll}.sticky{position:sticky!important;z-index:2;background-color:hsl(var(--card))}.sticky.before\:right-0:before,.sticky.before\:left-0:before{content:"";position:absolute;top:0;bottom:0;width:2px;background:linear-gradient(to right,rgba(0,0,0,.08),transparent);opacity:1;transition:opacity .3s ease}.sticky.before\:right-0:before{right:-1px;background:linear-gradient(to right,rgba(0,0,0,.08),transparent)}.sticky.before\:right-0:after{content:"";position:absolute;top:0;right:-8px;bottom:0;width:8px;pointer-events:none;background:linear-gradient(to right,rgba(0,0,0,.05),transparent)}.sticky.before\:left-0:before{left:-1px;background:linear-gradient(to left,rgba(0,0,0,.08),transparent)}.sticky.before\:left-0:after{content:"";position:absolute;top:0;left:-8px;bottom:0;width:8px;pointer-events:none;background:linear-gradient(to left,rgba(0,0,0,.05),transparent)}.sticky:hover:before{opacity:.8}.dark .sticky.before\:right-0:before,.dark .sticky.before\:left-0:before{background:linear-gradient(to right,rgba(255,255,255,.05),transparent)}.dark .sticky.before\:right-0:after,.dark .sticky.before\:left-0:after{background:linear-gradient(to right,rgba(255,255,255,.03),transparent)}.\*\:\!inline-block>*{display:inline-block!important}.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}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:bottom-0:before{content:var(--tw-content);bottom:0}.before\:left-0:before{content:var(--tw-content);left:0}.before\:right-0:before{content:var(--tw-content);right:0}.before\:top-0:before{content:var(--tw-content);top:0}.before\:w-\[1px\]:before{content:var(--tw-content);width:1px}.before\:bg-border:before{content:var(--tw-content);background-color:hsl(var(--border))}.after\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bottom-0:after{content:var(--tw-content);bottom:0}.after\:left-0:after{content:var(--tw-content);left:0}.after\:hidden:after{content:var(--tw-content);display:none}.after\:h-32:after{content:var(--tw-content);height:8rem}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:bg-\[linear-gradient\(180deg\,_transparent_10\%\,_hsl\(var\(--background\)\)_70\%\)\]:after{content:var(--tw-content);background-image:linear-gradient(180deg,transparent 10%,hsl(var(--background)) 70%)}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.focus-within\:ring-1:focus-within{--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-within\:ring-ring:focus-within{--tw-ring-color: hsl(var(--ring))}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:rotate-180:hover{--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))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-background:hover{background-color:hsl(var(--background))}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity, 1))}.hover\:bg-card\/80:hover{background-color:hsl(var(--card) / .8)}.hover\:bg-destructive\/10:hover{background-color:hsl(var(--destructive) / .1)}.hover\:bg-destructive\/25:hover{background-color:hsl(var(--destructive) / .25)}.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-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-inherit:hover{background-color:inherit}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-muted\/60:hover{background-color:hsl(var(--muted) / .6)}.hover\:bg-muted\/70:hover{background-color:hsl(var(--muted) / .7)}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary-foreground\/10:hover{background-color:hsl(var(--secondary-foreground) / .1)}.hover\:bg-secondary\/70:hover{background-color:hsl(var(--secondary) / .7)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-slate-200\/80:hover{background-color:#e2e8f0cc}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-yellow-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.hover\:bg-opacity-80:hover{--tw-bg-opacity: .8}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-foreground\/70:hover{color:hsl(var(--foreground) / .7)}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary) / .8)}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-lg:hover{--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)}.hover\:shadow-md:hover{--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)}.hover\:shadow-black\/30:hover{--tw-shadow-color: rgb(0 0 0 / .3);--tw-shadow: var(--tw-shadow-colored)}.hover\:ring-primary:hover{--tw-ring-color: hsl(var(--primary))}.focus\:z-10:focus{z-index:10}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-primary:focus{background-color:hsl(var(--primary))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-destructive:focus{color:hsl(var(--destructive))}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.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-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-primary:focus-visible{--tw-ring-color: hsl(var(--primary))}.focus-visible\:ring-red-500:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;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))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:via-background\/90{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background) / .9) var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-background\/70{--tw-gradient-to: hsl(var(--background) / .7) var(--tw-gradient-to-position)}.group\/id:hover .group-hover\/id\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group[data-collapsed=true] .group-\[\[data-collapsed\=true\]\]\:justify-center{justify-content:center}.group[data-collapsed=true] .group-\[\[data-collapsed\=true\]\]\:px-2{padding-left:.5rem;padding-right:.5rem}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.has-\[\:focus-visible\]\:outline-none:has(:focus-visible){outline:2px solid transparent;outline-offset:2px}.has-\[\:focus-visible\]\:ring-1:has(: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)}.has-\[\:focus-visible\]\:ring-neutral-950:has(:focus-visible){--tw-ring-opacity: 1;--tw-ring-color: rgb(10 10 10 / var(--tw-ring-opacity, 1))}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent) / .5)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.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-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 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))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--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))}@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-\[state\=dragging\]\:cursor-grabbing[data-state=dragging]{cursor:grabbing}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent) / .5)}.data-\[disabled\]\:bg-muted-foreground[data-disabled],.data-\[fixed\]\:bg-muted-foreground[data-fixed]{background-color:hsl(var(--muted-foreground))}.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-accent\/50[data-state=open]{background-color:hsl(var(--accent) / .5)}.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-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[collapsed\=true\]\:py-2[data-collapsed=true]{padding-top:.5rem;padding-bottom:.5rem}.data-\[disabled\]\:text-muted[data-disabled],.data-\[fixed\]\:text-muted[data-fixed]{color:hsl(var(--muted))}.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\=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-\[state\=closed\]\:duration-300[data-state=closed],.data-\[state\=open\]\:duration-300[data-state=open]{transition-duration:.3s}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{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-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden]{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-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity: 0}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed],.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale: .9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem}.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]{--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\=closed\]\:duration-300[data-state=closed],.data-\[state\=open\]\:duration-300[data-state=open]{animation-duration:.3s}.data-\[disabled\]\:hover\:bg-muted-foreground:hover[data-disabled],.data-\[fixed\]\:hover\:bg-muted-foreground:hover[data-fixed]{background-color:hsl(var(--muted-foreground))}.group[data-state=open] .group-data-\[state\=\"open\"\]\:-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-state=open] .group-data-\[state\=open\]\: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))}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-green-500\/10:is(.dark *){background-color:#22c55e1a}.dark\:bg-red-500\/10:is(.dark *){background-color:#ef44441a}.dark\:bg-red-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-500\/10:is(.dark *){background-color:#eab3081a}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:ring-gray-700:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity, 1))}.dark\:ring-gray-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity, 1))}.dark\:placeholder\:text-gray-500:is(.dark *)::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:placeholder\:text-gray-500:is(.dark *)::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-blue-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-red-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:has-\[\:focus-visible\]\:ring-neutral-300:has(:focus-visible):is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(212 212 212 / var(--tw-ring-opacity, 1))}@media (min-width: 640px){.sm\:absolute{position:absolute}.sm\:inset-auto{inset:auto}.sm\:bottom-\[calc\(100\%\+10px\)\]{bottom:calc(100% + 10px)}.sm\:left-0{left:0}.sm\:right-0{right:0}.sm\:my-0{margin-top:0;margin-bottom:0}.sm\:my-4{margin-top:1rem;margin-bottom:1rem}.sm\:mt-0{margin-top:0}.sm\:hidden{display:none}.sm\:h-\[80vh\]{height:80vh}.sm\:h-full{height:100%}.sm\:max-h-\[500px\]{max-height:500px}.sm\:max-h-\[600px\]{max-height:600px}.sm\:max-h-\[700px\]{max-height:700px}.sm\:max-h-\[800px\]{max-height:800px}.sm\:w-48{width:12rem}.sm\:w-\[480px\]{width:480px}.sm\:w-\[540px\]{width:540px}.sm\:w-\[90vw\]{width:90vw}.sm\:w-full{width:100%}.sm\:max-w-72{max-width:18rem}.sm\:max-w-\[1025px\]{max-width:1025px}.sm\:max-w-\[425px\]{max-width:425px}.sm\:max-w-\[700px\]{max-width:700px}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:translate-y-5{--tw-translate-y: 1.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))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-6{gap:1.5rem}.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\: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)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:bottom-0{bottom:0}.md\:right-auto{right:auto}.md\:col-span-1{grid-column:span 1 / span 1}.md\:ml-14{margin-left:3.5rem}.md\:ml-64{margin-left:16rem}.md\:block{display:block}.md\:inline-flex{display:inline-flex}.md\:hidden{display:none}.md\:h-svh{height:100svh}.md\:max-h-screen{max-height:100vh}.md\:w-14{width:3.5rem}.md\:w-32{width:8rem}.md\:w-64{width:16rem}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[31rem\]{max-width:31rem}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:overflow-y-hidden{overflow-y:hidden}.md\:border-none{border-style:none}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\:pt-0{padding-top:0}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.after\:md\:block:after{content:var(--tw-content);display:block}}@media (min-width: 1024px){.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-1\/5{width:20%}.lg\:w-\[250px\]{width:250px}.lg\:max-w-none{max-width:none}.lg\:max-w-xl{max-width:36rem}.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\:flex-row{flex-direction:row}.lg\:flex-col{flex-direction:column}.lg\:gap-8{gap:2rem}.lg\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(3rem * var(--tw-space-x-reverse));margin-left:calc(3rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.lg\: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))}.lg\:p-8{padding:2rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}}@media (min-width: 1280px){.xl\:mr-2{margin-right:.5rem}.xl\:flex{display:flex}.xl\:inline-flex{display:inline-flex}.xl\:h-10{height:2.5rem}.xl\:w-60{width:15rem}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:justify-start{justify-content:flex-start}.xl\:px-3{padding-left:.75rem;padding-right:.75rem}.xl\:py-2{padding-top:.5rem;padding-bottom:.5rem}}.\[\&\:\:-webkit-calendar-picker-indicator\]\:hidden::-webkit-calendar-picker-indicator{display:none}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent) / .5)}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\: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))}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>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))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:invisible svg{visibility:hidden}.\[\&_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} +*,: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{--header-height: 4rem;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%}.collapsibleDropdown{overflow:hidden}.collapsibleDropdown[data-state=open]{animation:slideDown .2s ease-out}.collapsibleDropdown[data-state=closed]{animation:slideUp .2s ease-out}@keyframes slideDown{0%{height:0}to{height:var(--radix-collapsible-content-height)}}@keyframes slideUp{0%{height:var(--radix-collapsible-content-height)}to{height:0}}*{border-color:hsl(var(--border))}body{min-height:100svh;width:100%;background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.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}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-right-5{right:-1.25rem}.-top-1\/2{top:-50%}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-4{left:1rem}.left-5{left:1.25rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-1\.5{right:.375rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-5{right:1.25rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-4{top:1rem}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[1\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.-m-0\.5{margin:-.125rem}.m-1{margin:.25rem}.m-auto{margin:auto}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-3{margin-left:-.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[16\/9\]{aspect-ratio:16/9}.aspect-square{aspect-ratio:1 / 1}.size-10{width:2.5rem;height:2.5rem}.size-2\.5{width:.625rem;height:.625rem}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-0{height:0px}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.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-\[180px\]{height:180px}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[300px\]{height:300px}.h-\[400px\]{height:400px}.h-\[90vh\]{height:90vh}.h-\[calc\(100\%-var\(--header-height\)\)\]{height:calc(100% - var(--header-height))}.h-\[calc\(100vh-280px\)\]{height:calc(100vh - 280px)}.h-\[var\(--header-height\)\]{height:var(--header-height)}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-0{max-height:0px}.max-h-12{max-height:3rem}.max-h-96{max-height:24rem}.max-h-\[300px\]{max-height:300px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[95\%\]{max-height:95%}.max-h-screen{max-height:100vh}.min-h-10{min-height:2.5rem}.min-h-6{min-height:1.5rem}.min-h-\[120px\]{min-height:120px}.min-h-\[200px\]{min-height:200px}.min-h-\[60px\]{min-height:60px}.w-0{width:0px}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/3{width:66.666667%}.w-28{width:7rem}.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-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[100px\]{width:100px}.w-\[120px\]{width:120px}.w-\[140px\]{width:140px}.w-\[150px\]{width:150px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-\[250px\]{width:250px}.w-\[300px\]{width:300px}.w-\[400px\]{width:400px}.w-\[50px\]{width:50px}.w-\[70px\]{width:70px}.w-\[80px\]{width:80px}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-0{min-width:0px}.min-w-20{min-width:5rem}.min-w-\[10em\]{min-width:10em}.min-w-\[300px\]{min-width:300px}.min-w-\[40px\]{min-width:40px}.min-w-\[4rem\]{min-width:4rem}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-32{max-width:8rem}.max-w-4xl{max-width:56rem}.max-w-52{max-width:13rem}.max-w-80{max-width:20rem}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[300px\]{max-width:300px}.max-w-\[500px\]{max-width:500px}.max-w-\[60\%\]{max-width:60%}.max-w-\[600px\]{max-width:600px}.max-w-\[90\%\]{max-width:90%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-none{max-width:none}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-\[1\.2\]{flex:1.2}.flex-\[1\]{flex:1}.flex-\[2\]{flex:2}.flex-\[4\]{flex:4}.flex-\[5\]{flex:5}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-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-full{--tw-translate-x: -100%;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-1\/2{--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))}.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-full{--tw-translate-x: 100%;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-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))}.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))}.-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))}.-rotate-90{--tw-rotate: -90deg;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))}.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))}.rotate-45{--tw-rotate: 45deg;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))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;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))}.scale-125{--tw-scale-x: 1.25;--tw-scale-y: 1.25;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 bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@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-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance: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-\[100px_1fr\]{grid-template-columns:100px 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.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-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-0\.5{row-gap:.125rem}.gap-y-2{row-gap:.5rem}.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-2\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.625rem * var(--tw-space-x-reverse));margin-left:calc(.625rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * 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-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-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-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))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-wrap{text-wrap:wrap}.text-nowrap{text-wrap:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.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-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-l-lg{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius)}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-lg{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-bl-none{border-bottom-left-radius:0}.rounded-br-none{border-bottom-right-radius:0}.rounded-tl-lg{border-top-left-radius:var(--radius)}.rounded-tl-none{border-top-left-radius:0}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-tr-lg{border-top-right-radius:var(--radius)}.rounded-tr-none{border-top-right-radius:0}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-500\/50{border-color:#3b82f680}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-foreground\/10{border-color:hsl(var(--foreground) / .1)}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-muted-foreground\/25{border-color:hsl(var(--muted-foreground) / .25)}.border-orange-500\/50{border-color:#f9731680}.border-primary{border-color:hsl(var(--primary))}.border-primary\/40{border-color:hsl(var(--primary) / .4)}.border-primary\/50{border-color:hsl(var(--primary) / .5)}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-l-slate-500{--tw-border-opacity: 1;border-left-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-r-muted{border-right-color:hsl(var(--muted))}.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{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.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-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-destructive\/15{background-color:hsl(var(--destructive) / .15)}.bg-destructive\/80{background-color:hsl(var(--destructive) / .8)}.bg-emerald-500\/80{background-color:#10b981cc}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / 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-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / 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\/70{background-color:#22c55eb3}.bg-inherit{background-color:inherit}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/50{background-color:hsl(var(--secondary) / .5)}.bg-slate-100\/80{background-color:#f1f5f9cc}.bg-transparent{background-color:transparent}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/80{background-color:#eab308cc}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-background\/95{--tw-gradient-from: hsl(var(--background) / .95) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-background\/80{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background) / .8) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-background\/60{--tw-gradient-to: hsl(var(--background) / .6) var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-primary{fill:hsl(var(--primary))}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.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-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.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-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}.pb-0\.5{padding-bottom:.125rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-4{padding-right:1rem}.pr-7{padding-right:1.75rem}.pr-8{padding-right:2rem}.pr-9{padding-right:2.25rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.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-\[0\.625rem\]{font-size:.625rem}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[7rem\]{font-size:7rem}.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-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.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-10{line-height:2.5rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / 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-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-foreground{color:hsl(var(--foreground))}.text-foreground\/70{color:hsl(var(--foreground) / .7)}.text-foreground\/90{color:hsl(var(--foreground) / .9)}.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-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/70{color:hsl(var(--muted-foreground) / .7)}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / 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-primary\/90{color:hsl(var(--primary) / .9)}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / 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-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / 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-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.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-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)}.shadow-destructive\/50{--tw-shadow-color: hsl(var(--destructive) / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-emerald-500\/50{--tw-shadow-color: rgb(16 185 129 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-500\/50{--tw-shadow-color: rgb(234 179 8 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--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)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--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)}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity, 1))}.ring-gray-300\/20{--tw-ring-color: rgb(209 213 219 / .2)}.ring-green-500\/20{--tw-ring-color: rgb(34 197 94 / .2)}.ring-primary\/20{--tw-ring-color: hsl(var(--primary) / .2)}.ring-offset-2{--tw-ring-offset-width: 2px}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.ring-offset-white{--tw-ring-offset-color: #fff}.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-\[1px\]{--tw-backdrop-blur: blur(1px);-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-\[margin\]{transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[max-height\,padding\]{transition-property:max-height,padding;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-\[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-shadow{transition-property:box-shadow;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-150{transition-delay:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.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-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.duration-700{animation-duration:.7s}.delay-100{animation-delay:.1s}.delay-150{animation-delay:.15s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html{overflow-y:scroll}.sticky{position:sticky!important;z-index:2;background-color:hsl(var(--card))}.sticky.before\:right-0:before,.sticky.before\:left-0:before{content:"";position:absolute;top:0;bottom:0;width:2px;background:linear-gradient(to right,rgba(0,0,0,.08),transparent);opacity:1;transition:opacity .3s ease}.sticky.before\:right-0:before{right:-1px;background:linear-gradient(to right,rgba(0,0,0,.08),transparent)}.sticky.before\:right-0:after{content:"";position:absolute;top:0;right:-8px;bottom:0;width:8px;pointer-events:none;background:linear-gradient(to right,rgba(0,0,0,.05),transparent)}.sticky.before\:left-0:before{left:-1px;background:linear-gradient(to left,rgba(0,0,0,.08),transparent)}.sticky.before\:left-0:after{content:"";position:absolute;top:0;left:-8px;bottom:0;width:8px;pointer-events:none;background:linear-gradient(to left,rgba(0,0,0,.05),transparent)}.sticky:hover:before{opacity:.8}.dark .sticky.before\:right-0:before,.dark .sticky.before\:left-0:before{background:linear-gradient(to right,rgba(255,255,255,.05),transparent)}.dark .sticky.before\:right-0:after,.dark .sticky.before\:left-0:after{background:linear-gradient(to right,rgba(255,255,255,.03),transparent)}.\*\:\!inline-block>*{display:inline-block!important}.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}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:bottom-0:before{content:var(--tw-content);bottom:0}.before\:left-0:before{content:var(--tw-content);left:0}.before\:right-0:before{content:var(--tw-content);right:0}.before\:top-0:before{content:var(--tw-content);top:0}.before\:w-\[1px\]:before{content:var(--tw-content);width:1px}.before\:bg-border:before{content:var(--tw-content);background-color:hsl(var(--border))}.after\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bottom-0:after{content:var(--tw-content);bottom:0}.after\:left-0:after{content:var(--tw-content);left:0}.after\:hidden:after{content:var(--tw-content);display:none}.after\:h-32:after{content:var(--tw-content);height:8rem}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:bg-\[linear-gradient\(180deg\,_transparent_10\%\,_hsl\(var\(--background\)\)_70\%\)\]:after{content:var(--tw-content);background-image:linear-gradient(180deg,transparent 10%,hsl(var(--background)) 70%)}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.focus-within\:ring-1:focus-within{--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-within\:ring-ring:focus-within{--tw-ring-color: hsl(var(--ring))}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:rotate-180:hover{--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))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-background:hover{background-color:hsl(var(--background))}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity, 1))}.hover\:bg-card\/80:hover{background-color:hsl(var(--card) / .8)}.hover\:bg-destructive\/10:hover{background-color:hsl(var(--destructive) / .1)}.hover\:bg-destructive\/25:hover{background-color:hsl(var(--destructive) / .25)}.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-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-inherit:hover{background-color:inherit}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-muted\/60:hover{background-color:hsl(var(--muted) / .6)}.hover\:bg-muted\/70:hover{background-color:hsl(var(--muted) / .7)}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary-foreground\/10:hover{background-color:hsl(var(--secondary-foreground) / .1)}.hover\:bg-secondary\/70:hover{background-color:hsl(var(--secondary) / .7)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-slate-200\/80:hover{background-color:#e2e8f0cc}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-yellow-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.hover\:bg-opacity-80:hover{--tw-bg-opacity: .8}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-foreground\/70:hover{color:hsl(var(--foreground) / .7)}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary) / .8)}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-lg:hover{--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)}.hover\:shadow-md:hover{--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)}.hover\:shadow-black\/30:hover{--tw-shadow-color: rgb(0 0 0 / .3);--tw-shadow: var(--tw-shadow-colored)}.hover\:ring-primary:hover{--tw-ring-color: hsl(var(--primary))}.focus\:z-10:focus{z-index:10}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-primary:focus{background-color:hsl(var(--primary))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-destructive:focus{color:hsl(var(--destructive))}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.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-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-primary:focus-visible{--tw-ring-color: hsl(var(--primary))}.focus-visible\:ring-red-500:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;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))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:via-background\/90{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background) / .9) var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-background\/70{--tw-gradient-to: hsl(var(--background) / .7) var(--tw-gradient-to-position)}.group\/id:hover .group-hover\/id\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group[data-collapsed=true] .group-\[\[data-collapsed\=true\]\]\:justify-center{justify-content:center}.group[data-collapsed=true] .group-\[\[data-collapsed\=true\]\]\:px-2{padding-left:.5rem;padding-right:.5rem}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.has-\[\:focus-visible\]\:outline-none:has(:focus-visible){outline:2px solid transparent;outline-offset:2px}.has-\[\:focus-visible\]\:ring-1:has(: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)}.has-\[\:focus-visible\]\:ring-neutral-950:has(:focus-visible){--tw-ring-opacity: 1;--tw-ring-color: rgb(10 10 10 / var(--tw-ring-opacity, 1))}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent) / .5)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.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-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 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))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--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))}@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-\[state\=dragging\]\:cursor-grabbing[data-state=dragging]{cursor:grabbing}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent) / .5)}.data-\[disabled\]\:bg-muted-foreground[data-disabled],.data-\[fixed\]\:bg-muted-foreground[data-fixed]{background-color:hsl(var(--muted-foreground))}.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-accent\/50[data-state=open]{background-color:hsl(var(--accent) / .5)}.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-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[collapsed\=true\]\:py-2[data-collapsed=true]{padding-top:.5rem;padding-bottom:.5rem}.data-\[disabled\]\:text-muted[data-disabled],.data-\[fixed\]\:text-muted[data-fixed]{color:hsl(var(--muted))}.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\=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-\[state\=closed\]\:duration-300[data-state=closed],.data-\[state\=open\]\:duration-300[data-state=open]{transition-duration:.3s}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{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-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden]{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-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity: 0}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed],.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale: .9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem}.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]{--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\=closed\]\:duration-300[data-state=closed],.data-\[state\=open\]\:duration-300[data-state=open]{animation-duration:.3s}.data-\[disabled\]\:hover\:bg-muted-foreground:hover[data-disabled],.data-\[fixed\]\:hover\:bg-muted-foreground:hover[data-fixed]{background-color:hsl(var(--muted-foreground))}.group[data-state=open] .group-data-\[state\=\"open\"\]\:-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-state=open] .group-data-\[state\=open\]\: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))}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-green-500\/10:is(.dark *){background-color:#22c55e1a}.dark\:bg-red-500\/10:is(.dark *){background-color:#ef44441a}.dark\:bg-red-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-500\/10:is(.dark *){background-color:#eab3081a}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:ring-gray-700:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity, 1))}.dark\:ring-gray-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity, 1))}.dark\:placeholder\:text-gray-500:is(.dark *)::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:placeholder\:text-gray-500:is(.dark *)::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-blue-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-red-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:has-\[\:focus-visible\]\:ring-neutral-300:has(:focus-visible):is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(212 212 212 / var(--tw-ring-opacity, 1))}@media (min-width: 640px){.sm\:absolute{position:absolute}.sm\:inset-auto{inset:auto}.sm\:bottom-\[calc\(100\%\+10px\)\]{bottom:calc(100% + 10px)}.sm\:left-0{left:0}.sm\:right-0{right:0}.sm\:my-0{margin-top:0;margin-bottom:0}.sm\:my-4{margin-top:1rem;margin-bottom:1rem}.sm\:mt-0{margin-top:0}.sm\:hidden{display:none}.sm\:h-\[80vh\]{height:80vh}.sm\:h-full{height:100%}.sm\:max-h-\[500px\]{max-height:500px}.sm\:max-h-\[600px\]{max-height:600px}.sm\:max-h-\[700px\]{max-height:700px}.sm\:max-h-\[800px\]{max-height:800px}.sm\:w-48{width:12rem}.sm\:w-\[480px\]{width:480px}.sm\:w-\[540px\]{width:540px}.sm\:w-\[90vw\]{width:90vw}.sm\:w-full{width:100%}.sm\:max-w-72{max-width:18rem}.sm\:max-w-\[1025px\]{max-width:1025px}.sm\:max-w-\[425px\]{max-width:425px}.sm\:max-w-\[700px\]{max-width:700px}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:translate-y-5{--tw-translate-y: 1.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))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-6{gap:1.5rem}.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\: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)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:bottom-0{bottom:0}.md\:right-auto{right:auto}.md\:col-span-1{grid-column:span 1 / span 1}.md\:ml-14{margin-left:3.5rem}.md\:ml-64{margin-left:16rem}.md\:block{display:block}.md\:inline-flex{display:inline-flex}.md\:hidden{display:none}.md\:h-svh{height:100svh}.md\:max-h-screen{max-height:100vh}.md\:w-14{width:3.5rem}.md\:w-32{width:8rem}.md\:w-64{width:16rem}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[31rem\]{max-width:31rem}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:overflow-y-hidden{overflow-y:hidden}.md\:border-none{border-style:none}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\:pt-0{padding-top:0}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.after\:md\:block:after{content:var(--tw-content);display:block}}@media (min-width: 1024px){.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-1\/5{width:20%}.lg\:w-\[250px\]{width:250px}.lg\:max-w-none{max-width:none}.lg\:max-w-xl{max-width:36rem}.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\:flex-row{flex-direction:row}.lg\:flex-col{flex-direction:column}.lg\:gap-8{gap:2rem}.lg\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(3rem * var(--tw-space-x-reverse));margin-left:calc(3rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.lg\: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))}.lg\:p-8{padding:2rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}}@media (min-width: 1280px){.xl\:mr-2{margin-right:.5rem}.xl\:flex{display:flex}.xl\:inline-flex{display:inline-flex}.xl\:h-10{height:2.5rem}.xl\:w-60{width:15rem}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:justify-start{justify-content:flex-start}.xl\:px-3{padding-left:.75rem;padding-right:.75rem}.xl\:py-2{padding-top:.5rem;padding-bottom:.5rem}}.\[\&\:\:-webkit-calendar-picker-indicator\]\:hidden::-webkit-calendar-picker-indicator{display:none}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent) / .5)}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\: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))}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>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))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:invisible svg{visibility:hidden}.\[\&_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} diff --git a/public/assets/admin/assets/index.js b/public/assets/admin/assets/index.js index a02dec8..83c5016 100644 --- a/public/assets/admin/assets/index.js +++ b/public/assets/admin/assets/index.js @@ -1,9 +1,63 @@ -import{r as m,j as e,t as ol,c as il,I as _a,a as Ts,S as Xt,u as is,b as ea,d as cl,O as sa,e as dl,f as q,g as ml,h as ul,i as xl,k as hl,B as fl,l as pl,m as gl,Q as jl,n as vl,R as bl,o as yl,P as Nl,p as _l,q as wl,s as Ua,F as Cl,C as Sl,v as kl,w as Dl,x as Tl,y as Pl,z as Rl,A as h,D as Ba,E as ce,G as ue,H as Ga,J as St,K as kt,L as ta,M as Oe,T as Dt,N as Tt,U as Wa,V as Ya,W as El,X as Vl,Y as Il,Z as Fl,_ as Ja,$ as aa,a0 as Qa,a1 as Ml,a2 as Za,a3 as Xa,a4 as en,a5 as sn,a6 as Ps,a7 as tn,a8 as Ol,a9 as an,aa as nn,ab as zl,ac as Ll,ad as Al,ae as $l,af as rn,ag as ql,ah as Hl,ai as I,aj as Rs,ak as ln,al as Kl,am as Ul,an as on,ao as Bl,ap as Gl,aq as wa,ar as Wl,as as cn,at as Yl,au as dn,av as Jl,aw as Ql,ax as Zl,ay as Xl,az as eo,aA as so,aB as mn,aC as to,aD as ao,aE as no,aF as Se,aG as ro,aH as lo,aI as oo,aJ as io,aK as co,aL as mo,aM as un,aN as xn,aO as hn,aP as uo,aQ as fn,aR as pn,aS as gn,aT as xo,aU as ho,aV as fo,aW as jn,aX as po,aY as na,aZ as vn,a_ as go,a$ as bn,b0 as jo,b1 as yn,b2 as vo,b3 as Nn,b4 as _n,b5 as bo,b6 as yo,b7 as wn,b8 as No,b9 as _o,ba as Cn,bb as wo,bc as Sn,bd as Co,be as So,bf as qe,bg as se,bh as $e,bi as it,bj as ko,bk as Do,bl as To,bm as Po,bn as Ro,bo as Eo,bp as Ca,bq as Sa,br as Vo,bs as Io,bt as Fo,bu as Mo,bv as Oo,bw as Ht,bx as Kt,by as zo,bz as Lo,bA as kn,bB as Ao,bC as $o,bD as Dn,bE as qo,bF as pe,bG as Ho,bH as ka,bI as Ut,bJ as Bt,bK as Ko,bL as Uo,bM as Tn,bN as Bo,bO as ra,bP as Go,bQ as Wo,bR as Yo,bS as Pn,bT as Rn,bU as En,bV as Jo,bW as Qo,bX as Zo,bY as Xo,bZ as Vn,b_ as ei,b$ as es,c0 as si,c1 as ti,c2 as ai,c3 as bt,c4 as Ne,c5 as Da,c6 as ni,c7 as In,c8 as Fn,c9 as Mn,ca as On,cb as zn,cc as Ln,cd as ri,ce as li,cf as oi,cg as Pt,ch as Es,ci as cs,cj as ze,ck as Le,cl as Ue,cm as Be,cn as Ge,co as ii,cp as ci,cq as di,cr as Gt,cs as la,ct as oa,cu as mi,cv as ds,cw as ms,cx as ct,cy as ui,cz as yt,cA as xi,cB as Ta,cC as An,cD as Pa,cE as Nt,cF as hi,cG as fi,cH as pi,cI as gi,cJ as $n,cK as ji,cL as vi,cM as qn,cN as Wt,cO as Hn,cP as bi,cQ as Kn,cR as Un,cS as yi,cT as Ni,cU as _i,cV as wi,cW as Ci}from"./vendor.js";import"./index.js";var Ch=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Si(s){if(s.__esModule)return s;var n=s.default;if(typeof n=="function"){var a=function l(){return this instanceof l?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(s).forEach(function(l){var r=Object.getOwnPropertyDescriptor(s,l);Object.defineProperty(a,l,r.get?r:{enumerable:!0,get:function(){return s[l]}})}),a}const ki={theme:"system",setTheme:()=>null},Bn=m.createContext(ki);function Di({children:s,defaultTheme:n="system",storageKey:a="vite-ui-theme",...l}){const[r,c]=m.useState(()=>localStorage.getItem(a)||n);m.useEffect(()=>{const u=window.document.documentElement;if(u.classList.remove("light","dark"),r==="system"){const x=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";u.classList.add(x);return}u.classList.add(r)},[r]);const i={theme:r,setTheme:u=>{localStorage.setItem(a,u),c(u)}};return e.jsx(Bn.Provider,{...l,value:i,children:s})}const Ti=()=>{const s=m.useContext(Bn);if(s===void 0)throw new Error("useTheme must be used within a ThemeProvider");return s},Pi=function(){const n=typeof document<"u"&&document.createElement("link").relList;return n&&n.supports&&n.supports("modulepreload")?"modulepreload":"preload"}(),Ri=function(s,n){return new URL(s,n).href},Ra={},oe=function(n,a,l){let r=Promise.resolve();if(a&&a.length>0){const i=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),x=u?.nonce||u?.getAttribute("nonce");r=Promise.allSettled(a.map(o=>{if(o=Ri(o,l),o in Ra)return;Ra[o]=!0;const d=o.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(!!l)for(let f=i.length-1;f>=0;f--){const _=i[f];if(_.href===o&&(!d||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${p}`))return;const V=document.createElement("link");if(V.rel=d?"stylesheet":Pi,d||(V.as="script"),V.crossOrigin="",V.href=o,x&&V.setAttribute("nonce",x),document.head.appendChild(V),d)return new Promise((f,_)=>{V.addEventListener("load",f),V.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${o}`)))})}))}function c(i){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=i,window.dispatchEvent(u),!u.defaultPrevented)throw i}return r.then(i=>{for(const u of i||[])u.status==="rejected"&&c(u.reason);return n().catch(c)})};function y(...s){return ol(il(s))}const Hs=Ts("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{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"}}),R=m.forwardRef(({className:s,variant:n,size:a,asChild:l=!1,children:r,disabled:c,loading:i=!1,leftSection:u,rightSection:x,...o},d)=>{const p=l?Xt:"button";return e.jsxs(p,{className:y(Hs({variant:n,size:a,className:s})),disabled:i||c,ref:d,...o,children:[(u&&i||!u&&!x&&i)&&e.jsx(_a,{className:"mr-2 h-4 w-4 animate-spin"}),!i&&u&&e.jsx("div",{className:"mr-2",children:u}),r,!i&&x&&e.jsx("div",{className:"ml-2",children:x}),x&&i&&e.jsx(_a,{className:"ml-2 h-4 w-4 animate-spin"})]})});R.displayName="Button";function Os({className:s,minimal:n=!1}){const a=is();return e.jsx("div",{className:y("h-svh w-full",s),children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[!n&&e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"500"}),e.jsxs("span",{className:"font-medium",children:["Oops! Something went wrong ",":')"]}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["We apologize for the inconvenience. ",e.jsx("br",{})," Please try again later."]}),!n&&e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(R,{variant:"outline",onClick:()=>a(-1),children:"Go Back"}),e.jsx(R,{onClick:()=>a("/"),children:"Back to Home"})]})]})})}function Ea(){const s=is();return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"404"}),e.jsx("span",{className:"font-medium",children:"Oops! Page Not Found!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["It seems like the page you're looking for ",e.jsx("br",{}),"does not exist or might have been removed."]}),e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(R,{variant:"outline",onClick:()=>s(-1),children:"Go Back"}),e.jsx(R,{onClick:()=>s("/"),children:"Back to Home"})]})]})})}function Ei(){return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"503"}),e.jsx("span",{className:"font-medium",children:"Website is under maintenance!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["The site is not available at the moment. ",e.jsx("br",{}),"We'll be back online shortly."]}),e.jsx("div",{className:"mt-6 flex gap-4",children:e.jsx(R,{variant:"outline",children:"Learn more"})})]})})}function Vi(s){return typeof s>"u"}function Ii(s){return s===null}function Fi(s){return Ii(s)||Vi(s)}class Mi{storage;prefixKey;constructor(n){this.storage=n.storage,this.prefixKey=n.prefixKey}getKey(n){return`${this.prefixKey}${n}`.toUpperCase()}set(n,a,l=null){const r=JSON.stringify({value:a,time:Date.now(),expire:l!==null?new Date().getTime()+l*1e3:null});this.storage.setItem(this.getKey(n),r)}get(n,a=null){const l=this.storage.getItem(this.getKey(n));if(!l)return{value:a,time:0};try{const r=JSON.parse(l),{value:c,time:i,expire:u}=r;return Fi(u)||u>new Date().getTime()?{value:c,time:i}:(this.remove(n),{value:a,time:0})}catch{return this.remove(n),{value:a,time:0}}}remove(n){this.storage.removeItem(this.getKey(n))}clear(){this.storage.clear()}}function Gn({prefixKey:s="",storage:n=sessionStorage}){return new Mi({prefixKey:s,storage:n})}const Wn="Xboard_",Oi=function(s={}){return Gn({prefixKey:s.prefixKey||"",storage:localStorage})},zi=function(s={}){return Gn({prefixKey:s.prefixKey||"",storage:sessionStorage})},Rt=Oi({prefixKey:Wn});zi({prefixKey:Wn});const Yn="access_token";function st(){return Rt.get(Yn)}function Jn(){Rt.remove(Yn)}const Va=["/sign-in","/sign-in-2","/sign-up","/forgot-password","/otp"];function Li({children:s}){const n=is(),a=ea(),l=st();return m.useEffect(()=>{if(!l.value&&!Va.includes(a.pathname)){const r=encodeURIComponent(a.pathname+a.search);n(`/sign-in?redirect=${r}`)}},[l.value,a.pathname,a.search,n]),Va.includes(a.pathname)||l.value?e.jsx(e.Fragment,{children:s}):null}const Ai=()=>e.jsx(Li,{children:e.jsx(sa,{})}),$i=cl([{path:"/sign-in",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>cc);return{default:s}},void 0,import.meta.url)).default})},{element:e.jsx(Ai,{}),children:[{path:"/",lazy:async()=>({Component:(await oe(()=>Promise.resolve().then(()=>_c),void 0,import.meta.url)).default}),errorElement:e.jsx(Os,{}),children:[{index:!0,lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Qd);return{default:s}},void 0,import.meta.url)).default})},{path:"config",errorElement:e.jsx(Os,{}),children:[{path:"system",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>sm);return{default:s}},void 0,import.meta.url)).default}),children:[{index:!0,lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>rm);return{default:s}},void 0,import.meta.url)).default})},{path:"safe",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>dm);return{default:s}},void 0,import.meta.url)).default})},{path:"subscribe",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>fm);return{default:s}},void 0,import.meta.url)).default})},{path:"invite",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>bm);return{default:s}},void 0,import.meta.url)).default})},{path:"frontend",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Cm);return{default:s}},void 0,import.meta.url)).default})},{path:"server",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Pm);return{default:s}},void 0,import.meta.url)).default})},{path:"email",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Fm);return{default:s}},void 0,import.meta.url)).default})},{path:"telegram",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Am);return{default:s}},void 0,import.meta.url)).default})},{path:"APP",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Um);return{default:s}},void 0,import.meta.url)).default})}]},{path:"payment",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>au);return{default:s}},void 0,import.meta.url)).default})},{path:"theme",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>ou);return{default:s}},void 0,import.meta.url)).default})},{path:"notice",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>hu);return{default:s}},void 0,import.meta.url)).default})},{path:"knowledge",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Nu);return{default:s}},void 0,import.meta.url)).default})}]},{path:"server",errorElement:e.jsx(Os,{}),children:[{path:"manage",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Gu);return{default:s}},void 0,import.meta.url)).default})},{path:"group",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Zu);return{default:s}},void 0,import.meta.url)).default})},{path:"route",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>nx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"finance",errorElement:e.jsx(Os,{}),children:[{path:"plan",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>xx);return{default:s}},void 0,import.meta.url)).default})},{path:"order",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>kx);return{default:s}},void 0,import.meta.url)).default})},{path:"coupon",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Mx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"user",errorElement:e.jsx(Os,{}),children:[{path:"manage",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>rh);return{default:s}},void 0,import.meta.url)).default})},{path:"ticket",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Nh);return{default:s}},void 0,import.meta.url)).default})}]}]}]},{path:"/500",Component:Os},{path:"/404",Component:Ea},{path:"/503",Component:Ei},{path:"*",Component:Ea}]),qi="locale";function Hi(){return Rt.get(qi)}function Qn(){Jn();const s=window.location.pathname,n=s&&!["/404","/sign-in"].includes(s),a=new URL(window.location.href),r=`${a.pathname.split("/")[1]?`/${a.pathname.split("/")[1]}`:""}#/sign-in`;window.location.href=r+(n?`?redirect=${s}`:"")}const Ki=["/passport/auth/login","/passport/auth/token2Login","/passport/auth/register","/guest/comm/config","/passport/comm/sendEmailVerify","/passport/auth/forget"];function Ui(){const s=window.settings?.base_url||"/";return s.endsWith("/")?s+"api/v2":s+"/api/v2"}const O=dl.create({baseURL:Ui(),timeout:12e3,headers:{"Content-Type":"application/json"}});O.interceptors.request.use(s=>{s.method?.toLowerCase()==="get"&&(s.params={...s.params,t:Date.now()});const n=st();if(!Ki.includes(s.url?.split("?")[0]||"")){if(!n.value)return Qn(),Promise.reject({code:-1,message:"未登录"});s.headers.Authorization=n.value}return s.headers["Content-Language"]=Hi().value||"zh-CN",s},s=>Promise.reject(s));O.interceptors.response.use(s=>s?.data||{code:-1,message:"未知错误"},s=>{const n=s.response?.status,a=s.response?.data?.message;return(n===401||n===403)&&Qn(),q.error(a||{401:"登录已过期",403:"没有权限",404:"资源或接口不存在"}[n]||"未知异常"),Promise.reject(s.response?.data||{data:null,code:-1,message:"未知错误"})});function Bi(){return O.get("/user/info")}const Ot={token:st()?.value||"",userInfo:null,isLoggedIn:!!st()?.value,loading:!1,error:null},Xs=ml("user/fetchUserInfo",async()=>(await Bi()).data,{condition:(s,{getState:n})=>{const{user:a}=n();return!!a.token&&!a.loading}}),Zn=ul({name:"user",initialState:Ot,reducers:{setToken(s,n){s.token=n.payload,s.isLoggedIn=!!n.payload},resetUserState:()=>Ot},extraReducers:s=>{s.addCase(Xs.pending,n=>{n.loading=!0,n.error=null}).addCase(Xs.fulfilled,(n,a)=>{n.loading=!1,n.userInfo=a.payload,n.error=null}).addCase(Xs.rejected,(n,a)=>{if(n.loading=!1,n.error=a.error.message||"Failed to fetch user info",!n.token)return Ot})}}),{setToken:Gi,resetUserState:Wi}=Zn.actions,Yi=s=>s.user.userInfo,Ji=Zn.reducer,Xn=xl({reducer:{user:Ji}});st()?.value&&Xn.dispatch(Xs());const Qi=()=>{const s=document.querySelector('script[src*="assets/index"]');if(s){const n=s.getAttribute("src")||"",a=n.lastIndexOf("/assets/");if(a!==-1)return n.substring(0,a+1)}return"./"};hl.use(fl).use(pl).use(gl).init({fallbackLng:"en",supportedLngs:["en","zh"],ns:["common","dashboard","search","nav","sidebar","server","subscribe","order"],defaultNS:"common",fallbackNS:"common",detection:{order:["localStorage","navigator"],caches:["localStorage"]},interpolation:{escapeValue:!1},backend:{loadPath:`${Qi()}locales/{{lng}}/{{ns}}.json`,allowMultiLoading:!1},load:"languageOnly",caches:["localStorage"],cacheTTL:7*24*60*60*1e3,react:{useSuspense:!1}});const Zi=new jl;vl.createRoot(document.getElementById("root")).render(e.jsx(bl.StrictMode,{children:e.jsx(yl,{client:Zi,children:e.jsx(Nl,{store:Xn,children:e.jsxs(Di,{defaultTheme:"light",storageKey:"vite-ui-theme",children:[e.jsx(_l,{router:$i}),e.jsx(wl,{richColors:!0,position:"top-right"})]})})})}));const Ke=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("rounded-xl border bg-card text-card-foreground shadow",s),...n}));Ke.displayName="Card";const ss=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex flex-col space-y-1.5 p-6",s),...n}));ss.displayName="CardHeader";const bs=m.forwardRef(({className:s,...n},a)=>e.jsx("h3",{ref:a,className:y("font-semibold leading-none tracking-tight",s),...n}));bs.displayName="CardTitle";const tt=m.forwardRef(({className:s,...n},a)=>e.jsx("p",{ref:a,className:y("text-sm text-muted-foreground",s),...n}));tt.displayName="CardDescription";const ts=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("p-6 pt-0",s),...n}));ts.displayName="CardContent";const Xi=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex items-center p-6 pt-0",s),...n}));Xi.displayName="CardFooter";const ec=Ts("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),_t=m.forwardRef(({className:s,...n},a)=>e.jsx(Ua,{ref:a,className:y(ec(),s),...n}));_t.displayName=Ua.displayName;const xe=Cl,er=m.createContext({}),j=({...s})=>e.jsx(er.Provider,{value:{name:s.name},children:e.jsx(Sl,{...s})}),Et=()=>{const s=m.useContext(er),n=m.useContext(sr),{getFieldState:a,formState:l}=kl(),r=a(s.name,l);if(!s)throw new Error("useFormField should be used within ");const{id:c}=n;return{id:c,name:s.name,formItemId:`${c}-form-item`,formDescriptionId:`${c}-form-item-description`,formMessageId:`${c}-form-item-message`,...r}},sr=m.createContext({}),g=m.forwardRef(({className:s,...n},a)=>{const l=m.useId();return e.jsx(sr.Provider,{value:{id:l},children:e.jsx("div",{ref:a,className:y("space-y-2",s),...n})})});g.displayName="FormItem";const v=m.forwardRef(({className:s,...n},a)=>{const{error:l,formItemId:r}=Et();return e.jsx(_t,{ref:a,className:y(l&&"text-destructive",s),htmlFor:r,...n})});v.displayName="FormLabel";const N=m.forwardRef(({...s},n)=>{const{error:a,formItemId:l,formDescriptionId:r,formMessageId:c}=Et();return e.jsx(Xt,{ref:n,id:l,"aria-describedby":a?`${r} ${c}`:`${r}`,"aria-invalid":!!a,...s})});N.displayName="FormControl";const F=m.forwardRef(({className:s,...n},a)=>{const{formDescriptionId:l}=Et();return e.jsx("p",{ref:a,id:l,className:y("text-[0.8rem] text-muted-foreground",s),...n})});F.displayName="FormDescription";const P=m.forwardRef(({className:s,children:n,...a},l)=>{const{error:r,formMessageId:c}=Et(),i=r?String(r?.message):n;return i?e.jsx("p",{ref:l,id:c,className:y("text-[0.8rem] font-medium text-destructive",s),...a,children:i}):null});P.displayName="FormMessage";const T=m.forwardRef(({className:s,type:n,...a},l)=>e.jsx("input",{type:n,className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:l,...a}));T.displayName="Input";const tr=m.forwardRef(({className:s,...n},a)=>{const[l,r]=m.useState(!1);return e.jsxs("div",{className:"relative rounded-md",children:[e.jsx("input",{type:l?"text":"password",className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...n}),e.jsx(R,{type:"button",size:"icon",variant:"ghost",className:"absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 rounded-md text-muted-foreground",onClick:()=>r(c=>!c),children:l?e.jsx(Dl,{size:18}):e.jsx(Tl,{size:18})})]})});tr.displayName="PasswordInput";const sc=s=>O({url:"/passport/auth/login",method:"post",data:s}),Yt=s=>s;function me(s=void 0,n="YYYY-MM-DD HH:mm:ss"){return s==null?"":(Math.floor(s).toString().length===10&&(s=s*1e3),Rl(s).format(n))}function tc(s=void 0,n="YYYY-MM-DD"){return me(s,n)}function As(s){const n=typeof s=="string"?parseFloat(s):s;return isNaN(n)?"0.00":n.toFixed(2)}function ks(s,n=!0){if(s==null)return n?"¥0.00":"0.00";const a=typeof s=="string"?parseFloat(s):s;if(isNaN(a))return n?"¥0.00":"0.00";const r=(a/100).toFixed(2).replace(/\.?0+$/,c=>c.includes(".")?".00":c);return n?`¥${r}`:r}function wt(s){navigator.clipboard?navigator.clipboard.writeText(s).then(()=>{q.success(Yt("复制成功"))}).catch(n=>{console.error("复制到剪贴板时出错:",n),Ia(s)}):Ia(s)}function Ia(s){const n=document.createElement("button"),a=new Pl(n,{text:()=>s});a.on("success",()=>{q.success(Yt("复制成功")),a.destroy()}),a.on("error",()=>{q.error(Yt("复制失败")),a.destroy()}),n.click()}function Ze(s){const n=s/1024,a=n/1024,l=a/1024,r=l/1024;return r>=1?As(r)+" TB":l>=1?As(l)+" GB":a>=1?As(a)+" MB":As(n)+" KB"}const ac="access_token";function nc(s){Rt.set(ac,s)}const rc=h.object({email:h.string().min(1,{message:"请输入邮箱地址"}).email({message:"邮箱地址格式不正确"}),password:h.string().min(1,{message:"请输入密码"}).min(7,{message:"密码长度至少为7个字符"})});function lc({className:s,onForgotPassword:n,...a}){const l=is(),r=Ba(),c=ce({resolver:ue(rc),defaultValues:{email:"",password:""}});async function i(u){sc(u).then(({data:x})=>{nc(x.auth_data),r(Gi(x.auth_data)),r(Xs()).unwrap(),l("/")})}return e.jsx("div",{className:y("grid gap-6",s),...a,children:e.jsx(xe,{...c,children:e.jsx("form",{onSubmit:c.handleSubmit(i),children:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{control:c.control,name:"email",render:({field:u})=>e.jsxs(g,{className:"space-y-1",children:[e.jsx(v,{children:"邮箱地址"}),e.jsx(N,{children:e.jsx(T,{placeholder:"name@example.com",...u})}),e.jsx(P,{})]})}),e.jsx(j,{control:c.control,name:"password",render:({field:u})=>e.jsxs(g,{className:"space-y-1",children:[e.jsx(v,{children:"密码"}),e.jsx(N,{children:e.jsx(tr,{placeholder:"请输入密码",...u})}),e.jsx(P,{})]})}),e.jsx(R,{className:"mt-2",loading:c.formState.isSubmitting,children:"登录"}),e.jsx(R,{variant:"link",type:"button",className:"mt-1 text-sm text-muted-foreground hover:text-primary",onClick:n,children:"忘记密码?"})]})})})})}const ge=Ga,Fe=Wa,oc=Ya,dt=ta,ar=m.forwardRef(({className:s,...n},a)=>e.jsx(St,{ref:a,className:y("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",s),...n}));ar.displayName=St.displayName;const he=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(oc,{children:[e.jsx(ar,{}),e.jsxs(kt,{ref:l,className:y("max-h-[95%] overflow-auto 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",s),...a,children:[n,e.jsxs(ta,{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:[e.jsx(Oe,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));he.displayName=kt.displayName;const ve=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",s),...n});ve.displayName="DialogHeader";const Me=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});Me.displayName="DialogFooter";const je=m.forwardRef(({className:s,...n},a)=>e.jsx(Dt,{ref:a,className:y("text-lg font-semibold leading-none tracking-tight",s),...n}));je.displayName=Dt.displayName;const Te=m.forwardRef(({className:s,...n},a)=>e.jsx(Tt,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));Te.displayName=Tt.displayName;const qs=Ts("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_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"}}),J=m.forwardRef(({className:s,variant:n,size:a,asChild:l=!1,...r},c)=>{const i=l?Xt:"button";return e.jsx(i,{className:y(qs({variant:n,size:a,className:s})),ref:c,...r})});J.displayName="Button";function ic(){const[s,n]=m.useState(!1),a="php artisan reset:password 管理员邮箱";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"container grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0",children:e.jsxs("div",{className:"mx-auto flex w-full flex-col justify-center space-y-2 sm:w-[480px] lg:p-8",children:[e.jsx("div",{className:"mb-4 flex items-center justify-center",children:e.jsx("h1",{className:"text-3xl font-medium",children:window?.settings?.title})}),e.jsxs(Ke,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-left",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"登录"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"请输入您的邮箱和密码登录系统"})]}),e.jsx(lc,{onForgotPassword:()=>n(!0)})]})]})}),e.jsx(ge,{open:s,onOpenChange:n,children:e.jsx(he,{children:e.jsxs(ve,{children:[e.jsx(je,{children:"忘记密码"}),e.jsx(Te,{children:"在站点目录下执行以下命令找回密码"}),e.jsx("div",{className:"mt-2",children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"rounded-md bg-secondary p-4 pr-12",children:a}),e.jsx(J,{variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 hover:bg-secondary-foreground/10",onClick:()=>wt(a),children:e.jsx(El,{className:"h-4 w-4"})})]})})]})})})]})}const cc=Object.freeze(Object.defineProperty({__proto__:null,default:ic},Symbol.toStringTag,{value:"Module"})),we=m.forwardRef(({className:s,fadedBelow:n=!1,fixedHeight:a=!1,...l},r)=>e.jsx("div",{ref:r,className:y("relative flex h-full w-full flex-col",n&&"after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:hidden after:h-32 after:w-full after:bg-[linear-gradient(180deg,_transparent_10%,_hsl(var(--background))_70%)] after:md:block",a&&"md:h-svh",s),...l}));we.displayName="Layout";const Ce=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex h-[var(--header-height)] flex-none items-center gap-4 bg-background p-4 md:px-8",s),...n}));Ce.displayName="LayoutHeader";const ke=m.forwardRef(({className:s,fixedHeight:n,...a},l)=>e.jsx("div",{ref:l,className:y("flex-1 overflow-hidden px-4 py-6 md:px-8",n&&"h-[calc(100%-var(--header-height))]",s),...a}));ke.displayName="LayoutBody";const nr=Vl,rr=Il,lr=Fl,ys=zl,Ns=Ll,dc=Al,mc=m.forwardRef(({className:s,inset:n,children:a,...l},r)=>e.jsxs(Ja,{ref:r,className:y("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",s),...l,children:[a,e.jsx(aa,{className:"ml-auto h-4 w-4"})]}));mc.displayName=Ja.displayName;const uc=m.forwardRef(({className:s,...n},a)=>e.jsx(Qa,{ref:a,className:y("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",s),...n}));uc.displayName=Qa.displayName;const os=m.forwardRef(({className:s,sideOffset:n=4,...a},l)=>e.jsx(Ml,{children:e.jsx(Za,{ref:l,sideOffset:n,className:y("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",s),...a})}));os.displayName=Za.displayName;const fe=m.forwardRef(({className:s,inset:n,...a},l)=>e.jsx(Xa,{ref:l,className:y("relative flex cursor-default cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",s),...a}));fe.displayName=Xa.displayName;const xc=m.forwardRef(({className:s,children:n,checked:a,...l},r)=>e.jsxs(en,{ref:r,className:y("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",s),checked:a,...l,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(sn,{children:e.jsx(Ps,{className:"h-4 w-4"})})}),n]}));xc.displayName=en.displayName;const hc=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(tn,{ref:l,className:y("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",s),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(sn,{children:e.jsx(Ol,{className:"h-4 w-4 fill-current"})})}),n]}));hc.displayName=tn.displayName;const ia=m.forwardRef(({className:s,inset:n,...a},l)=>e.jsx(an,{ref:l,className:y("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",s),...a}));ia.displayName=an.displayName;const at=m.forwardRef(({className:s,...n},a)=>e.jsx(nn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...n}));at.displayName=nn.displayName;const Jt=({className:s,...n})=>e.jsx("span",{className:y("ml-auto text-xs tracking-widest opacity-60",s),...n});Jt.displayName="DropdownMenuShortcut";const ie=$l,re=ql,le=Hl,te=m.forwardRef(({className:s,sideOffset:n=4,...a},l)=>e.jsx(rn,{ref:l,sideOffset:n,className:y("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",s),...a}));te.displayName=rn.displayName;function Vt(){const{pathname:s}=ea();return{checkActiveNav:a=>{if(a==="/"&&s==="/")return!0;const l=a.replace(/^\//,""),r=s.replace(/^\//,"");return l?r.startsWith(l):!1}}}function or({key:s,defaultValue:n}){const[a,l]=m.useState(()=>{const r=localStorage.getItem(s);return r!==null?JSON.parse(r):n});return m.useEffect(()=>{localStorage.setItem(s,JSON.stringify(a))},[a,s]),[a,l]}function fc(){const[s,n]=or({key:"collapsed-sidebar-items",defaultValue:[]}),a=r=>!s.includes(r);return{isExpanded:a,toggleItem:r=>{a(r)?n([...s,r]):n(s.filter(c=>c!==r))}}}function pc({links:s,isCollapsed:n,className:a,closeNav:l}){const{t:r}=I(),c=({sub:i,...u})=>{const x=`${r(u.title)}-${u.href}`;return n&&i?m.createElement(vc,{...u,sub:i,key:x,closeNav:l}):n?m.createElement(jc,{...u,key:x,closeNav:l}):i?m.createElement(gc,{...u,sub:i,key:x,closeNav:l}):m.createElement(ir,{...u,key:x,closeNav:l})};return e.jsx("div",{"data-collapsed":n,className:y("group border-b bg-background py-2 transition-[max-height,padding] duration-500 data-[collapsed=true]:py-2 md:border-none",a),children:e.jsx(ie,{delayDuration:0,children:e.jsx("nav",{className:"grid gap-1 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2",children:s.map(c)})})})}function ir({title:s,icon:n,label:a,href:l,closeNav:r,subLink:c=!1}){const{checkActiveNav:i}=Vt(),{t:u}=I();return e.jsxs(Rs,{to:l,onClick:r,className:y(Hs({variant:i(l)?"secondary":"ghost",size:"sm"}),"h-12 justify-start text-wrap rounded-none px-6",c&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":i(l)?"page":void 0,children:[e.jsx("div",{className:"mr-2",children:n}),u(s),a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:u(a)})]})}function gc({title:s,icon:n,label:a,sub:l,closeNav:r}){const{checkActiveNav:c}=Vt(),{isExpanded:i,toggleItem:u}=fc(),{t:x}=I(),o=!!l?.find(D=>c(D.href)),d=x(s),p=i(d)||o;return e.jsxs(nr,{open:p,onOpenChange:()=>u(d),children:[e.jsxs(rr,{className:y(Hs({variant:o?"secondary":"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[e.jsx("div",{className:"mr-2",children:n}),x(s),a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:x(a)}),e.jsx("span",{className:y('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:e.jsx(ln,{stroke:1})})]}),e.jsx(lr,{className:"collapsibleDropdown",asChild:!0,children:e.jsx("ul",{children:l.map(D=>e.jsx("li",{className:"my-1 ml-8",children:e.jsx(ir,{...D,subLink:!0,closeNav:r})},x(D.title)))})})]})}function jc({title:s,icon:n,label:a,href:l,closeNav:r}){const{checkActiveNav:c}=Vt(),{t:i}=I();return e.jsxs(re,{delayDuration:0,children:[e.jsx(le,{asChild:!0,children:e.jsxs(Rs,{to:l,onClick:r,className:y(Hs({variant:c(l)?"secondary":"ghost",size:"icon"}),"h-12 w-12"),children:[n,e.jsx("span",{className:"sr-only",children:i(s)})]})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[i(s),a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:i(a)})]})]})}function vc({title:s,icon:n,label:a,sub:l,closeNav:r}){const{checkActiveNav:c}=Vt(),{t:i}=I(),u=!!l?.find(x=>c(x.href));return e.jsxs(ys,{children:[e.jsxs(re,{delayDuration:0,children:[e.jsx(le,{asChild:!0,children:e.jsx(Ns,{asChild:!0,children:e.jsx(R,{variant:u?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:n})})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[i(s)," ",a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:i(a)}),e.jsx(ln,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),e.jsxs(os,{side:"right",align:"start",sideOffset:4,children:[e.jsxs(ia,{children:[i(s)," ",a?`(${i(a)})`:""]}),e.jsx(at,{}),l.map(({title:x,icon:o,label:d,href:p})=>e.jsx(fe,{asChild:!0,children:e.jsxs(Rs,{to:p,onClick:r,className:`${c(p)?"bg-secondary":""}`,children:[o," ",e.jsx("span",{className:"ml-2 max-w-52 text-wrap",children:i(x)}),d&&e.jsx("span",{className:"ml-auto text-xs",children:i(d)})]})},`${i(x)}-${p}`))]})]})}const cr=[{title:"nav:dashboard",label:"",href:"/",icon:e.jsx(Kl,{size:18})},{title:"nav:systemManagement",label:"",href:"",icon:e.jsx(Ul,{size:18}),sub:[{title:"nav:systemConfig",label:"",href:"/config/system",icon:e.jsx(on,{size:18})},{title:"nav:themeConfig",label:"",href:"/config/theme",icon:e.jsx(Bl,{size:18})},{title:"nav:noticeManagement",label:"",href:"/config/notice",icon:e.jsx(Gl,{size:18})},{title:"nav:paymentConfig",label:"",href:"/config/payment",icon:e.jsx(wa,{size:18})},{title:"nav:knowledgeManagement",label:"",href:"/config/knowledge",icon:e.jsx(Wl,{size:18})}]},{title:"nav:nodeManagement",label:"",href:"",icon:e.jsx(cn,{size:18}),sub:[{title:"nav:nodeManagement",label:"",href:"/server/manage",icon:e.jsx(Yl,{size:18})},{title:"nav:permissionGroupManagement",label:"",href:"/server/group",icon:e.jsx(dn,{size:18})},{title:"nav:routeManagement",label:"",href:"/server/route",icon:e.jsx(Jl,{size:18})}]},{title:"nav:subscriptionManagement",label:"",href:"",icon:e.jsx(Ql,{size:18}),sub:[{title:"nav:planManagement",label:"",href:"/finance/plan",icon:e.jsx(Zl,{size:18})},{title:"nav:orderManagement",label:"",href:"/finance/order",icon:e.jsx(wa,{size:18})},{title:"nav:couponManagement",label:"",href:"/finance/coupon",icon:e.jsx(Xl,{size:18})}]},{title:"nav:userManagement",label:"",href:"",icon:e.jsx(eo,{size:18}),sub:[{title:"nav:userManagement",label:"",href:"/user/manage",icon:e.jsx(so,{size:18})},{title:"nav:ticketManagement",label:"",href:"/user/ticket",icon:e.jsx(mn,{size:18})}]}];function bc({className:s,isCollapsed:n,setIsCollapsed:a}){const[l,r]=m.useState(!1),{t:c}=I();return m.useEffect(()=>{l?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden")},[l]),e.jsxs("aside",{className:y(`fixed left-0 right-0 top-0 z-50 w-full border-r-2 border-r-muted transition-[width] md:bottom-0 md:right-auto md:h-svh ${n?"md:w-14":"md:w-64"}`,s),children:[e.jsx("div",{onClick:()=>r(!1),className:`absolute inset-0 transition-[opacity] delay-100 duration-700 ${l?"h-svh opacity-50":"h-0 opacity-0"} w-full bg-black md:hidden`}),e.jsxs(we,{children:[e.jsxs(Ce,{className:"sticky top-0 justify-between px-4 py-3 shadow md:px-4",children:[e.jsxs("div",{className:`flex items-center ${n?"":"gap-2"}`,children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:`transition-all ${n?"h-6 w-6":"h-8 w-8"}`,children:[e.jsx("rect",{width:"256",height:"256",fill:"none"}),e.jsx("line",{x1:"208",y1:"128",x2:"128",y2:"208",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("line",{x1:"192",y1:"40",x2:"40",y2:"192",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("span",{className:"sr-only",children:"Website Name"})]}),e.jsx("div",{className:`flex flex-col justify-end truncate ${n?"invisible w-0":"visible w-auto"}`,children:e.jsx("span",{className:"font-medium",children:window?.settings?.title})})]}),e.jsx(R,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":c("common:toggleNavigation"),"aria-controls":"sidebar-menu","aria-expanded":l,onClick:()=>r(i=>!i),children:l?e.jsx(to,{}):e.jsx(ao,{})})]}),e.jsx(pc,{id:"sidebar-menu",className:`h-full flex-1 overflow-auto ${l?"max-h-screen":"max-h-0 py-0 md:max-h-screen md:py-2"}`,closeNav:()=>r(!1),isCollapsed:n,links:cr}),e.jsx("div",{className:y("px-4 py-3 text-xs text-muted-foreground/70 border-t border-border/50 bg-muted/20","transition-all duration-200 ease-in-out",n?"text-center":"text-left"),children:e.jsxs("div",{className:y("flex items-center gap-1.5",n?"justify-center":"justify-start"),children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500/70"}),e.jsxs("span",{className:"tracking-wide",children:["v",window?.settings?.version]})]})}),e.jsx(R,{onClick:()=>a(i=>!i),size:"icon",variant:"outline",className:"absolute -right-5 top-1/2 hidden rounded-full md:inline-flex","aria-label":c("common:toggleSidebar"),children:e.jsx(no,{stroke:1.5,className:`h-5 w-5 ${n?"rotate-180":""}`})})]})]})}function yc(){const[s,n]=or({key:"collapsed-sidebar",defaultValue:!1});return m.useEffect(()=>{const a=()=>{n(window.innerWidth<768?!1:s)};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[s,n]),[s,n]}function Nc(){const[s,n]=yc();return e.jsxs("div",{className:"relative h-full overflow-hidden bg-background",children:[e.jsx(bc,{isCollapsed:s,setIsCollapsed:n}),e.jsx("main",{id:"content",className:`overflow-x-hidden pt-16 transition-[margin] md:overflow-y-hidden md:pt-0 ${s?"md:ml-14":"md:ml-64"} h-full`,children:e.jsx(sa,{})})]})}const _c=Object.freeze(Object.defineProperty({__proto__:null,default:Nc},Symbol.toStringTag,{value:"Module"})),_s=m.forwardRef(({className:s,...n},a)=>e.jsx(Se,{ref:a,className:y("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",s),...n}));_s.displayName=Se.displayName;const wc=({children:s,...n})=>e.jsx(ge,{...n,children:e.jsx(he,{className:"overflow-hidden p-0",children:e.jsx(_s,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:s})})}),Vs=m.forwardRef(({className:s,...n},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(ro,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(Se.Input,{ref:a,className:y("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",s),...n})]}));Vs.displayName=Se.Input.displayName;const ws=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.List,{ref:a,className:y("max-h-[300px] overflow-y-auto overflow-x-hidden",s),...n}));ws.displayName=Se.List.displayName;const Is=m.forwardRef((s,n)=>e.jsx(Se.Empty,{ref:n,className:"py-6 text-center text-sm",...s}));Is.displayName=Se.Empty.displayName;const Ie=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.Group,{ref:a,className:y("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",s),...n}));Ie.displayName=Se.Group.displayName;const Ks=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.Separator,{ref:a,className:y("-mx-1 h-px bg-border",s),...n}));Ks.displayName=Se.Separator.displayName;const _e=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.Item,{ref:a,className:y("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...n}));_e.displayName=Se.Item.displayName;function Cc(){const s=[];for(const n of cr)if(n.href&&s.push(n),n.sub)for(const a of n.sub)s.push({...a,parent:n.title});return s}function Pe(){const[s,n]=m.useState(!1),a=is(),l=Cc(),{t:r}=I("search"),{t:c}=I("nav");m.useEffect(()=>{const u=x=>{x.key==="k"&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),n(o=>!o))};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[]);const i=m.useCallback(u=>{n(!1),a(u)},[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(J,{variant:"outline",className:"relative h-9 w-9 p-0 xl:h-10 xl:w-60 xl:justify-start xl:px-3 xl:py-2",onClick:()=>n(!0),children:[e.jsx(lo,{className:"h-4 w-4 xl:mr-2"}),e.jsx("span",{className:"hidden xl:inline-flex",children:r("placeholder")}),e.jsx("span",{className:"sr-only",children:r("shortcut.label")}),e.jsx("kbd",{className:"pointer-events-none absolute right-1.5 top-2 hidden h-6 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 xl:flex",children:r("shortcut.key")})]}),e.jsxs(wc,{open:s,onOpenChange:n,children:[e.jsx(Vs,{placeholder:r("placeholder")}),e.jsxs(ws,{children:[e.jsx(Is,{children:r("noResults")}),e.jsx(Ie,{heading:r("title"),children:l.map(u=>e.jsxs(_e,{value:`${u.parent?u.parent+" ":""}${u.title}`,onSelect:()=>i(u.href),children:[e.jsx("div",{className:"mr-2",children:u.icon}),e.jsx("span",{children:c(u.title)}),u.parent&&e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:c(u.parent)})]},u.href))})]})]})]})}const zt=[{code:"en",name:"English",flag:oo,shortName:"EN"},{code:"zh",name:"中文",flag:io,shortName:"CN"}];function Sc(){const{i18n:s}=I(),n=r=>{s.changeLanguage(r)},a=zt.find(r=>r.code===s.language)||zt[0],l=a.flag;return e.jsxs(ys,{children:[e.jsx(Ns,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 px-2 gap-1",children:[e.jsx(l,{className:"h-4 w-5 rounded-sm shadow-sm"}),e.jsx("span",{className:"text-sm font-medium",children:a.shortName})]})}),e.jsx(os,{align:"end",className:"w-[120px]",children:zt.map(r=>{const c=r.flag,i=r.code===s.language;return e.jsxs(fe,{onClick:()=>n(r.code),className:y("flex items-center gap-2 px-2 py-1.5 cursor-pointer",i&&"bg-accent"),children:[e.jsx(c,{className:"h-4 w-5 rounded-sm shadow-sm"}),e.jsx("span",{className:y("text-sm",i&&"font-medium"),children:r.name})]},r.code)})})]})}function Re(){const{theme:s,setTheme:n}=Ti();return m.useEffect(()=>{const a=s==="dark"?"#020817":"#fff",l=document.querySelector("meta[name='theme-color']");l&&l.setAttribute("content",a)},[s]),e.jsxs(e.Fragment,{children:[e.jsx(R,{size:"icon",variant:"ghost",className:"rounded-full",onClick:()=>n(s==="light"?"dark":"light"),children:s==="light"?e.jsx(co,{size:20}):e.jsx(mo,{size:20})}),e.jsx(Sc,{})]})}const dr=m.forwardRef(({className:s,...n},a)=>e.jsx(un,{ref:a,className:y("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...n}));dr.displayName=un.displayName;const mr=m.forwardRef(({className:s,...n},a)=>e.jsx(xn,{ref:a,className:y("aspect-square h-full w-full",s),...n}));mr.displayName=xn.displayName;const ur=m.forwardRef(({className:s,...n},a)=>e.jsx(hn,{ref:a,className:y("flex h-full w-full items-center justify-center rounded-full bg-muted",s),...n}));ur.displayName=hn.displayName;function Ee(){const s=is(),n=Ba(),a=uo(Yi),{t:l}=I(["common"]),r=()=>{Jn(),n(Wi()),s("/sign-in")},c=a?.email?.split("@")[0]||l("common:user"),i=c.substring(0,2).toUpperCase();return e.jsxs(ys,{children:[e.jsx(Ns,{asChild:!0,children:e.jsx(R,{variant:"ghost",className:"relative h-8 w-8 rounded-full",children:e.jsxs(dr,{className:"h-8 w-8",children:[e.jsx(mr,{src:a?.avatar_url,alt:c}),e.jsx(ur,{children:i})]})})}),e.jsxs(os,{className:"w-56",align:"end",forceMount:!0,children:[e.jsx(ia,{className:"font-normal",children:e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("p",{className:"text-sm font-medium leading-none",children:c}),e.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:a?.email||l("common:defaultEmail")})]})}),e.jsx(at,{}),e.jsx(fe,{asChild:!0,children:e.jsxs(Rs,{to:"/config/system",children:[l("common:settings"),e.jsx(Jt,{children:"⌘S"})]})}),e.jsx(at,{}),e.jsxs(fe,{onClick:r,children:[l("common:logout"),e.jsx(Jt,{children:"⇧⌘Q"})]})]})]})}const Qe=window?.settings?.secure_path,xr=5*60*1e3,Qt=new Map,kc=s=>{const n=Qt.get(s);return n?Date.now()-n.timestamp>xr?(Qt.delete(s),null):n.data:null},Dc=(s,n)=>{Qt.set(s,{data:n,timestamp:Date.now()})},Tc=async(s,n=xr)=>{const a=kc(s);if(a)return a;const l=await O.get(s);return Dc(s,l),l},Pc={getList:()=>Tc(`${Qe}/notice/fetch`),save:s=>O.post(`${Qe}/notice/save`,s),drop:s=>O.post(`${Qe}/notice/drop`,{id:s}),updateStatus:s=>O.post(`${Qe}/notice/show`,{id:s}),sort:s=>O.post(`${Qe}/notice/sort`,{ids:s})},Fa={getSystemStatus:()=>O.get(`${Qe}/system/getSystemStatus`),getQueueStats:()=>O.get(`${Qe}/system/getQueueStats`),getQueueWorkload:()=>O.get(`${Qe}/system/getQueueWorkload`),getQueueMasters:()=>O.get(`${Qe}/system/getQueueMasters`),getSystemLog:s=>O.get(`${Qe}/system/getSystemLog`,{params:s})},L=window?.settings?.secure_path,Rc=s=>O.get(L+"/stat/getOrder",{params:s}),Ec=()=>O.get(L+"/stat/getStats"),Ma=s=>O.get(L+"/stat/getTrafficRank",{params:s}),Vc=()=>O.get(L+"/theme/getThemes"),Ic=s=>O.post(L+"/theme/getThemeConfig",{name:s}),Fc=(s,n)=>O.post(L+"/theme/saveThemeConfig",{name:s,config:n}),Mc=s=>{const n=new FormData;return n.append("file",s),O.post(L+"/theme/upload",n,{headers:{"Content-Type":"multipart/form-data"}})},Oc=s=>O.post(L+"/theme/delete",{name:s}),zc=s=>O.post(L+"/config/save",s),hr=()=>O.get(L+"/server/manage/getNodes"),Lc=s=>O.post(L+"/server/manage/save",s),Ac=s=>O.post(L+"/server/manage/drop",s),$c=s=>O.post(L+"/server/manage/copy",s),qc=s=>O.post(L+"/server/manage/update",s),Hc=s=>O.post(L+"/server/manage/sort",s),It=()=>O.get(L+"/server/group/fetch"),Kc=s=>O.post(L+"/server/group/save",s),Uc=s=>O.post(L+"/server/group/drop",s),fr=()=>O.get(L+"/server/route/fetch"),Bc=s=>O.post(L+"/server/route/save",s),Gc=s=>O.post(L+"/server/route/drop",s),Wc=()=>O.get(L+"/payment/fetch"),Yc=()=>O.get(L+"/payment/getPaymentMethods"),Jc=s=>O.post(L+"/payment/getPaymentForm",s),Qc=s=>O.post(L+"/payment/save",s),Zc=s=>O.post(L+"/payment/drop",s),Xc=s=>O.post(L+"/payment/show",s),ed=s=>O.post(L+"/payment/sort",s),sd=()=>O.get(L+"/notice/fetch"),td=s=>O.post(L+"/notice/save",s),ad=s=>O.post(L+"/notice/drop",s),nd=s=>O.post(L+"/notice/show",s),rd=()=>O.get(L+"/knowledge/fetch"),ld=s=>O.get(L+"/knowledge/fetch?id="+s),od=s=>O.post(L+"/knowledge/save",s),id=s=>O.post(L+"/knowledge/drop",s),cd=s=>O.post(L+"/knowledge/show",s),dd=s=>O.post(L+"/knowledge/sort",s),Fs=()=>O.get(L+"/plan/fetch"),md=s=>O.post(L+"/plan/save",s),Lt=s=>O.post(L+"/plan/update",s),ud=s=>O.post(L+"/plan/drop",s),xd=s=>O.post(L+"/plan/sort",{ids:s}),hd=async s=>O.post(L+"/order/fetch",s),fd=s=>O.post(L+"/order/detail",s),pd=s=>O.post(L+"/order/paid",s),gd=s=>O.post(L+"/order/cancel",s),Oa=s=>O.post(L+"/order/update",s),jd=s=>O.post(L+"/order/assign",s),vd=s=>O.post(L+"/coupon/fetch",s),bd=s=>O.post(L+"/coupon/generate",s),yd=s=>O.post(L+"/coupon/drop",s),Nd=s=>O.post(L+"/coupon/update",s),_d=s=>O.post(L+"/user/fetch",s),wd=s=>O.post(L+"/user/update",s),Cd=s=>O.post(L+"/user/resetSecret",s),Sd=s=>O.post(L+"/user/generate",s),kd=s=>O.post(L+"/stat/getStatUser",s),Dd=s=>O.post(L+"/ticket/fetch",s),Td=s=>O.get(L+"/ticket/fetch?id= "+s),Pd=s=>O.post(L+"/ticket/reply",s),pr=s=>O.post(L+"/ticket/close",{id:s}),us=(s="")=>O.get(L+"/config/fetch?key="+s),xs=s=>O.post(L+"/config/save",s),Rd=()=>O.get(L+"/config/getEmailTemplate"),Ed=()=>O.post(L+"/config/testSendMail"),Vd=()=>O.post(L+"/config/setTelegramWebhook"),Id=Pc.sort,gr=xo,ca=m.forwardRef(({className:s,...n},a)=>e.jsx(fn,{ref:a,className:y("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),...n}));ca.displayName=fn.displayName;const nt=m.forwardRef(({className:s,...n},a)=>e.jsx(pn,{ref:a,className:y("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",s),...n}));nt.displayName=pn.displayName;const Fd=m.forwardRef(({className:s,...n},a)=>e.jsx(gn,{ref:a,className:y("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...n}));Fd.displayName=gn.displayName;const W=ho,fs=No,Y=fo,B=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(jn,{ref:l,className:y("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",s),...a,children:[n,e.jsx(po,{asChild:!0,children:e.jsx(na,{className:"h-4 w-4 opacity-50"})})]}));B.displayName=jn.displayName;const jr=m.forwardRef(({className:s,...n},a)=>e.jsx(vn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...n,children:e.jsx(go,{className:"h-4 w-4"})}));jr.displayName=vn.displayName;const vr=m.forwardRef(({className:s,...n},a)=>e.jsx(bn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...n,children:e.jsx(na,{className:"h-4 w-4"})}));vr.displayName=bn.displayName;const G=m.forwardRef(({className:s,children:n,position:a="popper",...l},r)=>e.jsx(jo,{children:e.jsxs(yn,{ref:r,className:y("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",a==="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",s),position:a,...l,children:[e.jsx(jr,{}),e.jsx(vo,{className:y("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),e.jsx(vr,{})]})}));G.displayName=yn.displayName;const Md=m.forwardRef(({className:s,...n},a)=>e.jsx(Nn,{ref:a,className:y("px-2 py-1.5 text-sm font-semibold",s),...n}));Md.displayName=Nn.displayName;const $=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(_n,{ref:l,className:y("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",s),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(bo,{children:e.jsx(Ps,{className:"h-4 w-4"})})}),e.jsx(yo,{children:n})]}));$.displayName=_n.displayName;const Od=m.forwardRef(({className:s,...n},a)=>e.jsx(wn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...n}));Od.displayName=wn.displayName;function Ms({className:s,classNames:n,showOutsideDays:a=!0,...l}){return e.jsx(_o,{showOutsideDays:a,className:y("p-3",s),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:y(qs({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",l.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(qs({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...n},components:{IconLeft:({className:r,...c})=>e.jsx(Cn,{className:y("h-4 w-4",r),...c}),IconRight:({className:r,...c})=>e.jsx(aa,{className:y("h-4 w-4",r),...c})},...l})}Ms.displayName="Calendar";const as=Co,ns=So,We=m.forwardRef(({className:s,align:n="center",sideOffset:a=4,...l},r)=>e.jsx(wo,{children:e.jsx(Sn,{ref:r,align:n,sideOffset:a,className:y("z-50 w-72 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",s),...l})}));We.displayName=Sn.displayName;const ps={income:{main:"hsl(var(--primary))",gradient:{start:"hsl(var(--primary))",end:"transparent"}},commission:{main:"hsl(var(--secondary))",gradient:{start:"hsl(var(--secondary))",end:"transparent"}}},Qs=s=>(s/100).toFixed(2),zd=({active:s,payload:n,label:a})=>{const{t:l}=I();return s&&n&&n.length?e.jsxs("div",{className:"rounded-lg border bg-background p-3 shadow-sm",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:a}),n.map((r,c)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:r.color}}),e.jsxs("span",{className:"text-muted-foreground",children:[l(r.name),":"]}),e.jsx("span",{className:"font-medium",children:r.name.includes(l("dashboard:overview.amount"))?`¥${Qs(r.value)}`:l("dashboard:overview.transactions",{count:r.value})})]},c))]}):null},Ld=[{value:"7d",label:"dashboard:overview.last7Days"},{value:"30d",label:"dashboard:overview.last30Days"},{value:"90d",label:"dashboard:overview.last90Days"},{value:"180d",label:"dashboard:overview.last180Days"},{value:"365d",label:"dashboard:overview.lastYear"},{value:"custom",label:"dashboard:overview.customRange"}],Ad=(s,n)=>{const a=new Date;if(s==="custom"&&n)return{startDate:n.from,endDate:n.to};let l;switch(s){case"7d":l=qe(a,7);break;case"30d":l=qe(a,30);break;case"90d":l=qe(a,90);break;case"180d":l=qe(a,180);break;case"365d":l=qe(a,365);break;default:l=qe(a,30)}return{startDate:l,endDate:a}};function $d(){const[s,n]=m.useState("amount"),[a,l]=m.useState("30d"),[r,c]=m.useState({from:qe(new Date,7),to:new Date}),{t:i}=I(),{startDate:u,endDate:x}=Ad(a,r),{data:o}=se({queryKey:["orderStat",{start_date:$e(u,"yyyy-MM-dd"),end_date:$e(x,"yyyy-MM-dd")}],queryFn:async()=>{const{data:d}=await Rc({start_date:$e(u,"yyyy-MM-dd"),end_date:$e(x,"yyyy-MM-dd")});return d},refetchInterval:3e4});return e.jsxs(Ke,{children:[e.jsx(ss,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(bs,{children:i("dashboard:overview.title")}),e.jsxs(tt,{children:[o?.summary.start_date," ",i("dashboard:overview.to")," ",o?.summary.end_date]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsxs(W,{value:a,onValueChange:d=>l(d),children:[e.jsx(B,{className:"w-[120px]",children:e.jsx(Y,{placeholder:i("dashboard:overview.selectTimeRange")})}),e.jsx(G,{children:Ld.map(d=>e.jsx($,{value:d.value,children:i(d.label)},d.value))})]}),a==="custom"&&e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(J,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[e.jsx(it,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:r?.from?r.to?e.jsxs(e.Fragment,{children:[$e(r.from,"yyyy-MM-dd")," -"," ",$e(r.to,"yyyy-MM-dd")]}):$e(r.from,"yyyy-MM-dd"):i("dashboard:overview.selectDate")})]})}),e.jsx(We,{className:"w-auto p-0",align:"end",children:e.jsx(Ms,{mode:"range",defaultMonth:r?.from,selected:{from:r?.from,to:r?.to},onSelect:d=>{d?.from&&d?.to&&c({from:d.from,to:d.to})},numberOfMonths:2})})]})]}),e.jsx(gr,{value:s,onValueChange:d=>n(d),children:e.jsxs(ca,{children:[e.jsx(nt,{value:"amount",children:i("dashboard:overview.amount")}),e.jsx(nt,{value:"count",children:i("dashboard:overview.count")})]})})]})]})}),e.jsxs(ts,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:i("dashboard:overview.totalIncome")}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Qs(o?.summary?.paid_total||0)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:i("dashboard:overview.totalTransactions",{count:o?.summary?.paid_count||0})}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[i("dashboard:overview.avgOrderAmount")," ¥",Qs(o?.summary?.avg_paid_amount||0)]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:i("dashboard:overview.totalCommission")}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Qs(o?.summary?.commission_total||0)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:i("dashboard:overview.totalTransactions",{count:o?.summary?.commission_count||0})}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[i("dashboard:overview.commissionRate")," ",o?.summary?.commission_rate.toFixed(2)||0,"%"]})]})]}),e.jsx("div",{className:"h-[400px] w-full",children:e.jsx(ko,{width:"100%",height:"100%",children:e.jsxs(Do,{data:o?.list||[],margin:{top:20,right:20,left:0,bottom:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"incomeGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:ps.income.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:ps.income.gradient.end,stopOpacity:.1})]}),e.jsxs("linearGradient",{id:"commissionGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:ps.commission.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:ps.commission.gradient.end,stopOpacity:.1})]})]}),e.jsx(To,{dataKey:"date",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:d=>$e(new Date(d),"MM-dd",{locale:Vo})}),e.jsx(Po,{axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:d=>s==="amount"?`¥${Qs(d)}`:i("dashboard:overview.transactions",{count:d})}),e.jsx(Ro,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))",opacity:.3}),e.jsx(Eo,{content:e.jsx(zd,{})}),s==="amount"?e.jsxs(e.Fragment,{children:[e.jsx(Ca,{type:"monotone",dataKey:"paid_total",name:i("dashboard:overview.orderAmount"),stroke:ps.income.main,fill:"url(#incomeGradient)",strokeWidth:2}),e.jsx(Ca,{type:"monotone",dataKey:"commission_total",name:i("dashboard:overview.commissionAmount"),stroke:ps.commission.main,fill:"url(#commissionGradient)",strokeWidth:2})]}):e.jsxs(e.Fragment,{children:[e.jsx(Sa,{dataKey:"paid_count",name:i("dashboard:overview.orderCount"),fill:ps.income.main,radius:[4,4,0,0],maxBarSize:40}),e.jsx(Sa,{dataKey:"commission_count",name:i("dashboard:overview.commissionCount"),fill:ps.commission.main,radius:[4,4,0,0],maxBarSize:40})]})]})})})]})]})}function Ve({className:s,...n}){return e.jsx("div",{className:y("animate-pulse rounded-md bg-primary/10",s),...n})}function qd(){return e.jsxs(Ke,{children:[e.jsxs(ss,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ve,{className:"h-4 w-[120px]"}),e.jsx(Ve,{className:"h-4 w-4"})]}),e.jsxs(ts,{children:[e.jsx(Ve,{className:"h-8 w-[140px] mb-2"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ve,{className:"h-4 w-4"}),e.jsx(Ve,{className:"h-4 w-[100px]"})]})]})]})}function Hd(){return e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:Array.from({length:8}).map((s,n)=>e.jsx(qd,{},n))})}var Q=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.CANCELLED=2]="CANCELLED",s[s.COMPLETED=3]="COMPLETED",s[s.DISCOUNTED=4]="DISCOUNTED",s))(Q||{});const Ys={0:"待支付",1:"开通中",2:"已取消",3:"已完成",4:"已折抵"},Js={0:"yellow-500",1:"blue-500",2:"red-500",3:"green-500",4:"green-500"};var He=(s=>(s[s.NEW=1]="NEW",s[s.RENEWAL=2]="RENEWAL",s[s.UPGRADE=3]="UPGRADE",s[s.RESET_FLOW=4]="RESET_FLOW",s))(He||{}),ne=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.VALID=2]="VALID",s[s.INVALID=3]="INVALID",s))(ne||{});const ut={0:"待确认",1:"发放中",2:"有效",3:"无效"},xt={0:"yellow-500",1:"blue-500",2:"green-500",3:"red-500"};var de=(s=>(s.MONTH_PRICE="month_price",s.QUARTER_PRICE="quarter_price",s.HALF_YEAR_PRICE="half_year_price",s.YEAR_PRICE="year_price",s.TWO_YEAR_PRICE="two_year_price",s.THREE_YEAR_PRICE="three_year_price",s.ONETIME_PRICE="onetime_price",s.RESET_PRICE="reset_price",s))(de||{});const Kd={month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"};var ye=(s=>(s.Shadowsocks="shadowsocks",s.Vmess="vmess",s.Trojan="trojan",s.Hysteria="hysteria",s.Vless="vless",s))(ye||{});const Ds=[{type:"shadowsocks",label:"Shadowsocks"},{type:"vmess",label:"VMess"},{type:"trojan",label:"Trojan"},{type:"hysteria",label:"Hysteria"},{type:"vless",label:"VLess"}],ls={shadowsocks:"#489851",vmess:"#CB3180",trojan:"#EBB749",hysteria:"#5684e6",vless:"#1a1a1a"};var js=(s=>(s[s.AMOUNT=1]="AMOUNT",s[s.PERCENTAGE=2]="PERCENTAGE",s))(js||{});const Ud={1:"按金额优惠",2:"按比例优惠"};var et=(s=>(s[s.OPENING=0]="OPENING",s[s.CLOSED=1]="CLOSED",s))(et||{}),Xe=(s=>(s[s.LOW=0]="LOW",s[s.MIDDLE=1]="MIDDLE",s[s.HIGH=2]="HIGH",s))(Xe||{});function gs({title:s,value:n,icon:a,trend:l,description:r,onClick:c,highlight:i,className:u}){return e.jsxs(Ke,{className:y("transition-colors",c&&"cursor-pointer hover:bg-muted/50",i&&"border-primary/50",u),onClick:c,children:[e.jsxs(ss,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(bs,{className:"text-sm font-medium",children:s}),a]}),e.jsxs(ts,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n}),l?e.jsxs("div",{className:"flex items-center pt-1",children:[e.jsx(Lo,{className:y("h-4 w-4",l.isPositive?"text-emerald-500":"text-red-500")}),e.jsxs("span",{className:y("ml-1 text-xs",l.isPositive?"text-emerald-500":"text-red-500"),children:[l.isPositive?"+":"-",Math.abs(l.value),"%"]}),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:l.label})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})]})}function Bd({className:s}){const n=is(),{t:a}=I(),{data:l,isLoading:r}=se({queryKey:["dashboardStats"],queryFn:async()=>(await Ec()).data,refetchInterval:1e3*60*5});if(r||!l)return e.jsx(Hd,{});const c=()=>{const i=new URLSearchParams;i.set("commission_status",ne.PENDING.toString()),i.set("status",Q.COMPLETED.toString()),i.set("commission_balance","gt:0"),n(`/finance/order?${i.toString()}`)};return e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2 lg:grid-cols-4",s),children:[e.jsx(gs,{title:a("dashboard:stats.todayIncome"),value:ks(l.todayIncome),icon:e.jsx(Io,{className:"h-4 w-4 text-emerald-500"}),trend:{value:l.dayIncomeGrowth,label:a("dashboard:stats.vsYesterday"),isPositive:l.dayIncomeGrowth>0}}),e.jsx(gs,{title:a("dashboard:stats.monthlyIncome"),value:ks(l.currentMonthIncome),icon:e.jsx(Fo,{className:"h-4 w-4 text-blue-500"}),trend:{value:l.monthIncomeGrowth,label:a("dashboard:stats.vsLastMonth"),isPositive:l.monthIncomeGrowth>0}}),e.jsx(gs,{title:a("dashboard:stats.pendingTickets"),value:l.ticketPendingTotal,icon:e.jsx(Mo,{className:y("h-4 w-4",l.ticketPendingTotal>0?"text-orange-500":"text-muted-foreground")}),description:l.ticketPendingTotal>0?a("dashboard:stats.hasPendingTickets"):a("dashboard:stats.noPendingTickets"),onClick:()=>n("/user/ticket"),highlight:l.ticketPendingTotal>0}),e.jsx(gs,{title:a("dashboard:stats.pendingCommission"),value:l.commissionPendingTotal,icon:e.jsx(Oo,{className:y("h-4 w-4",l.commissionPendingTotal>0?"text-blue-500":"text-muted-foreground")}),description:l.commissionPendingTotal>0?a("dashboard:stats.hasPendingCommission"):a("dashboard:stats.noPendingCommission"),onClick:c,highlight:l.commissionPendingTotal>0}),e.jsx(gs,{title:a("dashboard:stats.monthlyNewUsers"),value:l.currentMonthNewUsers,icon:e.jsx(Ht,{className:"h-4 w-4 text-blue-500"}),trend:{value:l.userGrowth,label:a("dashboard:stats.vsLastMonth"),isPositive:l.userGrowth>0}}),e.jsx(gs,{title:a("dashboard:stats.totalUsers"),value:l.totalUsers,icon:e.jsx(Ht,{className:"h-4 w-4 text-muted-foreground"}),description:a("dashboard:stats.activeUsers",{count:l.activeUsers})}),e.jsx(gs,{title:a("dashboard:stats.monthlyUpload"),value:Ze(l.monthTraffic.upload),icon:e.jsx(Kt,{className:"h-4 w-4 text-emerald-500"}),description:a("dashboard:stats.todayTraffic",{value:Ze(l.todayTraffic.upload)})}),e.jsx(gs,{title:a("dashboard:stats.monthlyDownload"),value:Ze(l.monthTraffic.download),icon:e.jsx(zo,{className:"h-4 w-4 text-blue-500"}),description:a("dashboard:stats.todayTraffic",{value:Ze(l.todayTraffic.download)})})]})}const rt=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(kn,{ref:l,className:y("relative overflow-hidden",s),...a,children:[e.jsx(Ao,{className:"h-full w-full rounded-[inherit]",children:n}),e.jsx(Ct,{}),e.jsx($o,{})]}));rt.displayName=kn.displayName;const Ct=m.forwardRef(({className:s,orientation:n="vertical",...a},l)=>e.jsx(Dn,{ref:l,orientation:n,className:y("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",s),...a,children:e.jsx(qo,{className:"relative flex-1 rounded-full bg-border"})}));Ct.displayName=Dn.displayName;const Zt={today:{getValue:()=>{const s=Ko();return{start:s,end:Uo(s,1)}}},last7days:{getValue:()=>{const s=new Date;return{start:qe(s,7),end:s}}},last30days:{getValue:()=>{const s=new Date;return{start:qe(s,30),end:s}}},custom:{getValue:()=>null}};function za({selectedRange:s,customDateRange:n,onRangeChange:a,onCustomRangeChange:l}){const{t:r}=I(),c={today:r("dashboard:trafficRank.today"),last7days:r("dashboard:trafficRank.last7days"),last30days:r("dashboard:trafficRank.last30days"),custom:r("dashboard:trafficRank.customRange")};return e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[e.jsxs(W,{value:s,onValueChange:a,children:[e.jsx(B,{className:"w-[120px]",children:e.jsx(Y,{placeholder:r("dashboard:trafficRank.selectTimeRange")})}),e.jsx(G,{position:"popper",className:"z-50",children:Object.entries(Zt).map(([i])=>e.jsx($,{value:i,children:c[i]},i))})]}),s==="custom"&&e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(J,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!n&&"text-muted-foreground"),children:[e.jsx(it,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:n?.from?n.to?e.jsxs(e.Fragment,{children:[$e(n.from,"yyyy-MM-dd")," -"," ",$e(n.to,"yyyy-MM-dd")]}):$e(n.from,"yyyy-MM-dd"):e.jsx("span",{children:r("dashboard:trafficRank.selectDateRange")})})]})}),e.jsx(We,{className:"w-auto p-0",align:"end",children:e.jsx(Ms,{mode:"range",defaultMonth:n?.from,selected:{from:n?.from,to:n?.to},onSelect:i=>{i?.from&&i?.to&&l({from:i.from,to:i.to})},numberOfMonths:2})})]})]})}const zs=s=>`${(s/1024/1024/1024).toFixed(2)} GB`;function Gd({className:s}){const{t:n}=I(),[a,l]=m.useState("today"),[r,c]=m.useState({from:qe(new Date,7),to:new Date}),[i,u]=m.useState("today"),[x,o]=m.useState({from:qe(new Date,7),to:new Date}),d=m.useMemo(()=>a==="custom"?{start:r.from,end:r.to}:Zt[a].getValue(),[a,r]),p=m.useMemo(()=>i==="custom"?{start:x.from,end:x.to}:Zt[i].getValue(),[i,x]),{data:D}=se({queryKey:["nodeTrafficRank",d.start,d.end],queryFn:()=>Ma({type:"node",start_time:pe.round(d.start.getTime()/1e3),end_time:pe.round(d.end.getTime()/1e3)}),refetchInterval:3e4}),{data:V}=se({queryKey:["userTrafficRank",p.start,p.end],queryFn:()=>Ma({type:"user",start_time:pe.round(p.start.getTime()/1e3),end_time:pe.round(p.end.getTime()/1e3)}),refetchInterval:3e4});return e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2",s),children:[e.jsxs(Ke,{children:[e.jsx(ss,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(bs,{className:"flex items-center text-base font-medium",children:[e.jsx(Ho,{className:"mr-2 h-4 w-4"}),n("dashboard:trafficRank.nodeTrafficRank")]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(za,{selectedRange:a,customDateRange:r,onRangeChange:l,onCustomRangeChange:c}),e.jsx(ka,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(ts,{className:"flex-1",children:D?.data?e.jsxs(rt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:D.data.map(f=>e.jsx(ie,{delayDuration:200,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:f.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",f.change>=0?"text-green-600":"text-red-600"),children:[f.change>=0?e.jsx(Ut,{className:"mr-1 h-3 w-3"}):e.jsx(Bt,{className:"mr-1 h-3 w-3"}),Math.abs(f.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${f.value/D.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:zs(f.value)})]})]})})}),e.jsx(te,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.currentTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:zs(f.value)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.previousTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:zs(f.previousValue)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.changeRate"),":"]}),e.jsxs("span",{className:y("font-medium",f.change>=0?"text-green-600":"text-red-600"),children:[f.change>=0?"+":"",f.change,"%"]})]})})]})},f.id))}),e.jsx(Ct,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:n("common:loading")})})})]}),e.jsxs(Ke,{children:[e.jsx(ss,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(bs,{className:"flex items-center text-base font-medium",children:[e.jsx(Ht,{className:"mr-2 h-4 w-4"}),n("dashboard:trafficRank.userTrafficRank")]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(za,{selectedRange:i,customDateRange:x,onRangeChange:u,onCustomRangeChange:o}),e.jsx(ka,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(ts,{className:"flex-1",children:V?.data?e.jsxs(rt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:V.data.map(f=>e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:f.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",f.change>=0?"text-green-600":"text-red-600"),children:[f.change>=0?e.jsx(Ut,{className:"mr-1 h-3 w-3"}):e.jsx(Bt,{className:"mr-1 h-3 w-3"}),Math.abs(f.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${f.value/V.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:zs(f.value)})]})]})})}),e.jsx(te,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.currentTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:zs(f.value)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.previousTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:zs(f.previousValue)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.changeRate"),":"]}),e.jsxs("span",{className:y("font-medium",f.change>=0?"text-green-600":"text-red-600"),children:[f.change>=0?"+":"",f.change,"%"]})]})})]})},f.id))}),e.jsx(Ct,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:n("common:loading")})})})]})]})}const Wd=Ts("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/10",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 H({className:s,variant:n,...a}){return e.jsx("div",{className:y(Wd({variant:n}),s),...a})}const vt=m.forwardRef(({className:s,value:n,...a},l)=>e.jsx(Tn,{ref:l,className:y("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",s),...a,children:e.jsx(Bo,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));vt.displayName=Tn.displayName;function Yd(){const{t:s}=I(),[n,a]=m.useState(null),[l,r]=m.useState(null),[c,i]=m.useState(!0),[u,x]=m.useState(!1),o=async()=>{try{x(!0);const[D,V]=await Promise.all([Fa.getSystemStatus(),Fa.getQueueStats()]);a(D.data.data),r(V.data.data)}catch(D){console.error("Error fetching system data:",D)}finally{i(!1),x(!1)}};m.useEffect(()=>{o();const D=setInterval(o,3e4);return()=>clearInterval(D)},[]);const d=()=>{o()};if(c)return e.jsx("div",{className:"flex items-center justify-center p-6",children:e.jsx(ra,{className:"h-6 w-6 animate-spin"})});const p=D=>D?e.jsx(Pn,{className:"h-5 w-5 text-green-500"}):e.jsx(Rn,{className:"h-5 w-5 text-red-500"});return e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Ke,{children:[e.jsxs(ss,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(bs,{className:"flex items-center gap-2",children:[e.jsx(Go,{className:"h-5 w-5"}),s("dashboard:queue.title")]}),e.jsx(tt,{children:s("dashboard:queue.status.description")})]}),e.jsx(J,{variant:"outline",size:"icon",onClick:d,disabled:u,children:e.jsx(Wo,{className:y("h-4 w-4",u&&"animate-spin")})})]}),e.jsx(ts,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[p(l?.status||!1),e.jsx("span",{className:"font-medium",children:s("dashboard:queue.status.running")})]}),e.jsx(H,{variant:l?.status?"secondary":"destructive",children:l?.status?s("dashboard:queue.status.normal"):s("dashboard:queue.status.abnormal")})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.status.waitTime",{seconds:l?.wait?.default||0})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.recentJobs")}),e.jsx("p",{className:"text-2xl font-bold",children:l?.recentJobs||0}),e.jsx(vt,{value:(l?.recentJobs||0)/(l?.periods?.recentJobs||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsx("p",{children:s("dashboard:queue.details.statisticsPeriod",{hours:l?.periods?.recentJobs||0})})})]})}),e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.jobsPerMinute")}),e.jsx("p",{className:"text-2xl font-bold",children:l?.jobsPerMinute||0}),e.jsx(vt,{value:(l?.jobsPerMinute||0)/(l?.queueWithMaxThroughput?.throughput||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsx("p",{children:s("dashboard:queue.details.maxThroughput",{value:l?.queueWithMaxThroughput?.throughput||0})})})]})})]})]})})]}),e.jsxs(Ke,{children:[e.jsxs(ss,{children:[e.jsxs(bs,{className:"flex items-center gap-2",children:[e.jsx(Yo,{className:"h-5 w-5"}),s("dashboard:queue.jobDetails")]}),e.jsx(tt,{children:s("dashboard:queue.details.description")})]}),e.jsx(ts,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.failedJobs7Days")}),e.jsx("p",{className:"text-2xl font-bold text-destructive",children:l?.failedJobs||0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s("dashboard:queue.details.retentionPeriod",{hours:l?.periods?.failedJobs||0})})]}),e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.longestRunningQueue")}),e.jsxs("p",{className:"text-2xl font-bold",children:[l?.queueWithMaxRuntime?.runtime||0,"s"]}),e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:l?.queueWithMaxRuntime?.name||"N/A"})]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.activeProcesses")}),e.jsxs("span",{className:"font-medium",children:[l?.processes||0," /"," ",(l?.processes||0)+(l?.pausedMasters||0)]})]}),e.jsx(vt,{value:(l?.processes||0)/((l?.processes||0)+(l?.pausedMasters||0))*100,className:"mt-2 h-1"})]})]})})]})]})}function Jd(){const{t:s}=I();return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx("div",{className:"flex items-center",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:s("dashboard:title")})}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Pe,{}),e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsx(ke,{children:e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"grid gap-6",children:[e.jsx(Bd,{}),e.jsx($d,{}),e.jsx(Gd,{}),e.jsx(Yd,{})]})})})]})}const Qd=Object.freeze(Object.defineProperty({__proto__:null,default:Jd},Symbol.toStringTag,{value:"Module"})),be=m.forwardRef(({className:s,orientation:n="horizontal",decorative:a=!0,...l},r)=>e.jsx(En,{ref:r,decorative:a,orientation:n,className:y("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",s),...l}));be.displayName=En.displayName;function Zd({className:s,items:n,...a}){const{pathname:l}=ea(),r=is(),[c,i]=m.useState(l??"/settings"),u=o=>{i(o),r(o)},{t:x}=I("settings");return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-1 md:hidden",children:e.jsxs(W,{value:c,onValueChange:u,children:[e.jsx(B,{className:"h-12 sm:w-48",children:e.jsx(Y,{placeholder:"Theme"})}),e.jsx(G,{children:n.map(o=>e.jsx($,{value:o.href,children:e.jsxs("div",{className:"flex gap-x-4 px-2 py-1",children:[e.jsx("span",{className:"scale-125",children:o.icon}),e.jsx("span",{className:"text-md",children:x(o.title)})]})},o.href))})]})}),e.jsx("div",{className:"hidden w-full overflow-x-auto bg-background px-1 py-2 md:block",children:e.jsx("nav",{className:y("flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1",s),...a,children:n.map(o=>e.jsxs(Rs,{to:o.href,className:y(Hs({variant:"ghost"}),l===o.href?"bg-muted hover:bg-muted":"hover:bg-transparent hover:underline","justify-start"),children:[e.jsx("span",{className:"mr-2",children:o.icon}),x(o.title)]},o.href))})})]})}const Xd=[{title:"site.title",key:"site",icon:e.jsx(Jo,{size:18}),href:"/config/system",description:"site.description"},{title:"safe.title",key:"safe",icon:e.jsx(dn,{size:18}),href:"/config/system/safe",description:"safe.description"},{title:"subscribe.title",key:"subscribe",icon:e.jsx(mn,{size:18}),href:"/config/system/subscribe",description:"subscribe.description"},{title:"invite.title",key:"invite",icon:e.jsx(Qo,{size:18}),href:"/config/system/invite",description:"invite.description"},{title:"server.title",key:"server",icon:e.jsx(cn,{size:18}),href:"/config/system/server",description:"server.description"},{title:"email.title",key:"email",icon:e.jsx(Zo,{size:18}),href:"/config/system/email",description:"email.description"},{title:"telegram.title",key:"telegram",icon:e.jsx(Xo,{size:18}),href:"/config/system/telegram",description:"telegram.description"},{title:"app.title",key:"app",icon:e.jsx(on,{size:18}),href:"/config/system/app",description:"app.description"}];function em(){const{t:s}=I("settings");return e.jsxs(we,{fadedBelow:!0,fixedHeight:!0,children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:s("title")}),e.jsx("div",{className:"text-muted-foreground",children:s("description")})]}),e.jsx(be,{className:"my-6"}),e.jsxs("div",{className:"flex flex-1 flex-col space-y-8 overflow-auto lg:flex-row lg:space-x-12 lg:space-y-0",children:[e.jsx("aside",{className:"sticky top-0 lg:w-1/5",children:e.jsx(Zd,{items:Xd})}),e.jsx("div",{className:"w-full p-1 pr-4 lg:max-w-xl",children:e.jsx("div",{className:"pb-16",children:e.jsx(sa,{})})})]})]})]})}const sm=Object.freeze(Object.defineProperty({__proto__:null,default:em},Symbol.toStringTag,{value:"Module"})),K=m.forwardRef(({className:s,...n},a)=>e.jsx(Vn,{className:y("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",s),...n,ref:a,children:e.jsx(ei,{className:y("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));K.displayName=Vn.displayName;const Cs=m.forwardRef(({className:s,...n},a)=>e.jsx("textarea",{className:y("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm 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",s),ref:a,...n}));Cs.displayName="Textarea";const tm=h.object({logo:h.string().nullable().default(""),force_https:h.number().nullable().default(0),stop_register:h.number().nullable().default(0),app_name:h.string().nullable().default(""),app_description:h.string().nullable().default(""),app_url:h.string().nullable().default(""),subscribe_url:h.string().nullable().default(""),try_out_plan_id:h.number().nullable().default(0),try_out_hour:h.coerce.number().nullable().default(0),tos_url:h.string().nullable().default(""),currency:h.string().nullable().default(""),currency_symbol:h.string().nullable().default("")});function am(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),{data:r}=se({queryKey:["settings","site"],queryFn:()=>us("site")}),{data:c}=se({queryKey:["plans"],queryFn:()=>Fs()}),i=ce({resolver:ue(tm),defaultValues:{},mode:"onBlur"}),{mutateAsync:u}=es({mutationFn:xs,onSuccess:d=>{d.data&&q.success(s("common.autoSaved"))}});m.useEffect(()=>{if(r?.data?.site){const d=r?.data?.site;Object.entries(d).forEach(([p,D])=>{i.setValue(p,D)}),l.current=d}},[r]);const x=m.useCallback(pe.debounce(async d=>{if(!pe.isEqual(d,l.current)){a(!0);try{const p=Object.entries(d).reduce((D,[V,f])=>(D[V]=f===null?"":f,D),{});await u(p),l.current=d}finally{a(!1)}}},1e3),[u]),o=m.useCallback(d=>{x(d)},[x]);return m.useEffect(()=>{const d=i.watch(p=>{o(p)});return()=>d.unsubscribe()},[i.watch,o]),e.jsx(xe,{...i,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:i.control,name:"app_name",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.siteName.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("site.form.siteName.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(F,{children:s("site.form.siteName.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:i.control,name:"app_description",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.siteDescription.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("site.form.siteDescription.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(F,{children:s("site.form.siteDescription.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:i.control,name:"app_url",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.siteUrl.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("site.form.siteUrl.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(F,{children:s("site.form.siteUrl.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:i.control,name:"force_https",render:({field:d})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("site.form.forceHttps.label")}),e.jsx(F,{children:s("site.form.forceHttps.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:!!d.value,onCheckedChange:p=>{d.onChange(Number(p)),o(i.getValues())}})})]})}),e.jsx(j,{control:i.control,name:"logo",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.logo.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("site.form.logo.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(F,{children:s("site.form.logo.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:i.control,name:"subscribe_url",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.subscribeUrl.label")}),e.jsx(N,{children:e.jsx(Cs,{placeholder:s("site.form.subscribeUrl.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(F,{children:s("site.form.subscribeUrl.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:i.control,name:"tos_url",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.tosUrl.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("site.form.tosUrl.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(F,{children:s("site.form.tosUrl.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:i.control,name:"stop_register",render:({field:d})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("site.form.stopRegister.label")}),e.jsx(F,{children:s("site.form.stopRegister.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:!!d.value,onCheckedChange:p=>{d.onChange(Number(p)),o(i.getValues())}})})]})}),e.jsx(j,{control:i.control,name:"try_out_plan_id",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.tryOut.label")}),e.jsx(N,{children:e.jsxs(W,{value:d.value?.toString(),onValueChange:p=>{d.onChange(Number(p)),o(i.getValues())},children:[e.jsx(B,{children:e.jsx(Y,{placeholder:s("site.form.tryOut.placeholder")})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("site.form.tryOut.placeholder")}),c?.data?.map(p=>e.jsx($,{value:p.id.toString(),children:p.name},p.id.toString()))]})]})}),e.jsx(F,{children:s("site.form.tryOut.description")}),e.jsx(P,{})]})}),!!i.watch("try_out_plan_id")&&e.jsx(j,{control:i.control,name:"try_out_hour",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"",children:s("site.form.tryOut.duration.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("site.form.tryOut.duration.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(F,{children:s("site.form.tryOut.duration.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:i.control,name:"currency",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.currency.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("site.form.currency.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(F,{children:s("site.form.currency.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:i.control,name:"currency_symbol",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.currencySymbol.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("site.form.currencySymbol.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(F,{children:s("site.form.currencySymbol.description")}),e.jsx(P,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("site.form.saving")})]})})}function nm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("site.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("site.description")})]}),e.jsx(be,{}),e.jsx(am,{})]})}const rm=Object.freeze(Object.defineProperty({__proto__:null,default:nm},Symbol.toStringTag,{value:"Module"})),lm=h.object({email_verify:h.boolean().nullable(),safe_mode_enable:h.boolean().nullable(),secure_path:h.string().nullable(),email_whitelist_enable:h.boolean().nullable(),email_whitelist_suffix:h.array(h.string().nullable()).nullable(),email_gmail_limit_enable:h.boolean().nullable(),recaptcha_enable:h.boolean().nullable(),recaptcha_key:h.string().nullable(),recaptcha_site_key:h.string().nullable(),register_limit_by_ip_enable:h.boolean().nullable(),register_limit_count:h.coerce.string().transform(s=>s===""?null:s).nullable(),register_limit_expire:h.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_enable:h.boolean().nullable(),password_limit_count:h.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_expire:h.coerce.string().transform(s=>s===""?null:s).nullable()}),om={email_verify:!1,safe_mode_enable:!1,secure_path:"",email_whitelist_enable:!1,email_whitelist_suffix:[],email_gmail_limit_enable:!1,recaptcha_enable:!1,recaptcha_key:"",recaptcha_site_key:"",register_limit_by_ip_enable:!1,register_limit_count:"",register_limit_expire:"",password_limit_enable:!1,password_limit_count:"",password_limit_expire:""};function im(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(lm),defaultValues:om,mode:"onBlur"}),{data:c}=se({queryKey:["settings","safe"],queryFn:()=>us("safe")}),{mutateAsync:i}=es({mutationFn:xs,onSuccess:o=>{o.data&&q.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data.safe){const o=c.data.safe;Object.entries(o).forEach(([d,p])=>{typeof p=="number"?r.setValue(d,String(p)):r.setValue(d,p)}),l.current=o}},[c]);const u=m.useCallback(pe.debounce(async o=>{if(!pe.isEqual(o,l.current)){a(!0);try{await i(o),l.current=o}finally{a(!1)}}},1e3),[i]),x=m.useCallback(o=>{u(o)},[u]);return m.useEffect(()=>{const o=r.watch(d=>{x(d)});return()=>o.unsubscribe()},[r.watch,x]),e.jsx(xe,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"email_verify",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.emailVerify.label")}),e.jsx(F,{children:s("safe.form.emailVerify.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"email_gmail_limit_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.gmailLimit.label")}),e.jsx(F,{children:s("safe.form.gmailLimit.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"safe_mode_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.safeMode.label")}),e.jsx(F,{children:s("safe.form.safeMode.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"secure_path",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.securePath.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("safe.form.securePath.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.securePath.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"email_whitelist_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.emailWhitelist.label")}),e.jsx(F,{children:s("safe.form.emailWhitelist.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("email_whitelist_enable")&&e.jsx(j,{control:r.control,name:"email_whitelist_suffix",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.emailWhitelist.suffixes.label")}),e.jsx(N,{children:e.jsx(Cs,{placeholder:s("safe.form.emailWhitelist.suffixes.placeholder"),...o,value:(o.value||[]).join(` -`),onChange:d=>{const p=d.target.value.split(` -`).filter(Boolean);o.onChange(p),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.emailWhitelist.suffixes.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"recaptcha_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.recaptcha.enable.label")}),e.jsx(F,{children:s("safe.form.recaptcha.enable.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("recaptcha_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"recaptcha_key",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.recaptcha.key.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("safe.form.recaptcha.key.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.recaptcha.key.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"recaptcha_site_key",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.recaptcha.siteKey.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("safe.form.recaptcha.siteKey.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.recaptcha.siteKey.description")}),e.jsx(P,{})]})})]}),e.jsx(j,{control:r.control,name:"register_limit_by_ip_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.registerLimit.enable.label")}),e.jsx(F,{children:s("safe.form.registerLimit.enable.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("register_limit_by_ip_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"register_limit_count",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.registerLimit.count.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("safe.form.registerLimit.count.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.registerLimit.count.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"register_limit_expire",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.registerLimit.expire.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("safe.form.registerLimit.expire.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.registerLimit.expire.description")}),e.jsx(P,{})]})})]}),e.jsx(j,{control:r.control,name:"password_limit_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.passwordLimit.enable.label")}),e.jsx(F,{children:s("safe.form.passwordLimit.enable.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("password_limit_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"password_limit_count",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.passwordLimit.count.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("safe.form.passwordLimit.count.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.passwordLimit.count.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"password_limit_expire",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.passwordLimit.expire.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("safe.form.passwordLimit.expire.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.passwordLimit.expire.description")}),e.jsx(P,{})]})})]}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("safe.form.saving")})]})})}function cm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("safe.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("safe.description")})]}),e.jsx(be,{}),e.jsx(im,{})]})}const dm=Object.freeze(Object.defineProperty({__proto__:null,default:cm},Symbol.toStringTag,{value:"Module"})),mm=h.object({plan_change_enable:h.boolean().nullable().default(!1),reset_traffic_method:h.coerce.number().nullable().default(0),surplus_enable:h.boolean().nullable().default(!1),new_order_event_id:h.coerce.number().nullable().default(0),renew_order_event_id:h.coerce.number().nullable().default(0),change_order_event_id:h.coerce.number().nullable().default(0),show_info_to_server_enable:h.boolean().nullable().default(!1),show_protocol_to_server_enable:h.boolean().nullable().default(!1),default_remind_expire:h.boolean().nullable().default(!1),default_remind_traffic:h.boolean().nullable().default(!1),subscribe_path:h.string().nullable().default("s")}),um={plan_change_enable:!1,reset_traffic_method:0,surplus_enable:!1,new_order_event_id:0,renew_order_event_id:0,change_order_event_id:0,show_info_to_server_enable:!1,show_protocol_to_server_enable:!1,default_remind_expire:!1,default_remind_traffic:!1,subscribe_path:"s"};function xm(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(mm),defaultValues:um,mode:"onBlur"}),{data:c}=se({queryKey:["settings","subscribe"],queryFn:()=>us("subscribe")}),{mutateAsync:i}=es({mutationFn:xs,onSuccess:o=>{o.data&&q.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data?.subscribe){const o=c?.data?.subscribe;Object.entries(o).forEach(([d,p])=>{r.setValue(d,p)}),l.current=o}},[c]);const u=m.useCallback(pe.debounce(async o=>{if(!pe.isEqual(o,l.current)){a(!0);try{await i(o),l.current=o}finally{a(!1)}}},1e3),[i]),x=m.useCallback(o=>{u(o)},[u]);return m.useEffect(()=>{const o=r.watch(d=>{x(d)});return()=>o.unsubscribe()},[r.watch,x]),e.jsx(xe,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"plan_change_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.plan_change_enable.title")}),e.jsx(F,{children:s("subscribe.plan_change_enable.description")}),e.jsx(N,{children:e.jsx(K,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"reset_traffic_method",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.reset_traffic_method.title")}),e.jsxs(W,{onValueChange:o.onChange,value:o.value?.toString()||"0",children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:"请选择重置方式"})})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("subscribe.reset_traffic_method.options.monthly_first")}),e.jsx($,{value:"1",children:s("subscribe.reset_traffic_method.options.monthly_reset")}),e.jsx($,{value:"2",children:s("subscribe.reset_traffic_method.options.no_reset")}),e.jsx($,{value:"3",children:s("subscribe.reset_traffic_method.options.yearly_first")}),e.jsx($,{value:"4",children:s("subscribe.reset_traffic_method.options.yearly_reset")})]})]}),e.jsx(F,{children:s("subscribe.reset_traffic_method.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"surplus_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.surplus_enable.title")}),e.jsx(F,{children:s("subscribe.surplus_enable.description")}),e.jsx(N,{children:e.jsx(K,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"new_order_event_id",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.new_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(N,{children:e.jsxs(W,{onValueChange:o.onChange,value:o.value?.toString(),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("subscribe.new_order_event.options.no_action")}),e.jsx($,{value:"1",children:s("subscribe.new_order_event.options.reset_traffic")})]})]})})}),e.jsx(F,{children:s("subscribe.new_order_event.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"renew_order_event_id",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.renew_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(N,{children:e.jsxs(W,{onValueChange:o.onChange,value:o.value?.toString(),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("subscribe.renew_order_event.options.no_action")}),e.jsx($,{value:"1",children:s("subscribe.renew_order_event.options.reset_traffic")})]})]})})}),e.jsx(F,{children:s("renew_order_event.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"change_order_event_id",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.change_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(N,{children:e.jsxs(W,{onValueChange:o.onChange,value:o.value?.toString(),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("subscribe.change_order_event.options.no_action")}),e.jsx($,{value:"1",children:s("subscribe.change_order_event.options.reset_traffic")})]})]})})}),e.jsx(F,{children:s("subscribe.change_order_event.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"subscribe_path",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.subscribe_path.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:"subscribe",...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[s("subscribe.subscribe_path.description"),e.jsx("br",{}),s("subscribe.subscribe_path.current_format",{path:o.value||"s"})]}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"show_info_to_server_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("subscribe.show_info_to_server.title")}),e.jsx(F,{children:s("subscribe.show_info_to_server.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"show_protocol_to_server_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("subscribe.show_protocol_to_server.title")}),e.jsx(F,{children:s("subscribe.show_protocol_to_server.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function hm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("subscribe.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("subscribe.description")})]}),e.jsx(be,{}),e.jsx(xm,{})]})}const fm=Object.freeze(Object.defineProperty({__proto__:null,default:hm},Symbol.toStringTag,{value:"Module"})),pm=h.object({invite_force:h.boolean().default(!1),invite_commission:h.coerce.string().default("0"),invite_gen_limit:h.coerce.string().default("0"),invite_never_expire:h.boolean().default(!1),commission_first_time_enable:h.boolean().default(!1),commission_auto_check_enable:h.boolean().default(!1),commission_withdraw_limit:h.coerce.string().default("0"),commission_withdraw_method:h.array(h.string()).default(["支付宝","USDT","Paypal"]),withdraw_close_enable:h.boolean().default(!1),commission_distribution_enable:h.boolean().default(!1),commission_distribution_l1:h.coerce.number().default(0),commission_distribution_l2:h.coerce.number().default(0),commission_distribution_l3:h.coerce.number().default(0)}),gm={invite_force:!1,invite_commission:"0",invite_gen_limit:"0",invite_never_expire:!1,commission_first_time_enable:!1,commission_auto_check_enable:!1,commission_withdraw_limit:"0",commission_withdraw_method:["支付宝","USDT","Paypal"],withdraw_close_enable:!1,commission_distribution_enable:!1,commission_distribution_l1:0,commission_distribution_l2:0,commission_distribution_l3:0};function jm(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(pm),defaultValues:gm,mode:"onBlur"}),{data:c}=se({queryKey:["settings","invite"],queryFn:()=>us("invite")}),{mutateAsync:i}=es({mutationFn:xs,onSuccess:o=>{o.data&&q.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data?.invite){const o=c?.data?.invite;Object.entries(o).forEach(([d,p])=>{typeof p=="number"?r.setValue(d,String(p)):r.setValue(d,p)}),l.current=o}},[c]);const u=m.useCallback(pe.debounce(async o=>{if(!pe.isEqual(o,l.current)){a(!0);try{await i(o),l.current=o}finally{a(!1)}}},1e3),[i]),x=m.useCallback(o=>{u(o)},[u]);return m.useEffect(()=>{const o=r.watch(d=>{x(d)});return()=>o.unsubscribe()},[r.watch,x]),e.jsx(xe,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"invite_force",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.invite_force.title")}),e.jsx(F,{children:s("invite.invite_force.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"invite_commission",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("invite.invite_commission.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("invite.invite_commission.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("invite.invite_commission.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"invite_gen_limit",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("invite.invite_gen_limit.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("invite.invite_gen_limit.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("invite.invite_gen_limit.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"invite_never_expire",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.invite_never_expire.title")}),e.jsx(F,{children:s("invite.invite_never_expire.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_first_time_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.commission_first_time.title")}),e.jsx(F,{children:s("invite.commission_first_time.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_auto_check_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.commission_auto_check.title")}),e.jsx(F,{children:s("invite.commission_auto_check.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_withdraw_limit",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("invite.commission_withdraw_limit.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("invite.commission_withdraw_limit.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("invite.commission_withdraw_limit.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"commission_withdraw_method",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("invite.commission_withdraw_method.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("invite.commission_withdraw_method.placeholder"),...o,value:Array.isArray(o.value)?o.value.join(","):"",onChange:d=>{const p=d.target.value.split(",").filter(Boolean);o.onChange(p),x(r.getValues())}})}),e.jsx(F,{children:s("invite.commission_withdraw_method.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"withdraw_close_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.withdraw_close.title")}),e.jsx(F,{children:s("invite.withdraw_close.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_distribution_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.commission_distribution.title")}),e.jsx(F,{children:s("invite.commission_distribution.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("commission_distribution_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"commission_distribution_l1",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:s("invite.commission_distribution.l1")}),e.jsx(N,{children:e.jsx(T,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...o,value:o.value||"",onChange:d=>{const p=d.target.value?Number(d.target.value):0;o.onChange(p),x(r.getValues())}})}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"commission_distribution_l2",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:s("invite.commission_distribution.l2")}),e.jsx(N,{children:e.jsx(T,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...o,value:o.value||"",onChange:d=>{const p=d.target.value?Number(d.target.value):0;o.onChange(p),x(r.getValues())}})}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"commission_distribution_l3",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:s("invite.commission_distribution.l3")}),e.jsx(N,{children:e.jsx(T,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...o,value:o.value||"",onChange:d=>{const p=d.target.value?Number(d.target.value):0;o.onChange(p),x(r.getValues())}})}),e.jsx(P,{})]})})]}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("invite.saving")})]})})}function vm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("invite.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("invite.description")})]}),e.jsx(be,{}),e.jsx(jm,{})]})}const bm=Object.freeze(Object.defineProperty({__proto__:null,default:vm},Symbol.toStringTag,{value:"Module"})),ym=h.object({frontend_theme:h.string().nullable(),frontend_theme_sidebar:h.string().nullable(),frontend_theme_header:h.string().nullable(),frontend_theme_color:h.string().nullable(),frontend_background_url:h.string().url().nullable()}),Nm={frontend_theme:"",frontend_theme_sidebar:"",frontend_theme_header:"",frontend_theme_color:"",frontend_background_url:""};function _m(){const{data:s}=se({queryKey:["settings","frontend"],queryFn:()=>us("frontend")}),n=ce({resolver:ue(ym),defaultValues:Nm,mode:"onChange"});m.useEffect(()=>{if(s?.data?.frontend){const l=s?.data?.frontend;Object.entries(l).forEach(([r,c])=>{n.setValue(r,c)})}},[s]);function a(l){xs(l).then(({data:r})=>{r&&q.success("更新成功")})}return e.jsx(xe,{...n,children:e.jsxs("form",{onSubmit:n.handleSubmit(a),className:"space-y-8",children:[e.jsx(j,{control:n.control,name:"frontend_theme_sidebar",render:({field:l})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:"边栏风格"}),e.jsx(F,{children:"边栏风格"})]}),e.jsx(N,{children:e.jsx(K,{checked:l.value,onCheckedChange:l.onChange})})]})}),e.jsx(j,{control:n.control,name:"frontend_theme_header",render:({field:l})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:"头部风格"}),e.jsx(F,{children:"边栏风格"})]}),e.jsx(N,{children:e.jsx(K,{checked:l.value,onCheckedChange:l.onChange})})]})}),e.jsx(j,{control:n.control,name:"frontend_theme_color",render:({field:l})=>e.jsxs(g,{children:[e.jsx(v,{children:"主题色"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(N,{children:e.jsxs("select",{className:y(Hs({variant:"outline"}),"w-[200px] appearance-none font-normal"),...l,children:[e.jsx("option",{value:"default",children:"默认"}),e.jsx("option",{value:"black",children:"黑色"}),e.jsx("option",{value:"blackblue",children:"暗蓝色"}),e.jsx("option",{value:"green",children:"奶绿色"})]})}),e.jsx(na,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(F,{children:"主题色"}),e.jsx(P,{})]})}),e.jsx(j,{control:n.control,name:"frontend_background_url",render:({field:l})=>e.jsxs(g,{children:[e.jsx(v,{children:"背景"}),e.jsx(N,{children:e.jsx(T,{placeholder:"请输入图片地址",...l})}),e.jsx(F,{children:"将会在后台登录页面进行展示。"}),e.jsx(P,{})]})}),e.jsx(R,{type:"submit",children:"保存设置"})]})})}function wm(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"个性化设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"自定义系统界面外观,包括主题风格、布局、颜色方案、背景图等个性化选项。"})]}),e.jsx(be,{}),e.jsx(_m,{})]})}const Cm=Object.freeze(Object.defineProperty({__proto__:null,default:wm},Symbol.toStringTag,{value:"Module"})),Sm=h.object({server_pull_interval:h.coerce.number().nullable(),server_push_interval:h.coerce.number().nullable(),server_token:h.string().nullable(),device_limit_mode:h.coerce.number().nullable()}),km={server_pull_interval:0,server_push_interval:0,server_token:"",device_limit_mode:0};function Dm(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(Sm),defaultValues:km,mode:"onBlur"}),{data:c}=se({queryKey:["settings","server"],queryFn:()=>us("server")}),{mutateAsync:i}=es({mutationFn:xs,onSuccess:d=>{d.data&&q.success(s("common.AutoSaved"))}});m.useEffect(()=>{if(c?.data.server){const d=c.data.server;Object.entries(d).forEach(([p,D])=>{r.setValue(p,D)}),l.current=d}},[c]);const u=m.useCallback(pe.debounce(async d=>{if(!pe.isEqual(d,l.current)){a(!0);try{await i(d),l.current=d}finally{a(!1)}}},1e3),[i]),x=m.useCallback(d=>{u(d)},[u]);m.useEffect(()=>{const d=r.watch(p=>{x(p)});return()=>d.unsubscribe()},[r.watch,x]);const o=()=>{const d=Math.floor(Math.random()*17)+16,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let D="";for(let V=0;Ve.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("server.server_token.title")}),e.jsx(N,{children:e.jsxs("div",{className:"relative",children:[e.jsx(T,{placeholder:s("server.server_token.placeholder"),...d,value:d.value||"",className:"pr-10"}),e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2",onClick:p=>{p.preventDefault(),o()},children:e.jsx(si,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"})})}),e.jsx(te,{children:e.jsx("p",{children:s("server.server_token.generate_tooltip")})})]})})]})}),e.jsx(F,{children:s("server.server_token.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"server_pull_interval",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("server.server_pull_interval.title")}),e.jsx(N,{children:e.jsx(T,{type:"number",placeholder:s("server.server_pull_interval.placeholder"),...d,value:d.value||"",onChange:p=>{const D=p.target.value?Number(p.target.value):null;d.onChange(D)}})}),e.jsx(F,{children:s("server.server_pull_interval.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"server_push_interval",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("server.server_push_interval.title")}),e.jsx(N,{children:e.jsx(T,{type:"number",placeholder:s("server.server_push_interval.placeholder"),...d,value:d.value||"",onChange:p=>{const D=p.target.value?Number(p.target.value):null;d.onChange(D)}})}),e.jsx(F,{children:s("server.server_push_interval.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"device_limit_mode",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("server.device_limit_mode.title")}),e.jsxs(W,{onValueChange:d.onChange,value:d.value?.toString()||"0",children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:s("server.device_limit_mode.placeholder")})})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("server.device_limit_mode.strict")}),e.jsx($,{value:"1",children:s("server.device_limit_mode.relaxed")})]})]}),e.jsx(F,{children:s("server.device_limit_mode.description")}),e.jsx(P,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("server.saving")})]})})}function Tm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("server.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("server.description")})]}),e.jsx(be,{}),e.jsx(Dm,{})]})}const Pm=Object.freeze(Object.defineProperty({__proto__:null,default:Tm},Symbol.toStringTag,{value:"Module"}));function Rm({open:s,onOpenChange:n,result:a}){const l=!a.error;return e.jsx(ge,{open:s,onOpenChange:n,children:e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l?e.jsx(Pn,{className:"h-5 w-5 text-green-500"}):e.jsx(Rn,{className:"h-5 w-5 text-destructive"}),e.jsx(je,{children:l?"邮件发送成功":"邮件发送失败"})]}),e.jsx(Te,{children:l?"测试邮件已成功发送,请检查收件箱":"发送测试邮件时遇到错误"})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"发送详情"}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2 text-sm",children:[e.jsx("div",{className:"text-muted-foreground",children:"收件地址"}),e.jsx("div",{children:a.email}),e.jsx("div",{className:"text-muted-foreground",children:"邮件主题"}),e.jsx("div",{children:a.subject}),e.jsx("div",{className:"text-muted-foreground",children:"模板名称"}),e.jsx("div",{children:a.template_name})]})]}),a.error&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium text-destructive",children:"错误信息"}),e.jsx("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive break-all",children:a.error})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"配置信息"}),e.jsx(rt,{className:"h-[200px] rounded-md border p-4",children:e.jsx("div",{className:"grid gap-2 text-sm",children:e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2",children:[e.jsx("div",{className:"text-muted-foreground",children:"驱动"}),e.jsx("div",{children:a.config.driver}),e.jsx("div",{className:"text-muted-foreground",children:"服务器"}),e.jsx("div",{children:a.config.host}),e.jsx("div",{className:"text-muted-foreground",children:"端口"}),e.jsx("div",{children:a.config.port}),e.jsx("div",{className:"text-muted-foreground",children:"加密方式"}),e.jsx("div",{children:a.config.encryption||"无"}),e.jsx("div",{className:"text-muted-foreground",children:"发件人"}),e.jsx("div",{children:a.config.from.address?`${a.config.from.address}${a.config.from.name?` (${a.config.from.name})`:""}`:"未设置"}),e.jsx("div",{className:"text-muted-foreground",children:"用户名"}),e.jsx("div",{children:a.config.username||"未设置"})]})})})]})]})]})})}const Em=h.object({email_template:h.string().nullable().default("classic"),email_host:h.string().nullable().default(""),email_port:h.string().regex(/^\d+$/).nullable().default("465"),email_username:h.string().nullable().default(""),email_password:h.string().nullable().default(""),email_encryption:h.string().nullable().default(""),email_from_address:h.string().email().nullable().default(""),remind_mail_enable:h.boolean().nullable().default(!1)});function Vm(){const{t:s}=I("settings"),[n,a]=m.useState(null),[l,r]=m.useState(!1),c=m.useRef(null),[i,u]=m.useState(!1),x=ce({resolver:ue(Em),defaultValues:{},mode:"onBlur"}),{data:o}=se({queryKey:["settings","email"],queryFn:()=>us("email")}),{data:d}=se({queryKey:["emailTemplate"],queryFn:()=>Rd()}),{mutateAsync:p}=es({mutationFn:xs,onSuccess:k=>{k.data&&q.success(s("common.autoSaved"))}}),{mutate:D,isPending:V}=es({mutationFn:Ed,onMutate:()=>{a(null),r(!1)},onSuccess:k=>{a(k.data),r(!0),k.data.error?q.error(s("email.test.error")):q.success(s("email.test.success"))}});m.useEffect(()=>{if(o?.data.email){const k=o.data.email;Object.entries(k).forEach(([b,w])=>{x.setValue(b,w)}),c.current=k}},[o]);const f=m.useCallback(pe.debounce(async k=>{if(!pe.isEqual(k,c.current)){u(!0);try{await p(k),c.current=k}finally{u(!1)}}},1e3),[p]),_=m.useCallback(k=>{f(k)},[f]);return m.useEffect(()=>{const k=x.watch(b=>{_(b)});return()=>k.unsubscribe()},[x.watch,_]),e.jsxs(e.Fragment,{children:[e.jsx(xe,{...x,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:x.control,name:"email_host",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email.email_host.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(F,{children:s("email.email_host.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:x.control,name:"email_port",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email.email_port.title")}),e.jsx(N,{children:e.jsx(T,{type:"number",placeholder:s("common.placeholder"),...k,value:k.value||"",onChange:b=>{const w=b.target.value?Number(b.target.value):null;k.onChange(w)}})}),e.jsx(F,{children:s("email.email_port.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:x.control,name:"email_encryption",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email.email_encryption.title")}),e.jsxs(W,{onValueChange:k.onChange,value:k.value||"none",children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:"请选择加密方式"})})}),e.jsxs(G,{children:[e.jsx($,{value:"none",children:s("email.email_encryption.none")}),e.jsx($,{value:"ssl",children:s("email.email_encryption.ssl")}),e.jsx($,{value:"tls",children:s("email.email_encryption.tls")})]})]}),e.jsx(F,{children:s("email.email_encryption.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:x.control,name:"email_username",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email.email_username.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(F,{children:s("email.email_username.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:x.control,name:"email_password",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email_password.title")}),e.jsx(N,{children:e.jsx(T,{type:"password",placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(F,{children:s("email_password.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:x.control,name:"email_from_address",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email_from.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(F,{children:s("email_from.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:x.control,name:"email_template",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email_template.title")}),e.jsxs(W,{onValueChange:b=>{k.onChange(b),_(x.getValues())},value:k.value||void 0,children:[e.jsx(N,{children:e.jsx(B,{className:"w-[200px]",children:e.jsx(Y,{placeholder:s("email_template.placeholder")})})}),e.jsx(G,{children:d?.data?.map(b=>e.jsx($,{value:b,children:b},b))})]}),e.jsx(F,{children:s("email_template.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:x.control,name:"remind_mail_enable",render:({field:k})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("remind_mail.title")}),e.jsx(F,{children:s("remind_mail.description")})]}),e.jsx(N,{children:e.jsx(K,{checked:k.value||!1,onCheckedChange:b=>{k.onChange(b),_(x.getValues())}})})]})}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(R,{onClick:()=>D(),loading:V,disabled:V,children:s(V?"test.sending":"test.title")})})]})}),i&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("saving")}),n&&e.jsx(Rm,{open:l,onOpenChange:r,result:n})]})}function Im(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("email.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("email.description")})]}),e.jsx(be,{}),e.jsx(Vm,{})]})}const Fm=Object.freeze(Object.defineProperty({__proto__:null,default:Im},Symbol.toStringTag,{value:"Module"})),Mm=h.object({telegram_bot_enable:h.boolean().nullable(),telegram_bot_token:h.string().nullable(),telegram_discuss_link:h.string().nullable()}),Om={telegram_bot_enable:!1,telegram_bot_token:"",telegram_discuss_link:""};function zm(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(Mm),defaultValues:Om,mode:"onBlur"}),{data:c}=se({queryKey:["settings","telegram"],queryFn:()=>us("telegram")}),{mutateAsync:i}=es({mutationFn:xs,onSuccess:p=>{p.data&&q.success(s("common.autoSaved"))}}),{mutate:u,isPending:x}=es({mutationFn:Vd,onSuccess:p=>{p.data&&q.success(s("telegram.webhook_success"))}});m.useEffect(()=>{if(c?.data.telegram){const p=c.data.telegram;Object.entries(p).forEach(([D,V])=>{r.setValue(D,V)}),l.current=p}},[c]);const o=m.useCallback(pe.debounce(async p=>{if(!pe.isEqual(p,l.current)){a(!0);try{await i(p),l.current=p}finally{a(!1)}}},1e3),[i]),d=m.useCallback(p=>{o(p)},[o]);return m.useEffect(()=>{const p=r.watch(D=>{d(D)});return()=>p.unsubscribe()},[r.watch,d]),e.jsx(xe,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"telegram_bot_token",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("telegram.bot_token.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("telegram.bot_token.placeholder"),...p,value:p.value||""})}),e.jsx(F,{children:s("telegram.bot_token.description")}),e.jsx(P,{})]})}),r.watch("telegram_bot_token")&&e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("telegram.webhook.title")}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(R,{loading:x,disabled:x,onClick:()=>u(),children:s(x?"telegram.webhook.setting":"telegram.webhook.button")}),n&&e.jsx("span",{className:"text-sm text-muted-foreground",children:s("common.saving")})]}),e.jsx(F,{children:s("telegram.webhook.description")}),e.jsx(P,{})]}),e.jsx(j,{control:r.control,name:"telegram_bot_enable",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("telegram.bot_enable.title")}),e.jsx(F,{children:s("telegram.bot_enable.description")}),e.jsx(N,{children:e.jsx(K,{checked:p.value||!1,onCheckedChange:D=>{p.onChange(D),d(r.getValues())}})}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"telegram_discuss_link",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("telegram.discuss_link.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("telegram.discuss_link.placeholder"),...p,value:p.value||""})}),e.jsx(F,{children:s("telegram.discuss_link.description")}),e.jsx(P,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function Lm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("telegram.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("telegram.description")})]}),e.jsx(be,{}),e.jsx(zm,{})]})}const Am=Object.freeze(Object.defineProperty({__proto__:null,default:Lm},Symbol.toStringTag,{value:"Module"})),$m=h.object({windows_version:h.string().nullable(),windows_download_url:h.string().nullable(),macos_version:h.string().nullable(),macos_download_url:h.string().nullable(),android_version:h.string().nullable(),android_download_url:h.string().nullable()}),qm={windows_version:"",windows_download_url:"",macos_version:"",macos_download_url:"",android_version:"",android_download_url:""};function Hm(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue($m),defaultValues:qm,mode:"onBlur"}),{data:c}=se({queryKey:["settings","app"],queryFn:()=>us("app")}),{mutateAsync:i}=es({mutationFn:xs,onSuccess:o=>{o.data&&q.success(s("app.save_success"))}});m.useEffect(()=>{if(c?.data.app){const o=c.data.app;Object.entries(o).forEach(([d,p])=>{r.setValue(d,p)}),l.current=o}},[c]);const u=m.useCallback(pe.debounce(async o=>{if(!pe.isEqual(o,l.current)){a(!0);try{await i(o),l.current=o}finally{a(!1)}}},1e3),[i]),x=m.useCallback(o=>{u(o)},[u]);return m.useEffect(()=>{const o=r.watch(d=>{x(d)});return()=>o.unsubscribe()},[r.watch,x]),e.jsx(xe,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"windows_version",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.windows.version.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("app.windows.version.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"windows_download_url",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.windows.download.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("app.windows.download.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"macos_version",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.macos.version.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("app.macos.version.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"macos_download_url",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.macos.download.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("app.macos.download.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"android_version",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.android.version.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("app.android.version.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"android_download_url",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.android.download.title")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("app.android.download.description")}),e.jsx(P,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function Km(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("app.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("app.description")})]}),e.jsx(be,{}),e.jsx(Hm,{})]})}const Um=Object.freeze(Object.defineProperty({__proto__:null,default:Km},Symbol.toStringTag,{value:"Module"})),da=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:y("w-full caption-bottom text-sm",s),...n})}));da.displayName="Table";const ma=m.forwardRef(({className:s,...n},a)=>e.jsx("thead",{ref:a,className:y("[&_tr]:border-b",s),...n}));ma.displayName="TableHeader";const ua=m.forwardRef(({className:s,...n},a)=>e.jsx("tbody",{ref:a,className:y("[&_tr:last-child]:border-0",s),...n}));ua.displayName="TableBody";const Bm=m.forwardRef(({className:s,...n},a)=>e.jsx("tfoot",{ref:a,className:y("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...n}));Bm.displayName="TableFooter";const vs=m.forwardRef(({className:s,...n},a)=>e.jsx("tr",{ref:a,className:y("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...n}));vs.displayName="TableRow";const xa=m.forwardRef(({className:s,...n},a)=>e.jsx("th",{ref:a,className:y("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...n}));xa.displayName="TableHead";const $s=m.forwardRef(({className:s,...n},a)=>e.jsx("td",{ref:a,className:y("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...n}));$s.displayName="TableCell";const Gm=m.forwardRef(({className:s,...n},a)=>e.jsx("caption",{ref:a,className:y("mt-4 text-sm text-muted-foreground",s),...n}));Gm.displayName="TableCaption";function Wm({table:s}){const[n,a]=m.useState("");m.useEffect(()=>{a((s.getState().pagination.pageIndex+1).toString())},[s.getState().pagination.pageIndex]);const l=r=>{const c=parseInt(r);!isNaN(c)&&c>=1&&c<=s.getPageCount()?s.setPageIndex(c-1):a((s.getState().pagination.pageIndex+1).toString())};return e.jsxs("div",{className:"flex flex-col-reverse gap-4 px-2 py-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex-1 text-sm text-muted-foreground",children:["已选择 ",s.getFilteredSelectedRowModel().rows.length," 项, 共"," ",s.getFilteredRowModel().rows.length," 项"]}),e.jsxs("div",{className:"flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"每页显示"}),e.jsxs(W,{value:`${s.getState().pagination.pageSize}`,onValueChange:r=>{s.setPageSize(Number(r))},children:[e.jsx(B,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:s.getState().pagination.pageSize})}),e.jsx(G,{side:"top",children:[10,20,30,40,50,100,500].map(r=>e.jsx($,{value:`${r}`,children:r},r))})]})]}),e.jsxs("div",{className:"flex items-center justify-center space-x-2 text-sm font-medium",children:[e.jsx("span",{children:"第"}),e.jsx(T,{type:"text",value:n,onChange:r=>a(r.target.value),onBlur:r=>l(r.target.value),onKeyDown:r=>{r.key==="Enter"&&l(r.currentTarget.value)},className:"h-8 w-[50px] text-center"}),e.jsxs("span",{children:["页,共 ",s.getPageCount()," 页"]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(R,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(0),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到第一页"}),e.jsx(ti,{className:"h-4 w-4"})]}),e.jsxs(R,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.previousPage(),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"上一页"}),e.jsx(Cn,{className:"h-4 w-4"})]}),e.jsxs(R,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.nextPage(),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"下一页"}),e.jsx(aa,{className:"h-4 w-4"})]}),e.jsxs(R,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(s.getPageCount()-1),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到最后一页"}),e.jsx(ai,{className:"h-4 w-4"})]})]})]})]})}function Ye({table:s,toolbar:n,draggable:a=!1,onDragStart:l,onDragEnd:r,onDragOver:c,onDragLeave:i,onDrop:u,showPagination:x=!0,isLoading:o=!1}){const d=m.useRef(null),p=s.getAllColumns().filter(_=>_.getIsPinned()==="left"),D=s.getAllColumns().filter(_=>_.getIsPinned()==="right"),V=_=>p.slice(0,_).reduce((k,b)=>k+(b.getSize()??0),0),f=_=>D.slice(_+1).reduce((k,b)=>k+(b.getSize()??0),0);return e.jsxs("div",{className:"space-y-4",children:[typeof n=="function"?n(s):n,e.jsx("div",{ref:d,className:"relative overflow-auto rounded-md border bg-card",children:e.jsx("div",{className:"overflow-auto",children:e.jsxs(da,{children:[e.jsx(ma,{children:s.getHeaderGroups().map(_=>e.jsx(vs,{className:"hover:bg-transparent",children:_.headers.map((k,b)=>{const w=k.column.getIsPinned()==="left",S=k.column.getIsPinned()==="right",C=w?V(p.indexOf(k.column)):void 0,E=S?f(D.indexOf(k.column)):void 0;return e.jsx(xa,{colSpan:k.colSpan,style:{width:k.getSize(),...w&&{left:C},...S&&{right:E}},className:y("h-11 bg-card px-4 text-muted-foreground",(w||S)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",w&&"before:right-0",S&&"before:left-0"]),children:k.isPlaceholder?null:bt(k.column.columnDef.header,k.getContext())},k.id)})},_.id))}),e.jsx(ua,{children:s.getRowModel().rows?.length?s.getRowModel().rows.map((_,k)=>e.jsx(vs,{"data-state":_.getIsSelected()&&"selected",className:"hover:bg-muted/50",draggable:a,onDragStart:b=>l?.(b,k),onDragEnd:r,onDragOver:c,onDragLeave:i,onDrop:b=>u?.(b,k),children:_.getVisibleCells().map((b,w)=>{const S=b.column.getIsPinned()==="left",C=b.column.getIsPinned()==="right",E=S?V(p.indexOf(b.column)):void 0,z=C?f(D.indexOf(b.column)):void 0;return e.jsx($s,{style:{width:b.column.getSize(),...S&&{left:E},...C&&{right:z}},className:y("bg-card",(S||C)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",S&&"before:right-0",C&&"before:left-0"]),children:bt(b.column.columnDef.cell,b.getContext())},b.id)})},_.id)):e.jsx(vs,{children:e.jsx($s,{colSpan:s.getAllColumns().length,className:"h-24 text-center",children:"暂无数据"})})})]})})}),x&&e.jsx(Wm,{table:s})]})}const Ym=s=>h.object({id:h.number().nullable(),name:h.string().min(2,s("form.validation.name.min")).max(30,s("form.validation.name.max")),icon:h.string().optional().nullable(),notify_domain:h.string().refine(a=>!a||/^https?:\/\/\S+/.test(a),s("form.validation.notify_domain.url")).optional().nullable(),handling_fee_fixed:h.coerce.number().min(0).optional().nullable(),handling_fee_percent:h.coerce.number().min(0).max(100).optional().nullable(),payment:h.string().min(1,s("form.validation.payment.required")),config:h.record(h.string(),h.string())}),La={id:null,name:"",icon:"",notify_domain:"",handling_fee_fixed:0,handling_fee_percent:0,payment:"",config:{}};function br({refetch:s,dialogTrigger:n,type:a="add",defaultFormValues:l=La}){const{t:r}=I("payment"),[c,i]=m.useState(!1),[u,x]=m.useState(!1),[o,d]=m.useState([]),[p,D]=m.useState([]),V=Ym(r),f=ce({resolver:ue(V),defaultValues:l,mode:"onChange"}),_=f.watch("payment");m.useEffect(()=>{c&&(async()=>{const{data:w}=await Yc();d(w)})()},[c]),m.useEffect(()=>{if(!_||!c)return;(async()=>{const w={payment:_,...a==="edit"&&{id:Number(f.getValues("id"))}};Jc(w).then(({data:S})=>{D(S);const C=S.reduce((E,z)=>(z.field_name&&(E[z.field_name]=z.value??""),E),{});f.setValue("config",C)})})()},[_,c,f,a]);const k=async b=>{x(!0);try{(await Qc(b)).data&&(q.success(r("form.messages.success")),f.reset(La),s(),i(!1))}finally{x(!1)}};return e.jsxs(ge,{open:c,onOpenChange:i,children:[e.jsx(Fe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ne,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add.button")})]})}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsx(ve,{children:e.jsx(je,{children:r(a==="add"?"form.add.title":"form.edit.title")})}),e.jsx(xe,{...f,children:e.jsxs("form",{onSubmit:f.handleSubmit(k),className:"space-y-4",children:[e.jsx(j,{control:f.control,name:"name",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.name.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:r("form.fields.name.placeholder"),...b})}),e.jsx(F,{children:r("form.fields.name.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:f.control,name:"icon",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.icon.label")}),e.jsx(N,{children:e.jsx(T,{...b,value:b.value||"",placeholder:r("form.fields.icon.placeholder")})}),e.jsx(F,{children:r("form.fields.icon.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:f.control,name:"notify_domain",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.notify_domain.label")}),e.jsx(N,{children:e.jsx(T,{...b,value:b.value||"",placeholder:r("form.fields.notify_domain.placeholder")})}),e.jsx(F,{children:r("form.fields.notify_domain.description")}),e.jsx(P,{})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(j,{control:f.control,name:"handling_fee_percent",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.handling_fee_percent.label")}),e.jsx(N,{children:e.jsx(T,{type:"number",...b,value:b.value||"",placeholder:r("form.fields.handling_fee_percent.placeholder")})}),e.jsx(P,{})]})}),e.jsx(j,{control:f.control,name:"handling_fee_fixed",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.handling_fee_fixed.label")}),e.jsx(N,{children:e.jsx(T,{type:"number",...b,value:b.value||"",placeholder:r("form.fields.handling_fee_fixed.placeholder")})}),e.jsx(P,{})]})})]}),e.jsx(j,{control:f.control,name:"payment",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.payment.label")}),e.jsxs(W,{onValueChange:b.onChange,defaultValue:b.value,children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:r("form.fields.payment.placeholder")})})}),e.jsx(G,{children:o.map(w=>e.jsx($,{value:w,children:w},w))})]}),e.jsx(F,{children:r("form.fields.payment.description")}),e.jsx(P,{})]})}),p.length>0&&e.jsx("div",{className:"space-y-4",children:p.map(b=>e.jsx(j,{control:f.control,name:`config.${b.field_name}`,render:({field:w})=>e.jsxs(g,{children:[e.jsx(v,{children:b.label}),e.jsx(N,{children:e.jsx(T,{...w,value:w.value||""})}),e.jsx(P,{})]})},b.field_name))}),e.jsxs(Me,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.buttons.cancel")})}),e.jsx(R,{type:"submit",disabled:u,children:r("form.buttons.submit")})]})]})})]})]})}function M({column:s,title:n,tooltip:a,className:l}){return s.getCanSort()?e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(R,{variant:"ghost",size:"default",className:y("-ml-3 flex h-8 items-center gap-2 text-nowrap font-medium hover:bg-muted/60",l),onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),children:[e.jsx("span",{children:n}),a&&e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(Da,{className:"h-4 w-4 cursor-pointer text-muted-foreground"})}),e.jsx(te,{children:a})]})}),s.getIsSorted()==="asc"?e.jsx(Ut,{className:"h-4 w-4 text-foreground/70"}):s.getIsSorted()==="desc"?e.jsx(Bt,{className:"h-4 w-4 text-foreground/70"}):e.jsx(ni,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-foreground/70"})]})})}):e.jsxs("div",{className:y("flex items-center space-x-1 text-nowrap py-2 font-medium text-muted-foreground",l),children:[e.jsx("span",{children:n}),a&&e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx(Da,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(te,{children:a})]})})]})}const Jm=ri,Qm=li,Zm=oi,yr=m.forwardRef(({className:s,...n},a)=>e.jsx(In,{className:y("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",s),...n,ref:a}));yr.displayName=In.displayName;const Nr=m.forwardRef(({className:s,...n},a)=>e.jsxs(Zm,{children:[e.jsx(yr,{}),e.jsx(Fn,{ref:a,className:y("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",s),...n})]}));Nr.displayName=Fn.displayName;const _r=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...n});_r.displayName="AlertDialogHeader";const wr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});wr.displayName="AlertDialogFooter";const Cr=m.forwardRef(({className:s,...n},a)=>e.jsx(Mn,{ref:a,className:y("text-lg font-semibold",s),...n}));Cr.displayName=Mn.displayName;const Sr=m.forwardRef(({className:s,...n},a)=>e.jsx(On,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));Sr.displayName=On.displayName;const kr=m.forwardRef(({className:s,...n},a)=>e.jsx(zn,{ref:a,className:y(qs(),s),...n}));kr.displayName=zn.displayName;const Dr=m.forwardRef(({className:s,...n},a)=>e.jsx(Ln,{ref:a,className:y(qs({variant:"outline"}),"mt-2 sm:mt-0",s),...n}));Dr.displayName=Ln.displayName;function Je({onConfirm:s,children:n,title:a="确认操作",description:l="确定要执行此操作吗?",cancelText:r="取消",confirmText:c="确认",variant:i="default",className:u}){return e.jsxs(Jm,{children:[e.jsx(Qm,{asChild:!0,children:n}),e.jsxs(Nr,{className:y("sm:max-w-[425px]",u),children:[e.jsxs(_r,{children:[e.jsx(Cr,{children:a}),e.jsx(Sr,{children:l})]}),e.jsxs(wr,{children:[e.jsx(Dr,{asChild:!0,children:e.jsx(R,{variant:"outline",children:r})}),e.jsx(kr,{asChild:!0,children:e.jsx(R,{variant:i,onClick:s,children:c})})]})]})]})}const Tr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M11.29 15.29a2 2 0 0 0-.12.15a.8.8 0 0 0-.09.18a.6.6 0 0 0-.06.18a1.4 1.4 0 0 0 0 .2a.84.84 0 0 0 .08.38a.9.9 0 0 0 .54.54a.94.94 0 0 0 .76 0a.9.9 0 0 0 .54-.54A1 1 0 0 0 13 16a1 1 0 0 0-.29-.71a1 1 0 0 0-1.42 0M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8 8 0 0 1-8 8m0-13a3 3 0 0 0-2.6 1.5a1 1 0 1 0 1.73 1A1 1 0 0 1 12 9a1 1 0 0 1 0 2a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-.18A3 3 0 0 0 12 7"})}),Xm=({refetch:s,isSortMode:n=!1})=>{const{t:a}=I("payment");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:n?"cursor-move":"opacity-0",children:e.jsx(Pt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:l})=>e.jsx(M,{column:l,title:a("table.columns.id")}),cell:({row:l})=>e.jsx(H,{variant:"outline",children:l.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"enable",header:({column:l})=>e.jsx(M,{column:l,title:a("table.columns.enable")}),cell:({row:l})=>e.jsx(K,{defaultChecked:l.getValue("enable"),onCheckedChange:async()=>{const{data:r}=await Xc({id:l.original.id});r||s()}}),enableSorting:!1,size:100},{accessorKey:"name",header:({column:l})=>e.jsx(M,{column:l,title:a("table.columns.name")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:l.getValue("name")})}),enableSorting:!1,size:200},{accessorKey:"payment",header:({column:l})=>e.jsx(M,{column:l,title:a("table.columns.payment")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:l.getValue("payment")})}),enableSorting:!1,size:200},{accessorKey:"notify_url",header:({column:l})=>e.jsxs("div",{className:"flex items-center",children:[e.jsx(M,{column:l,title:a("table.columns.notify_url")}),e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{className:"ml-1",children:e.jsx(Tr,{className:"h-4 w-4"})}),e.jsx(te,{children:a("table.columns.notify_url_tooltip")})]})})]}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[300px] truncate font-medium",children:l.getValue("notify_url")})}),enableSorting:!1,size:3e3},{id:"actions",header:({column:l})=>e.jsx(M,{className:"justify-end",column:l,title:a("table.columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(br,{refetch:s,dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:a("table.actions.edit")})]}),type:"edit",defaultFormValues:l.original}),e.jsx(Je,{title:a("table.actions.delete.title"),description:a("table.actions.delete.description"),onConfirm:async()=>{const{data:r}=await Zc({id:l.original.id});r&&s()},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-destructive/10",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"}),e.jsx("span",{className:"sr-only",children:a("table.actions.delete.title")})]})})]}),size:100}]};function eu({table:s,refetch:n,saveOrder:a,isSortMode:l}){const{t:r}=I("payment"),c=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[l?e.jsx("p",{className:"text-sm text-muted-foreground",children:r("table.toolbar.sort.hint")}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(br,{refetch:n}),e.jsx(T,{placeholder:r("table.toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:i=>s.getColumn("name")?.setFilterValue(i.target.value),className:"h-8 w-[250px]"}),c&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:[r("table.toolbar.reset"),e.jsx(Oe,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:l?"default":"outline",onClick:a,size:"sm",children:r(l?"table.toolbar.sort.save":"table.toolbar.sort.edit")})})]})}function su(){const[s,n]=m.useState([]),[a,l]=m.useState([]),[r,c]=m.useState(!1),[i,u]=m.useState([]),[x,o]=m.useState({"drag-handle":!1}),[d,p]=m.useState({pageSize:20,pageIndex:0}),{refetch:D}=se({queryKey:["paymentList"],queryFn:async()=>{const{data:b}=await Wc();return u(b?.map(w=>({...w,enable:!!w.enable}))||[]),b}});m.useEffect(()=>{o({"drag-handle":r,actions:!r}),p({pageSize:r?99999:10,pageIndex:0})},[r]);const V=(b,w)=>{r&&(b.dataTransfer.setData("text/plain",w.toString()),b.currentTarget.classList.add("opacity-50"))},f=(b,w)=>{if(!r)return;b.preventDefault(),b.currentTarget.classList.remove("bg-muted");const S=parseInt(b.dataTransfer.getData("text/plain"));if(S===w)return;const C=[...i],[E]=C.splice(S,1);C.splice(w,0,E),u(C)},_=async()=>{r?ed({ids:i.map(b=>b.id)}).then(()=>{D(),c(!1),q.success("排序保存成功")}):c(!0)},k=ze({data:i,columns:Xm({refetch:D,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:x,pagination:d},onSortingChange:l,onColumnFiltersChange:n,onColumnVisibilityChange:o,getCoreRowModel:Le(),getFilteredRowModel:Ue(),getPaginationRowModel:Be(),getSortedRowModel:Ge(),initialState:{columnPinning:{right:["actions"]}},pageCount:r?1:void 0});return e.jsx(Ye,{table:k,toolbar:b=>e.jsx(eu,{table:b,refetch:D,saveOrder:_,isSortMode:r}),draggable:r,onDragStart:V,onDragEnd:b=>b.currentTarget.classList.remove("opacity-50"),onDragOver:b=>{b.preventDefault(),b.currentTarget.classList.add("bg-muted")},onDragLeave:b=>b.currentTarget.classList.remove("bg-muted"),onDrop:f,showPagination:!r})}function tu(){const{t:s}=I("payment");return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(Pe,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{children:[e.jsx("header",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("section",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(su,{})})]})]})}const au=Object.freeze(Object.defineProperty({__proto__:null,default:tu},Symbol.toStringTag,{value:"Module"})),nu=(s,n)=>{let a=null;switch(s.field_type){case"input":a=e.jsx(T,{placeholder:s.placeholder,...n});break;case"textarea":a=e.jsx(Cs,{placeholder:s.placeholder,...n});break;case"select":a=e.jsx("select",{className:y(qs({variant:"outline"}),"w-full appearance-none font-normal"),...n,children:s.select_options&&Object.keys(s.select_options).map(l=>e.jsx("option",{value:l,children:s.select_options?.[l]},l))});break;default:a=null;break}return a};function ru({themeKey:s,themeInfo:n}){const{t:a}=I("theme"),[l,r]=m.useState(!1),[c,i]=m.useState(!1),[u,x]=m.useState(!1),o=ce({defaultValues:n.configs.reduce((D,V)=>(D[V.field_name]="",D),{})}),d=async()=>{i(!0),Ic(s).then(({data:D})=>{Object.entries(D).forEach(([V,f])=>{o.setValue(V,f)})}).finally(()=>{i(!1)})},p=async D=>{x(!0),Fc(s,D).then(()=>{q.success(a("config.success")),r(!1)}).finally(()=>{x(!1)})};return e.jsxs(ge,{open:l,onOpenChange:D=>{r(D),D?d():o.reset()},children:[e.jsx(Fe,{asChild:!0,children:e.jsx(R,{variant:"outline",children:a("card.configureTheme")})}),e.jsxs(he,{className:"max-h-[90vh] overflow-auto sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:a("config.title",{name:n.name})}),e.jsx(Te,{children:a("config.description")})]}),c?e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(ra,{className:"h-6 w-6 animate-spin"})}):e.jsx(xe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(p),className:"space-y-4",children:[n.configs.map(D=>e.jsx(j,{control:o.control,name:D.field_name,render:({field:V})=>e.jsxs(g,{children:[e.jsx(v,{children:D.label}),e.jsx(N,{children:nu(D,V)}),e.jsx(P,{})]})},D.field_name)),e.jsxs(Me,{className:"mt-6 gap-2",children:[e.jsx(R,{type:"button",variant:"secondary",onClick:()=>r(!1),children:a("config.cancel")}),e.jsx(R,{type:"submit",loading:u,children:a("config.save")})]})]})})]})]})}function lu(){const{t:s}=I("theme"),[n,a]=m.useState(null),[l,r]=m.useState(!1),[c,i]=m.useState(!1),[u,x]=m.useState(!1),[o,d]=m.useState(null),p=m.useRef(null),[D,V]=m.useState(0),{data:f,isLoading:_,refetch:k}=se({queryKey:["themeList"],queryFn:async()=>{const{data:A}=await Vc();return A}}),b=async A=>{a(A),zc({frontend_theme:A}).then(()=>{q.success("主题切换成功"),k()}).finally(()=>{a(null)})},w=async A=>{if(!A.name.endsWith(".zip")){q.error(s("upload.error.format"));return}r(!0),Mc(A).then(()=>{q.success("主题上传成功"),i(!1),k()}).finally(()=>{r(!1),p.current&&(p.current.value="")})},S=A=>{A.preventDefault(),A.stopPropagation(),A.type==="dragenter"||A.type==="dragover"?x(!0):A.type==="dragleave"&&x(!1)},C=A=>{A.preventDefault(),A.stopPropagation(),x(!1),A.dataTransfer.files&&A.dataTransfer.files[0]&&w(A.dataTransfer.files[0])},E=()=>{o&&V(A=>A===0?o.images.length-1:A-1)},z=()=>{o&&V(A=>A===o.images.length-1?0:A+1)},Z=(A,X)=>{V(0),d({name:A,images:X})};return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(Pe,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("div",{className:"mb-2",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-muted-foreground",children:s("description")}),e.jsxs(R,{onClick:()=>i(!0),variant:"outline",className:"ml-4 shrink-0",size:"sm",children:[e.jsx(Kt,{className:"mr-2 h-4 w-4"}),s("upload.button")]})]})]}),e.jsx("section",{className:"grid gap-6 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3",children:_?e.jsxs(e.Fragment,{children:[e.jsx(Aa,{}),e.jsx(Aa,{})]}):f?.themes&&Object.entries(f.themes).map(([A,X])=>e.jsx(Ke,{className:"group relative overflow-hidden transition-all hover:shadow-md",style:{backgroundImage:X.background_url?`url(${X.background_url})`:"none",backgroundSize:"cover",backgroundPosition:"center"},children:e.jsxs("div",{className:y("relative z-10 h-full transition-colors",X.background_url?"group-hover:from-background/98 bg-gradient-to-t from-background/95 via-background/80 to-background/60 backdrop-blur-[1px] group-hover:via-background/90 group-hover:to-background/70":"bg-background"),children:[!!X.can_delete&&e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(Je,{title:s("card.delete.title"),description:s("card.delete.description"),confirmText:s("card.delete.button"),variant:"destructive",onConfirm:async()=>{if(A===f?.active){q.error(s("card.delete.error.active"));return}a(A),Oc(A).then(()=>{q.success("主题删除成功"),k()}).finally(()=>{a(null)})},children:e.jsx(R,{disabled:n===A,loading:n===A,variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",children:e.jsx(cs,{className:"h-4 w-4"})})})}),e.jsxs(ss,{children:[e.jsx(bs,{children:X.name}),e.jsx(tt,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{children:X.description}),X.version&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("card.version",{version:X.version})})]})})]}),e.jsxs(ts,{className:"flex items-center justify-end space-x-3",children:[X.images&&Array.isArray(X.images)&&X.images.length>0&&e.jsx(R,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>Z(X.name,X.images),children:e.jsx(ii,{className:"h-4 w-4"})}),e.jsx(ru,{themeKey:A,themeInfo:X}),e.jsx(R,{onClick:()=>b(A),disabled:n===A||A===f.active,loading:n===A,variant:A===f.active?"secondary":"default",children:A===f.active?s("card.currentTheme"):s("card.activateTheme")})]})]})},A))}),e.jsx(ge,{open:c,onOpenChange:i,children:e.jsxs(he,{className:"sm:max-w-md",children:[e.jsxs(ve,{children:[e.jsx(je,{children:s("upload.title")}),e.jsx(Te,{children:s("upload.description")})]}),e.jsxs("div",{className:y("relative mt-4 flex h-64 flex-col items-center justify-center rounded-lg border-2 border-dashed border-muted-foreground/25 px-5 py-10 text-center transition-colors",u&&"border-primary/50 bg-muted/50"),onDragEnter:S,onDragLeave:S,onDragOver:S,onDrop:C,children:[e.jsx("input",{type:"file",ref:p,className:"hidden",accept:".zip",onChange:A=>{const X=A.target.files?.[0];X&&w(X)}}),l?e.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[e.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-b-2 border-primary"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("upload.uploading")})]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsx("div",{className:"rounded-full border-2 border-muted-foreground/25 p-3",children:e.jsx(Kt,{className:"h-6 w-6 text-muted-foreground/50"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-sm font-medium",children:[s("upload.dragText")," ",e.jsx("button",{type:"button",onClick:()=>p.current?.click(),className:"mx-1 text-primary hover:underline",children:s("upload.clickText")})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s("upload.supportText")})]})]})})]})]})}),e.jsx(ge,{open:!!o,onOpenChange:A=>{A||(d(null),V(0))},children:e.jsxs(he,{className:"max-w-4xl",children:[e.jsxs(ve,{children:[e.jsxs(je,{children:[o?.name," ",s("preview.title")]}),e.jsx(Te,{className:"text-center",children:o&&s("preview.imageCount",{current:D+1,total:o.images.length})})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"aspect-[16/9] overflow-hidden rounded-lg border bg-muted",children:o?.images[D]&&e.jsx("img",{src:o.images[D],alt:`${o.name} 预览图 ${D+1}`,className:"h-full w-full object-contain"})}),o&&o.images.length>1&&e.jsxs(e.Fragment,{children:[e.jsx(R,{variant:"outline",size:"icon",className:"absolute left-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:E,children:e.jsx(ci,{className:"h-4 w-4"})}),e.jsx(R,{variant:"outline",size:"icon",className:"absolute right-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:z,children:e.jsx(di,{className:"h-4 w-4"})})]})]}),o&&o.images.length>1&&e.jsx("div",{className:"mt-4 flex gap-2 overflow-x-auto pb-2",children:o.images.map((A,X)=>e.jsx("button",{onClick:()=>V(X),className:y("relative h-16 w-16 flex-shrink-0 overflow-hidden rounded-md border-2",D===X?"border-primary":"border-transparent"),children:e.jsx("img",{src:A,alt:`缩略图 ${X+1}`,className:"h-full w-full object-cover"})},X))})]})})]})]})}function Aa(){return e.jsxs(Ke,{children:[e.jsxs(ss,{children:[e.jsx(Ve,{className:"h-6 w-[200px]"}),e.jsx(Ve,{className:"h-4 w-[300px]"})]}),e.jsxs(ts,{className:"flex items-center justify-end space-x-3",children:[e.jsx(Ve,{className:"h-10 w-[100px]"}),e.jsx(Ve,{className:"h-10 w-[100px]"})]})]})}const ou=Object.freeze(Object.defineProperty({__proto__:null,default:lu},Symbol.toStringTag,{value:"Module"})),ha=m.forwardRef(({className:s,value:n,onChange:a,...l},r)=>{const[c,i]=m.useState("");m.useEffect(()=>{if(c.includes(",")){const x=new Set([...n,...c.split(",").map(o=>o.trim())]);a(Array.from(x)),i("")}},[c,a,n]);const u=()=>{if(c){const x=new Set([...n,c]);a(Array.from(x)),i("")}};return e.jsxs("div",{className:y(" has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-neutral-950 dark:has-[:focus-visible]:ring-neutral-300 flex w-full flex-wrap gap-2 rounded-md border border-input shadow-sm px-3 py-2 text-sm ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",s),children:[n.map(x=>e.jsxs(H,{variant:"secondary",children:[x,e.jsx(J,{variant:"ghost",size:"icon",className:"ml-2 h-3 w-3",onClick:()=>{a(n.filter(o=>o!==x))},children:e.jsx(Gt,{className:"w-3"})})]},x)),e.jsx("input",{className:"flex-1 outline-none placeholder:text-muted-foreground bg-transparent",value:c,onChange:x=>i(x.target.value),onKeyDown:x=>{x.key==="Enter"||x.key===","?(x.preventDefault(),u()):x.key==="Backspace"&&c.length===0&&n.length>0&&(x.preventDefault(),a(n.slice(0,-1)))},...l,ref:r})]})});ha.displayName="InputTags";const iu=h.object({id:h.number().nullable(),title:h.string().min(1).max(250),content:h.string().min(1),show:h.boolean(),tags:h.array(h.string()),img_url:h.string().nullable()}),cu={id:null,show:!1,tags:[],img_url:"",title:"",content:""};function Pr({refetch:s,dialogTrigger:n,type:a="add",defaultFormValues:l=cu}){const{t:r}=I("notice"),[c,i]=m.useState(!1),u=ce({resolver:ue(iu),defaultValues:l,mode:"onChange",shouldFocusError:!0}),x=new la({html:!0});return e.jsx(xe,{...u,children:e.jsxs(ge,{onOpenChange:i,open:c,children:[e.jsx(Fe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ne,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add.button")})]})}),e.jsxs(he,{className:"sm:max-w-[1025px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(a==="add"?"form.add.title":"form.edit.title")}),e.jsx(Te,{})]}),e.jsx(j,{control:u.control,name:"title",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.title.label")}),e.jsx("div",{className:"relative ",children:e.jsx(N,{children:e.jsx(T,{placeholder:r("form.fields.title.placeholder"),...o})})}),e.jsx(P,{})]})}),e.jsx(j,{control:u.control,name:"content",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.content.label")}),e.jsx(N,{children:e.jsx(oa,{style:{height:"500px"},value:o.value,renderHTML:d=>x.render(d),onChange:({text:d})=>{o.onChange(d)}})}),e.jsx(P,{})]})}),e.jsx(j,{control:u.control,name:"img_url",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.img_url.label")}),e.jsx("div",{className:"relative",children:e.jsx(N,{children:e.jsx(T,{type:"text",placeholder:r("form.fields.img_url.placeholder"),...o,value:o.value||""})})}),e.jsx(P,{})]})}),e.jsx(j,{control:u.control,name:"show",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.show.label")}),e.jsx("div",{className:"relative py-2",children:e.jsx(N,{children:e.jsx(K,{checked:o.value,onCheckedChange:o.onChange})})}),e.jsx(P,{})]})}),e.jsx(j,{control:u.control,name:"tags",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.tags.label")}),e.jsx(N,{children:e.jsx(ha,{value:o.value,onChange:o.onChange,placeholder:r("form.fields.tags.placeholder"),className:"w-full"})}),e.jsx(P,{})]})}),e.jsxs(Me,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.buttons.cancel")})}),e.jsx(R,{type:"submit",onClick:o=>{o.preventDefault(),u.handleSubmit(async d=>{td(d).then(({data:p})=>{p&&(q.success(r("form.buttons.success")),s(),i(!1))})})()},children:r("form.buttons.submit")})]})]})]})})}function du({table:s,refetch:n,saveOrder:a,isSortMode:l}){const{t:r}=I("notice"),c=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between space-x-2 ",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[!l&&e.jsx(Pr,{refetch:n}),!l&&e.jsx(T,{placeholder:r("table.toolbar.search"),value:s.getColumn("title")?.getFilterValue()??"",onChange:i=>s.getColumn("title")?.setFilterValue(i.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),c&&!l&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-9 px-2 lg:px-3",children:[r("table.toolbar.reset"),e.jsx(Oe,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(R,{variant:l?"default":"outline",onClick:a,className:"h-8",size:"sm",children:r(l?"table.toolbar.sort.save":"table.toolbar.sort.edit")})})]})}const mu=s=>{const{t:n}=I("notice");return[{id:"drag-handle",header:"",cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(mi,{className:"h-4 w-4 text-muted-foreground cursor-move"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.id")}),cell:({row:a})=>e.jsx(H,{variant:"outline",className:"font-mono",children:a.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"show",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.show")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(K,{defaultChecked:a.getValue("show"),onCheckedChange:async()=>{const{data:l}=await nd({id:a.original.id});l||s()}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.title")}),cell:({row:a})=>e.jsx("div",{className:"flex max-w-[500px] items-center",children:e.jsx("span",{className:"truncate font-medium",children:a.getValue("title")})}),enableSorting:!1,size:6e3},{id:"actions",header:({column:a})=>e.jsx(M,{className:"justify-end",column:a,title:n("table.columns.actions")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(Pr,{refetch:s,dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("table.actions.edit")})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Je,{title:n("table.actions.delete.title"),description:n("table.actions.delete.description"),onConfirm:async()=>{ad({id:a.original.id}).then(()=>{q.success(n("table.actions.delete.success")),s()})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("table.actions.delete.title")})]})})]}),size:100}]};function uu(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[i,u]=m.useState([]),[x,o]=m.useState(!1),[d,p]=m.useState({}),[D,V]=m.useState({pageSize:50,pageIndex:0}),[f,_]=m.useState([]),{refetch:k}=se({queryKey:["notices"],queryFn:async()=>{const{data:E}=await sd();return _(E),E}});m.useEffect(()=>{l({"drag-handle":x,content:!x,created_at:!x,actions:!x}),V({pageSize:x?99999:50,pageIndex:0})},[x]);const b=(E,z)=>{x&&(E.dataTransfer.setData("text/plain",z.toString()),E.currentTarget.classList.add("opacity-50"))},w=(E,z)=>{if(!x)return;E.preventDefault(),E.currentTarget.classList.remove("bg-muted");const Z=parseInt(E.dataTransfer.getData("text/plain"));if(Z===z)return;const A=[...f],[X]=A.splice(Z,1);A.splice(z,0,X),_(A)},S=async()=>{if(!x){o(!0);return}Id(f.map(E=>E.id)).then(()=>{q.success("排序保存成功"),o(!1),k()}).finally(()=>{o(!1)})},C=ze({data:f??[],columns:mu(k),state:{sorting:i,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:d,pagination:D},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,onColumnSizingChange:p,onPaginationChange:V,getCoreRowModel:Le(),getFilteredRowModel:Ue(),getPaginationRowModel:Be(),getSortedRowModel:Ge(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx("div",{className:"space-y-4",children:e.jsx(Ye,{table:C,toolbar:E=>e.jsx(du,{table:E,refetch:k,saveOrder:S,isSortMode:x}),draggable:x,onDragStart:b,onDragEnd:E=>E.currentTarget.classList.remove("opacity-50"),onDragOver:E=>{E.preventDefault(),E.currentTarget.classList.add("bg-muted")},onDragLeave:E=>E.currentTarget.classList.remove("bg-muted"),onDrop:w,showPagination:!x})})}function xu(){const{t:s}=I("notice");return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(Pe,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(uu,{})})]})]})}const hu=Object.freeze(Object.defineProperty({__proto__:null,default:xu},Symbol.toStringTag,{value:"Module"})),fu=h.object({id:h.number().nullable(),language:h.string().max(250),category:h.string().max(250),title:h.string().min(1).max(250),body:h.string().min(1),show:h.boolean()}),pu={id:null,language:"zh-CN",category:"",title:"",body:"",show:!1};function Rr({refreshData:s,dialogTrigger:n,type:a="add",defaultFormValues:l=pu}){const{t:r}=I("knowledge"),[c,i]=m.useState(!1),u=ce({resolver:ue(fu),defaultValues:l,mode:"onChange",shouldFocusError:!0}),x=new la({html:!0});return m.useEffect(()=>{c&&l.id&&ld(l.id).then(({data:o})=>{u.reset(o)})},[l.id,u,c]),e.jsxs(ge,{onOpenChange:i,open:c,children:[e.jsx(Fe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ne,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add")})]})}),e.jsxs(he,{className:"sm:max-w-[1025px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(a==="add"?"form.add":"form.edit")}),e.jsx(Te,{})]}),e.jsxs(xe,{...u,children:[e.jsx(j,{control:u.control,name:"title",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.title")}),e.jsx("div",{className:"relative ",children:e.jsx(N,{children:e.jsx(T,{placeholder:r("form.titlePlaceholder"),...o})})}),e.jsx(P,{})]})}),e.jsx(j,{control:u.control,name:"category",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.category")}),e.jsx("div",{className:"relative ",children:e.jsx(N,{children:e.jsx(T,{placeholder:r("form.categoryPlaceholder"),...o})})}),e.jsx(P,{})]})}),e.jsx(j,{control:u.control,name:"language",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.language")}),e.jsx(N,{children:e.jsxs(W,{value:o.value,onValueChange:o.onChange,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:r("form.languagePlaceholder")})}),e.jsx(G,{children:[{value:"en-US"},{value:"ja-JP"},{value:"ko-KR"},{value:"vi-VN"},{value:"zh-CN"},{value:"zh-TW"}].map(d=>e.jsx($,{value:d.value,className:"cursor-pointer",children:r(`languages.${d.value}`)},d.value))})]})})]})}),e.jsx(j,{control:u.control,name:"body",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.content")}),e.jsx(N,{children:e.jsx(oa,{style:{height:"500px"},value:o.value,renderHTML:d=>x.render(d),onChange:({text:d})=>{o.onChange(d)}})}),e.jsx(P,{})]})}),e.jsx(j,{control:u.control,name:"show",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.show")}),e.jsx("div",{className:"relative py-2",children:e.jsx(N,{children:e.jsx(K,{checked:o.value,onCheckedChange:o.onChange})})}),e.jsx(P,{})]})}),e.jsxs(Me,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.cancel")})}),e.jsx(R,{type:"submit",onClick:()=>{u.handleSubmit(o=>{od(o).then(({data:d})=>{d&&(u.reset(),q.success(r("messages.operationSuccess")),i(!1),s())})})()},children:r("form.submit")})]})]})]})]})}function gu({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(_s,{children:[e.jsx(Vs,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Is,{children:"No results found."}),e.jsx(Ie,{children:a.map(c=>{const i=r.has(c.value);return e.jsxs(_e,{onSelect:()=>{i?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",i?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ps,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Ks,{}),e.jsx(Ie,{children:e.jsx(_e,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}function ju({table:s,refetch:n,saveOrder:a,isSortMode:l}){const r=s.getState().columnFilters.length>0,{t:c}=I("knowledge");return e.jsxs("div",{className:"flex items-center justify-between",children:[l?e.jsx("p",{className:"text-sm text-muted-foreground",children:c("toolbar.sortModeHint")}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Rr,{refreshData:n}),e.jsx(T,{placeholder:c("toolbar.searchPlaceholder"),value:s.getColumn("title")?.getFilterValue()??"",onChange:i=>s.getColumn("title")?.setFilterValue(i.target.value),className:"h-8 w-[250px]"}),s.getColumn("category")&&e.jsx(gu,{column:s.getColumn("category"),title:c("columns.category"),options:Array.from(new Set(s.getCoreRowModel().rows.map(i=>i.getValue("category")))).map(i=>({label:i,value:i}))}),r&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:[c("toolbar.reset"),e.jsx(Oe,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:l?"default":"outline",onClick:a,size:"sm",children:c(l?"toolbar.saveSort":"toolbar.editSort")})})]})}const vu=({refetch:s,isSortMode:n=!1})=>{const{t:a}=I("knowledge");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:n?"cursor-move":"opacity-0",children:e.jsx(Pt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.id")}),cell:({row:l})=>e.jsx(H,{variant:"outline",className:"justify-center",children:l.getValue("id")}),enableSorting:!0,size:70},{accessorKey:"show",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.status")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx(K,{defaultChecked:l.getValue("show"),onCheckedChange:async()=>{cd({id:l.original.id}).then(({data:r})=>{r||s()})}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.title")}),cell:({row:l})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"line-clamp-2 font-medium",children:l.getValue("title")})}),enableSorting:!0,size:600},{accessorKey:"category",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.category")}),cell:({row:l})=>e.jsx(H,{variant:"secondary",className:"max-w-[180px] truncate",children:l.getValue("category")}),enableSorting:!0,size:1800},{id:"actions",header:({column:l})=>e.jsx(M,{className:"justify-end",column:l,title:a("columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-end space-x-1",children:[e.jsx(Rr,{refreshData:s,dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:a("form.edit")})]}),type:"edit",defaultFormValues:l.original}),e.jsx(Je,{title:a("messages.deleteConfirm"),description:a("messages.deleteDescription"),confirmText:a("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{id({id:l.original.id}).then(({data:r})=>{r&&(q.success(a("messages.operationSuccess")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:a("messages.deleteButton")})]})})]}),size:100}]};function bu(){const[s,n]=m.useState([]),[a,l]=m.useState([]),[r,c]=m.useState(!1),[i,u]=m.useState([]),[x,o]=m.useState({"drag-handle":!1}),[d,p]=m.useState({pageSize:20,pageIndex:0}),{refetch:D,isLoading:V,data:f}=se({queryKey:["knowledge"],queryFn:async()=>{const{data:S}=await rd();return u(S||[]),S}});m.useEffect(()=>{o({"drag-handle":r,actions:!r}),p({pageSize:r?99999:10,pageIndex:0})},[r]);const _=(S,C)=>{r&&(S.dataTransfer.setData("text/plain",C.toString()),S.currentTarget.classList.add("opacity-50"))},k=(S,C)=>{if(!r)return;S.preventDefault(),S.currentTarget.classList.remove("bg-muted");const E=parseInt(S.dataTransfer.getData("text/plain"));if(E===C)return;const z=[...i],[Z]=z.splice(E,1);z.splice(C,0,Z),u(z)},b=async()=>{r?dd({ids:i.map(S=>S.id)}).then(()=>{D(),c(!1),q.success("排序保存成功")}):c(!0)},w=ze({data:i,columns:vu({refetch:D,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:x,pagination:d},onSortingChange:l,onColumnFiltersChange:n,onColumnVisibilityChange:o,getCoreRowModel:Le(),getFilteredRowModel:Ue(),getPaginationRowModel:Be(),getSortedRowModel:Ge(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:w,toolbar:S=>e.jsx(ju,{table:S,refetch:D,saveOrder:b,isSortMode:r}),draggable:r,onDragStart:_,onDragEnd:S=>S.currentTarget.classList.remove("opacity-50"),onDragOver:S=>{S.preventDefault(),S.currentTarget.classList.add("bg-muted")},onDragLeave:S=>S.currentTarget.classList.remove("bg-muted"),onDrop:k,showPagination:!r})}function yu(){const{t:s}=I("knowledge");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight mb-2",children:s("title")}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(bu,{})})]})]})}const Nu=Object.freeze(Object.defineProperty({__proto__:null,default:yu},Symbol.toStringTag,{value:"Module"}));function _u(s,n){const[a,l]=m.useState(s);return m.useEffect(()=>{const r=setTimeout(()=>l(s),n);return()=>{clearTimeout(r)}},[s,n]),a}function At(s,n){if(s.length===0)return{};if(!n)return{"":s};const a={};return s.forEach(l=>{const r=l[n]||"";a[r]||(a[r]=[]),a[r].push(l)}),a}function wu(s,n){const a=JSON.parse(JSON.stringify(s));for(const[l,r]of Object.entries(a))a[l]=r.filter(c=>!n.find(i=>i.value===c.value));return a}function Cu(s,n){for(const[,a]of Object.entries(s))if(a.some(l=>n.find(r=>r.value===l.value)))return!0;return!1}const Er=m.forwardRef(({className:s,...n},a)=>ui(r=>r.filtered.count===0)?e.jsx("div",{ref:a,className:y("py-6 text-center text-sm",s),"cmdk-empty":"",role:"presentation",...n}):null);Er.displayName="CommandEmpty";const lt=m.forwardRef(({value:s,onChange:n,placeholder:a,defaultOptions:l=[],options:r,delay:c,onSearch:i,loadingIndicator:u,emptyIndicator:x,maxSelected:o=Number.MAX_SAFE_INTEGER,onMaxSelected:d,hidePlaceholderWhenSelected:p,disabled:D,groupBy:V,className:f,badgeClassName:_,selectFirstItem:k=!0,creatable:b=!1,triggerSearchOnFocus:w=!1,commandProps:S,inputProps:C,hideClearAllButton:E=!1},z)=>{const Z=m.useRef(null),[A,X]=m.useState(!1),Us=m.useRef(!1),[ba,ya]=m.useState(!1),[ee,Bs]=m.useState(s||[]),[Ss,Na]=m.useState(At(l,V)),[hs,Mt]=m.useState(""),Gs=_u(hs,c||500);m.useImperativeHandle(z,()=>({selectedValue:[...ee],input:Z.current,focus:()=>Z.current?.focus()}),[ee]);const mt=m.useCallback(U=>{const ae=ee.filter(De=>De.value!==U.value);Bs(ae),n?.(ae)},[n,ee]),sl=m.useCallback(U=>{const ae=Z.current;ae&&((U.key==="Delete"||U.key==="Backspace")&&ae.value===""&&ee.length>0&&(ee[ee.length-1].fixed||mt(ee[ee.length-1])),U.key==="Escape"&&ae.blur())},[mt,ee]);m.useEffect(()=>{s&&Bs(s)},[s]),m.useEffect(()=>{if(!r||i)return;const U=At(r||[],V);JSON.stringify(U)!==JSON.stringify(Ss)&&Na(U)},[l,r,V,i,Ss]),m.useEffect(()=>{const U=async()=>{ya(!0);const De=await i?.(Gs);Na(At(De||[],V)),ya(!1)};(async()=>{!i||!A||(w&&await U(),Gs&&await U())})()},[Gs,V,A,w]);const tl=()=>{if(!b||Cu(Ss,[{value:hs,label:hs}])||ee.find(ae=>ae.value===hs))return;const U=e.jsx(_e,{value:hs,className:"cursor-pointer",onMouseDown:ae=>{ae.preventDefault(),ae.stopPropagation()},onSelect:ae=>{if(ee.length>=o){d?.(ee.length);return}Mt("");const De=[...ee,{value:ae,label:ae}];Bs(De),n?.(De)},children:`Create "${hs}"`});if(!i&&hs.length>0||i&&Gs.length>0&&!ba)return U},al=m.useCallback(()=>{if(x)return i&&!b&&Object.keys(Ss).length===0?e.jsx(_e,{value:"-",disabled:!0,children:x}):e.jsx(Er,{children:x})},[b,x,i,Ss]),nl=m.useMemo(()=>wu(Ss,ee),[Ss,ee]),rl=m.useCallback(()=>{if(S?.filter)return S.filter;if(b)return(U,ae)=>U.toLowerCase().includes(ae.toLowerCase())?1:-1},[b,S?.filter]),ll=m.useCallback(()=>{const U=ee.filter(ae=>ae.fixed);Bs(U),n?.(U)},[n,ee]);return e.jsxs(_s,{...S,onKeyDown:U=>{sl(U),S?.onKeyDown?.(U)},className:y("h-auto overflow-visible bg-transparent",S?.className),shouldFilter:S?.shouldFilter!==void 0?S.shouldFilter:!i,filter:rl(),children:[e.jsx("div",{className:y("rounded-md border border-input text-sm ring-offset-background focus-within:ring-1 focus-within:ring-ring ",{"px-3 py-2":ee.length!==0,"cursor-text":!D&&ee.length!==0},f),onClick:()=>{D||Z.current?.focus()},children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[ee.map(U=>e.jsxs(H,{className:y("data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground","data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground",_),"data-fixed":U.fixed,"data-disabled":D||void 0,children:[U.label,e.jsx("button",{className:y("ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",(D||U.fixed)&&"hidden"),onKeyDown:ae=>{ae.key==="Enter"&&mt(U)},onMouseDown:ae=>{ae.preventDefault(),ae.stopPropagation()},onClick:()=>mt(U),children:e.jsx(Gt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},U.value)),e.jsx(Se.Input,{...C,ref:Z,value:hs,disabled:D,onValueChange:U=>{Mt(U),C?.onValueChange?.(U)},onBlur:U=>{Us.current===!1&&X(!1),C?.onBlur?.(U)},onFocus:U=>{X(!0),w&&i?.(Gs),C?.onFocus?.(U)},placeholder:p&&ee.length!==0?"":a,className:y("flex-1 bg-transparent outline-none placeholder:text-muted-foreground",{"w-full":p,"px-3 py-2":ee.length===0,"ml-1":ee.length!==0},C?.className)}),e.jsx("button",{type:"button",onClick:ll,className:y((E||D||ee.length<1||ee.filter(U=>U.fixed).length===ee.length)&&"hidden"),children:e.jsx(Gt,{})})]})}),e.jsx("div",{className:"relative",children:A&&e.jsx(ws,{className:"absolute top-1 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",onMouseLeave:()=>{Us.current=!1},onMouseEnter:()=>{Us.current=!0},onMouseUp:()=>{Z.current?.focus()},children:ba?e.jsx(e.Fragment,{children:u}):e.jsxs(e.Fragment,{children:[al(),tl(),!k&&e.jsx(_e,{value:"-",className:"hidden"}),Object.entries(nl).map(([U,ae])=>e.jsx(Ie,{heading:U,className:"h-full overflow-auto",children:e.jsx(e.Fragment,{children:ae.map(De=>e.jsx(_e,{value:De.value,disabled:De.disable,onMouseDown:Ws=>{Ws.preventDefault(),Ws.stopPropagation()},onSelect:()=>{if(ee.length>=o){d?.(ee.length);return}Mt("");const Ws=[...ee,De];Bs(Ws),n?.(Ws)},className:y("cursor-pointer",De.disable&&"cursor-default text-muted-foreground"),children:De.label},De.value))})},U))]})})})]})});lt.displayName="MultipleSelector";const Su=s=>h.object({id:h.number().optional(),name:h.string().min(2,s("messages.nameValidation.min")).max(50,s("messages.nameValidation.max")).regex(/^[a-zA-Z0-9\u4e00-\u9fa5_-]+$/,s("messages.nameValidation.pattern"))});function Ft({refetch:s,dialogTrigger:n,defaultValues:a={name:""},type:l="add"}){const{t:r}=I("group"),c=ce({resolver:ue(Su(r)),defaultValues:a,mode:"onChange"}),[i,u]=m.useState(!1),[x,o]=m.useState(!1),d=async p=>{o(!0),Kc(p).then(()=>{q.success(r(l==="edit"?"messages.updateSuccess":"messages.createSuccess")),s&&s(),c.reset(),u(!1)}).finally(()=>{o(!1)})};return e.jsxs(ge,{open:i,onOpenChange:u,children:[e.jsx(Fe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ne,{icon:"ion:add"}),e.jsx("span",{children:r("form.add")})]})}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(l==="edit"?"form.edit":"form.create")}),e.jsx(Te,{children:r(l==="edit"?"form.editDescription":"form.createDescription")})]}),e.jsx(xe,{...c,children:e.jsxs("form",{onSubmit:c.handleSubmit(d),className:"space-y-4",children:[e.jsx(j,{control:c.control,name:"name",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.name")}),e.jsx(N,{children:e.jsx(T,{placeholder:r("form.namePlaceholder"),...p,className:"w-full"})}),e.jsx(F,{children:r("form.nameDescription")}),e.jsx(P,{})]})}),e.jsxs(Me,{className:"gap-2",children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.cancel")})}),e.jsxs(R,{type:"submit",disabled:x||!c.formState.isValid,children:[x&&e.jsx(ra,{className:"mr-2 h-4 w-4 animate-spin"}),r(l==="edit"?"form.update":"form.create")]})]})]})})]})]})}const Vr=m.createContext(void 0);function ku({children:s,refetch:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null),[i,u]=m.useState(ye.Shadowsocks);return e.jsx(Vr.Provider,{value:{isOpen:a,setIsOpen:l,editingServer:r,setEditingServer:c,serverType:i,setServerType:u,refetch:n},children:s})}function Ir(){const s=m.useContext(Vr);if(s===void 0)throw new Error("useServerEdit must be used within a ServerEditProvider");return s}function $t({dialogTrigger:s,value:n,setValue:a,templateType:l}){const{t:r}=I("server");m.useEffect(()=>{console.log(n)},[n]);const[c,i]=m.useState(!1),[u,x]=m.useState(()=>{if(!n||Object.keys(n).length===0)return"";try{return JSON.stringify(n,null,2)}catch{return""}}),[o,d]=m.useState(null),p=b=>{if(!b)return null;try{const w=JSON.parse(b);return typeof w!="object"||w===null?r("network_settings.validation.must_be_object"):null}catch{return r("network_settings.validation.invalid_json")}},D={tcp:{label:"TCP",content:{acceptProxyProtocol:!1,header:{type:"none"}}},"tcp-http":{label:"TCP + HTTP",content:{acceptProxyProtocol:!1,header:{type:"http",request:{version:"1.1",method:"GET",path:["/"],headers:{Host:["www.example.com"]}},response:{version:"1.1",status:"200",reason:"OK"}}}},grpc:{label:"gRPC",content:{serviceName:"GunService"}},ws:{label:"WebSocket",content:{path:"/",headers:{Host:"v2ray.com"}}}},V=()=>{switch(l){case"tcp":return["tcp","tcp-http"];case"grpc":return["grpc"];case"ws":return["ws"];default:return[]}},f=()=>{const b=p(u||"");if(b){q.error(b);return}try{if(!u){a(null),i(!1);return}a(JSON.parse(u)),i(!1)}catch{q.error(r("network_settings.errors.save_failed"))}},_=b=>{x(b),d(p(b))},k=b=>{const w=D[b];if(w){const S=JSON.stringify(w.content,null,2);x(S),d(null)}};return m.useEffect(()=>{c&&console.log(n)},[c,n]),m.useEffect(()=>{c&&n&&Object.keys(n).length>0&&x(JSON.stringify(n,null,2))},[c,n]),e.jsxs(ge,{open:c,onOpenChange:b=>{!b&&c&&f(),i(b)},children:[e.jsx(Fe,{asChild:!0,children:s??e.jsx(J,{variant:"link",children:r("network_settings.edit_protocol")})}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsx(ve,{children:e.jsx(je,{children:r("network_settings.edit_protocol_config")})}),e.jsxs("div",{className:"space-y-4",children:[V().length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:V().map(b=>e.jsx(J,{variant:"outline",size:"sm",onClick:()=>k(b),children:r("network_settings.use_template",{template:D[b].label})},b))}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Cs,{className:`min-h-[200px] font-mono text-sm ${o?"border-red-500 focus-visible:ring-red-500":""}`,value:u,placeholder:V().length>0?r("network_settings.json_config_placeholder_with_template"):r("network_settings.json_config_placeholder"),onChange:b=>_(b.target.value)}),o&&e.jsx("p",{className:"text-sm text-red-500",children:o})]})]}),e.jsxs(Me,{className:"gap-2",children:[e.jsx(J,{variant:"outline",onClick:()=>i(!1),children:r("common.cancel")}),e.jsx(J,{onClick:f,disabled:!!o,children:r("common.confirm")})]})]})]})}function kh(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const Du={},Tu=Object.freeze(Object.defineProperty({__proto__:null,default:Du},Symbol.toStringTag,{value:"Module"})),Dh=Si(Tu),$a=s=>s.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),Pu=()=>{try{const s=xi.box.keyPair(),n=$a(Ta.encodeBase64(s.secretKey)),a=$a(Ta.encodeBase64(s.publicKey));return{privateKey:n,publicKey:a}}catch(s){throw console.error("Error generating x25519 key pair:",s),s}},Ru=()=>{try{return Pu()}catch(s){throw console.error("Error generating key pair:",s),s}},Eu=s=>{const n=new Uint8Array(Math.ceil(s/2));return window.crypto.getRandomValues(n),Array.from(n).map(a=>a.toString(16).padStart(2,"0")).join("").substring(0,s)},Vu=()=>{const s=Math.floor(Math.random()*8)*2+2;return Eu(s)},Iu=h.object({cipher:h.string().default("aes-128-gcm"),obfs:h.string().default("0"),obfs_settings:h.object({path:h.string().default(""),host:h.string().default("")}).default({})}),Fu=h.object({tls:h.coerce.number().default(0),tls_settings:h.object({server_name:h.string().default(""),allow_insecure:h.boolean().default(!1)}).default({}),network:h.string().default("tcp"),network_settings:h.record(h.any()).default({})}),Mu=h.object({server_name:h.string().default(""),allow_insecure:h.boolean().default(!1),network:h.string().default("tcp"),network_settings:h.record(h.any()).default({})}),Ou=h.object({version:h.coerce.number().default(2),alpn:h.string().default("h2"),obfs:h.object({open:h.coerce.boolean().default(!1),type:h.string().default("salamander"),password:h.string().default("")}).default({}),tls:h.object({server_name:h.string().default(""),allow_insecure:h.boolean().default(!1)}).default({}),bandwidth:h.object({up:h.string().default(""),down:h.string().default("")}).default({})}),zu=h.object({tls:h.coerce.number().default(0),tls_settings:h.object({server_name:h.string().default(""),allow_insecure:h.boolean().default(!1)}).default({}),reality_settings:h.object({server_port:h.coerce.number().default(443),server_name:h.string().default(""),allow_insecure:h.boolean().default(!1),public_key:h.string().default(""),private_key:h.string().default(""),short_id:h.string().default("")}).default({}),network:h.string().default("tcp"),network_settings:h.record(h.any()).default({}),flow:h.string().default("")}),rs={shadowsocks:{schema:Iu,ciphers:["aes-128-gcm","aes-192-gcm","aes-256-gcm","chacha20-ietf-poly1305","2022-blake3-aes-128-gcm","2022-blake3-aes-256-gcm"]},vmess:{schema:Fu,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},trojan:{schema:Mu,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},hysteria:{schema:Ou,versions:["1","2"],alpnOptions:["hysteria","http/1.1","h2","h3"]},vless:{schema:zu,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"},{value:"kcp",label:"mKCP"},{value:"httpupgrade",label:"HttpUpgrade"},{value:"xhttp",label:"XHTTP"}],flowOptions:["none","xtls-rprx-direct","xtls-rprx-splice","xtls-rprx-vision"]}},Lu=({serverType:s,value:n,onChange:a})=>{const{t:l}=I("server"),r=s?rs[s]:null,c=r?.schema||h.record(h.any()),i=s?c.parse({}):{},u=ce({resolver:ue(c),defaultValues:i,mode:"onChange"});if(m.useEffect(()=>{if(!n||Object.keys(n).length===0){if(s){const f=c.parse({});u.reset(f)}}else u.reset(n)},[s,n,a,u,c]),m.useEffect(()=>{const f=u.watch(_=>{a(_)});return()=>f.unsubscribe()},[u,a]),!s||!r)return null;const V={shadowsocks:()=>e.jsxs(e.Fragment,{children:[e.jsx(j,{control:u.control,name:"cipher",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.shadowsocks.cipher.label")}),e.jsx(N,{children:e.jsxs(W,{onValueChange:f.onChange,value:f.value,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.shadowsocks.cipher.placeholder")})}),e.jsx(G,{children:e.jsx(fs,{children:rs.shadowsocks.ciphers.map(_=>e.jsx($,{value:_,children:_},_))})})]})})]})}),e.jsx(j,{control:u.control,name:"obfs",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.shadowsocks.obfs.label")}),e.jsx(N,{children:e.jsxs(W,{onValueChange:f.onChange,value:f.value,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.shadowsocks.obfs.placeholder")})}),e.jsx(G,{children:e.jsxs(fs,{children:[e.jsx($,{value:"0",children:l("dynamic_form.shadowsocks.obfs.none")}),e.jsx($,{value:"http",children:l("dynamic_form.shadowsocks.obfs.http")})]})})]})})]})}),u.watch("obfs")==="http"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"obfs_settings.path",render:({field:f})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(N,{children:e.jsx(T,{type:"text",placeholder:l("dynamic_form.shadowsocks.obfs_settings.path"),...f})}),e.jsx(P,{})]})}),e.jsx(j,{control:u.control,name:"obfs_settings.host",render:({field:f})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(N,{children:e.jsx(T,{type:"text",placeholder:l("dynamic_form.shadowsocks.obfs_settings.host"),...f})}),e.jsx(P,{})]})})]})]}),vmess:()=>e.jsxs(e.Fragment,{children:[e.jsx(j,{control:u.control,name:"tls",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vmess.tls.label")}),e.jsx(N,{children:e.jsxs(W,{value:f.value?.toString(),onValueChange:_=>f.onChange(Number(_)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.vmess.tls.placeholder")})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:l("dynamic_form.vmess.tls.disabled")}),e.jsx($,{value:"1",children:l("dynamic_form.vmess.tls.enabled")})]})]})})]})}),u.watch("tls")==1&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"tls_settings.server_name",render:({field:f})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.vmess.tls_settings.server_name.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:l("dynamic_form.vmess.tls_settings.server_name.placeholder"),...f})})]})}),e.jsx(j,{control:u.control,name:"tls_settings.allow_insecure",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vmess.tls_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(N,{children:e.jsx(K,{checked:f.value,onCheckedChange:f.onChange})})})]})})]}),e.jsx(j,{control:u.control,name:"network",render:({field:f})=>e.jsxs(g,{children:[e.jsxs(v,{children:[l("dynamic_form.vmess.network.label"),e.jsx($t,{value:u.watch("network_settings"),setValue:_=>u.setValue("network_settings",_),templateType:u.watch("network")})]}),e.jsx(N,{children:e.jsxs(W,{onValueChange:f.onChange,value:f.value,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.vmess.network.placeholder")})}),e.jsx(G,{children:e.jsx(fs,{children:rs.vmess.networkOptions.map(_=>e.jsx($,{value:_.value,className:"cursor-pointer",children:_.label},_.value))})})]})})]})})]}),trojan:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"server_name",render:({field:f})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.trojan.server_name.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:l("dynamic_form.trojan.server_name.placeholder"),...f,value:f.value||""})})]})}),e.jsx(j,{control:u.control,name:"allow_insecure",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.trojan.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(N,{children:e.jsx(K,{checked:f.value||!1,onCheckedChange:f.onChange})})})]})})]}),e.jsx(j,{control:u.control,name:"network",render:({field:f})=>e.jsxs(g,{children:[e.jsxs(v,{children:[l("dynamic_form.trojan.network.label"),e.jsx($t,{value:u.watch("network_settings")||{},setValue:_=>u.setValue("network_settings",_),templateType:u.watch("network")||"tcp"})]}),e.jsx(N,{children:e.jsxs(W,{onValueChange:f.onChange,value:f.value||"tcp",children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.trojan.network.placeholder")})}),e.jsx(G,{children:e.jsx(fs,{children:rs.trojan.networkOptions.map(_=>e.jsx($,{value:_.value,className:"cursor-pointer",children:_.label},_.value))})})]})})]})})]}),hysteria:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"version",render:({field:f})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:l("dynamic_form.hysteria.version.label")}),e.jsx(N,{children:e.jsxs(W,{value:(f.value||2).toString(),onValueChange:_=>f.onChange(Number(_)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.version.placeholder")})}),e.jsx(G,{children:e.jsx(fs,{children:rs.hysteria.versions.map(_=>e.jsxs($,{value:_,className:"cursor-pointer",children:["V",_]},_))})})]})})]})}),u.watch("version")==1&&e.jsx(j,{control:u.control,name:"alpn",render:({field:f})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.hysteria.alpn.label")}),e.jsx(N,{children:e.jsxs(W,{value:f.value||"h2",onValueChange:f.onChange,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.alpn.placeholder")})}),e.jsx(G,{children:e.jsx(fs,{children:rs.hysteria.alpnOptions.map(_=>e.jsx($,{value:_,children:_},_))})})]})})]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"obfs.open",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.hysteria.obfs.label")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(N,{children:e.jsx(K,{checked:f.value||!1,onCheckedChange:f.onChange})})})]})}),!!u.watch("obfs.open")&&e.jsxs(e.Fragment,{children:[u.watch("version")=="2"&&e.jsx(j,{control:u.control,name:"obfs.type",render:({field:f})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:l("dynamic_form.hysteria.obfs.type.label")}),e.jsx(N,{children:e.jsxs(W,{value:f.value||"salamander",onValueChange:f.onChange,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.obfs.type.placeholder")})}),e.jsx(G,{children:e.jsx(fs,{children:e.jsx($,{value:"salamander",children:l("dynamic_form.hysteria.obfs.type.salamander")})})})]})})]})}),e.jsx(j,{control:u.control,name:"obfs.password",render:({field:f})=>e.jsxs(g,{className:u.watch("version")==2?"w-full":"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.hysteria.obfs.password.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(N,{children:e.jsx(T,{placeholder:l("dynamic_form.hysteria.obfs.password.placeholder"),...f,value:f.value||"",className:"pr-9"})}),e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",k=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(b=>_[b%_.length]).join("");u.setValue("obfs.password",k),q.success(l("dynamic_form.hysteria.obfs.password.generate_success"))},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(Ne,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})]})]})})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"tls.server_name",render:({field:f})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.hysteria.tls.server_name.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:l("dynamic_form.hysteria.tls.server_name.placeholder"),...f,value:f.value||""})})]})}),e.jsx(j,{control:u.control,name:"tls.allow_insecure",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.hysteria.tls.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(N,{children:e.jsx(K,{checked:f.value||!1,onCheckedChange:f.onChange})})})]})})]}),e.jsx(j,{control:u.control,name:"bandwidth.up",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.hysteria.bandwidth.up.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(N,{children:e.jsx(T,{type:"number",placeholder:l("dynamic_form.hysteria.bandwidth.up.placeholder")+(u.watch("version")==2?l("dynamic_form.hysteria.bandwidth.up.bbr_tip"):""),className:"rounded-br-none rounded-tr-none",...f,value:f.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:l("dynamic_form.hysteria.bandwidth.up.suffix")})})]})]})}),e.jsx(j,{control:u.control,name:"bandwidth.down",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.hysteria.bandwidth.down.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(N,{children:e.jsx(T,{type:"number",placeholder:l("dynamic_form.hysteria.bandwidth.down.placeholder")+(u.watch("version")==2?l("dynamic_form.hysteria.bandwidth.down.bbr_tip"):""),className:"rounded-br-none rounded-tr-none",...f,value:f.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:l("dynamic_form.hysteria.bandwidth.down.suffix")})})]})]})})]}),vless:()=>e.jsxs(e.Fragment,{children:[e.jsx(j,{control:u.control,name:"tls",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.tls.label")}),e.jsx(N,{children:e.jsxs(W,{value:f.value?.toString(),onValueChange:_=>f.onChange(Number(_)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.tls.placeholder")})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:l("dynamic_form.vless.tls.none")}),e.jsx($,{value:"1",children:l("dynamic_form.vless.tls.tls")}),e.jsx($,{value:"2",children:l("dynamic_form.vless.tls.reality")})]})]})})]})}),u.watch("tls")=="1"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"tls_settings.server_name",render:({field:f})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.vless.tls_settings.server_name.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:l("dynamic_form.vless.tls_settings.server_name.placeholder"),...f})})]})}),e.jsx(j,{control:u.control,name:"tls_settings.allow_insecure",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.tls_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(N,{children:e.jsx(K,{checked:f.value,onCheckedChange:f.onChange})})})]})})]}),u.watch("tls")==2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"reality_settings.server_name",render:({field:f})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.server_name.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:l("dynamic_form.vless.reality_settings.server_name.placeholder"),...f})})]})}),e.jsx(j,{control:u.control,name:"reality_settings.server_port",render:({field:f})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.server_port.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:l("dynamic_form.vless.reality_settings.server_port.placeholder"),...f})})]})}),e.jsx(j,{control:u.control,name:"reality_settings.allow_insecure",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(N,{children:e.jsx(K,{checked:f.value,onCheckedChange:f.onChange})})})]})})]}),e.jsx("div",{className:"flex items-end gap-2",children:e.jsx(j,{control:u.control,name:"reality_settings.private_key",render:({field:f})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.private_key.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(N,{children:e.jsx(T,{...f,className:"pr-9"})}),e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{try{const _=Ru();u.setValue("reality_settings.private_key",_.privateKey),u.setValue("reality_settings.public_key",_.publicKey),q.success(l("dynamic_form.vless.reality_settings.key_pair.success"))}catch{q.error(l("dynamic_form.vless.reality_settings.key_pair.error"))}},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(Ne,{icon:"ion:key-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})}),e.jsx(yt,{children:e.jsx(te,{children:e.jsx("p",{children:l("dynamic_form.vless.reality_settings.key_pair.generate")})})})]})]})]})})}),e.jsx(j,{control:u.control,name:"reality_settings.public_key",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.public_key.label")}),e.jsx(N,{children:e.jsx(T,{...f})})]})}),e.jsx(j,{control:u.control,name:"reality_settings.short_id",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.short_id.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(N,{children:e.jsx(T,{...f,className:"pr-9",placeholder:l("dynamic_form.vless.reality_settings.short_id.placeholder")})}),e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const _=Vu();u.setValue("reality_settings.short_id",_),q.success(l("dynamic_form.vless.reality_settings.short_id.success"))},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(Ne,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})}),e.jsx(yt,{children:e.jsx(te,{children:e.jsx("p",{children:l("dynamic_form.vless.reality_settings.short_id.generate")})})})]})]}),e.jsx(F,{className:"text-xs text-muted-foreground",children:l("dynamic_form.vless.reality_settings.short_id.description")})]})})]}),e.jsx(j,{control:u.control,name:"network",render:({field:f})=>e.jsxs(g,{children:[e.jsxs(v,{children:[l("dynamic_form.vless.network.label"),e.jsx($t,{value:u.watch("network_settings"),setValue:_=>u.setValue("network_settings",_),templateType:u.watch("network")})]}),e.jsx(N,{children:e.jsxs(W,{onValueChange:f.onChange,value:f.value,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.network.placeholder")})}),e.jsx(G,{children:e.jsx(fs,{children:rs.vless.networkOptions.map(_=>e.jsx($,{value:_.value,className:"cursor-pointer",children:_.label},_.value))})})]})})]})}),e.jsx(j,{control:u.control,name:"flow",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.flow.label")}),e.jsx(N,{children:e.jsxs(W,{onValueChange:_=>f.onChange(_==="none"?null:_),value:f.value||"none",children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.flow.placeholder")})}),e.jsx(G,{children:rs.vless.flowOptions.map(_=>e.jsx($,{value:_,children:_},_))})]})})]})})]})};return e.jsx(ie,{children:V[s]?.()})},Au=h.object({id:h.number().optional().nullable(),code:h.string().optional(),name:h.string().min(1,"form.name.error"),rate:h.string().min(1,"form.rate.error"),tags:h.array(h.string()).default([]),excludes:h.array(h.string()).default([]),ips:h.array(h.string()).default([]),group_ids:h.array(h.string()).default([]),host:h.string().min(1,"form.host.error"),port:h.string().min(1,"form.port.error"),server_port:h.string().min(1,"form.server_port.error"),parent_id:h.string().default("0").nullable(),route_ids:h.array(h.string()).default([]),protocol_settings:h.record(h.any()).default({}).nullable()}),ht={id:null,code:"",name:"",rate:"1",tags:[],excludes:[],ips:[],group_ids:[],host:"",port:"",server_port:"",parent_id:"0",route_ids:[],protocol_settings:null};function $u(){const{t:s}=I("server"),{isOpen:n,setIsOpen:a,editingServer:l,setEditingServer:r,serverType:c,setServerType:i,refetch:u}=Ir(),[x,o]=m.useState([]),[d,p]=m.useState([]),[D,V]=m.useState([]),f=ce({resolver:ue(Au),defaultValues:ht,mode:"onChange"});m.useEffect(()=>{_()},[n]),m.useEffect(()=>{l?.type&&l.type!==c&&i(l.type)},[l,c,i]),m.useEffect(()=>{l?l.type===c&&f.reset({...ht,...l}):f.reset({...ht,protocol_settings:rs[c].schema.parse({})})},[l,f,c]);const _=async()=>{if(!n)return;const[C,E,z]=await Promise.all([It(),fr(),hr()]);o(C.data?.map(Z=>({label:Z.name,value:Z.id.toString()}))||[]),p(E.data?.map(Z=>({label:Z.remarks,value:Z.id.toString()}))||[]),V(z.data||[])},k=m.useMemo(()=>D?.filter(C=>(C.parent_id===0||C.parent_id===null)&&C.type===c&&C.id!==f.watch("id")),[c,D,f]),b=()=>e.jsxs(ys,{children:[e.jsx(Ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ne,{icon:"ion:add"}),e.jsx("div",{children:s("form.add_node")})]})}),e.jsx(os,{align:"start",children:e.jsx(dc,{children:Ds.map(({type:C,label:E})=>e.jsx(fe,{onClick:()=>{i(C),a(!0)},className:"cursor-pointer",children:e.jsx(H,{variant:"outline",className:"text-white",style:{background:ls[C]},children:E})},C))})})]}),w=()=>{a(!1),r(null),f.reset(ht)},S=async()=>{const C=f.getValues();(await Lc({...C,type:c})).data&&(w(),q.success(s("form.success")),u())};return e.jsxs(ge,{open:n,onOpenChange:w,children:[b(),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:s(l?"form.edit_node":"form.new_node")}),e.jsx(Te,{})]}),e.jsxs(xe,{...f,children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:f.control,name:"name",render:({field:C})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:s("form.name.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("form.name.placeholder"),...C})}),e.jsx(P,{})]})}),e.jsx(j,{control:f.control,name:"rate",render:({field:C})=>e.jsxs(g,{className:"flex-[1]",children:[e.jsx(v,{children:s("form.rate.label")}),e.jsx("div",{className:"relative flex",children:e.jsx(N,{children:e.jsx(T,{type:"number",min:"0",step:"0.1",...C})})}),e.jsx(P,{})]})})]}),e.jsx(j,{control:f.control,name:"code",render:({field:C})=>e.jsxs(g,{children:[e.jsxs(v,{children:[s("form.code.label"),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:s("form.code.optional")})]}),e.jsx(N,{children:e.jsx(T,{placeholder:s("form.code.placeholder"),...C,value:C.value||""})}),e.jsx(P,{})]})}),e.jsx(j,{control:f.control,name:"tags",render:({field:C})=>e.jsxs(g,{children:[e.jsx(v,{children:s("form.tags.label")}),e.jsx(N,{children:e.jsx(ha,{value:C.value,onChange:C.onChange,placeholder:s("form.tags.placeholder"),className:"w-full"})}),e.jsx(P,{})]})}),e.jsx(j,{control:f.control,name:"group_ids",render:({field:C})=>e.jsxs(g,{children:[e.jsxs(v,{className:"flex items-center justify-between",children:[s("form.groups.label"),e.jsx(Ft,{dialogTrigger:e.jsx(R,{variant:"link",children:s("form.groups.add")}),refetch:_})]}),e.jsx(N,{children:e.jsx(lt,{options:x,onChange:E=>C.onChange(E.map(z=>z.value)),value:x?.filter(E=>C.value.includes(E.value)),placeholder:s("form.groups.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:s("form.groups.empty")})})}),e.jsx(P,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:f.control,name:"host",render:({field:C})=>e.jsxs(g,{children:[e.jsx(v,{children:s("form.host.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:s("form.host.placeholder"),...C})}),e.jsx(P,{})]})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(j,{control:f.control,name:"port",render:({field:C})=>e.jsxs(g,{className:"flex-1",children:[e.jsxs(v,{className:"flex items-center gap-1.5",children:[s("form.port.label"),e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(Ne,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(yt,{children:e.jsx(te,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:s("form.port.tooltip")})})})]})})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(N,{children:e.jsx(T,{placeholder:s("form.port.placeholder"),...C})}),e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0 text-muted-foreground/50 hover:text-muted-foreground",onClick:()=>{const E=C.value;E&&f.setValue("server_port",E)},children:e.jsx(Ne,{icon:"tabler:arrows-right",className:"size-3"})})}),e.jsx(te,{side:"right",children:e.jsx("p",{children:s("form.port.sync")})})]})})]}),e.jsx(P,{})]})}),e.jsx(j,{control:f.control,name:"server_port",render:({field:C})=>e.jsxs(g,{className:"flex-1",children:[e.jsxs(v,{className:"flex items-center gap-1.5",children:[s("form.server_port.label"),e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(Ne,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(yt,{children:e.jsx(te,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:s("form.server_port.tooltip")})})})]})})]}),e.jsx(N,{children:e.jsx(T,{placeholder:s("form.server_port.placeholder"),...C})}),e.jsx(P,{})]})})]})]}),n&&e.jsx(Lu,{serverType:c,value:f.watch("protocol_settings"),onChange:C=>f.setValue("protocol_settings",C,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}),e.jsx(j,{control:f.control,name:"parent_id",render:({field:C})=>e.jsxs(g,{children:[e.jsx(v,{children:s("form.parent.label")}),e.jsxs(W,{onValueChange:C.onChange,value:C.value?.toString()||"0",children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:s("form.parent.placeholder")})})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("form.parent.none")}),k?.map(E=>e.jsx($,{value:E.id.toString(),className:"cursor-pointer",children:E.name},E.id))]})]}),e.jsx(P,{})]})}),e.jsx(j,{control:f.control,name:"route_ids",render:({field:C})=>e.jsxs(g,{children:[e.jsx(v,{children:s("form.route.label")}),e.jsx(N,{children:e.jsx(lt,{options:d,onChange:E=>C.onChange(E.map(z=>z.value)),value:d?.filter(E=>C.value.includes(E.value)),placeholder:s("form.route.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:s("form.route.empty")})})}),e.jsx(P,{})]})})]}),e.jsxs(Me,{className:"mt-6",children:[e.jsx(R,{type:"button",variant:"outline",onClick:w,children:s("form.cancel")}),e.jsx(R,{type:"submit",onClick:S,children:s("form.submit")})]})]})]})]})}function qa({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(_s,{children:[e.jsx(Vs,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Is,{children:"No results found."}),e.jsx(Ie,{children:a.map(c=>{const i=r.has(c.value);return e.jsxs(_e,{onSelect:()=>{i?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},className:"cursor-pointer",children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",i?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ps,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Ks,{}),e.jsx(Ie,{children:e.jsx(_e,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center cursor-pointer",children:"Clear filters"})})]})]})]})})]})}const qu=[{value:ye.Shadowsocks,label:Ds.find(s=>s.type===ye.Shadowsocks)?.label,color:ls[ye.Shadowsocks]},{value:ye.Vmess,label:Ds.find(s=>s.type===ye.Vmess)?.label,color:ls[ye.Vmess]},{value:ye.Trojan,label:Ds.find(s=>s.type===ye.Trojan)?.label,color:ls[ye.Trojan]},{value:ye.Hysteria,label:Ds.find(s=>s.type===ye.Hysteria)?.label,color:ls[ye.Hysteria]},{value:ye.Vless,label:Ds.find(s=>s.type===ye.Vless)?.label,color:ls[ye.Vless]}];function Hu({table:s,saveOrder:n,isSortMode:a,groups:l}){const r=s.getState().columnFilters.length>0,{t:c}=I("server"),i=l.map(u=>({label:u,value:u}));return e.jsxs("div",{className:"flex items-center justify-between ",children:[e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[!a&&e.jsxs(e.Fragment,{children:[e.jsx($u,{}),e.jsx(T,{placeholder:c("toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:u=>s.getColumn("name")?.setFilterValue(u.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex gap-x-2",children:[s.getColumn("type")&&e.jsx(qa,{column:s.getColumn("type"),title:c("toolbar.type"),options:qu}),s.getColumn("groups")&&e.jsx(qa,{column:s.getColumn("groups"),title:c("columns.groups.title"),options:i})]}),r&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[c("toolbar.reset"),e.jsx(Oe,{className:"ml-2 h-4 w-4"})]})]}),a&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:c("toolbar.sort.tip")})})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:a?"default":"outline",onClick:n,size:"sm",children:c(a?"toolbar.sort.save":"toolbar.sort.edit")})})]})}const ot=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19M12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4"})}),ft={0:"bg-destructive/80 shadow-sm shadow-destructive/50",1:"bg-yellow-500/80 shadow-sm shadow-yellow-500/50",2:"bg-emerald-500/80 shadow-sm shadow-emerald-500/50"},Ku=s=>{const{t:n}=I("server");return[{id:"drag-handle",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.sort")}),cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Pt,{className:"size-4 cursor-move text-muted-foreground transition-colors hover:text-primary","aria-hidden":"true"})}),size:50},{accessorKey:"id",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.nodeId")}),cell:({row:a})=>{const l=a.getValue("id"),r=a.original.code;return e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"group/id flex items-center space-x-2",children:[e.jsxs(H,{variant:"outline",className:y("border-2 font-medium transition-all duration-200 hover:opacity-80","flex items-center gap-1.5"),style:{borderColor:ls[a.original.type]},children:[e.jsx(An,{className:"size-3"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"flex items-center gap-0.5",children:r??l}),a.original.parent?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm text-muted-foreground/30",children:"→"}),e.jsx("span",{children:a.original.parent?.code||a.original.parent?.id})]}):""]})]}),e.jsx(R,{variant:"ghost",size:"icon",className:"size-5 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:text-muted-foreground group-hover/id:opacity-100",onClick:c=>{c.stopPropagation(),wt(r||l.toString())},children:e.jsx(Pa,{className:"size-3"})})]})}),e.jsxs(te,{side:"top",className:"flex flex-col gap-1 p-3",children:[e.jsxs("p",{className:"font-medium",children:[Ds.find(c=>c.type===a.original.type)?.label,a.original.parent_id?" (子节点)":""]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r?"点击括号内容或复制按钮可复制节点代码":"点击复制按钮可复制节点ID"})]})]})})},size:200,enableSorting:!0},{accessorKey:"show",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.show")}),cell:({row:a})=>{const[l,r]=m.useState(!!a.getValue("show"));return e.jsx(K,{checked:l,onCheckedChange:async c=>{r(c),qc({id:a.original.id,type:a.original.type,show:c?1:0}).catch(()=>{r(!c),s()})},style:{backgroundColor:l?ls[a.original.type]:void 0}})},size:50,enableSorting:!1},{accessorKey:"name",header:({column:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(M,{column:a,title:n("columns.node"),tooltip:e.jsxs("div",{className:"grid grid-cols-1 gap-3 p-2",children:[e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",ft[0])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.0")})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",ft[1])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.1")})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",ft[2])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.2")})]})]})})}),cell:({row:a})=>e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("size-2.5 flex-shrink-0 rounded-full transition-all duration-200",ft[a.original.available_status])}),e.jsx("span",{className:"text-left font-medium transition-colors hover:text-primary",children:a.getValue("name")})]})}),e.jsx(te,{children:e.jsx("p",{className:"font-medium",children:n(`columns.status.${a.original.available_status}`)})})]})}),enableSorting:!1,size:200},{accessorKey:"host",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.address")}),cell:({row:a})=>{const l=`${a.original.host}:${a.original.port}`,r=a.original.port!==a.original.server_port;return e.jsxs("div",{className:"group relative flex min-w-0 items-start",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1 gap-y-0.5 pr-7",children:[e.jsx("div",{className:"flex items-center ",children:e.jsxs("span",{className:"font-mono text-sm font-medium text-foreground/90",children:[a.original.host,":",a.original.port]})}),r&&e.jsxs("span",{className:"whitespace-nowrap text-[0.7rem] tracking-tight text-muted-foreground/40",children:["(",n("columns.internalPort")," ",a.original.server_port,")"]})]}),e.jsx("div",{className:"absolute right-0 top-0",children:e.jsx(ie,{delayDuration:0,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"ghost",size:"icon",className:"size-6 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:bg-muted/50 hover:text-muted-foreground group-hover:opacity-100",onClick:c=>{c.stopPropagation(),wt(l)},children:e.jsx(Pa,{className:"size-3"})})}),e.jsx(te,{side:"top",sideOffset:10,children:n("columns.copyAddress")})]})})})]})},enableSorting:!1,enableHiding:!0},{accessorKey:"online",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.onlineUsers.title"),tooltip:n("columns.onlineUsers.tooltip")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(ot,{className:"size-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("online")})]}),size:80,enableSorting:!0,enableHiding:!0},{accessorKey:"rate",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.rate.title"),tooltip:n("columns.rate.tooltip")}),cell:({row:a})=>e.jsxs(H,{variant:"secondary",className:"font-medium",children:[a.getValue("rate")," x"]}),size:80,enableSorting:!1,enableHiding:!0},{accessorKey:"groups",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.groups.title"),tooltip:n("columns.groups.tooltip")}),cell:({row:a})=>{const l=a.getValue("groups")||[];return e.jsx("div",{className:"flex min-w-[300px] max-w-[600px] flex-wrap items-center gap-1.5",children:l.length>0?l.map((r,c)=>e.jsx(H,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:r.name},c)):e.jsx("span",{className:"text-sm text-muted-foreground",children:n("columns.groups.empty")})})},enableSorting:!1,size:600,filterFn:(a,l,r)=>{const c=a.getValue(l);return c?r.some(i=>c.includes(i)):!1}},{accessorKey:"type",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.type")}),cell:({row:a})=>{const l=a.getValue("type");return e.jsx(H,{variant:"outline",className:"border-2 font-medium transition-colors",style:{borderColor:ls[l]},children:l})},enableSorting:!1,enableHiding:!0,enableColumnFilter:!1,size:8e3},{id:"actions",header:({column:a})=>e.jsx(M,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>{const{setIsOpen:l,setEditingServer:r,setServerType:c}=Ir();return e.jsx("div",{className:"flex justify-center",children:e.jsxs(ys,{modal:!1,children:[e.jsx(Ns,{asChild:!0,children:e.jsx(R,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":n("columns.actions"),children:e.jsx(Nt,{className:"size-4"})})}),e.jsxs(os,{align:"end",className:"w-40",children:[e.jsx(fe,{className:"cursor-pointer",onClick:()=>{c(a.original.type),r(a.original),l(!0)},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(hi,{className:"mr-2 size-4"}),n("columns.actions_dropdown.edit")]})}),e.jsxs(fe,{className:"cursor-pointer",onClick:async()=>{$c({id:a.original.id}).then(({data:i})=>{i&&(q.success(n("columns.actions_dropdown.copy_success")),s())})},children:[e.jsx(fi,{className:"mr-2 size-4"}),n("columns.actions_dropdown.copy")]}),e.jsx(at,{}),e.jsx(fe,{className:"cursor-pointer text-destructive focus:text-destructive",onSelect:i=>i.preventDefault(),children:e.jsx(Je,{title:n("columns.actions_dropdown.delete.title"),description:n("columns.actions_dropdown.delete.description"),confirmText:n("columns.actions_dropdown.delete.confirm"),variant:"destructive",onConfirm:async()=>{Ac({id:a.original.id}).then(({data:i})=>{i&&(q.success(n("columns.actions_dropdown.delete_success")),s())})},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(cs,{className:"mr-2 size-4"}),n("columns.actions_dropdown.delete.confirm")]})})})]})]})})},size:50}]};function Uu(){const[s,n]=m.useState({}),[a,l]=m.useState({"drag-handle":!1}),[r,c]=m.useState([]),[i,u]=m.useState({pageSize:500,pageIndex:0}),[x,o]=m.useState([]),[d,p]=m.useState(!1),[D,V]=m.useState({}),[f,_]=m.useState([]),{refetch:k}=se({queryKey:["nodeList"],queryFn:async()=>{const{data:z}=await hr();return _(z),z}}),b=m.useMemo(()=>{const z=new Set;return f.forEach(Z=>{Z.groups&&Z.groups.forEach(A=>z.add(A.name))}),Array.from(z).sort()},[f]);m.useEffect(()=>{l({"drag-handle":d,show:!d,host:!d,online:!d,rate:!d,groups:!d,type:!1,actions:!d}),V({name:d?2e3:200}),u({pageSize:d?99999:500,pageIndex:0})},[d]);const w=(z,Z)=>{d&&(z.dataTransfer.setData("text/plain",Z.toString()),z.currentTarget.classList.add("opacity-50"))},S=(z,Z)=>{if(!d)return;z.preventDefault(),z.currentTarget.classList.remove("bg-muted");const A=parseInt(z.dataTransfer.getData("text/plain"));if(A===Z)return;const X=[...f],[Us]=X.splice(A,1);X.splice(Z,0,Us),_(X)},C=async()=>{if(!d){p(!0);return}const z=f?.map((Z,A)=>({id:Z.id,order:A+1}));Hc(z).then(()=>{q.success("排序保存成功"),p(!1),k()}).finally(()=>{p(!1)})},E=ze({data:f||[],columns:Ku(k),state:{sorting:x,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:D,pagination:i},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:o,onColumnFiltersChange:c,onColumnVisibilityChange:l,onColumnSizingChange:V,onPaginationChange:u,getCoreRowModel:Le(),getFilteredRowModel:Ue(),getPaginationRowModel:Be(),getSortedRowModel:Ge(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(ku,{refetch:k,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Ye,{table:E,toolbar:z=>e.jsx(Hu,{table:z,refetch:k,saveOrder:C,isSortMode:d,groups:b}),draggable:d,onDragStart:w,onDragEnd:z=>z.currentTarget.classList.remove("opacity-50"),onDragOver:z=>{z.preventDefault(),z.currentTarget.classList.add("bg-muted")},onDragLeave:z=>z.currentTarget.classList.remove("bg-muted"),onDrop:S,showPagination:!d})})})}function Bu(){const{t:s}=I("server");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("manage.title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("manage.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Uu,{})})]})]})}const Gu=Object.freeze(Object.defineProperty({__proto__:null,default:Bu},Symbol.toStringTag,{value:"Module"}));function Wu({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=I("group");return e.jsx("div",{className:"flex items-center justify-between space-x-4",children:e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsx(Ft,{refetch:n}),e.jsx(T,{placeholder:l("toolbar.searchPlaceholder"),value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:y("h-8 w-[150px] lg:w-[250px]",a&&"border-primary/50 ring-primary/20")}),a&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("toolbar.reset"),e.jsx(Oe,{className:"ml-2 h-4 w-4"})]})]})})}const Yu=s=>{const{t:n}=I("group");return[{accessorKey:"id",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.id")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(H,{variant:"outline",children:a.getValue("id")})}),enableSorting:!0},{accessorKey:"name",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium",children:a.getValue("name")})})},{accessorKey:"users_count",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.usersCount")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(ot,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"server_count",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.serverCount")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(An,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("server_count")})]}),enableSorting:!0,size:8e3},{id:"actions",header:({column:a})=>e.jsx(M,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Ft,{defaultValues:a.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("form.edit")})]})}),e.jsx(Je,{title:n("messages.deleteConfirm"),description:n("messages.deleteDescription"),confirmText:n("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Uc({id:a.original.id}).then(({data:l})=>{l&&(q.success(n("messages.updateSuccess")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("messages.deleteButton")})]})})]})}]};function Ju(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[i,u]=m.useState([]),{data:x,refetch:o,isLoading:d}=se({queryKey:["serverGroupList"],queryFn:async()=>{const{data:D}=await It();return D}}),p=ze({data:x||[],columns:Yu(o),state:{sorting:i,columnVisibility:a,rowSelection:s,columnFilters:r},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:Le(),getFilteredRowModel:Ue(),getPaginationRowModel:Be(),getSortedRowModel:Ge(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:p,toolbar:D=>e.jsx(Wu,{table:D,refetch:o}),isLoading:d})}function Qu(){const{t:s}=I("group");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ju,{})})]})]})}const Zu=Object.freeze(Object.defineProperty({__proto__:null,default:Qu},Symbol.toStringTag,{value:"Module"})),Xu=s=>h.object({remarks:h.string().min(1,s("form.validation.remarks")),match:h.array(h.string()),action:h.enum(["block","dns"]),action_value:h.string().optional()});function Fr({refetch:s,dialogTrigger:n,defaultValues:a={remarks:"",match:[],action:"block",action_value:""},type:l="add"}){const{t:r}=I("route"),c=ce({resolver:ue(Xu(r)),defaultValues:a,mode:"onChange"}),[i,u]=m.useState(!1);return e.jsxs(ge,{open:i,onOpenChange:u,children:[e.jsx(Fe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ne,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add")})]})}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(l==="edit"?"form.edit":"form.create")}),e.jsx(Te,{})]}),e.jsxs(xe,{...c,children:[e.jsx(j,{control:c.control,name:"remarks",render:({field:x})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:r("form.remarks")}),e.jsx("div",{className:"relative",children:e.jsx(N,{children:e.jsx(T,{type:"text",placeholder:r("form.remarksPlaceholder"),...x})})}),e.jsx(P,{})]})}),e.jsx(j,{control:c.control,name:"match",render:({field:x})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:r("form.match")}),e.jsx("div",{className:"relative",children:e.jsx(N,{children:e.jsx(Cs,{className:"min-h-[120px]",placeholder:r("form.matchPlaceholder"),value:x.value.join(` -`),onChange:o=>{x.onChange(o.target.value.split(` -`))}})})}),e.jsx(P,{})]})}),e.jsx(j,{control:c.control,name:"action",render:({field:x})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.action")}),e.jsx("div",{className:"relative",children:e.jsx(N,{children:e.jsxs(W,{onValueChange:x.onChange,defaultValue:x.value,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:r("form.actionPlaceholder")})}),e.jsxs(G,{children:[e.jsx($,{value:"block",children:r("actions.block")}),e.jsx($,{value:"dns",children:r("actions.dns")})]})]})})}),e.jsx(P,{})]})}),c.watch("action")==="dns"&&e.jsx(j,{control:c.control,name:"action_value",render:({field:x})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.dns")}),e.jsx("div",{className:"relative",children:e.jsx(N,{children:e.jsx(T,{type:"text",placeholder:r("form.dnsPlaceholder"),...x})})})]})}),e.jsxs(Me,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{variant:"outline",children:r("form.cancel")})}),e.jsx(R,{type:"submit",onClick:()=>{Bc(c.getValues()).then(({data:x})=>{x&&(u(!1),s&&s(),toast.success(r(l==="edit"?"messages.updateSuccess":"messages.createSuccess")),c.reset())})},children:r("form.submit")})]})]})]})]})}function ex({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=I("route");return e.jsx("div",{className:"flex items-center justify-between ",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[e.jsx(Fr,{refetch:n}),e.jsx(T,{placeholder:l("toolbar.searchPlaceholder"),value:s.getColumn("remarks")?.getFilterValue()??"",onChange:r=>s.getColumn("remarks")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),a&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("toolbar.reset"),e.jsx(Oe,{className:"ml-2 h-4 w-4"})]})]})})}function sx({columns:s,data:n,refetch:a}){const[l,r]=m.useState({}),[c,i]=m.useState({}),[u,x]=m.useState([]),[o,d]=m.useState([]),p=ze({data:n,columns:s,state:{sorting:o,columnVisibility:c,rowSelection:l,columnFilters:u},enableRowSelection:!0,onRowSelectionChange:r,onSortingChange:d,onColumnFiltersChange:x,onColumnVisibilityChange:i,getCoreRowModel:Le(),getFilteredRowModel:Ue(),getPaginationRowModel:Be(),getSortedRowModel:Ge(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:p,toolbar:D=>e.jsx(ex,{table:D,refetch:a})})}const tx=s=>{const{t:n}=I("route"),a={block:{icon:pi,variant:"destructive",className:"bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-400 hover:bg-red-200 dark:hover:bg-red-800"},dns:{icon:gi,variant:"secondary",className:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-400 hover:bg-blue-200 dark:hover:bg-blue-800"}};return[{accessorKey:"id",header:({column:l})=>e.jsx(M,{column:l,title:n("columns.id")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(H,{variant:"outline",children:l.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"remarks",header:({column:l})=>e.jsx(M,{column:l,title:n("columns.remarks")}),cell:({row:l})=>{const r=l.original.match?.length||0;return e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:n("columns.matchRules",{count:r})})})},enableHiding:!1,enableSorting:!1},{accessorKey:"action",header:({column:l})=>e.jsx(M,{column:l,title:n("columns.action")}),cell:({row:l})=>{const r=l.getValue("action"),c=a[r]?.icon;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(H,{variant:a[r]?.variant||"default",className:y("flex items-center gap-1.5 px-3 py-1 capitalize",a[r]?.className),children:[c&&e.jsx(c,{className:"h-3.5 w-3.5"}),n(`actions.${r}`)]})})},enableSorting:!1,size:9e3},{id:"actions",header:()=>e.jsx("div",{className:"text-right",children:n("columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Fr,{defaultValues:l.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("form.edit")})]})}),e.jsx(Je,{title:n("messages.deleteConfirm"),description:n("messages.deleteDescription"),confirmText:n("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Gc({id:l.original.id}).then(({data:r})=>{r&&(q.success(n("messages.deleteSuccess")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("messages.deleteButton")})]})})]})}]};function ax(){const{t:s}=I("route"),[n,a]=m.useState([]);function l(){fr().then(({data:r})=>{a(r)})}return m.useEffect(()=>{l()},[]),e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(sx,{data:n,columns:tx(l),refetch:l})})]})]})}const nx=Object.freeze(Object.defineProperty({__proto__:null,default:ax},Symbol.toStringTag,{value:"Module"})),Mr=m.createContext(void 0);function rx({children:s,refreshData:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null);return e.jsx(Mr.Provider,{value:{isOpen:a,setIsOpen:l,editingPlan:r,setEditingPlan:c,refreshData:n},children:s})}function fa(){const s=m.useContext(Mr);if(s===void 0)throw new Error("usePlanEdit must be used within a PlanEditProvider");return s}function lx({table:s,saveOrder:n,isSortMode:a}){const{setIsOpen:l}=fa(),{t:r}=I("subscribe");return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsxs(R,{variant:"outline",className:"space-x-2",size:"sm",onClick:()=>l(!0),children:[e.jsx(Ne,{icon:"ion:add"}),e.jsx("div",{children:r("plan.add")})]}),e.jsx(T,{placeholder:r("plan.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:c=>s.getColumn("name")?.setFilterValue(c.target.value),className:"h-8 w-[150px] lg:w-[250px]"})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:a?"default":"outline",onClick:n,size:"sm",children:r(a?"plan.sort.save":"plan.sort.edit")})})]})}const Ha={monthly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},quarterly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},half_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},two_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},three_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},onetime:{color:"text-slate-700",bgColor:"bg-slate-100/80"},reset_traffic:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},ox=s=>{const{t:n}=I("subscribe");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:"cursor-move",children:e.jsx(Pt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.id")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(H,{variant:"outline",children:a.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"show",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.show")}),cell:({row:a})=>e.jsx(K,{defaultChecked:a.getValue("show"),onCheckedChange:l=>{Lt({id:a.original.id,show:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"sell",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.sell")}),cell:({row:a})=>e.jsx(K,{defaultChecked:a.getValue("sell"),onCheckedChange:l=>{Lt({id:a.original.id,sell:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"renew",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.renew"),tooltip:n("plan.columns.renew_tooltip")}),cell:({row:a})=>e.jsx(K,{defaultChecked:a.getValue("renew"),onCheckedChange:l=>{Lt({id:a.original.id,renew:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a.getValue("name")})}),enableSorting:!1,enableHiding:!1,size:900},{accessorKey:"users_count",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.stats")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-2",children:[e.jsx(ot,{}),e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"group",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.group")}),cell:({row:a})=>e.jsx("div",{className:"flex max-w-[600px] flex-wrap items-center gap-1.5 text-nowrap",children:e.jsx(H,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:a.getValue("group")?.name})}),enableSorting:!1,enableHiding:!1},{accessorKey:"prices",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.price")}),cell:({row:a})=>{const l=a.getValue("prices"),r=[{period:n("plan.columns.price_period.monthly"),key:"monthly",unit:n("plan.columns.price_period.unit.month")},{period:n("plan.columns.price_period.quarterly"),key:"quarterly",unit:n("plan.columns.price_period.unit.quarter")},{period:n("plan.columns.price_period.half_yearly"),key:"half_yearly",unit:n("plan.columns.price_period.unit.half_year")},{period:n("plan.columns.price_period.yearly"),key:"yearly",unit:n("plan.columns.price_period.unit.year")},{period:n("plan.columns.price_period.two_yearly"),key:"two_yearly",unit:n("plan.columns.price_period.unit.two_year")},{period:n("plan.columns.price_period.three_yearly"),key:"three_yearly",unit:n("plan.columns.price_period.unit.three_year")},{period:n("plan.columns.price_period.onetime"),key:"onetime",unit:""},{period:n("plan.columns.price_period.reset_traffic"),key:"reset_traffic",unit:n("plan.columns.price_period.unit.times")}];return e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:r.map(({period:c,key:i,unit:u})=>l[i]!=null&&e.jsxs(H,{variant:"secondary",className:y("px-2 py-0.5 font-medium transition-colors text-nowrap",Ha[i].color,Ha[i].bgColor,"border border-border/50","hover:bg-slate-200/80"),children:[c," ¥",l[i],u]},i))})},enableSorting:!1,size:9e3},{id:"actions",header:({column:a})=>e.jsx(M,{className:"justify-end",column:a,title:n("plan.columns.actions")}),cell:({row:a})=>{const{setIsOpen:l,setEditingPlan:r}=fa();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>{r(a.original),l(!0)},children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("plan.columns.edit")})]}),e.jsx(Je,{title:n("plan.columns.delete_confirm.title"),description:n("plan.columns.delete_confirm.description"),confirmText:n("plan.columns.delete"),variant:"destructive",onConfirm:async()=>{ud({id:a.original.id}).then(({data:c})=>{c&&(q.success(n("plan.columns.delete_confirm.success")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("plan.columns.delete")})]})})]})}}]},ix=h.object({id:h.number().nullable(),group_id:h.union([h.number(),h.string()]).nullable().optional(),name:h.string().min(1).max(250),content:h.string().nullable().optional(),transfer_enable:h.union([h.number().min(0),h.string().min(1)]),prices:h.object({monthly:h.union([h.number(),h.string()]).nullable().optional(),quarterly:h.union([h.number(),h.string()]).nullable().optional(),half_yearly:h.union([h.number(),h.string()]).nullable().optional(),yearly:h.union([h.number(),h.string()]).nullable().optional(),two_yearly:h.union([h.number(),h.string()]).nullable().optional(),three_yearly:h.union([h.number(),h.string()]).nullable().optional(),onetime:h.union([h.number(),h.string()]).nullable().optional(),reset_traffic:h.union([h.number(),h.string()]).nullable().optional()}).default({}),speed_limit:h.union([h.number(),h.string()]).nullable().optional(),capacity_limit:h.union([h.number(),h.string()]).nullable().optional(),device_limit:h.union([h.number(),h.string()]).nullable().optional(),force_update:h.boolean().optional(),reset_traffic_method:h.number().nullable(),users_count:h.number().optional()}),Or=m.forwardRef(({className:s,...n},a)=>e.jsx($n,{ref:a,className:y("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",s),...n,children:e.jsx(ji,{className:y("flex items-center justify-center text-current"),children:e.jsx(Ps,{className:"h-4 w-4"})})}));Or.displayName=$n.displayName;const pt={id:null,group_id:null,name:"",content:"",transfer_enable:"",prices:{monthly:"",quarterly:"",half_yearly:"",yearly:"",two_yearly:"",three_yearly:"",onetime:"",reset_traffic:""},speed_limit:"",capacity_limit:"",device_limit:"",force_update:!1,reset_traffic_method:null},gt={monthly:{label:"月付",months:1,discount:1},quarterly:{label:"季付",months:3,discount:.95},half_yearly:{label:"半年付",months:6,discount:.9},yearly:{label:"年付",months:12,discount:.85},two_yearly:{label:"两年付",months:24,discount:.8},three_yearly:{label:"三年付",months:36,discount:.75},onetime:{label:"流量包",months:1,discount:1},reset_traffic:{label:"重置包",months:1,discount:1}},cx=[{value:null,label:"follow_system"},{value:0,label:"monthly_first"},{value:1,label:"monthly_reset"},{value:2,label:"no_reset"},{value:3,label:"yearly_first"},{value:4,label:"yearly_reset"}];function dx(){const{isOpen:s,setIsOpen:n,editingPlan:a,setEditingPlan:l,refreshData:r}=fa(),[c,i]=m.useState(!1),{t:u}=I("subscribe"),x=ce({resolver:ue(ix),defaultValues:{...pt,...a||{}},mode:"onChange"});m.useEffect(()=>{a?x.reset({...pt,...a}):x.reset(pt)},[a,x]);const o=new la({html:!0}),[d,p]=m.useState();async function D(){It().then(({data:_})=>{p(_)})}m.useEffect(()=>{s&&D()},[s]);const V=_=>{if(isNaN(_))return;const k=Object.entries(gt).reduce((b,[w,S])=>{const C=_*S.months*S.discount;return{...b,[w]:C.toFixed(2)}},{});x.setValue("prices",k,{shouldDirty:!0})},f=()=>{n(!1),l(null),x.reset(pt)};return e.jsx(ge,{open:s,onOpenChange:f,children:e.jsxs(he,{children:[e.jsxs(ve,{children:[e.jsx(je,{children:u(a?"plan.form.edit_title":"plan.form.add_title")}),e.jsx(Te,{})]}),e.jsxs(xe,{...x,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:x.control,name:"name",render:({field:_})=>e.jsxs(g,{children:[e.jsx(v,{children:u("plan.form.name.label")}),e.jsx(N,{children:e.jsx(T,{placeholder:u("plan.form.name.placeholder"),..._})}),e.jsx(P,{})]})}),e.jsx(j,{control:x.control,name:"group_id",render:({field:_})=>e.jsxs(g,{children:[e.jsxs(v,{className:"flex items-center justify-between",children:[u("plan.form.group.label"),e.jsx(Ft,{dialogTrigger:e.jsx(R,{variant:"link",children:u("plan.form.group.add")}),refetch:D})]}),e.jsxs(W,{value:_.value?.toString()??"",onValueChange:k=>_.onChange(k?Number(k):null),children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:u("plan.form.group.placeholder")})})}),e.jsx(G,{children:d?.map(k=>e.jsx($,{value:k.id.toString(),children:k.name},k.id))})]}),e.jsx(P,{})]})}),e.jsx(j,{control:x.control,name:"transfer_enable",render:({field:_})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:u("plan.form.transfer.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(N,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.transfer.placeholder"),className:"rounded-r-none",..._})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.transfer.unit")})]}),e.jsx(P,{})]})}),e.jsx(j,{control:x.control,name:"speed_limit",render:({field:_})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:u("plan.form.speed.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(N,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.speed.placeholder"),className:"rounded-r-none",..._,value:_.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.speed.unit")})]}),e.jsx(P,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center",children:[e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"}),e.jsx("h3",{className:"mx-4 text-sm font-medium text-gray-500 dark:text-gray-400",children:u("plan.form.price.title")}),e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(T,{type:"number",placeholder:u("plan.form.price.base_price"),className:"h-7 w-32 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500",onChange:_=>{const k=parseFloat(_.target.value);V(k)}})]}),e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>{const _=Object.keys(gt).reduce((k,b)=>({...k,[b]:""}),{});x.setValue("prices",_,{shouldDirty:!0})},children:u("plan.form.price.clear.button")})}),e.jsx(te,{side:"top",align:"end",children:e.jsx("p",{className:"text-xs",children:u("plan.form.price.clear.tooltip")})})]})})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-3",children:Object.entries(gt).filter(([_])=>!["onetime","reset_traffic"].includes(_)).map(([_,k])=>e.jsx("div",{className:"group relative rounded-md bg-card p-2 ring-1 ring-gray-200 transition-all hover:ring-primary dark:ring-gray-800",children:e.jsx(j,{control:x.control,name:`prices.${_}`,render:({field:b})=>e.jsxs(g,{children:[e.jsxs(v,{className:"text-xs font-medium text-muted-foreground",children:[u(`plan.columns.price_period.${_}`),e.jsxs("span",{className:"ml-1 text-[10px] text-gray-400",children:["(",k.months===1?u("plan.form.price.period.monthly"):u("plan.form.price.period.months",{count:k.months}),")"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(N,{children:e.jsx(T,{type:"number",placeholder:"0.00",min:0,...b,value:b.value??"",onChange:w=>b.onChange(w.target.value),className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})},_))}),e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:Object.entries(gt).filter(([_])=>["onetime","reset_traffic"].includes(_)).map(([_,k])=>e.jsx("div",{className:"rounded-md border border-dashed border-gray-200 bg-muted/30 p-3 dark:border-gray-700",children:e.jsx(j,{control:x.control,name:`prices.${_}`,render:({field:b})=>e.jsx(g,{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"space-y-0",children:[e.jsx(v,{className:"text-xs font-medium",children:u(`plan.columns.price_period.${_}`)}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:u(_==="onetime"?"plan.form.price.onetime_desc":"plan.form.price.reset_desc")})]}),e.jsxs("div",{className:"relative w-full md:w-32",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(N,{children:e.jsx(T,{type:"number",placeholder:"0.00",min:0,...b,className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})})},_))})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(j,{control:x.control,name:"device_limit",render:({field:_})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:u("plan.form.device.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(N,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.device.placeholder"),className:"rounded-r-none",..._,value:_.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.device.unit")})]}),e.jsx(P,{})]})}),e.jsx(j,{control:x.control,name:"capacity_limit",render:({field:_})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:u("plan.form.capacity.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(N,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.capacity.placeholder"),className:"rounded-r-none",..._,value:_.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.capacity.unit")})]}),e.jsx(P,{})]})})]}),e.jsx(j,{control:x.control,name:"reset_traffic_method",render:({field:_})=>e.jsxs(g,{children:[e.jsx(v,{children:u("plan.form.reset_method.label")}),e.jsxs(W,{value:_.value?.toString()??"null",onValueChange:k=>_.onChange(k=="null"?null:Number(k)),children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:u("plan.form.reset_method.placeholder")})})}),e.jsx(G,{children:cx.map(k=>e.jsx($,{value:k.value?.toString()??"null",children:u(`plan.form.reset_method.options.${k.label}`)},k.value))})]}),e.jsx(F,{className:"text-xs",children:u("plan.form.reset_method.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:x.control,name:"content",render:({field:_})=>{const[k,b]=m.useState(!1);return e.jsxs(g,{className:"space-y-2",children:[e.jsxs(v,{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[u("plan.form.content.label"),e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>b(!k),children:k?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z"}),e.jsx("path",{fillRule:"evenodd",d:"M.664 10.59a1.651 1.651 0 010-1.186A10.004 10.004 0 0110 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0110 17c-4.257 0-7.893-2.66-9.336-6.41zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{fillRule:"evenodd",d:"M3.28 2.22a.75.75 0 00-1.06 1.06l14.5 14.5a.75.75 0 101.06-1.06l-1.745-1.745a10.029 10.029 0 003.3-4.38 1.651 1.651 0 000-1.185A10.004 10.004 0 009.999 3a9.956 9.956 0 00-4.744 1.194L3.28 2.22zM7.752 6.69l1.092 1.092a2.5 2.5 0 013.374 3.373l1.091 1.092a4 4 0 00-5.557-5.557z",clipRule:"evenodd"}),e.jsx("path",{d:"M10.748 13.93l2.523 2.523a9.987 9.987 0 01-3.27.547c-4.258 0-7.894-2.66-9.337-6.41a1.651 1.651 0 010-1.186A10.007 10.007 0 012.839 6.02L6.07 9.252a4 4 0 004.678 4.678z"})]})})}),e.jsx(te,{side:"top",children:e.jsx("p",{className:"text-xs",children:u(k?"plan.form.content.preview_button.hide":"plan.form.content.preview_button.show")})})]})})]}),e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"outline",size:"sm",onClick:()=>{_.onChange(u("plan.form.content.template.content"))},children:u("plan.form.content.template.button")})}),e.jsx(te,{side:"left",align:"center",children:e.jsx("p",{className:"text-xs",children:u("plan.form.content.template.tooltip")})})]})})]}),e.jsxs("div",{className:`grid gap-4 ${k?"grid-cols-1 lg:grid-cols-2":"grid-cols-1"}`,children:[e.jsx("div",{className:"space-y-2",children:e.jsx(N,{children:e.jsx(oa,{style:{height:"400px"},value:_.value||"",renderHTML:w=>o.render(w),onChange:({text:w})=>_.onChange(w),config:{view:{menu:!0,md:!0,html:!1},canView:{menu:!0,md:!0,html:!1,fullScreen:!1,hideMenu:!1}},placeholder:u("plan.form.content.placeholder"),className:"rounded-md border"})})}),k&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:u("plan.form.content.preview")}),e.jsx("div",{className:"prose prose-sm dark:prose-invert h-[400px] max-w-none overflow-y-auto rounded-md border p-4",children:e.jsx("div",{dangerouslySetInnerHTML:{__html:o.render(_.value||"")}})})]})]}),e.jsx(F,{className:"text-xs",children:u("plan.form.content.description")}),e.jsx(P,{})]})}})]}),e.jsx(Me,{className:"mt-6",children:e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsx("div",{className:"flex-shrink-0",children:a&&e.jsx(j,{control:x.control,name:"force_update",render:({field:_})=>e.jsxs(g,{className:"flex flex-row items-center space-x-2 space-y-0",children:[e.jsx(N,{children:e.jsx(Or,{checked:_.value,onCheckedChange:_.onChange})}),e.jsx("div",{className:"",children:e.jsx(v,{className:"text-sm",children:u("plan.form.force_update.label")})})]})})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(R,{type:"button",variant:"outline",onClick:f,children:u("plan.form.submit.cancel")}),e.jsx(R,{type:"submit",disabled:c,onClick:()=>{x.handleSubmit(async _=>{i(!0),(await md(_)).data&&(q.success(u(a?"plan.form.submit.success.update":"plan.form.submit.success.add")),f(),r()),i(!1)})()},children:u(c?"plan.form.submit.submitting":"plan.form.submit.submit")})]})]})})]})]})})}function mx(){const[s,n]=m.useState({}),[a,l]=m.useState({"drag-handle":!1}),[r,c]=m.useState([]),[i,u]=m.useState([]),[x,o]=m.useState(!1),[d,p]=m.useState({pageSize:20,pageIndex:0}),[D,V]=m.useState([]),{refetch:f}=se({queryKey:["planList"],queryFn:async()=>{const{data:S}=await Fs();return V(S),S}});m.useEffect(()=>{l({"drag-handle":x}),p({pageSize:x?99999:10,pageIndex:0})},[x]);const _=(S,C)=>{x&&(S.dataTransfer.setData("text/plain",C.toString()),S.currentTarget.classList.add("opacity-50"))},k=(S,C)=>{if(!x)return;S.preventDefault(),S.currentTarget.classList.remove("bg-muted");const E=parseInt(S.dataTransfer.getData("text/plain"));if(E===C)return;const z=[...D],[Z]=z.splice(E,1);z.splice(C,0,Z),V(z)},b=async()=>{if(!x){o(!0);return}const S=D?.map(C=>C.id);xd(S).then(()=>{q.success("排序保存成功"),o(!1),f()}).finally(()=>{o(!1)})},w=ze({data:D||[],columns:ox(f),state:{sorting:i,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:d},enableRowSelection:!0,onPaginationChange:p,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:Le(),getFilteredRowModel:Ue(),getPaginationRowModel:Be(),getSortedRowModel:Ge(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}},pageCount:x?1:void 0});return e.jsx(rx,{refreshData:f,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(Ye,{table:w,toolbar:S=>e.jsx(lx,{table:S,refetch:f,saveOrder:b,isSortMode:x}),draggable:x,onDragStart:_,onDragEnd:S=>S.currentTarget.classList.remove("opacity-50"),onDragOver:S=>{S.preventDefault(),S.currentTarget.classList.add("bg-muted")},onDragLeave:S=>S.currentTarget.classList.remove("bg-muted"),onDrop:k,showPagination:!x}),e.jsx(dx,{})]})})}function ux(){const{t:s}=I("subscribe");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("plan.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("plan.page.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(mx,{})})]})]})}const xx=Object.freeze(Object.defineProperty({__proto__:null,default:ux},Symbol.toStringTag,{value:"Module"})),Ls=[{value:Q.PENDING,label:Ys[Q.PENDING],icon:vi,color:Js[Q.PENDING]},{value:Q.PROCESSING,label:Ys[Q.PROCESSING],icon:qn,color:Js[Q.PROCESSING]},{value:Q.COMPLETED,label:Ys[Q.COMPLETED],icon:Wt,color:Js[Q.COMPLETED]},{value:Q.CANCELLED,label:Ys[Q.CANCELLED],icon:Hn,color:Js[Q.CANCELLED]},{value:Q.DISCOUNTED,label:Ys[Q.DISCOUNTED],icon:Wt,color:Js[Q.DISCOUNTED]}],Zs=[{value:ne.PENDING,label:ut[ne.PENDING],icon:bi,color:xt[ne.PENDING]},{value:ne.PROCESSING,label:ut[ne.PROCESSING],icon:qn,color:xt[ne.PROCESSING]},{value:ne.VALID,label:ut[ne.VALID],icon:Wt,color:xt[ne.VALID]},{value:ne.INVALID,label:ut[ne.INVALID],icon:Hn,color:xt[ne.INVALID]}];function jt({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=s?.getFilterValue(),c=Array.isArray(r)?new Set(r):r!==void 0?new Set([r]):new Set;return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,c?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:c.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:c.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[c.size," selected"]}):a.filter(i=>c.has(i.value)).map(i=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:i.label},i.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(_s,{children:[e.jsx(Vs,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Is,{children:"No results found."}),e.jsx(Ie,{children:a.map(i=>{const u=c.has(i.value);return e.jsxs(_e,{onSelect:()=>{const x=new Set(c);u?x.delete(i.value):x.add(i.value);const o=Array.from(x);s?.setFilterValue(o.length?o:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",u?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ps,{className:y("h-4 w-4")})}),i.icon&&e.jsx(i.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${i.color}`}),e.jsx("span",{children:i.label}),l?.get(i.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(i.value)})]},i.value)})}),c.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Ks,{}),e.jsx(Ie,{children:e.jsx(_e,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const hx=h.object({email:h.string().min(1),plan_id:h.number(),period:h.string(),total_amount:h.number()}),fx={email:"",plan_id:0,total_amount:0,period:""};function zr({refetch:s,trigger:n,defaultValues:a}){const{t:l}=I("order"),[r,c]=m.useState(!1),i=ce({resolver:ue(hx),defaultValues:{...fx,...a},mode:"onChange"}),[u,x]=m.useState([]);return m.useEffect(()=>{r&&Fs().then(({data:o})=>{x(o)})},[r]),e.jsxs(ge,{open:r,onOpenChange:c,children:[e.jsx(Fe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(Ne,{icon:"ion:add"}),e.jsx("div",{children:l("dialog.addOrder")})]})}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:l("dialog.assignOrder")}),e.jsx(Te,{})]}),e.jsxs(xe,{...i,children:[e.jsx(j,{control:i.control,name:"email",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dialog.fields.userEmail")}),e.jsx(N,{children:e.jsx(T,{placeholder:l("dialog.placeholders.email"),...o})})]})}),e.jsx(j,{control:i.control,name:"plan_id",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dialog.fields.subscriptionPlan")}),e.jsx(N,{children:e.jsxs(W,{value:o.value?o.value?.toString():void 0,onValueChange:d=>o.onChange(parseInt(d)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dialog.placeholders.plan")})}),e.jsx(G,{children:u.map(d=>e.jsx($,{value:d.id.toString(),children:d.name},d.id))})]})})]})}),e.jsx(j,{control:i.control,name:"period",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dialog.fields.orderPeriod")}),e.jsx(N,{children:e.jsxs(W,{value:o.value,onValueChange:o.onChange,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dialog.placeholders.period")})}),e.jsx(G,{children:Object.keys(Kd).map(d=>e.jsx($,{value:d,children:l(`period.${d}`)},d))})]})})]})}),e.jsx(j,{control:i.control,name:"total_amount",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dialog.fields.paymentAmount")}),e.jsx(N,{children:e.jsx(T,{type:"number",placeholder:l("dialog.placeholders.amount"),value:o.value/100,onChange:d=>o.onChange(parseFloat(d.currentTarget.value)*100)})}),e.jsx(P,{})]})}),e.jsxs(Me,{children:[e.jsx(R,{variant:"outline",onClick:()=>c(!1),children:l("dialog.actions.cancel")}),e.jsx(R,{type:"submit",onClick:()=>{i.handleSubmit(o=>{jd(o).then(({data:d})=>{d&&(s&&s(),i.reset(),c(!1),q.success(l("dialog.messages.addSuccess")))})})()},children:l("dialog.actions.confirm")})]})]})]})]})}function px({table:s,refetch:n}){const{t:a}=I("order"),l=s.getState().columnFilters.length>0,r=Object.values(He).filter(x=>typeof x=="number").map(x=>({label:a(`type.${He[x]}`),value:x,color:x===He.NEW?"green-500":x===He.RENEWAL?"blue-500":x===He.UPGRADE?"purple-500":"orange-500"})),c=Object.values(de).map(x=>({label:a(`period.${x}`),value:x,color:x===de.MONTH_PRICE?"slate-500":x===de.QUARTER_PRICE?"cyan-500":x===de.HALF_YEAR_PRICE?"indigo-500":x===de.YEAR_PRICE?"violet-500":x===de.TWO_YEAR_PRICE?"fuchsia-500":x===de.THREE_YEAR_PRICE?"pink-500":x===de.ONETIME_PRICE?"rose-500":"orange-500"})),i=Object.values(Q).filter(x=>typeof x=="number").map(x=>({label:a(`status.${Q[x]}`),value:x,icon:x===Q.PENDING?Ls[0].icon:x===Q.PROCESSING?Ls[1].icon:x===Q.COMPLETED?Ls[2].icon:x===Q.CANCELLED?Ls[3].icon:Ls[4].icon,color:x===Q.PENDING?"yellow-500":x===Q.PROCESSING?"blue-500":x===Q.COMPLETED?"green-500":x===Q.CANCELLED?"red-500":"green-500"})),u=Object.values(ne).filter(x=>typeof x=="number").map(x=>({label:a(`commission.${ne[x]}`),value:x,icon:x===ne.PENDING?Zs[0].icon:x===ne.PROCESSING?Zs[1].icon:x===ne.VALID?Zs[2].icon:Zs[3].icon,color:x===ne.PENDING?"yellow-500":x===ne.PROCESSING?"blue-500":x===ne.VALID?"green-500":"red-500"}));return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(zr,{refetch:n}),e.jsx(T,{placeholder:a("search.placeholder"),value:s.getColumn("trade_no")?.getFilterValue()??"",onChange:x=>s.getColumn("trade_no")?.setFilterValue(x.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex flex-wrap gap-x-2",children:[s.getColumn("type")&&e.jsx(jt,{column:s.getColumn("type"),title:a("table.columns.type"),options:r}),s.getColumn("period")&&e.jsx(jt,{column:s.getColumn("period"),title:a("table.columns.period"),options:c}),s.getColumn("status")&&e.jsx(jt,{column:s.getColumn("status"),title:a("table.columns.status"),options:i}),s.getColumn("commission_status")&&e.jsx(jt,{column:s.getColumn("commission_status"),title:a("table.columns.commissionStatus"),options:u})]}),l&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[a("actions.reset"),e.jsx(Oe,{className:"ml-2 h-4 w-4"})]})]})}function Ae({label:s,value:n,className:a,valueClassName:l}){return e.jsxs("div",{className:y("flex items-center py-1.5",a),children:[e.jsx("div",{className:"w-28 shrink-0 text-sm text-muted-foreground",children:s}),e.jsx("div",{className:y("text-sm",l),children:n||"-"})]})}function gx({status:s}){const{t:n}=I("order"),a={[Q.PENDING]:"bg-yellow-100 text-yellow-800 hover:bg-yellow-100",[Q.PROCESSING]:"bg-blue-100 text-blue-800 hover:bg-blue-100",[Q.CANCELLED]:"bg-red-100 text-red-800 hover:bg-red-100",[Q.COMPLETED]:"bg-green-100 text-green-800 hover:bg-green-100",[Q.DISCOUNTED]:"bg-gray-100 text-gray-800 hover:bg-gray-100"};return e.jsx(H,{variant:"secondary",className:y("font-medium",a[s]),children:n(`status.${Q[s]}`)})}function jx({id:s,trigger:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(),{t:i}=I("order");return m.useEffect(()=>{(async()=>{if(a){const{data:x}=await fd({id:s});c(x)}})()},[a,s]),e.jsxs(ge,{onOpenChange:l,open:a,children:[e.jsx(Fe,{asChild:!0,children:n}),e.jsxs(he,{className:"max-w-xl",children:[e.jsxs(ve,{className:"space-y-2",children:[e.jsx(je,{className:"text-lg font-medium",children:i("dialog.title")}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsxs("div",{className:"flex items-center space-x-6",children:[e.jsxs("div",{className:"text-muted-foreground",children:[i("table.columns.tradeNo"),":",r?.trade_no]}),r?.status&&e.jsx(gx,{status:r.status})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:i("dialog.basicInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ae,{label:i("dialog.fields.userEmail"),value:r?.user?.email?e.jsxs(Rs,{to:`/user/manage?email=${r.user.email}`,className:"group inline-flex items-center gap-1 text-primary hover:underline",children:[r.user.email,e.jsx(Kn,{className:"h-3.5 w-3.5 opacity-0 transition-opacity group-hover:opacity-100"})]}):"-"}),e.jsx(Ae,{label:i("dialog.fields.orderPeriod"),value:r&&i(`period.${r.period}`)}),e.jsx(Ae,{label:i("dialog.fields.subscriptionPlan"),value:r?.plan?.name,valueClassName:"font-medium"}),e.jsx(Ae,{label:i("dialog.fields.callbackNo"),value:r?.callback_no,valueClassName:"font-mono text-xs"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:i("dialog.amountInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ae,{label:i("dialog.fields.paymentAmount"),value:ks(r?.total_amount||0),valueClassName:"font-medium text-primary"}),e.jsx(be,{className:"my-2"}),e.jsx(Ae,{label:i("dialog.fields.balancePayment"),value:ks(r?.balance_amount||0)}),e.jsx(Ae,{label:i("dialog.fields.discountAmount"),value:ks(r?.discount_amount||0),valueClassName:"text-green-600"}),e.jsx(Ae,{label:i("dialog.fields.refundAmount"),value:ks(r?.refund_amount||0),valueClassName:"text-red-600"}),e.jsx(Ae,{label:i("dialog.fields.deductionAmount"),value:ks(r?.surplus_amount||0)})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:i("dialog.timeInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ae,{label:i("dialog.fields.createdAt"),value:me(r?.created_at),valueClassName:"font-mono text-xs"}),e.jsx(Ae,{label:i("dialog.fields.updatedAt"),value:me(r?.updated_at),valueClassName:"font-mono text-xs"})]})]})]})]})]})}const vx={[He.NEW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.RENEWAL]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.UPGRADE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.RESET_FLOW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},bx={[de.MONTH_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.QUARTER_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.HALF_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.TWO_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.THREE_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.ONETIME_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.RESET_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},yx=s=>Q[s],Nx=s=>ne[s],_x=s=>He[s],wx=s=>{const{t:n}=I("order");return[{accessorKey:"trade_no",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.tradeNo")}),cell:({row:a})=>{const l=a.original.trade_no,r=l.length>6?`${l.slice(0,3)}...${l.slice(-3)}`:l;return e.jsx("div",{className:"flex items-center",children:e.jsx(jx,{trigger:e.jsxs(J,{variant:"ghost",size:"sm",className:"flex h-8 items-center gap-1.5 px-2 font-medium text-primary transition-colors hover:bg-primary/10 hover:text-primary/80",children:[e.jsx("span",{className:"font-mono",children:r}),e.jsx(Kn,{className:"h-3.5 w-3.5 opacity-70"})]}),id:a.original.id})})},enableSorting:!1,enableHiding:!1},{accessorKey:"type",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.type")}),cell:({row:a})=>{const l=a.getValue("type"),r=vx[l];return e.jsx(H,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",r.color,r.bgColor,"border border-border/50","hover:bg-slate-200/80"),children:n(`type.${_x(l)}`)})},enableSorting:!1,enableHiding:!1},{accessorKey:"plan.name",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.plan")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium text-foreground/90 sm:max-w-72 md:max-w-[31rem]",children:a.original.plan?.name||"-"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"period",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.period")}),cell:({row:a})=>{const l=a.getValue("period"),r=bx[l];return e.jsx(H,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",r.color,r.bgColor,"hover:bg-opacity-80"),children:n(`period.${l}`)})},enableSorting:!1,enableHiding:!1},{accessorKey:"total_amount",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.amount")}),cell:({row:a})=>{const l=a.getValue("total_amount"),r=typeof l=="number"?(l/100).toFixed(2):"N/A";return e.jsxs("div",{className:"flex items-center font-mono text-foreground/90",children:["¥",r]})},enableSorting:!0,enableHiding:!1},{accessorKey:"status",header:({column:a})=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(M,{column:a,title:n("table.columns.status")}),e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx(Tr,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-muted-foreground"})}),e.jsx(te,{side:"top",className:"max-w-[200px] text-sm",children:n("status.tooltip")})]})})]}),cell:({row:a})=>{const l=Ls.find(r=>r.value===a.getValue("status"));return l?e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l.icon&&e.jsx(l.icon,{className:`h-4 w-4 text-${l.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n(`status.${yx(l.value)}`)})]}),l.value===Q.PENDING&&e.jsxs(ys,{modal:!0,children:[e.jsx(Ns,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(Nt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:n("actions.openMenu")})]})}),e.jsxs(os,{align:"end",className:"w-[140px]",children:[e.jsx(fe,{className:"cursor-pointer",onClick:async()=>{await pd({trade_no:a.original.trade_no}),s()},children:n("actions.markAsPaid")}),e.jsx(fe,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await gd({trade_no:a.original.trade_no}),s()},children:n("actions.cancel")})]})]})]}):null},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_balance",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.commission")}),cell:({row:a})=>{const l=a.getValue("commission_balance"),r=l?(l/100).toFixed(2):"-";return e.jsx("div",{className:"flex items-center font-mono text-foreground/90",children:l?`¥${r}`:"-"})},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_status",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.commissionStatus")}),cell:({row:a})=>{const l=a.original.status,r=a.original.commission_balance,c=Zs.find(i=>i.value===a.getValue("commission_status"));return r==0||!c?e.jsx("span",{className:"text-muted-foreground",children:"-"}):e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[c.icon&&e.jsx(c.icon,{className:`h-4 w-4 text-${c.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n(`commission.${Nx(c.value)}`)})]}),c.value===ne.PENDING&&l===Q.COMPLETED&&e.jsxs(ys,{modal:!0,children:[e.jsx(Ns,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(Nt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:n("actions.openMenu")})]})}),e.jsxs(os,{align:"end",className:"w-[120px]",children:[e.jsx(fe,{className:"cursor-pointer",onClick:async()=>{await Oa({trade_no:a.original.trade_no,commission_status:ne.PROCESSING}),s()},children:n("commission.PROCESSING")}),e.jsx(fe,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await Oa({trade_no:a.original.trade_no,commission_status:ne.INVALID}),s()},children:n("commission.INVALID")})]})]})]})},enableSorting:!0,enableHiding:!1},{accessorKey:"created_at",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.createdAt")}),cell:({row:a})=>e.jsx("div",{className:"text-nowrap font-mono text-sm text-muted-foreground",children:me(a.getValue("created_at"),"YYYY/MM/DD HH:mm:ss")}),enableSorting:!0,enableHiding:!1}]};function Cx(){const[s]=Un(),[n,a]=m.useState({}),[l,r]=m.useState({}),[c,i]=m.useState([]),[u,x]=m.useState([]),[o,d]=m.useState({pageIndex:0,pageSize:20});m.useEffect(()=>{const k=Object.entries({user_id:"string",order_id:"string",commission_status:"number",status:"number",commission_balance:"string"}).map(([b,w])=>{const S=s.get(b);return S?{id:b,value:w==="number"?parseInt(S):S}:null}).filter(Boolean);k.length>0&&i(k)},[s]);const{refetch:p,data:D,isLoading:V}=se({queryKey:["orderList",o,c,u],queryFn:()=>hd({pageSize:o.pageSize,current:o.pageIndex+1,filter:c,sort:u})}),f=ze({data:D?.data??[],columns:wx(p),state:{sorting:u,columnVisibility:l,rowSelection:n,columnFilters:c,pagination:o},rowCount:D?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:x,onColumnFiltersChange:i,onColumnVisibilityChange:r,getCoreRowModel:Le(),getFilteredRowModel:Ue(),getPaginationRowModel:Be(),onPaginationChange:d,getSortedRowModel:Ge(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:f,toolbar:e.jsx(px,{table:f,refetch:p}),showPagination:!0})}function Sx(){const{t:s}=I("order");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Cx,{})})]})]})}const kx=Object.freeze(Object.defineProperty({__proto__:null,default:Sx},Symbol.toStringTag,{value:"Module"}));function Dx({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(_s,{children:[e.jsx(Vs,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Is,{children:"No results found."}),e.jsx(Ie,{children:a.map(c=>{const i=r.has(c.value);return e.jsxs(_e,{onSelect:()=>{i?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",i?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ps,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Ks,{}),e.jsx(Ie,{children:e.jsx(_e,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const Tx=h.object({id:h.coerce.number().nullable().optional(),name:h.string().min(1,"请输入优惠券名称"),code:h.string().nullable(),type:h.union([h.string(),h.nativeEnum(js)]),value:h.coerce.number(),started_at:h.coerce.number(),ended_at:h.coerce.number(),limit_use:h.union([h.string(),h.number()]).nullable(),limit_use_with_user:h.union([h.string(),h.number()]).nullable(),generate_count:h.coerce.number().nullable().optional(),limit_plan_ids:h.array(h.number()).default([]).nullable(),limit_period:h.array(h.nativeEnum(de)).default([]).nullable()}).refine(s=>s.ended_at>s.started_at,{message:"结束时间必须晚于开始时间",path:["ended_at"]}),Ka={name:"",code:"",type:js.AMOUNT,value:0,started_at:Math.floor(Date.now()/1e3),ended_at:Math.floor(Date.now()/1e3)+7*24*60*60,limit_use:"",limit_use_with_user:"",limit_plan_ids:[],limit_period:[],generate_count:""};function Lr({defaultValues:s,refetch:n,type:a="create",dialogTrigger:l=null,open:r,onOpenChange:c}){const{t:i}=I("coupon"),[u,x]=m.useState(!1),o=r??u,d=c??x,[p,D]=m.useState([]),V=ce({resolver:ue(Tx),defaultValues:s||Ka});m.useEffect(()=>{s&&V.reset(s)},[s,V]),m.useEffect(()=>{Fs().then(({data:b})=>D(b))},[]);const f=b=>{if(!b)return;const w=(S,C)=>{const E=new Date(C*1e3);return S.setHours(E.getHours(),E.getMinutes(),E.getSeconds()),Math.floor(S.getTime()/1e3)};b.from&&V.setValue("started_at",w(b.from,V.watch("started_at"))),b.to&&V.setValue("ended_at",w(b.to,V.watch("ended_at")))},_=async b=>{bd(b).then(()=>{d(!1),a==="create"&&V.reset(Ka),n()})},k=(b,w)=>e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:w}),e.jsx(T,{type:"datetime-local",step:"1",value:me(V.watch(b),"YYYY-MM-DDTHH:mm:ss"),onChange:S=>{const C=new Date(S.target.value);V.setValue(b,Math.floor(C.getTime()/1e3))},className:"h-8 [&::-webkit-calendar-picker-indicator]:hidden"})]});return e.jsxs(ge,{open:o,onOpenChange:d,children:[l&&e.jsx(Fe,{asChild:!0,children:l}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsx(ve,{children:e.jsx(je,{children:i(a==="create"?"form.add":"form.edit")})}),e.jsx(xe,{...V,children:e.jsxs("form",{onSubmit:V.handleSubmit(_),className:"space-y-4",children:[e.jsx(j,{control:V.control,name:"name",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:i("form.name.label")}),e.jsx(T,{placeholder:i("form.name.placeholder"),...b}),e.jsx(P,{})]})}),e.jsx(j,{control:V.control,name:"code",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:i("form.code.label")}),e.jsx(T,{placeholder:i("form.code.placeholder"),...b,className:"h-9"}),e.jsx(F,{className:"text-xs",children:i("form.code.description")}),e.jsx(P,{})]})}),e.jsxs(g,{children:[e.jsx(v,{children:i("form.type.label")}),e.jsxs("div",{className:"flex",children:[e.jsx(j,{control:V.control,name:"type",render:({field:b})=>e.jsxs(W,{value:b.value.toString(),onValueChange:b.onChange,children:[e.jsx(B,{className:"flex-[1.2] rounded-r-none border-r-0 focus:z-10",children:e.jsx(Y,{placeholder:i("form.type.placeholder")})}),e.jsx(G,{children:Object.entries(Ud).map(([w,S])=>e.jsx($,{value:w,children:i(`table.toolbar.types.${w}`)},w))})]})}),e.jsx(j,{control:V.control,name:"value",render:({field:b})=>e.jsx(T,{type:"number",placeholder:i("form.value.placeholder"),...b,onChange:w=>b.onChange(w.target.value===""?"":w.target.value),className:"flex-[2] rounded-none border-x-0 text-left"})}),e.jsx("div",{className:"flex min-w-[40px] items-center justify-center rounded-md rounded-l-none border border-l-0 border-input bg-muted/50 px-3 font-medium text-muted-foreground",children:e.jsx("span",{children:V.watch("type")===js.AMOUNT?"¥":"%"})})]})]}),e.jsxs(g,{children:[e.jsx(v,{children:i("form.validity.label")}),e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",className:y("w-full justify-start text-left font-normal",!V.watch("started_at")&&"text-muted-foreground"),children:[e.jsx(it,{className:"mr-2 h-4 w-4"}),me(V.watch("started_at"),"YYYY-MM-DD HH:mm:ss")," ",i("form.validity.to")," ",me(V.watch("ended_at"),"YYYY-MM-DD HH:mm:ss")]})}),e.jsxs(We,{className:"w-auto p-0",align:"start",children:[e.jsx("div",{className:"border-b border-border",children:e.jsx(Ms,{mode:"range",selected:{from:new Date(V.watch("started_at")*1e3),to:new Date(V.watch("ended_at")*1e3)},onSelect:f,numberOfMonths:2})}),e.jsx("div",{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-4",children:[k("started_at",i("table.validity.startTime")),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:i("form.validity.to")}),k("ended_at",i("table.validity.endTime"))]})})]})]}),e.jsx(P,{})]}),e.jsx(j,{control:V.control,name:"limit_use",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:i("form.limitUse.label")}),e.jsx(T,{type:"number",min:0,placeholder:i("form.limitUse.placeholder"),...b,value:b.value===void 0?"":b.value,onChange:w=>b.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(F,{className:"text-xs",children:i("form.limitUse.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:V.control,name:"limit_use_with_user",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:i("form.limitUseWithUser.label")}),e.jsx(T,{type:"number",min:0,placeholder:i("form.limitUseWithUser.placeholder"),...b,value:b.value===void 0?"":b.value,onChange:w=>b.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(F,{className:"text-xs",children:i("form.limitUseWithUser.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:V.control,name:"limit_period",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:i("form.limitPeriod.label")}),e.jsx(lt,{options:Object.entries(de).filter(([w])=>isNaN(Number(w))).map(([w,S])=>({label:S,value:w})),onChange:w=>{if(w.length===0){b.onChange([]);return}const S=w.map(C=>de[C.value]);b.onChange(S)},value:(b.value||[]).map(w=>({label:Object.entries(de).find(([S,C])=>C===w)?.[1]||"",value:Object.entries(de).find(([S,C])=>C===w)?.[0]||""})),placeholder:i("form.limitPeriod.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:i("form.limitPeriod.empty")})}),e.jsx(F,{className:"text-xs",children:i("form.limitPeriod.description")}),e.jsx(P,{})]})}),e.jsx(j,{control:V.control,name:"limit_plan_ids",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:i("form.limitPlan.label")}),e.jsx(lt,{options:p?.map(w=>({label:w.name,value:w.id.toString()}))||[],onChange:w=>b.onChange(w.map(S=>Number(S.value))),value:(p||[]).filter(w=>(b.value||[]).includes(w.id)).map(w=>({label:w.name,value:w.id.toString()})),placeholder:i("form.limitPlan.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:i("form.limitPlan.empty")})}),e.jsx(P,{})]})}),a==="create"&&e.jsx(e.Fragment,{children:e.jsx(j,{control:V.control,name:"generate_count",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:i("form.generateCount.label")}),e.jsx(T,{type:"number",min:0,placeholder:i("form.generateCount.placeholder"),...b,value:b.value===void 0?"":b.value,onChange:w=>b.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(F,{className:"text-xs",children:i("form.generateCount.description")}),e.jsx(P,{})]})})}),e.jsx(Me,{children:e.jsx(R,{type:"submit",disabled:V.formState.isSubmitting,children:V.formState.isSubmitting?i("form.submit.saving"):i("form.submit.save")})})]})})]})]})}function Px({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=I("coupon");return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Lr,{refetch:n,dialogTrigger:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(Ne,{icon:"ion:add"}),e.jsx("div",{children:l("form.add")})]})}),e.jsx(T,{placeholder:l("table.toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),s.getColumn("type")&&e.jsx(Dx,{column:s.getColumn("type"),title:l("table.toolbar.type"),options:[{value:js.AMOUNT,label:l(`table.toolbar.types.${js.AMOUNT}`)},{value:js.PERCENTAGE,label:l(`table.toolbar.types.${js.PERCENTAGE}`)}]}),a&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("table.toolbar.reset"),e.jsx(Oe,{className:"ml-2 h-4 w-4"})]})]})}const Ar=m.createContext(void 0);function Rx({children:s,refetch:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null),i=x=>{c(x),l(!0)},u=()=>{l(!1),c(null)};return e.jsxs(Ar.Provider,{value:{isOpen:a,currentCoupon:r,openEdit:i,closeEdit:u},children:[s,r&&e.jsx(Lr,{defaultValues:r,refetch:n,type:"edit",open:a,onOpenChange:l})]})}function Ex(){const s=m.useContext(Ar);if(s===void 0)throw new Error("useCouponEdit must be used within a CouponEditProvider");return s}const Vx=s=>{const{t:n}=I("coupon");return[{accessorKey:"id",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.id")}),cell:({row:a})=>e.jsx(H,{children:a.original.id}),enableSorting:!0},{accessorKey:"show",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.show")}),cell:({row:a})=>e.jsx(K,{defaultChecked:a.original.show,onCheckedChange:l=>{Nd({id:a.original.id,show:l}).then(({data:r})=>!r&&s())}}),enableSorting:!1},{accessorKey:"name",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{children:a.original.name})}),enableSorting:!1,size:800},{accessorKey:"type",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.type")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:n(`table.toolbar.types.${a.original.type}`)}),enableSorting:!0},{accessorKey:"code",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.code")}),cell:({row:a})=>e.jsx(H,{variant:"secondary",children:a.original.code}),enableSorting:!0},{accessorKey:"limit_use",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.limitUse")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:a.original.limit_use===null?n("table.validity.unlimited"):a.original.limit_use}),enableSorting:!0},{accessorKey:"limit_use_with_user",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.limitUseWithUser")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:a.original.limit_use_with_user===null?n("table.validity.noLimit"):a.original.limit_use_with_user}),enableSorting:!0},{accessorKey:"#",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.validity")}),cell:({row:a})=>{const[l,r]=m.useState(!1),c=Date.now(),i=a.original.started_at*1e3,u=a.original.ended_at*1e3,x=c>u,o=ce.jsx(M,{className:"justify-end",column:a,title:n("table.columns.actions")}),cell:({row:a})=>{const{openEdit:l}=Ex();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>l(a.original),children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("table.actions.edit")})]}),e.jsx(Je,{title:n("table.actions.deleteConfirm.title"),description:n("table.actions.deleteConfirm.description"),confirmText:n("table.actions.deleteConfirm.confirmText"),variant:"destructive",onConfirm:async()=>{yd({id:a.original.id}).then(({data:r})=>{r&&(q.success("删除成功"),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("table.actions.delete")})]})})]})}}]};function Ix(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[i,u]=m.useState([]),[x,o]=m.useState({pageIndex:0,pageSize:20}),{refetch:d,data:p}=se({queryKey:["couponList",x,r,i],queryFn:()=>vd({pageSize:x.pageSize,current:x.pageIndex+1,filter:r,sort:i})}),D=ze({data:p?.data??[],columns:Vx(d),state:{sorting:i,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:x},pageCount:Math.ceil((p?.total??0)/x.pageSize),rowCount:p?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,onPaginationChange:o,getCoreRowModel:Le(),getFilteredRowModel:Ue(),getPaginationRowModel:Be(),getSortedRowModel:Ge(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Rx,{refetch:d,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Ye,{table:D,toolbar:e.jsx(Px,{table:D,refetch:d})})})})}function Fx(){const{t:s}=I("coupon");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ix,{})})]})]})}const Mx=Object.freeze(Object.defineProperty({__proto__:null,default:Fx},Symbol.toStringTag,{value:"Module"})),Ox=h.object({email_prefix:h.string().optional(),email_suffix:h.string().min(1),password:h.string().optional(),expired_at:h.number().optional().nullable(),plan_id:h.number().nullable(),generate_count:h.number().optional().nullable()}).refine(s=>s.generate_count===null?s.email_prefix!==void 0&&s.email_prefix!=="":!0,{message:"Email prefix is required when generate_count is null",path:["email_prefix"]}),zx={email_prefix:"",email_suffix:"",password:"",expired_at:null,plan_id:null,generate_count:void 0};function Lx({refetch:s}){const{t:n}=I("user"),[a,l]=m.useState(!1),r=ce({resolver:ue(Ox),defaultValues:zx,mode:"onChange"}),[c,i]=m.useState([]);return m.useEffect(()=>{a&&Fs().then(({data:u})=>{u&&i(u)})},[a]),e.jsxs(ge,{open:a,onOpenChange:l,children:[e.jsx(Fe,{asChild:!0,children:e.jsxs(J,{size:"sm",variant:"outline",className:"space-x-2 gap-0",children:[e.jsx(Ne,{icon:"ion:add"}),e.jsx("div",{children:n("generate.button")})]})}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:n("generate.title")}),e.jsx(Te,{})]}),e.jsxs(xe,{...r,children:[e.jsxs(g,{children:[e.jsx(v,{children:n("generate.form.email")}),e.jsxs("div",{className:"flex",children:[!r.watch("generate_count")&&e.jsx(j,{control:r.control,name:"email_prefix",render:({field:u})=>e.jsx(T,{className:"flex-[5] rounded-r-none",placeholder:n("generate.form.email_prefix"),...u})}),e.jsx("div",{className:`z-[-1] border border-r-0 border-input px-3 py-1 shadow-sm ${r.watch("generate_count")?"rounded-l-md":"border-l-0"}`,children:"@"}),e.jsx(j,{control:r.control,name:"email_suffix",render:({field:u})=>e.jsx(T,{className:"flex-[4] rounded-l-none",placeholder:n("generate.form.email_domain"),...u})})]})]}),e.jsx(j,{control:r.control,name:"password",render:({field:u})=>e.jsxs(g,{children:[e.jsx(v,{children:n("generate.form.password")}),e.jsx(T,{placeholder:n("generate.form.password_placeholder"),...u}),e.jsx(P,{})]})}),e.jsx(j,{control:r.control,name:"expired_at",render:({field:u})=>e.jsxs(g,{className:"flex flex-col",children:[e.jsx(v,{children:n("generate.form.expire_time")}),e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsx(N,{children:e.jsxs(J,{variant:"outline",className:y("w-full pl-3 text-left font-normal",!u.value&&"text-muted-foreground"),children:[u.value?me(u.value):e.jsx("span",{children:n("generate.form.expire_time_placeholder")}),e.jsx(it,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsxs(We,{className:"flex w-auto flex-col space-y-2 p-2",children:[e.jsx(Ni,{asChild:!0,children:e.jsx(J,{variant:"outline",className:"w-full",onClick:()=>{u.onChange(null)},children:n("generate.form.permanent")})}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Ms,{mode:"single",selected:u.value?new Date(u.value*1e3):void 0,onSelect:x=>{x&&u.onChange(x?.getTime()/1e3)}})})]})]})]})}),e.jsx(j,{control:r.control,name:"plan_id",render:({field:u})=>e.jsxs(g,{children:[e.jsx(v,{children:n("generate.form.subscription")}),e.jsx(N,{children:e.jsxs(W,{value:u.value?u.value.toString():"null",onValueChange:x=>u.onChange(x==="null"?null:parseInt(x)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:n("generate.form.subscription_none")})}),e.jsxs(G,{children:[e.jsx($,{value:"null",children:n("generate.form.subscription_none")}),c.map(x=>e.jsx($,{value:x.id.toString(),children:x.name},x.id))]})]})})]})}),!r.watch("email_prefix")&&e.jsx(j,{control:r.control,name:"generate_count",render:({field:u})=>e.jsxs(g,{children:[e.jsx(v,{children:n("generate.form.generate_count")}),e.jsx(T,{type:"number",placeholder:n("generate.form.generate_count_placeholder"),value:u.value||"",onChange:x=>u.onChange(x.target.value?parseInt(x.target.value):null)})]})})]}),e.jsxs(Me,{children:[e.jsx(J,{variant:"outline",onClick:()=>l(!1),children:n("generate.form.cancel")}),e.jsx(J,{onClick:()=>r.handleSubmit(u=>{Sd(u).then(({data:x})=>{x&&(q.success(n("generate.form.success")),r.reset(),s(),l(!1))})})(),children:n("generate.form.submit")})]})]})]})}const $r=Ga,qr=Wa,Ax=Ya,Hr=m.forwardRef(({className:s,...n},a)=>e.jsx(St,{className:y("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",s),...n,ref:a}));Hr.displayName=St.displayName;const $x=Ts("fixed overflow-y-scroll z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-md",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-md"}},defaultVariants:{side:"right"}}),pa=m.forwardRef(({side:s="right",className:n,children:a,...l},r)=>e.jsxs(Ax,{children:[e.jsx(Hr,{}),e.jsxs(kt,{ref:r,className:y($x({side:s}),n),...l,children:[e.jsxs(ta,{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-secondary",children:[e.jsx(Oe,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));pa.displayName=kt.displayName;const ga=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...n});ga.displayName="SheetHeader";const Kr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});Kr.displayName="SheetFooter";const ja=m.forwardRef(({className:s,...n},a)=>e.jsx(Dt,{ref:a,className:y("text-lg font-semibold text-foreground",s),...n}));ja.displayName=Dt.displayName;const va=m.forwardRef(({className:s,...n},a)=>e.jsx(Tt,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));va.displayName=Tt.displayName;function qx({table:s,refetch:n,permissionGroups:a=[],subscriptionPlans:l=[]}){const{t:r}=I("user"),c=s.getState().columnFilters.length>0,[i,u]=m.useState([]),[x,o]=m.useState(!1),d=[{label:r("filter.fields.email"),value:"email",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.id"),value:"id",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.plan_id"),value:"plan_id",type:"select",operators:[{label:r("filter.operators.eq"),value:"eq"}],useOptions:!0},{label:r("filter.fields.transfer_enable"),value:"transfer_enable",type:"number",unit:"GB",operators:[{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.total_used"),value:"total_used",type:"number",unit:"GB",operators:[{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.online_count"),value:"online_count",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"},{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"}]},{label:r("filter.fields.expired_at"),value:"expired_at",type:"date",operators:[{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.uuid"),value:"uuid",type:"text",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.token"),value:"token",type:"text",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.banned"),value:"banned",type:"select",operators:[{label:r("filter.operators.eq"),value:"eq"}],options:[{label:r("filter.status.normal"),value:"0"},{label:r("filter.status.banned"),value:"1"}]},{label:r("filter.fields.remark"),value:"remark",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.inviter_email"),value:"inviter_email",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.invite_user_id"),value:"invite_user_id",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.is_admin"),value:"is_admin",type:"boolean",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.is_staff"),value:"is_staff",type:"boolean",operators:[{label:r("filter.operators.eq"),value:"eq"}]}],p=w=>w*1024*1024*1024,D=w=>w/(1024*1024*1024),V=()=>{u([...i,{field:"",operator:"",value:""}])},f=w=>{u(i.filter((S,C)=>C!==w))},_=(w,S,C)=>{const E=[...i];if(E[w]={...E[w],[S]:C},S==="field"){const z=d.find(Z=>Z.value===C);z&&(E[w].operator=z.operators[0].value,E[w].value=z.type==="boolean"?!1:"")}u(E)},k=(w,S)=>{const C=d.find(E=>E.value===w.field);if(!C)return null;switch(C.type){case"text":return e.jsx(T,{placeholder:r("filter.sheet.value"),value:w.value,onChange:E=>_(S,"value",E.target.value)});case"number":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(T,{type:"number",placeholder:r("filter.sheet.value_number",{unit:C.unit}),value:C.unit==="GB"?D(w.value||0):w.value,onChange:E=>{const z=Number(E.target.value);_(S,"value",C.unit==="GB"?p(z):z)}}),C.unit&&e.jsx("span",{className:"text-sm text-muted-foreground",children:C.unit})]});case"date":return e.jsx(Ms,{mode:"single",selected:w.value,onSelect:E=>_(S,"value",E),className:"rounded-md border"});case"select":return e.jsxs(W,{value:w.value,onValueChange:E=>_(S,"value",E),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:r("filter.sheet.value")})}),e.jsx(G,{children:C.useOptions?l.map(E=>e.jsx($,{value:E.value.toString(),children:E.label},E.value)):C.options?.map(E=>e.jsx($,{value:E.value.toString(),children:E.label},E.value))})]});case"boolean":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(K,{checked:w.value,onCheckedChange:E=>_(S,"value",E)}),e.jsx(_t,{children:w.value?r("filter.boolean.true"):r("filter.boolean.false")})]});default:return null}},b=()=>{const w=i.filter(S=>S.field&&S.operator&&S.value!=="").map(S=>{const C=d.find(z=>z.value===S.field);let E=S.value;return S.operator==="contains"?{id:S.field,value:E}:(C?.type==="date"&&E instanceof Date&&(E=Math.floor(E.getTime()/1e3)),C?.type==="boolean"&&(E=E?1:0),{id:S.field,value:`${S.operator}:${E}`})});s.setColumnFilters(w),o(!1)};return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2",children:e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:[e.jsx(Lx,{refetch:n}),e.jsx(T,{placeholder:r("filter.email_search"),value:s.getColumn("email")?.getFilterValue()??"",onChange:w=>s.getColumn("email")?.setFilterValue(w.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs($r,{open:x,onOpenChange:o,children:[e.jsx(qr,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(_i,{className:"mr-2 h-4 w-4"}),r("filter.advanced"),i.length>0&&e.jsx(H,{variant:"secondary",className:"ml-2 rounded-sm px-1",children:i.length})]})}),e.jsxs(pa,{className:"w-[400px] sm:w-[540px]",children:[e.jsxs(ga,{children:[e.jsx(ja,{children:r("filter.sheet.title")}),e.jsx(va,{children:r("filter.sheet.description")})]}),e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{className:"font-medium",children:r("filter.sheet.conditions")}),e.jsx(R,{variant:"outline",size:"sm",onClick:V,children:r("filter.sheet.add")})]}),e.jsx(rt,{className:"h-[calc(100vh-280px)] pr-4",children:e.jsx("div",{className:"space-y-4",children:i.map((w,S)=>e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(_t,{children:r("filter.sheet.condition",{number:S+1})}),e.jsx(R,{variant:"ghost",size:"sm",onClick:()=>f(S),children:e.jsx(Oe,{className:"h-4 w-4"})})]}),e.jsxs(W,{value:w.field,onValueChange:C=>_(S,"field",C),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:r("filter.sheet.field")})}),e.jsx(G,{children:d.map(C=>e.jsx($,{value:C.value,children:C.label},C.value))})]}),w.field&&e.jsxs(W,{value:w.operator,onValueChange:C=>_(S,"operator",C),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:r("filter.sheet.operator")})}),e.jsx(G,{children:d.find(C=>C.value===w.field)?.operators.map(C=>e.jsx($,{value:C.value,children:C.label},C.value))})]}),w.field&&w.operator&&k(w,S)]},S))})}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(R,{variant:"outline",onClick:()=>{u([]),o(!1)},children:r("filter.sheet.reset")}),e.jsx(R,{onClick:b,children:r("filter.sheet.apply")})]})]})]})]}),c&&e.jsxs(R,{variant:"ghost",onClick:()=>{s.resetColumnFilters(),u([])},className:"h-8 px-2 lg:px-3",children:[r("filter.reset"),e.jsx(Oe,{className:"ml-2 h-4 w-4"})]})]})})}const Hx=h.object({id:h.number(),email:h.string().email(),invite_user_email:h.string().email().nullable().optional(),password:h.string().optional().nullable(),balance:h.coerce.number(),commission_balance:h.coerce.number(),u:h.number(),d:h.number(),transfer_enable:h.number(),expired_at:h.number().nullable(),plan_id:h.number().nullable(),banned:h.number(),commission_type:h.number(),commission_rate:h.number().nullable(),discount:h.number().nullable(),speed_limit:h.number().nullable(),device_limit:h.number().nullable(),is_admin:h.number(),is_staff:h.number(),remarks:h.string().nullable()}),Ur=m.createContext(void 0);function Kx({children:s,defaultValues:n,open:a,onOpenChange:l}){const[r,c]=m.useState(!1),[i,u]=m.useState(!1),[x,o]=m.useState([]),d=ce({resolver:ue(Hx),defaultValues:n,mode:"onChange"});m.useEffect(()=>{a!==void 0&&c(a)},[a]);const p=D=>{c(D),l?.(D)};return e.jsx(Ur.Provider,{value:{form:d,formOpen:r,setFormOpen:p,datePickerOpen:i,setDatePickerOpen:u,planList:x,setPlanList:o},children:s})}function Ux(){const s=m.useContext(Ur);if(!s)throw new Error("useUserForm must be used within a UserFormProvider");return s}function Bx({refetch:s}){const{t:n}=I("user"),{form:a,formOpen:l,setFormOpen:r,datePickerOpen:c,setDatePickerOpen:i,planList:u,setPlanList:x}=Ux();return m.useEffect(()=>{l&&Fs().then(({data:o})=>{x(o)})},[l,x]),e.jsxs(xe,{...a,children:[e.jsx(j,{control:a.control,name:"email",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.email")}),e.jsx(N,{children:e.jsx(T,{...o,placeholder:n("edit.form.email_placeholder")})}),e.jsx(P,{...o})]})}),e.jsx(j,{control:a.control,name:"invite_user_email",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.inviter_email")}),e.jsx(N,{children:e.jsx(T,{value:o.value||"",onChange:d=>o.onChange(d.target.value?d.target.value:null),placeholder:n("edit.form.inviter_email_placeholder")})}),e.jsx(P,{...o})]})}),e.jsx(j,{control:a.control,name:"password",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.password")}),e.jsx(N,{children:e.jsx(T,{value:o.value||"",onChange:o.onChange,placeholder:n("edit.form.password_placeholder")})}),e.jsx(P,{...o})]})}),e.jsxs("div",{className:"grid gap-2 md:grid-cols-2",children:[e.jsx(j,{control:a.control,name:"balance",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.balance")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:o.value||"",onChange:o.onChange,placeholder:n("edit.form.balance_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(P,{...o})]})}),e.jsx(j,{control:a.control,name:"commission_balance",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.commission_balance")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:o.value||"",onChange:o.onChange,placeholder:n("edit.form.commission_balance_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(P,{...o})]})}),e.jsx(j,{control:a.control,name:"u",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.upload")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{value:o.value/1024/1024/1024||"",onChange:d=>o.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.upload_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(P,{...o})]})}),e.jsx(j,{control:a.control,name:"d",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.download")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:o.value/1024/1024/1024||"",onChange:d=>o.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.download_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(P,{...o})]})})]}),e.jsx(j,{control:a.control,name:"transfer_enable",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.total_traffic")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:o.value/1024/1024/1024||"",onChange:d=>o.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.total_traffic_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(P,{})]})}),e.jsx(j,{control:a.control,name:"expired_at",render:({field:o})=>e.jsxs(g,{className:"flex flex-col",children:[e.jsx(v,{children:n("edit.form.expire_time")}),e.jsxs(as,{open:c,onOpenChange:i,children:[e.jsx(ns,{asChild:!0,children:e.jsx(N,{children:e.jsxs(R,{type:"button",variant:"outline",className:y("w-full pl-3 text-left font-normal",!o.value&&"text-muted-foreground"),onClick:()=>i(!0),children:[o.value?me(o.value):e.jsx("span",{children:n("edit.form.expire_time_placeholder")}),e.jsx(it,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsx(We,{className:"w-auto p-0",align:"start",side:"top",sideOffset:4,onInteractOutside:d=>{d.preventDefault()},onEscapeKeyDown:d=>{d.preventDefault()},children:e.jsxs("div",{className:"flex flex-col space-y-3 p-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(R,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{o.onChange(null),i(!1)},children:n("edit.form.expire_time_permanent")}),e.jsx(R,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const d=new Date;d.setMonth(d.getMonth()+1),d.setHours(23,59,59,999),o.onChange(Math.floor(d.getTime()/1e3)),i(!1)},children:n("edit.form.expire_time_1month")}),e.jsx(R,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const d=new Date;d.setMonth(d.getMonth()+3),d.setHours(23,59,59,999),o.onChange(Math.floor(d.getTime()/1e3)),i(!1)},children:n("edit.form.expire_time_3months")})]}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Ms,{mode:"single",selected:o.value?new Date(o.value*1e3):void 0,onSelect:d=>{if(d){const p=new Date(o.value?o.value*1e3:Date.now());d.setHours(p.getHours(),p.getMinutes(),p.getSeconds()),o.onChange(Math.floor(d.getTime()/1e3))}},disabled:d=>d{const d=new Date;d.setHours(23,59,59,999),o.onChange(Math.floor(d.getTime()/1e3))},className:"h-6 px-2 text-xs",children:n("edit.form.expire_time_today")})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(T,{type:"datetime-local",step:"1",value:me(o.value,"YYYY-MM-DDTHH:mm:ss"),onChange:d=>{const p=new Date(d.target.value);isNaN(p.getTime())||o.onChange(Math.floor(p.getTime()/1e3))},className:"flex-1"}),e.jsx(R,{type:"button",variant:"outline",onClick:()=>i(!1),children:n("edit.form.expire_time_confirm")})]})]})]})})]}),e.jsx(P,{})]})}),e.jsx(j,{control:a.control,name:"plan_id",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.subscription")}),e.jsx(N,{children:e.jsxs(W,{value:o.value?o.value.toString():"null",onValueChange:d=>o.onChange(d==="null"?null:parseInt(d)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:n("edit.form.subscription_none")})}),e.jsxs(G,{children:[e.jsx($,{value:"null",children:n("edit.form.subscription_none")}),u.map(d=>e.jsx($,{value:d.id.toString(),children:d.name},d.id))]})]})})]})}),e.jsx(j,{control:a.control,name:"banned",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.account_status")}),e.jsx(N,{children:e.jsxs(W,{value:o.value.toString(),onValueChange:d=>o.onChange(parseInt(d)),children:[e.jsx(B,{children:e.jsx(Y,{})}),e.jsxs(G,{children:[e.jsx($,{value:"1",children:n("columns.status_text.banned")}),e.jsx($,{value:"0",children:n("columns.status_text.normal")})]})]})})]})}),e.jsx(j,{control:a.control,name:"commission_type",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.commission_type")}),e.jsx(N,{children:e.jsxs(W,{value:o.value.toString(),onValueChange:d=>o.onChange(parseInt(d)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:n("edit.form.subscription_none")})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:n("edit.form.commission_type_system")}),e.jsx($,{value:"1",children:n("edit.form.commission_type_cycle")}),e.jsx($,{value:"2",children:n("edit.form.commission_type_onetime")})]})]})})]})}),e.jsx(j,{control:a.control,name:"commission_rate",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.commission_rate")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:o.value||"",onChange:d=>o.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.commission_rate_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})})]})}),e.jsx(j,{control:a.control,name:"discount",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.discount")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:o.value||"",onChange:d=>o.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.discount_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})}),e.jsx(P,{})]})}),e.jsx(j,{control:a.control,name:"speed_limit",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.speed_limit")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:o.value||"",onChange:d=>o.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.speed_limit_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"Mbps"})]})}),e.jsx(P,{})]})}),e.jsx(j,{control:a.control,name:"device_limit",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.device_limit")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:o.value||"",onChange:d=>o.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.device_limit_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"台"})]})}),e.jsx(P,{})]})}),e.jsx(j,{control:a.control,name:"is_admin",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.is_admin")}),e.jsx("div",{className:"py-2",children:e.jsx(N,{children:e.jsx(K,{checked:o.value===1,onCheckedChange:d=>o.onChange(d?1:0)})})})]})}),e.jsx(j,{control:a.control,name:"is_staff",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.is_staff")}),e.jsx("div",{className:"py-2",children:e.jsx(N,{children:e.jsx(K,{checked:o.value===1,onCheckedChange:d=>o.onChange(d?1:0)})})})]})}),e.jsx(j,{control:a.control,name:"remarks",render:({field:o})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.remarks")}),e.jsx(N,{children:e.jsx(Cs,{className:"h-24",value:o.value||"",onChange:d=>o.onChange(d.currentTarget.value??null),placeholder:n("edit.form.remarks_placeholder")})}),e.jsx(P,{})]})}),e.jsxs(Kr,{children:[e.jsx(R,{variant:"outline",onClick:()=>r(!1),children:n("edit.form.cancel")}),e.jsx(R,{type:"submit",onClick:()=>{a.handleSubmit(o=>{wd(o).then(({data:d})=>{d&&(q.success(n("edit.form.success")),r(!1),s())})})()},children:n("edit.form.submit")})]})]})}function Br({refetch:s,defaultValues:n,dialogTrigger:a=e.jsxs(R,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),t("edit.button")]})}){const{t:l}=I("user"),[r,c]=m.useState(!1);return e.jsx(Kx,{defaultValues:n,open:r,onOpenChange:c,children:e.jsxs($r,{open:r,onOpenChange:c,children:[e.jsx(qr,{asChild:!0,children:a}),e.jsxs(pa,{className:"max-w-[90%] space-y-4",children:[e.jsxs(ga,{children:[e.jsx(ja,{children:l("edit.title")}),e.jsx(va,{})]}),e.jsx(Bx,{refetch:s})]})]})})}const Gr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m17.71 11.29l-5-5a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21l-5 5a1 1 0 0 0 1.42 1.42L11 9.41V17a1 1 0 0 0 2 0V9.41l3.29 3.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42"})}),Wr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.71 11.29a1 1 0 0 0-1.42 0L13 14.59V7a1 1 0 0 0-2 0v7.59l-3.29-3.3a1 1 0 0 0-1.42 1.42l5 5a1 1 0 0 0 .33.21a.94.94 0 0 0 .76 0a1 1 0 0 0 .33-.21l5-5a1 1 0 0 0 0-1.42"})}),Gx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17 11H9.41l3.3-3.29a1 1 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33a1 1 0 0 0 0 .76a1 1 0 0 0 .21.33l5 5a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42L9.41 13H17a1 1 0 0 0 0-2"})}),Wx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76"})}),qt=[{accessorKey:"record_at",header:"时间",cell:({row:s})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("time",{className:"text-sm text-muted-foreground",children:tc(s.original.record_at)})})},{accessorKey:"u",header:"上行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Gr,{className:"h-4 w-4 text-emerald-500"}),e.jsx("span",{className:"font-mono text-sm",children:Ze(s.original.u)})]})},{accessorKey:"d",header:"下行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Wr,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{className:"font-mono text-sm",children:Ze(s.original.d)})]})},{accessorKey:"server_rate",header:"倍率",cell:({row:s})=>{const n=s.original.server_rate;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(H,{variant:"outline",className:"font-mono",children:[n,"x"]})})}},{id:"total",header:"总计",cell:({row:s})=>{const n=s.original.u+s.original.d;return e.jsx("div",{className:"flex items-center justify-end font-mono text-sm",children:Ze(n)})}}];function Yr({user_id:s,dialogTrigger:n}){const{t:a}=I(["traffic"]),[l,r]=m.useState(!1),[c,i]=m.useState({pageIndex:0,pageSize:20}),{data:u,isLoading:x}=se({queryKey:["userStats",s,c,l],queryFn:()=>l?kd({user_id:s,pageSize:c.pageSize,page:c.pageIndex+1}):null}),o=ze({data:u?.data??[],columns:qt,pageCount:Math.ceil((u?.total??0)/c.pageSize),state:{pagination:c},manualPagination:!0,getCoreRowModel:Le(),onPaginationChange:i});return e.jsxs(ge,{open:l,onOpenChange:r,children:[e.jsx(Fe,{asChild:!0,children:n}),e.jsxs(he,{className:"sm:max-w-[700px]",children:[e.jsx(ve,{children:e.jsx(je,{children:a("trafficRecord.title")})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(da,{children:[e.jsx(ma,{children:o.getHeaderGroups().map(d=>e.jsx(vs,{children:d.headers.map(p=>e.jsx(xa,{className:y("h-10 px-2 text-xs",p.id==="total"&&"text-right"),children:p.isPlaceholder?null:bt(p.column.columnDef.header,p.getContext())},p.id))},d.id))}),e.jsx(ua,{children:x?Array.from({length:c.pageSize}).map((d,p)=>e.jsx(vs,{children:Array.from({length:qt.length}).map((D,V)=>e.jsx($s,{className:"p-2",children:e.jsx(Ve,{className:"h-6 w-full"})},V))},p)):o.getRowModel().rows?.length?o.getRowModel().rows.map(d=>e.jsx(vs,{"data-state":d.getIsSelected()&&"selected",className:"h-10",children:d.getVisibleCells().map(p=>e.jsx($s,{className:"px-2",children:bt(p.column.columnDef.cell,p.getContext())},p.id))},d.id)):e.jsx(vs,{children:e.jsx($s,{colSpan:qt.length,className:"h-24 text-center",children:a("trafficRecord.noRecords")})})})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:a("trafficRecord.perPage")}),e.jsxs(W,{value:`${o.getState().pagination.pageSize}`,onValueChange:d=>{o.setPageSize(Number(d))},children:[e.jsx(B,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:o.getState().pagination.pageSize})}),e.jsx(G,{side:"top",children:[10,20,30,40,50].map(d=>e.jsx($,{value:`${d}`,children:d},d))})]}),e.jsx("p",{className:"text-sm font-medium",children:a("trafficRecord.records")})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"flex w-[100px] items-center justify-center text-sm",children:a("trafficRecord.page",{current:o.getState().pagination.pageIndex+1,total:o.getPageCount()})}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>o.previousPage(),disabled:!o.getCanPreviousPage()||x,children:e.jsx(Gx,{className:"h-4 w-4"})}),e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>o.nextPage(),disabled:!o.getCanNextPage()||x,children:e.jsx(Wx,{className:"h-4 w-4"})})]})]})]})]})]})]})}const Yx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M5 18h4.24a1 1 0 0 0 .71-.29l6.92-6.93L19.71 8a1 1 0 0 0 0-1.42l-4.24-4.29a1 1 0 0 0-1.42 0l-2.82 2.83l-6.94 6.93a1 1 0 0 0-.29.71V17a1 1 0 0 0 1 1m9.76-13.59l2.83 2.83l-1.42 1.42l-2.83-2.83ZM6 13.17l5.93-5.93l2.83 2.83L8.83 16H6ZM21 20H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2"})}),Jx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2"})}),Qx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 8.94a1.3 1.3 0 0 0-.06-.27v-.09a1 1 0 0 0-.19-.28l-6-6a1 1 0 0 0-.28-.19a.3.3 0 0 0-.09 0a.9.9 0 0 0-.33-.11H10a3 3 0 0 0-3 3v1H6a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3zm-6-3.53L17.59 8H16a1 1 0 0 1-1-1ZM15 19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3Z"})}),Zx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 11a1 1 0 0 0-1 1a8.05 8.05 0 1 1-2.22-5.5h-2.4a1 1 0 0 0 0 2h4.53a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1.77A10 10 0 1 0 22 12a1 1 0 0 0-1-1"})}),Xx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9.5 10.5H12a1 1 0 0 0 0-2h-1V8a1 1 0 0 0-2 0v.55a2.5 2.5 0 0 0 .5 4.95h1a.5.5 0 0 1 0 1H8a1 1 0 0 0 0 2h1v.5a1 1 0 0 0 2 0v-.55a2.5 2.5 0 0 0-.5-4.95h-1a.5.5 0 0 1 0-1M21 12h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Z"})}),eh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12.3 12.22A4.92 4.92 0 0 0 14 8.5a5 5 0 0 0-10 0a4.92 4.92 0 0 0 1.7 3.72A8 8 0 0 0 1 19.5a1 1 0 0 0 2 0a6 6 0 0 1 12 0a1 1 0 0 0 2 0a8 8 0 0 0-4.7-7.28M9 11.5a3 3 0 1 1 3-3a3 3 0 0 1-3 3m9.74.32A5 5 0 0 0 15 3.5a1 1 0 0 0 0 2a3 3 0 0 1 3 3a3 3 0 0 1-1.5 2.59a1 1 0 0 0-.5.84a1 1 0 0 0 .45.86l.39.26l.13.07a7 7 0 0 1 4 6.38a1 1 0 0 0 2 0a9 9 0 0 0-4.23-7.68"})}),sh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 1 1 4 12a1 1 0 0 0-2 0A10 10 0 1 0 12 2m0 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h2a1 1 0 0 0 0-2h-1V9a1 1 0 0 0-1-1"})}),th=(s,n)=>{const{t:a}=I("user");return[{accessorKey:"is_admin",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.is_admin")}),enableSorting:!1,enableHiding:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r)),size:0},{accessorKey:"is_staff",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.is_staff")}),enableSorting:!1,enableHiding:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r)),size:0},{accessorKey:"id",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.id")}),cell:({row:l})=>e.jsx(H,{variant:"outline",children:l.original.id}),enableSorting:!0,enableHiding:!1},{accessorKey:"email",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.email")}),cell:({row:l})=>{const r=l.original.t||0,c=Date.now()/1e3-r<120,i=Math.floor(Date.now()/1e3-r);let u=c?a("columns.online_status.online"):r===0?a("columns.online_status.never"):a("columns.online_status.last_online",{time:me(r)});if(!c&&r!==0){const x=Math.floor(i/60),o=Math.floor(x/60),d=Math.floor(o/24);d>0?u+=` -`+a("columns.online_status.offline_duration.days",{count:d}):o>0?u+=` -`+a("columns.online_status.offline_duration.hours",{count:o}):x>0?u+=` -`+a("columns.online_status.offline_duration.minutes",{count:x}):u+=` -`+a("columns.online_status.offline_duration.seconds",{count:i})}return e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:y("size-2.5 rounded-full ring-2 ring-offset-2",c?"bg-green-500 ring-green-500/20":"bg-gray-300 ring-gray-300/20","transition-all duration-300")}),e.jsx("span",{className:"font-medium text-foreground/90",children:l.original.email})]})}),e.jsx(te,{side:"bottom",className:"max-w-[280px]",children:e.jsx("p",{className:"whitespace-pre-line text-sm",children:u})})]})})},enableSorting:!1,enableHiding:!1},{accessorKey:"online_count",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.online_count")}),cell:({row:l})=>{const r=l.original.device_limit,c=l.original.online_count||0;return e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(H,{variant:"outline",className:y("min-w-[4rem] justify-center",r!==null&&c>=r?"border-destructive/50 bg-destructive/10 text-destructive":"border-primary/40 bg-primary/5 text-primary/90"),children:[c," / ",r===null?"∞":r]})})}),e.jsx(te,{side:"bottom",children:e.jsx("p",{className:"text-sm",children:r===null?a("columns.device_limit.unlimited"):a("columns.device_limit.limited",{count:r})})})]})})},enableSorting:!0,enableHiding:!1},{accessorKey:"banned",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.status")}),cell:({row:l})=>{const r=l.original.banned;return e.jsx("div",{className:"flex justify-center",children:e.jsx(H,{className:y("min-w-20 justify-center transition-colors",r?"bg-destructive/15 text-destructive hover:bg-destructive/25":"bg-success/15 text-success hover:bg-success/25"),children:a(r?"columns.status_text.banned":"columns.status_text.normal")})})},enableSorting:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r))},{accessorKey:"plan_id",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.subscription")}),cell:({row:l})=>e.jsx("div",{className:"min-w-[10em] break-all",children:l.original?.plan?.name||"-"}),enableSorting:!1,enableHiding:!1},{accessorKey:"group_id",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.group")}),cell:({row:l})=>e.jsx("div",{className:"flex flex-wrap gap-1",children:e.jsx(H,{variant:"outline",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5 whitespace-nowrap"),children:l.original?.group?.name||"-"})}),enableSorting:!1},{accessorKey:"total_used",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.used_traffic")}),cell:({row:l})=>{const r=Ze(l.original?.total_used),c=Ze(l.original?.transfer_enable),i=l.original?.total_used/l.original?.transfer_enable*100||0;return e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{className:"w-full",children:e.jsxs("div",{className:"w-full space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:r}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[i.toFixed(1),"%"]})]}),e.jsx("div",{className:"h-1.5 w-full rounded-full bg-secondary",children:e.jsx("div",{className:y("h-full rounded-full transition-all",i>90?"bg-destructive":"bg-primary"),style:{width:`${Math.min(i,100)}%`}})})]})}),e.jsx(te,{side:"bottom",children:e.jsxs("p",{className:"text-sm",children:[a("columns.total_traffic"),": ",c]})})]})})}},{accessorKey:"transfer_enable",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.total_traffic")}),cell:({row:l})=>e.jsx("div",{className:"font-medium text-muted-foreground",children:Ze(l.original?.transfer_enable)})},{accessorKey:"expired_at",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.expire_time")}),cell:({row:l})=>{const r=l.original.expired_at,c=Date.now()/1e3,i=r!=null&&re.jsx(M,{column:l,title:a("columns.balance")}),cell:({row:l})=>{const r=As(l.original?.balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:r})]})}},{accessorKey:"commission_balance",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.commission")}),cell:({row:l})=>{const r=As(l.original?.commission_balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:r})]})}},{accessorKey:"created_at",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.register_time")}),cell:({row:l})=>e.jsx("div",{className:"truncate",children:me(l.original?.created_at)}),size:1e3},{id:"actions",header:({column:l})=>e.jsx(M,{column:l,className:"justify-end",title:a("columns.actions")}),cell:({row:l,table:r})=>e.jsxs(ys,{modal:!0,children:[e.jsx(Ns,{asChild:!0,children:e.jsx("div",{className:"text-center",children:e.jsx(J,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":a("columns.actions"),children:e.jsx(Nt,{className:"size-4"})})})}),e.jsxs(os,{align:"end",className:"min-w-[40px]",children:[e.jsx(fe,{onSelect:c=>{c.preventDefault()},className:"p-0",children:e.jsx(Br,{defaultValues:{...l.original,invite_user_email:l.original.invite_user?.email},refetch:s,dialogTrigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Yx,{className:"mr-2"}),a("columns.actions_menu.edit")]})})}),e.jsx(fe,{onSelect:c=>c.preventDefault(),className:"p-0",children:e.jsx(zr,{defaultValues:{email:l.original.email},trigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Jx,{className:"mr-2 "}),a("columns.actions_menu.assign_order")]})})}),e.jsx(fe,{onSelect:()=>{wt(l.original.subscribe_url)},className:"p-0",children:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Qx,{className:"mr-2"}),a("columns.actions_menu.copy_url")]})}),e.jsx(fe,{onSelect:()=>{Cd({id:l.original.id}).then(({data:c})=>{c&&q.success("重置成功")})},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Zx,{className:"mr-2 "}),a("columns.actions_menu.reset_secret")]})}),e.jsx(fe,{onSelect:()=>{},className:"p-0",children:e.jsxs(Rs,{className:"flex items-center px-2 py-1.5",to:`/finance/order?user_id=${l.original?.id}`,children:[e.jsx(Xx,{className:"mr-2"}),a("columns.actions_menu.orders")]})}),e.jsx(fe,{onSelect:()=>{r.setColumnFilters([{id:"invite_user_id",value:l.original?.id}])},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(eh,{className:"mr-2 "}),a("columns.actions_menu.invites")]})}),e.jsx(fe,{onSelect:c=>c.preventDefault(),className:"p-0",children:e.jsx(Yr,{user_id:l.original?.id,dialogTrigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(sh,{className:"mr-2 "}),a("columns.actions_menu.traffic_records")]})})})]})]})}]};function ah(){const[s]=Un(),[n,a]=m.useState({}),[l,r]=m.useState({is_admin:!1,is_staff:!1}),[c,i]=m.useState([]),[u,x]=m.useState([]),[o,d]=m.useState({pageIndex:0,pageSize:20});m.useEffect(()=>{const E=s.get("email");E&&i(z=>z.some(A=>A.id==="email")?z:[...z,{id:"email",value:E}])},[s]);const{refetch:p,data:D,isLoading:V}=se({queryKey:["userList",o,c,u],queryFn:()=>_d({pageSize:o.pageSize,current:o.pageIndex+1,filter:c,sort:u})}),[f,_]=m.useState([]),[k,b]=m.useState([]);m.useEffect(()=>{It().then(({data:E})=>{_(E)}),Fs().then(({data:E})=>{b(E)})},[]);const w=f.map(E=>({label:E.name,value:E.id})),S=k.map(E=>({label:E.name,value:E.id})),C=ze({data:D?.data??[],columns:th(p),state:{sorting:u,columnVisibility:l,rowSelection:n,columnFilters:c,pagination:o},rowCount:D?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:x,onColumnFiltersChange:i,onColumnVisibilityChange:r,getCoreRowModel:Le(),getFilteredRowModel:Ue(),getPaginationRowModel:Be(),onPaginationChange:d,getSortedRowModel:Ge(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnVisibility:{commission_balance:!1,created_at:!1,is_admin:!1,is_staff:!1,permission_group:!1,plan_id:!1},columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:C,toolbar:e.jsx(qx,{table:C,refetch:p,serverGroupList:f,permissionGroups:w,subscriptionPlans:S})})}function nh(){const{t:s}=I("user");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("manage.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("manage.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx("div",{className:"w-full",children:e.jsx(ah,{})})})]})]})}const rh=Object.freeze(Object.defineProperty({__proto__:null,default:nh},Symbol.toStringTag,{value:"Module"}));function lh({column:s,title:n,options:a}){const l=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(J,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(wi,{className:"mr-2 h-4 w-4"}),n,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(r=>l.has(r.value)).map(r=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:r.label},`selected-${r.value}`))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(_s,{children:[e.jsx(Vs,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Is,{children:"No results found."}),e.jsx(Ie,{children:a.map(r=>{const c=l.has(r.value);return e.jsxs(_e,{onSelect:()=>{c?l.delete(r.value):l.add(r.value);const i=Array.from(l);s?.setFilterValue(i.length?i:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ci,{className:y("h-4 w-4")})}),r.icon&&e.jsx(r.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:r.label})]},`option-${r.value}`)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Ks,{}),e.jsx(Ie,{children:e.jsx(_e,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const oh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})});function ih({table:s}){const{t:n}=I("ticket");return e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-4",children:[e.jsx(gr,{defaultValue:s.getColumn("status")?.getFilterValue(),onValueChange:a=>s.getColumn("status")?.setFilterValue(a),children:e.jsxs(ca,{className:"grid w-full grid-cols-2",children:[e.jsx(nt,{value:"0",children:n("status.pending")}),e.jsx(nt,{value:"1",children:n("status.closed")})]})}),s.getColumn("level")&&e.jsx(lh,{column:s.getColumn("level"),title:n("columns.level"),options:[{label:n("level.low"),value:Xe.LOW,icon:oh,color:"gray"},{label:n("level.medium"),value:Xe.MIDDLE,icon:Gr,color:"yellow"},{label:n("level.high"),value:Xe.HIGH,icon:Wr,color:"red"}]})]})})}function ch(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"text-foreground",children:[e.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_qFRN",begin:"0;spinner_OcgL.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{begin:"spinner_qFRN.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_OcgL",begin:"spinner_qFRN.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})}const dh=Ts("flex gap-2 max-w-[60%] items-end relative group",{variants:{variant:{received:"self-start",sent:"self-end flex-row-reverse"},layout:{default:"",ai:"max-w-full w-full items-center"}},defaultVariants:{variant:"received",layout:"default"}}),Jr=m.forwardRef(({className:s,variant:n,layout:a,children:l,...r},c)=>e.jsx("div",{className:y(dh({variant:n,layout:a,className:s}),"relative group"),ref:c,...r,children:m.Children.map(l,i=>m.isValidElement(i)&&typeof i.type!="string"?m.cloneElement(i,{variant:n,layout:a}):i)}));Jr.displayName="ChatBubble";const mh=Ts("p-4",{variants:{variant:{received:"bg-secondary text-secondary-foreground rounded-r-lg rounded-tl-lg",sent:"bg-primary text-primary-foreground rounded-l-lg rounded-tr-lg"},layout:{default:"",ai:"border-t w-full rounded-none bg-transparent"}},defaultVariants:{variant:"received",layout:"default"}}),Qr=m.forwardRef(({className:s,variant:n,layout:a,isLoading:l=!1,children:r,...c},i)=>e.jsx("div",{className:y(mh({variant:n,layout:a,className:s}),"break-words max-w-full whitespace-pre-wrap"),ref:i,...c,children:l?e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(ch,{})}):r}));Qr.displayName="ChatBubbleMessage";const uh=m.forwardRef(({variant:s,className:n,children:a,...l},r)=>e.jsx("div",{ref:r,className:y("absolute top-1/2 -translate-y-1/2 flex opacity-0 group-hover:opacity-100 transition-opacity duration-200",s==="sent"?"-left-1 -translate-x-full flex-row-reverse":"-right-1 translate-x-full",n),...l,children:a}));uh.displayName="ChatBubbleActionWrapper";const Zr=m.forwardRef(({className:s,...n},a)=>e.jsx(Cs,{autoComplete:"off",ref:a,name:"message",className:y("max-h-12 px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",s),...n}));Zr.displayName="ChatInput";const Xr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"})}),el=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.098 12.634L13 11.423V7a1 1 0 0 0-2 0v5a1 1 0 0 0 .5.866l2.598 1.5a1 1 0 1 0 1-1.732M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8.01 8.01 0 0 1-8 8"})}),xh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M3.71 16.29a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21a1 1 0 0 0-.21.33a1 1 0 0 0 .21 1.09a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1 1 0 0 0 .21-1.09a1 1 0 0 0-.21-.33M7 8h14a1 1 0 0 0 0-2H7a1 1 0 0 0 0 2m-3.29 3.29a1 1 0 0 0-1.09-.21a1.2 1.2 0 0 0-.33.21a1 1 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1 1 0 0 0-.21-.33M21 11H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2M3.71 6.29a1 1 0 0 0-.33-.21a1 1 0 0 0-1.09.21a1.2 1.2 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a1 1 0 0 0 1.09-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1.2 1.2 0 0 0-.21-.33M21 16H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})}),hh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9 12H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m-1-2h4a1 1 0 0 0 0-2H8a1 1 0 0 0 0 2m1 6H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m12-4h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Zm-6.44-2.83a.8.8 0 0 0-.18-.09a.6.6 0 0 0-.19-.06a1 1 0 0 0-.9.27A1.05 1.05 0 0 0 12 17a1 1 0 0 0 .07.38a1.2 1.2 0 0 0 .22.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21A1 1 0 0 0 14 17a1.05 1.05 0 0 0-.29-.71a2 2 0 0 0-.15-.12m.14-3.88a1 1 0 0 0-1.62.33A1 1 0 0 0 13 14a1 1 0 0 0 1-1a1 1 0 0 0-.08-.38a.9.9 0 0 0-.22-.33"})});function fh(){return e.jsxs("div",{className:"flex h-full flex-col space-y-4 p-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Ve,{className:"h-8 w-3/4"}),e.jsx(Ve,{className:"h-4 w-1/2"})]}),e.jsx("div",{className:"flex-1 space-y-4",children:[1,2,3].map(s=>e.jsx(Ve,{className:"h-20 w-2/3"},s))})]})}function ph({ticketId:s,dialogTrigger:n}){const{t:a}=I("ticket"),l=is(),r=m.useRef(null),[c,i]=m.useState(!1),[u,x]=m.useState(""),[o,d]=m.useState(!1),{data:p,refetch:D,isLoading:V}=se({queryKey:["ticket",s,c],queryFn:()=>c?Td(s):Promise.resolve(null),refetchInterval:c?5e3:!1,retry:3}),f=p?.data,_=(C="smooth")=>{if(r.current){const{scrollHeight:E,clientHeight:z}=r.current;r.current.scrollTo({top:E-z,behavior:C})}};m.useEffect(()=>{if(!c)return;const C=requestAnimationFrame(()=>{_("instant"),setTimeout(()=>_(),1e3)});return()=>{cancelAnimationFrame(C)}},[c,f?.messages]);const k=async()=>{const C=u.trim();!C||o||(d(!0),Pd({id:s,message:C}).then(()=>{x(""),D(),_()}).finally(()=>{d(!1)}))},b=async()=>{pr(s).then(()=>{q.success(a("actions.close_success")),D()})},w=()=>{f?.user&&l("/finance/order?user_id="+f.user.id)},S=f?.status===et.CLOSED;return e.jsxs(ge,{open:c,onOpenChange:i,children:[e.jsx(Fe,{asChild:!0,children:n??e.jsx(J,{variant:"outline",children:a("actions.view_ticket")})}),e.jsxs(he,{className:"flex h-[90vh] max-w-4xl flex-col gap-0 p-0",children:[e.jsx(je,{}),V?e.jsx(fh,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col space-y-4 border-b p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:f?.subject}),e.jsx(H,{variant:S?"secondary":"default",children:a(S?"status.closed":"status.processing")}),!S&&e.jsx(Je,{title:a("actions.close_confirm_title"),description:a("actions.close_confirm_description"),confirmText:a("actions.close_confirm_button"),variant:"destructive",onConfirm:b,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"gap-1 text-muted-foreground hover:text-destructive",children:[e.jsx(Xr,{className:"h-4 w-4"}),a("actions.close_ticket")]})})]}),e.jsxs("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(ot,{className:"h-4 w-4"}),e.jsx("span",{children:f?.user?.email})]}),e.jsx(be,{orientation:"vertical",className:"h-4"}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(el,{className:"h-4 w-4"}),e.jsxs("span",{children:[a("detail.created_at")," ",me(f?.created_at)]})]}),e.jsx(be,{orientation:"vertical",className:"h-4"}),e.jsx(H,{variant:"outline",children:f?.level!=null&&a(`level.${f.level===Xe.LOW?"low":f.level===Xe.MIDDLE?"medium":"high"}`)})]})]}),f?.user&&e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Br,{defaultValues:f.user,refetch:D,dialogTrigger:e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.user_info"),children:e.jsx(ot,{className:"h-4 w-4"})})}),e.jsx(Yr,{user_id:f.user.id,dialogTrigger:e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.traffic_records"),children:e.jsx(xh,{className:"h-4 w-4"})})}),e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.order_records"),onClick:w,children:e.jsx(hh,{className:"h-4 w-4"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx("div",{ref:r,className:"h-full space-y-4 overflow-y-auto p-6",children:f?.messages?.length===0?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:a("detail.no_messages")}):f?.messages?.map(C=>e.jsx(Jr,{variant:C.is_me?"sent":"received",className:C.is_me?"ml-auto":"mr-auto",children:e.jsx(Qr,{children:e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"whitespace-pre-wrap break-words",children:C.message}),e.jsx("div",{className:"text-right",children:e.jsx("time",{className:"text-[10px] text-muted-foreground",children:me(C.created_at)})})]})})},C.id))})}),e.jsx("div",{className:"border-t p-4",children:e.jsxs("div",{className:"relative flex items-center space-x-2",children:[e.jsx(Zr,{disabled:S||o,placeholder:a(S?"detail.input.closed_placeholder":"detail.input.reply_placeholder"),className:"flex-1 resize-none rounded-lg border bg-background p-3 focus-visible:ring-1",value:u,onChange:C=>x(C.target.value),onKeyDown:C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),k())}}),e.jsx(J,{disabled:S||o||!u.trim(),onClick:k,children:a(o?"detail.input.sending":"detail.input.send")})]})})]})]})]})}const gh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 4H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3m-.41 2l-5.88 5.88a1 1 0 0 1-1.42 0L5.41 6ZM20 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7.41l5.88 5.88a3 3 0 0 0 4.24 0L20 7.41Z"})}),jh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21.92 11.6C19.9 6.91 16.1 4 12 4s-7.9 2.91-9.92 7.6a1 1 0 0 0 0 .8C4.1 17.09 7.9 20 12 20s7.9-2.91 9.92-7.6a1 1 0 0 0 0-.8M12 18c-3.17 0-6.17-2.29-7.9-6C5.83 8.29 8.83 6 12 6s6.17 2.29 7.9 6c-1.73 3.71-4.73 6-7.9 6m0-10a4 4 0 1 0 4 4a4 4 0 0 0-4-4m0 6a2 2 0 1 1 2-2a2 2 0 0 1-2 2"})}),vh=s=>{const{t:n}=I("ticket");return[{accessorKey:"id",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.id")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:a.getValue("id")}),enableSorting:!1,enableHiding:!1},{accessorKey:"subject",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.subject")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(gh,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"max-w-[500px] truncate font-medium",children:a.getValue("subject")})]}),enableSorting:!1,enableHiding:!1,size:4e3},{accessorKey:"level",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.level")}),cell:({row:a})=>{const l=a.getValue("level"),r=l===Xe.LOW?"default":l===Xe.MIDDLE?"secondary":"destructive";return e.jsx(H,{variant:r,className:"whitespace-nowrap",children:n(`level.${l===Xe.LOW?"low":l===Xe.MIDDLE?"medium":"high"}`)})},filterFn:(a,l,r)=>r.includes(a.getValue(l))},{accessorKey:"status",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.status")}),cell:({row:a})=>{const l=a.getValue("status"),r=a.original.reply_status,c=l===et.CLOSED?n("status.closed"):n(r===0?"status.replied":"status.pending"),i=l===et.CLOSED?"default":r===0?"secondary":"destructive";return e.jsx(H,{variant:i,className:"whitespace-nowrap",children:c})}},{accessorKey:"updated_at",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.updated_at")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[e.jsx(el,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:me(a.getValue("updated_at"))})]}),enableSorting:!0},{accessorKey:"created_at",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.created_at")}),cell:({row:a})=>e.jsx("div",{className:"text-sm text-muted-foreground",children:me(a.getValue("created_at"))}),enableSorting:!0,meta:{isFlexGrow:!0}},{id:"actions",header:({column:a})=>e.jsx(M,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>{const l=a.original.status!==et.CLOSED;return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(ph,{ticketId:a.original.id,dialogTrigger:e.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",title:n("actions.view_details"),children:e.jsx(jh,{className:"h-4 w-4"})})}),l&&e.jsx(Je,{title:n("actions.close_confirm_title"),description:n("actions.close_confirm_description"),confirmText:n("actions.close_confirm_button"),variant:"destructive",onConfirm:async()=>{pr(a.original.id).then(()=>{q.success(n("actions.close_success")),s()})},children:e.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",title:n("actions.close_ticket"),children:e.jsx(Xr,{className:"h-4 w-4"})})})]})}}]};function bh(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([{id:"status",value:"0"}]),[i,u]=m.useState([]),[x,o]=m.useState({pageIndex:0,pageSize:20}),{refetch:d,data:p,isLoading:D}=se({queryKey:["orderList",x,r,i],queryFn:()=>Dd({pageSize:x.pageSize,current:x.pageIndex+1,filter:r,sort:i})}),V=ze({data:p?.data??[],columns:vh(d),state:{sorting:i,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:x},rowCount:p?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:Le(),getFilteredRowModel:Ue(),getPaginationRowModel:Be(),onPaginationChange:o,getSortedRowModel:Ge(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(ih,{table:V,refetch:d}),e.jsx(Ye,{table:V,showPagination:!0})]})}function yh(){const{t:s}=I("ticket");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(bh,{})})]})]})}const Nh=Object.freeze(Object.defineProperty({__proto__:null,default:yh},Symbol.toStringTag,{value:"Module"}));export{oe as _,kh as a,Ch as c,Sh as g,Dh as r}; +import{r as m,j as e,t as il,c as ol,I as Na,a as Ts,S as Xt,u as os,b as ea,d as cl,O as sa,e as dl,f as $,g as ml,h as ul,i as hl,k as xl,B as pl,l as fl,Q as gl,m as jl,R as vl,n as bl,P as yl,o as _l,p as Nl,q as Ga,F as wl,C as Cl,s as Sl,v as kl,w as Pl,x as Tl,y as Dl,z as x,A as Ka,D as ce,E as ue,G as Ba,H as St,J as kt,K as ta,L as Le,T as Pt,M as Tt,N as Wa,U as Ya,V as Rl,W as El,X as Il,Y as Ml,Z as Ja,_ as aa,$ as Qa,a0 as Ol,a1 as Za,a2 as Xa,a3 as en,a4 as sn,a5 as Ds,a6 as tn,a7 as Vl,a8 as an,a9 as nn,aa as Ll,ab as Al,ac as Fl,ad as zl,ae as rn,af as Ul,ag as $l,ah as M,ai as Rs,aj as ln,ak as Hl,al as ql,am as on,an as Gl,ao as Kl,ap as wa,aq as Bl,ar as cn,as as Wl,at as dn,au as Yl,av as Jl,aw as Ql,ax as Zl,ay as Xl,az as ei,aA as mn,aB as si,aC as ti,aD as ai,aE as Se,aF as ni,aG as ri,aH as li,aI as ii,aJ as oi,aK as ci,aL as un,aM as hn,aN as xn,aO as di,aP as pn,aQ as fn,aR as gn,aS as mi,aT as ui,aU as hi,aV as jn,aW as xi,aX as na,aY as vn,aZ as pi,a_ as bn,a$ as fi,b0 as yn,b1 as gi,b2 as _n,b3 as Nn,b4 as ji,b5 as vi,b6 as wn,b7 as bi,b8 as yi,b9 as Cn,ba as _i,bb as Sn,bc as Ni,bd as wi,be as $e,bf as se,bg as Ue,bh as ot,bi as Ci,bj as Si,bk as ki,bl as Pi,bm as Ti,bn as Di,bo as Ca,bp as Sa,bq as Ri,br as Ei,bs as Ii,bt as Mi,bu as Oi,bv as Ht,bw as qt,bx as Vi,by as Li,bz as kn,bA as Ai,bB as Fi,bC as Pn,bD as zi,bE as fe,bF as Ui,bG as ka,bH as Gt,bI as Kt,bJ as $i,bK as Hi,bL as Tn,bM as qi,bN as ra,bO as Gi,bP as Ki,bQ as Bi,bR as Dn,bS as Rn,bT as En,bU as Wi,bV as Yi,bW as Ji,bX as Qi,bY as In,bZ as Zi,b_ as es,b$ as Xi,c0 as eo,c1 as so,c2 as bt,c3 as _e,c4 as Pa,c5 as to,c6 as Mn,c7 as On,c8 as Vn,c9 as Ln,ca as An,cb as Fn,cc as ao,cd as no,ce as ro,cf as Dt,cg as Es,ch as cs,ci as Ae,cj as Fe,ck as Ge,cl as Ke,cm as Be,cn as lo,co as io,cp as oo,cq as Bt,cr as la,cs as ia,ct as co,cu as ds,cv as ms,cw as ct,cx as mo,cy as yt,cz as uo,cA as Ta,cB as zn,cC as Da,cD as _t,cE as ho,cF as xo,cG as po,cH as fo,cI as Un,cJ as go,cK as jo,cL as $n,cM as Wt,cN as Hn,cO as vo,cP as qn,cQ as Gn,cR as bo,cS as yo,cT as _o,cU as No,cV as wo}from"./vendor.js";import"./index.js";var op=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cp(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Co(s){if(s.__esModule)return s;var n=s.default;if(typeof n=="function"){var a=function l(){return this instanceof l?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(s).forEach(function(l){var r=Object.getOwnPropertyDescriptor(s,l);Object.defineProperty(a,l,r.get?r:{enumerable:!0,get:function(){return s[l]}})}),a}const So={theme:"system",setTheme:()=>null},Kn=m.createContext(So);function ko({children:s,defaultTheme:n="system",storageKey:a="vite-ui-theme",...l}){const[r,c]=m.useState(()=>localStorage.getItem(a)||n);m.useEffect(()=>{const u=window.document.documentElement;if(u.classList.remove("light","dark"),r==="system"){const h=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";u.classList.add(h);return}u.classList.add(r)},[r]);const o={theme:r,setTheme:u=>{localStorage.setItem(a,u),c(u)}};return e.jsx(Kn.Provider,{...l,value:o,children:s})}const Po=()=>{const s=m.useContext(Kn);if(s===void 0)throw new Error("useTheme must be used within a ThemeProvider");return s},To=function(){const n=typeof document<"u"&&document.createElement("link").relList;return n&&n.supports&&n.supports("modulepreload")?"modulepreload":"preload"}(),Do=function(s,n){return new URL(s,n).href},Ra={},ie=function(n,a,l){let r=Promise.resolve();if(a&&a.length>0){const o=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),h=u?.nonce||u?.getAttribute("nonce");r=Promise.allSettled(a.map(i=>{if(i=Do(i,l),i in Ra)return;Ra[i]=!0;const d=i.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(!!l)for(let p=o.length-1;p>=0;p--){const N=o[p];if(N.href===i&&(!d||N.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${f}`))return;const I=document.createElement("link");if(I.rel=d?"stylesheet":To,d||(I.as="script"),I.crossOrigin="",I.href=i,h&&I.setAttribute("nonce",h),document.head.appendChild(I),d)return new Promise((p,N)=>{I.addEventListener("load",p),I.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${i}`)))})}))}function c(o){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=o,window.dispatchEvent(u),!u.defaultPrevented)throw o}return r.then(o=>{for(const u of o||[])u.status==="rejected"&&c(u.reason);return n().catch(c)})};function y(...s){return il(ol(s))}const Hs=Ts("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{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"}}),R=m.forwardRef(({className:s,variant:n,size:a,asChild:l=!1,children:r,disabled:c,loading:o=!1,leftSection:u,rightSection:h,...i},d)=>{const f=l?Xt:"button";return e.jsxs(f,{className:y(Hs({variant:n,size:a,className:s})),disabled:o||c,ref:d,...i,children:[(u&&o||!u&&!h&&o)&&e.jsx(Na,{className:"mr-2 h-4 w-4 animate-spin"}),!o&&u&&e.jsx("div",{className:"mr-2",children:u}),r,!o&&h&&e.jsx("div",{className:"ml-2",children:h}),h&&o&&e.jsx(Na,{className:"ml-2 h-4 w-4 animate-spin"})]})});R.displayName="Button";function Ls({className:s,minimal:n=!1}){const a=os();return e.jsx("div",{className:y("h-svh w-full",s),children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[!n&&e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"500"}),e.jsxs("span",{className:"font-medium",children:["Oops! Something went wrong ",":')"]}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["We apologize for the inconvenience. ",e.jsx("br",{})," Please try again later."]}),!n&&e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(R,{variant:"outline",onClick:()=>a(-1),children:"Go Back"}),e.jsx(R,{onClick:()=>a("/"),children:"Back to Home"})]})]})})}function Ea(){const s=os();return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"404"}),e.jsx("span",{className:"font-medium",children:"Oops! Page Not Found!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["It seems like the page you're looking for ",e.jsx("br",{}),"does not exist or might have been removed."]}),e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(R,{variant:"outline",onClick:()=>s(-1),children:"Go Back"}),e.jsx(R,{onClick:()=>s("/"),children:"Back to Home"})]})]})})}function Ro(){return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"503"}),e.jsx("span",{className:"font-medium",children:"Website is under maintenance!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["The site is not available at the moment. ",e.jsx("br",{}),"We'll be back online shortly."]}),e.jsx("div",{className:"mt-6 flex gap-4",children:e.jsx(R,{variant:"outline",children:"Learn more"})})]})})}function Eo(s){return typeof s>"u"}function Io(s){return s===null}function Mo(s){return Io(s)||Eo(s)}class Oo{storage;prefixKey;constructor(n){this.storage=n.storage,this.prefixKey=n.prefixKey}getKey(n){return`${this.prefixKey}${n}`.toUpperCase()}set(n,a,l=null){const r=JSON.stringify({value:a,time:Date.now(),expire:l!==null?new Date().getTime()+l*1e3:null});this.storage.setItem(this.getKey(n),r)}get(n,a=null){const l=this.storage.getItem(this.getKey(n));if(!l)return{value:a,time:0};try{const r=JSON.parse(l),{value:c,time:o,expire:u}=r;return Mo(u)||u>new Date().getTime()?{value:c,time:o}:(this.remove(n),{value:a,time:0})}catch{return this.remove(n),{value:a,time:0}}}remove(n){this.storage.removeItem(this.getKey(n))}clear(){this.storage.clear()}}function Bn({prefixKey:s="",storage:n=sessionStorage}){return new Oo({prefixKey:s,storage:n})}const Wn="Xboard_",Vo=function(s={}){return Bn({prefixKey:s.prefixKey||"",storage:localStorage})},Lo=function(s={}){return Bn({prefixKey:s.prefixKey||"",storage:sessionStorage})},Rt=Vo({prefixKey:Wn});Lo({prefixKey:Wn});const Yn="access_token";function st(){return Rt.get(Yn)}function Jn(){Rt.remove(Yn)}const Ia=["/sign-in","/sign-in-2","/sign-up","/forgot-password","/otp"];function Ao({children:s}){const n=os(),a=ea(),l=st();return m.useEffect(()=>{if(!l.value&&!Ia.includes(a.pathname)){const r=encodeURIComponent(a.pathname+a.search);n(`/sign-in?redirect=${r}`)}},[l.value,a.pathname,a.search,n]),Ia.includes(a.pathname)||l.value?e.jsx(e.Fragment,{children:s}):null}const Fo=()=>e.jsx(Ao,{children:e.jsx(sa,{})}),zo=cl([{path:"/sign-in",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Kc);return{default:s}},void 0,import.meta.url)).default})},{element:e.jsx(Fo,{}),children:[{path:"/",lazy:async()=>({Component:(await ie(()=>Promise.resolve().then(()=>ld),void 0,import.meta.url)).default}),errorElement:e.jsx(Ls,{}),children:[{index:!0,lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Mm);return{default:s}},void 0,import.meta.url)).default})},{path:"config",errorElement:e.jsx(Ls,{}),children:[{path:"system",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Am);return{default:s}},void 0,import.meta.url)).default}),children:[{index:!0,lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>$m);return{default:s}},void 0,import.meta.url)).default})},{path:"safe",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Bm);return{default:s}},void 0,import.meta.url)).default})},{path:"subscribe",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Zm);return{default:s}},void 0,import.meta.url)).default})},{path:"invite",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>au);return{default:s}},void 0,import.meta.url)).default})},{path:"frontend",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>ou);return{default:s}},void 0,import.meta.url)).default})},{path:"server",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>hu);return{default:s}},void 0,import.meta.url)).default})},{path:"email",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>ju);return{default:s}},void 0,import.meta.url)).default})},{path:"telegram",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Nu);return{default:s}},void 0,import.meta.url)).default})},{path:"APP",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Pu);return{default:s}},void 0,import.meta.url)).default})}]},{path:"payment",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>zu);return{default:s}},void 0,import.meta.url)).default})},{path:"theme",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>qu);return{default:s}},void 0,import.meta.url)).default})},{path:"notice",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Qu);return{default:s}},void 0,import.meta.url)).default})},{path:"knowledge",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>rh);return{default:s}},void 0,import.meta.url)).default})}]},{path:"server",errorElement:e.jsx(Ls,{}),children:[{path:"manage",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Dh);return{default:s}},void 0,import.meta.url)).default})},{path:"group",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Oh);return{default:s}},void 0,import.meta.url)).default})},{path:"route",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Uh);return{default:s}},void 0,import.meta.url)).default})}]},{path:"finance",errorElement:e.jsx(Ls,{}),children:[{path:"plan",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Jh);return{default:s}},void 0,import.meta.url)).default})},{path:"order",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>dx);return{default:s}},void 0,import.meta.url)).default})},{path:"coupon",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>vx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"user",errorElement:e.jsx(Ls,{}),children:[{path:"manage",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>$x);return{default:s}},void 0,import.meta.url)).default})},{path:"ticket",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>rp);return{default:s}},void 0,import.meta.url)).default})}]}]}]},{path:"/500",Component:Ls},{path:"/404",Component:Ea},{path:"/503",Component:Ro},{path:"*",Component:Ea}]),Uo="locale";function $o(){return Rt.get(Uo)}function Qn(){Jn();const s=window.location.pathname,n=s&&!["/404","/sign-in"].includes(s),a=new URL(window.location.href),r=`${a.pathname.split("/")[1]?`/${a.pathname.split("/")[1]}`:""}#/sign-in`;window.location.href=r+(n?`?redirect=${s}`:"")}const Ho=["/passport/auth/login","/passport/auth/token2Login","/passport/auth/register","/guest/comm/config","/passport/comm/sendEmailVerify","/passport/auth/forget"];function qo(){const s=window.settings?.base_url||"/";return s.endsWith("/")?s+"api/v2":s+"/api/v2"}const L=dl.create({baseURL:qo(),timeout:12e3,headers:{"Content-Type":"application/json"}});L.interceptors.request.use(s=>{s.method?.toLowerCase()==="get"&&(s.params={...s.params,t:Date.now()});const n=st();if(!Ho.includes(s.url?.split("?")[0]||"")){if(!n.value)return Qn(),Promise.reject({code:-1,message:"未登录"});s.headers.Authorization=n.value}return s.headers["Content-Language"]=$o().value||"zh-CN",s},s=>Promise.reject(s));L.interceptors.response.use(s=>s?.data||{code:-1,message:"未知错误"},s=>{const n=s.response?.status,a=s.response?.data?.message;return(n===401||n===403)&&Qn(),$.error(a||{401:"登录已过期",403:"没有权限",404:"资源或接口不存在"}[n]||"未知异常"),Promise.reject(s.response?.data||{data:null,code:-1,message:"未知错误"})});function Go(){return L.get("/user/info")}const Lt={token:st()?.value||"",userInfo:null,isLoggedIn:!!st()?.value,loading:!1,error:null},Xs=ml("user/fetchUserInfo",async()=>(await Go()).data,{condition:(s,{getState:n})=>{const{user:a}=n();return!!a.token&&!a.loading}}),Zn=ul({name:"user",initialState:Lt,reducers:{setToken(s,n){s.token=n.payload,s.isLoggedIn=!!n.payload},resetUserState:()=>Lt},extraReducers:s=>{s.addCase(Xs.pending,n=>{n.loading=!0,n.error=null}).addCase(Xs.fulfilled,(n,a)=>{n.loading=!1,n.userInfo=a.payload,n.error=null}).addCase(Xs.rejected,(n,a)=>{if(n.loading=!1,n.error=a.error.message||"Failed to fetch user info",!n.token)return Lt})}}),{setToken:Ko,resetUserState:Bo}=Zn.actions,Wo=s=>s.user.userInfo,Yo=Zn.reducer,Xn=hl({reducer:{user:Yo}});st()?.value&&Xn.dispatch(Xs());const Jo={loading:"Loading...",error:"Error",success:"Success",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",view:"View",toggleNavigation:"Toggle Navigation",toggleSidebar:"Toggle Sidebar",search:"Search...",theme:{light:"Light",dark:"Dark",system:"System"},user:"User",defaultEmail:"user@example.com",settings:"Settings",logout:"Logout"},Qo={title:"Dashboard",stats:{newUsers:"New Users",totalScore:"Total Score",monthlyUpload:"Monthly Upload",vsLastMonth:"vs Last Month",vsYesterday:"vs Yesterday",todayIncome:"Today's Income",monthlyIncome:"Monthly Income",totalIncome:"Total Income",totalUsers:"Total Users",activeUsers:"Active Users: {{count}}",totalOrders:"Total Orders",revenue:"Revenue",todayRegistered:"Today Registered",monthlyRegistered:"Monthly Registered",onlineUsers:"Online Users",pendingTickets:"Pending Tickets",hasPendingTickets:"There are tickets that need attention",noPendingTickets:"No pending tickets",pendingCommission:"Pending Commission",hasPendingCommission:"There are commissions that need confirmation",noPendingCommission:"No pending commission",monthlyNewUsers:"Monthly New Users",monthlyDownload:"Monthly Download",todayTraffic:"Today: {{value}}",activeUserTrend:"Active User Trend",realtimeUsers:"Realtime Users",todayPeak:"Today's Peak",vsLastWeek:"vs Last Week"},trafficRank:{nodeTrafficRank:"Node Traffic Rank",userTrafficRank:"User Traffic Rank",today:"Today",last7days:"Last 7 Days",last30days:"Last 30 Days",customRange:"Custom Range",selectTimeRange:"Select Time Range",selectDateRange:"Select Date Range",currentTraffic:"Current Traffic",previousTraffic:"Previous Traffic",changeRate:"Change Rate",recordTime:"Record Time"},overview:{title:"Revenue Overview",thisMonth:"This Month",lastMonth:"Last Month",to:"to",selectTimeRange:"Select Range",selectDate:"Select Date",last7Days:"Last 7 Days",last30Days:"Last 30 Days",last90Days:"Last 90 Days",last180Days:"Last 180 Days",lastYear:"Last Year",customRange:"Custom Range",amount:"Amount",count:"Count",transactions:"{{count}} transactions",orderAmount:"Order Amount",commissionAmount:"Commission Amount",orderCount:"Order Count",commissionCount:"Commission Count",totalIncome:"Total Income",totalCommission:"Total Commission",totalTransactions:"Total: {{count}} transactions",avgOrderAmount:"Average Order Amount:",commissionRate:"Commission Rate:"},traffic:{title:"Traffic Ranking",rank:"Rank",domain:"Domain",todayTraffic:"Today's Traffic",monthlyTraffic:"Monthly Traffic"},queue:{title:"Queue Status",jobDetails:"Job Details",status:{description:"Current queue running status",running:"Running Status",normal:"Normal",abnormal:"Abnormal",waitTime:"Current wait time: {{seconds}} seconds",pending:"Pending",processing:"Processing",completed:"Completed",failed:"Failed",cancelled:"Cancelled"},details:{description:"Queue processing details",recentJobs:"Recent Jobs",statisticsPeriod:"Statistics Period: {{hours}} hours",jobsPerMinute:"Jobs Per Minute",maxThroughput:"Max Throughput: {{value}}",failedJobs7Days:"Failed Jobs (7 days)",retentionPeriod:"Retention Period: {{hours}} hours",longestRunningQueue:"Longest Running Queue",activeProcesses:"Active Processes",id:"Job ID",type:"Job Type",status:"Status",progress:"Progress",createdAt:"Created At",updatedAt:"Updated At",error:"Error Message",data:"Job Data",result:"Result",duration:"Duration",attempts:"Attempts",nextRetry:"Next Retry"},actions:{retry:"Retry",cancel:"Cancel",delete:"Delete",viewDetails:"View Details"},empty:"No jobs in queue",loading:"Loading queue status...",error:"Failed to load queue status"},search:{placeholder:"Search menus and functions...",title:"Menu Navigation",noResults:"No results found",loading:"Searching..."}},Zo={placeholder:"Search menus and functions...",title:"Menu Navigation",noResults:"No results found",shortcut:{label:"Search",key:"⌘K"}},Xo={dashboard:"Dashboard",systemManagement:"System Management",systemConfig:"System Configuration",themeConfig:"Theme Configuration",noticeManagement:"Notice Management",paymentConfig:"Payment Configuration",knowledgeManagement:"Knowledge Management",nodeManagement:"Node Management",permissionGroupManagement:"Permission Group",routeManagement:"Route Management",subscriptionManagement:"Subscription",planManagement:"Plan Management",orderManagement:"Order Management",couponManagement:"Coupon Management",userManagement:"User Management",ticketManagement:"Ticket Management"},ec={dashboard:"Dashboard",systemManagement:"System Management",systemConfig:"System Configuration",themeConfig:"Theme Configuration",noticeManagement:"Notice Management",paymentConfig:"Payment Configuration",knowledgeManagement:"Knowledge Base",nodeManagement:"Node Management",permissionGroupManagement:"Permission Groups",routeManagement:"Route Management",subscriptionManagement:"Subscription Management",planManagement:"Plan Management",orderManagement:"Order Management",couponManagement:"Coupon Management",userManagement:"User Management",ticketManagement:"Ticket Management"},sc={title:"Node Configuration",description:"Configure node communication and synchronization settings, including communication key, polling interval, load balancing and other advanced options.",server_token:{title:"Communication Key",description:"The key for communication between Xboard and nodes to prevent unauthorized data access.",placeholder:"Please enter communication key"},server_pull_interval:{title:"Node Pull Action Polling Interval",description:"The frequency at which nodes retrieve data from the panel.",placeholder:"Please enter pull interval"},server_push_interval:{title:"Node Push Action Polling Interval",description:"The frequency at which nodes push data to the panel.",placeholder:"Please enter push interval"},device_limit_mode:{title:"Device Limit Mode",description:"In relaxed mode, multiple nodes from the same IP address count as one device.",strict:"Strict Mode",relaxed:"Relaxed Mode",placeholder:"Please select device limit mode"},saving:"Saving...",manage:{title:"Node Management",description:"Manage all nodes, including adding, deleting, editing and other operations."},columns:{sort:"Sort",nodeId:"Node ID",show:"Show",node:"Node",address:"Address",onlineUsers:{title:"Online Users",tooltip:"Online users count based on server reporting frequency"},rate:{title:"Rate",tooltip:"Traffic billing rate"},groups:{title:"Permission Groups",tooltip:"Groups that can subscribe to this node",empty:"--"},type:"Type",actions:"Actions",copyAddress:"Copy Connection Address",internalPort:"Internal Port",status:{0:"Not Running",1:"Unused or Abnormal",2:"Running Normal"},actions_dropdown:{edit:"Edit",copy:"Copy",delete:{title:"Confirm Delete",description:"This action will permanently delete this node and cannot be undone. Are you sure you want to continue?",confirm:"Delete"},copy_success:"Copied successfully",delete_success:"Deleted successfully"}},toolbar:{search:"Search nodes...",type:"Type",reset:"Reset",sort:{tip:"Drag nodes to sort, then click save",edit:"Edit Sort",save:"Save Sort"}},form:{add_node:"Add Node",edit_node:"Edit Node",new_node:"New Node",name:{label:"Node Name",placeholder:"Please enter node name",error:"Please enter a valid name"},rate:{label:"Rate",error:"Please enter a valid rate"},code:{label:"Custom Node ID",optional:"(Optional)",placeholder:"Please enter custom node ID"},tags:{label:"Node Tags",placeholder:"Press Enter to add tags"},groups:{label:"Permission Groups",add:"Add Group",placeholder:"Please select permission groups",empty:"No results found"},host:{label:"Node Address",placeholder:"Please enter domain or IP"},port:{label:"Connection Port",placeholder:"User connection port",tooltip:"The port that users actually connect to, this is the port number that needs to be filled in the client configuration. If using transit or tunnel, this port may be different from the port that the server actually listens on.",sync:"Sync to server port"},server_port:{label:"Server Port",placeholder:"Server listening port",tooltip:"The port that the server actually listens on, this is the real port opened on the server. If using transit or tunnel, this port may be different from the user connection port."},parent:{label:"Parent Node",placeholder:"Select parent node",none:"None"},route:{label:"Route Groups",placeholder:"Select route groups",empty:"No results found"},submit:"Submit",cancel:"Cancel",success:"Submitted successfully"},dynamic_form:{shadowsocks:{cipher:{label:"Encryption Method",placeholder:"Select encryption method"},obfs:{label:"Obfuscation",placeholder:"Select obfuscation method",none:"None",http:"HTTP"},obfs_settings:{path:"Path",host:"Host"}},vmess:{tls:{label:"TLS",placeholder:"Please select security",disabled:"Disabled",enabled:"Enabled"},tls_settings:{server_name:{label:"Server Name Indication (SNI)",placeholder:"Leave empty if not used"},allow_insecure:"Allow Insecure?"},network:{label:"Transport Protocol",placeholder:"Select transport protocol"}},trojan:{server_name:{label:"Server Name Indication (SNI)",placeholder:"Used for certificate verification when node address differs from certificate"},allow_insecure:"Allow Insecure?",network:{label:"Transport Protocol",placeholder:"Select transport protocol"}},hysteria:{version:{label:"Protocol Version",placeholder:"Protocol version"},alpn:{label:"ALPN",placeholder:"ALPN"},obfs:{label:"Obfuscation",type:{label:"Obfuscation Implementation",placeholder:"Select obfuscation implementation",salamander:"Salamander"},password:{label:"Obfuscation Password",placeholder:"Please enter obfuscation password",generate_success:"Obfuscation password generated successfully"}},tls:{server_name:{label:"Server Name Indication (SNI)",placeholder:"Used for certificate verification when node address differs from certificate"},allow_insecure:"Allow Insecure?"},bandwidth:{up:{label:"Upload Bandwidth",placeholder:"Please enter upload bandwidth",suffix:"Mbps",bbr_tip:", leave empty to use BBR"},down:{label:"Download Bandwidth",placeholder:"Please enter download bandwidth",suffix:"Mbps",bbr_tip:", leave empty to use BBR"}}},vless:{tls:{label:"Security",placeholder:"Please select security",none:"None",tls:"TLS",reality:"Reality"},tls_settings:{server_name:{label:"Server Name Indication (SNI)",placeholder:"Leave empty if not used"},allow_insecure:"Allow Insecure?"},reality_settings:{server_name:{label:"Destination Site (dest)",placeholder:"e.g., example.com"},server_port:{label:"Port",placeholder:"e.g., 443"},allow_insecure:"Allow Insecure?",private_key:{label:"Private Key"},public_key:{label:"Public Key"},short_id:{label:"Short ID",placeholder:"Optional, length must be even, max 16 characters",description:"List of shortIds available to clients, can be used to distinguish different clients, using hexadecimal characters 0-f",generate:"Generate Short ID",success:"Short ID generated successfully"},key_pair:{generate:"Generate Key Pair",success:"Key pair generated successfully",error:"Failed to generate key pair"}},network:{label:"Transport Protocol",placeholder:"Select transport protocol"},flow:{label:"Flow Control",placeholder:"Select flow control"}}},network_settings:{edit_protocol:"Edit Protocol",edit_protocol_config:"Edit Protocol Configuration",use_template:"Use {{template}} Template",json_config_placeholder:"Please enter JSON configuration",json_config_placeholder_with_template:"Please enter JSON configuration or select template above",validation:{must_be_object:"Configuration must be a JSON object",invalid_json:"Invalid JSON format"},errors:{save_failed:"Error occurred while saving"}},common:{cancel:"Cancel",confirm:"Confirm"}},tc={plan:{title:"Subscription Plans",add:"Add Plan",search:"Search plans...",sort:{edit:"Edit Sort",save:"Save Sort"},columns:{id:"ID",show:"Show",sell:"Sell",renew:"Renew",renew_tooltip:"Whether existing users can renew when the subscription stops selling",name:"Name",stats:"Statistics",group:"Permission Group",price:"Price",actions:"Actions",edit:"Edit",delete:"Delete",delete_confirm:{title:"Confirm Delete",description:"This action will permanently delete this subscription and cannot be undone. Are you sure you want to continue?",success:"Successfully deleted"},price_period:{monthly:"Monthly",quarterly:"Quarterly",half_yearly:"Half Yearly",yearly:"Yearly",two_yearly:"Two Years",three_yearly:"Three Years",onetime:"One Time",reset_traffic:"Reset Traffic",unit:{month:"/month",quarter:"/quarter",half_year:"/half year",year:"/year",two_year:"/2 years",three_year:"/3 years",times:"/time"}}},form:{add_title:"Add Plan",edit_title:"Edit Plan",name:{label:"Plan Name",placeholder:"Enter plan name"},group:{label:"Permission Group",placeholder:"Select permission group",add:"Add Group"},transfer:{label:"Traffic",placeholder:"Enter traffic size",unit:"GB"},speed:{label:"Speed Limit",placeholder:"Enter speed limit",unit:"Mbps"},price:{title:"Price Settings",base_price:"Base monthly price",clear:{button:"Clear Prices",tooltip:"Clear all period price settings"}},device:{label:"Device Limit",placeholder:"Leave empty for no limit",unit:"devices"},capacity:{label:"Capacity Limit",placeholder:"Leave empty for no limit",unit:"users"},reset_method:{label:"Traffic Reset Method",placeholder:"Select traffic reset method",description:"Set how subscription traffic is reset, different methods affect how user traffic is calculated",options:{follow_system:"Follow System Settings",monthly_first:"1st of Each Month",monthly_reset:"Monthly Reset",no_reset:"No Reset",yearly_first:"January 1st",yearly_reset:"Yearly Reset"}},content:{label:"Plan Description",placeholder:"Write plan description here...",description:"Supports Markdown format, you can use headings, lists, bold, italic and other styles to beautify the content",preview:"Preview",preview_button:{show:"Show Preview",hide:"Hide Preview"},template:{button:"Use Template",tooltip:"Click to use preset plan description template",content:`## Plan Features +• High-speed and stable global network access +• Support multiple devices online simultaneously +• Unlimited traffic reset + +## Usage Instructions +1. Supported devices: iOS, Android, Windows, macOS +2. 24/7 technical support +3. Automatic periodic traffic reset + +## Notes +- No abuse allowed +- Comply with local laws and regulations +- Support plan changes anytime`}},force_update:{label:"Force Update to Users"},submit:{submitting:"Submitting...",submit:"Submit",cancel:"Cancel",success:{add:"Plan added successfully",update:"Plan updated successfully"}}},page:{description:"Here you can configure subscription plans, including adding, deleting, and editing operations."}}},ac={title:"Order Management",description:"Here you can view user orders, including assignment, viewing, deletion and other operations.",table:{columns:{tradeNo:"Order No.",type:"Type",plan:"Subscription Plan",period:"Period",amount:"Payment Amount",status:"Order Status",commission:"Commission Amount",commissionStatus:"Commission Status",createdAt:"Created At"}},type:{NEW:"New Purchase",RENEWAL:"Renewal",UPGRADE:"Upgrade",RESET_FLOW:"Reset Traffic"},period:{month_price:"Monthly",quarter_price:"Quarterly",half_year_price:"Semi-annually",year_price:"Annually",two_year_price:"2 Years",three_year_price:"3 Years",onetime_price:"One-time",reset_price:"Reset Package"},status:{PENDING:"Pending",PROCESSING:"Processing",CANCELLED:"Cancelled",COMPLETED:"Completed",DISCOUNTED:"Discounted",tooltip:"After marking as [Paid], the system will proceed with activation and completion"},commission:{PENDING:"Pending",PROCESSING:"Processing",VALID:"Valid",INVALID:"Invalid"},actions:{markAsPaid:"Mark as Paid",cancel:"Cancel Order",openMenu:"Open Menu",reset:"Reset"},search:{placeholder:"Search orders..."},dialog:{title:"Order Information",basicInfo:"Basic Information",amountInfo:"Amount Information",timeInfo:"Time Information",addOrder:"Add Order",assignOrder:"Assign Order",fields:{userEmail:"User Email",orderPeriod:"Order Period",subscriptionPlan:"Subscription Plan",callbackNo:"Callback No.",paymentAmount:"Payment Amount",balancePayment:"Balance Payment",discountAmount:"Discount Amount",refundAmount:"Refund Amount",deductionAmount:"Deduction Amount",createdAt:"Created At",updatedAt:"Updated At"},placeholders:{email:"Please enter user email",plan:"Please select subscription plan",period:"Please select subscription period",amount:"Please enter payment amount"},actions:{cancel:"Cancel",confirm:"Confirm"},messages:{addSuccess:"Added successfully"}}},nc={title:"System Settings",description:"Manage core system configurations, including site, security, subscription, invite commission, nodes, email, and notifications",server:{title:"Server Configuration",description:"Configure node communication and synchronization settings, including communication keys, polling intervals, load balancing and other advanced options.",server_token:{title:"Communication Token",placeholder:"Enter communication token",description:"Used for authentication between servers",generate_tooltip:"Click to generate random token"},server_pull_interval:{title:"Node Pull Action Polling Interval",description:"The frequency at which nodes retrieve data from the panel.",placeholder:"Enter pull interval"},server_push_interval:{title:"Node Push Action Polling Interval",description:"The frequency at which nodes push data to the panel.",placeholder:"Enter push interval"},device_limit_mode:{title:"Device Limit Mode",description:"In relaxed mode, using multiple nodes from the same IP address counts as one device.",strict:"Strict Mode",relaxed:"Relaxed Mode",placeholder:"Select device limit mode"}},invite:{title:"Invitation & Commission Settings",description:"Configure invitation registration and commission related settings.",invite_force:{title:"Enable Forced Invitation",description:"When enabled, only invited users can register."},invite_commission:{title:"Invitation Commission Percentage",description:"Default global commission distribution ratio, you can configure individual ratios in user management.",placeholder:"Enter commission percentage"},invite_gen_limit:{title:"Invitation Code Generation Limit",description:"Maximum number of invitation codes a user can create",placeholder:"Enter generation limit"},invite_never_expire:{title:"Never Expire Invitation Code",description:"When enabled, invitation codes will not expire after use, otherwise they will expire after being used."},commission_first_time:{title:"First-time Commission Only",description:"When enabled, commission will only be generated on the first payment of the invitee, can be configured individually in user management."},commission_auto_check:{title:"Automatic Commission Confirmation",description:"When enabled, commission will be automatically confirmed 3 days after order completion."},commission_withdraw_limit:{title:"Withdrawal Threshold (Yuan)",description:"Withdrawal requests below this threshold will not be submitted.",placeholder:"Enter withdrawal threshold"},commission_withdraw_method:{title:"Withdrawal Methods",description:"Supported withdrawal methods, separate multiple methods with commas.",placeholder:"Enter withdrawal methods, separate with commas"},withdraw_close:{title:"Disable Withdrawals",description:"When enabled, users will be prohibited from requesting withdrawals, and invitation commissions will go directly to user balance."},commission_distribution:{title:"Three-level Distribution",description:"When enabled, commission will be split according to the three set ratios, total should not exceed 100%.",l1:"Level 1 Inviter Ratio",l2:"Level 2 Inviter Ratio",l3:"Level 3 Inviter Ratio",placeholder:"Enter ratio e.g. 50"},saving:"Saving..."},site:{title:"Site Settings",description:"Configure basic site information, including site name, description, currency unit, and other core settings.",form:{siteName:{label:"Site Name",placeholder:"Please enter site name",description:"Used where site name needs to be displayed."},siteDescription:{label:"Site Description",placeholder:"Please enter site description",description:"Used where site description needs to be displayed."},siteUrl:{label:"Site URL",placeholder:"Please enter site URL, without trailing /",description:"Current website URL, will be used in emails and other places where URL is needed."},forceHttps:{label:"Force HTTPS",description:"Need to enable when the site is not using HTTPS but CDN or reverse proxy has forced HTTPS."},logo:{label:"LOGO",placeholder:"Please enter LOGO URL, without trailing /",description:"Used where LOGO needs to be displayed."},subscribeUrl:{label:"Subscribe URL",placeholder:"Used for subscription, multiple URLs separated by ','. Leave empty to use site URL.",description:"Used for subscription, leave empty to use site URL."},tosUrl:{label:"Terms of Service (TOS) URL",placeholder:"Please enter TOS URL, without trailing /",description:"Used to link to Terms of Service (TOS)"},stopRegister:{label:"Stop New User Registration",description:"When enabled, no one will be able to register."},tryOut:{label:"Registration Trial",placeholder:"Disabled",description:"Select the subscription for trial, if no options please add in subscription management first.",duration:{label:"Trial Duration",placeholder:"0",description:"Trial duration in hours."}},currency:{label:"Currency Unit",placeholder:"CNY",description:"For display only, changing this will affect all currency units in the system."},currencySymbol:{label:"Currency Symbol",placeholder:"¥",description:"For display only, changing this will affect all currency symbols in the system."}}},safe:{title:"Security Settings",description:"Configure system security options, including login verification, password policies, and API access settings.",form:{emailVerify:{label:"Email Verification",description:"When enabled, users will be required to verify their email."},gmailLimit:{label:"Disable Gmail Aliases",description:"When enabled, Gmail aliases will not be allowed to register."},safeMode:{label:"Safe Mode",description:"When enabled, accessing the site through domains other than the site URL will be blocked with 403."},securePath:{label:"Admin Path",placeholder:"admin",description:"Admin management path, changing this will modify the original admin path"},emailWhitelist:{label:"Email Suffix Whitelist",description:"When enabled, only email suffixes in the list will be allowed to register.",suffixes:{label:"Email Suffixes",placeholder:"Enter email suffixes, one per line",description:"Enter the allowed email suffixes, one per line"}},recaptcha:{enable:{label:"Enable reCAPTCHA",description:"When enabled, users will need to pass reCAPTCHA verification when registering."},key:{label:"reCAPTCHA Key",placeholder:"Enter reCAPTCHA key",description:"Enter your reCAPTCHA key"},siteKey:{label:"reCAPTCHA Site Key",placeholder:"Enter reCAPTCHA site key",description:"Enter your reCAPTCHA site key"}},registerLimit:{enable:{label:"IP Registration Limit",description:"When enabled, the number of registrations from the same IP will be limited."},count:{label:"Registration Count",placeholder:"Enter maximum registration count",description:"Maximum number of registrations allowed from the same IP"},expire:{label:"Limit Duration",placeholder:"Enter limit duration in hours",description:"Duration of the registration limit in hours"}},passwordLimit:{enable:{label:"Password Attempt Limit",description:"When enabled, the number of password attempts will be limited."},count:{label:"Attempt Count",placeholder:"Enter maximum attempt count",description:"Maximum number of password attempts allowed"},expire:{label:"Lock Duration",placeholder:"Enter lock duration in hours",description:"Duration of the account lock in hours"}}}},subscribe:{title:"Subscription Settings",description:"Manage subscription-related configurations, including subscription link format, update frequency, traffic statistics, and other settings.",plan_change_enable:{title:"Allow Subscription Changes",description:"When enabled, users will be able to change their subscription plans."},reset_traffic_method:{title:"Monthly Traffic Reset Method",description:"Global traffic reset method, defaults to the 1st of each month. Can be set individually for subscriptions in subscription management.",options:{monthly_first:"1st of Each Month",monthly_reset:"Monthly Reset",no_reset:"No Reset",yearly_first:"January 1st",yearly_reset:"Yearly Reset"}},surplus_enable:{title:"Enable Deduction Plan",description:"When enabled, the system will deduct from the original subscription when users change subscriptions, refer to documentation for details."},new_order_event:{title:"Trigger Event on New Subscription",description:"This task will be triggered when a new subscription is completed.",options:{no_action:"No Action",reset_traffic:"Reset User Traffic"}},renew_order_event:{title:"Trigger Event on Subscription Renewal",description:"This task will be triggered when a subscription renewal is completed.",options:{no_action:"No Action",reset_traffic:"Reset User Traffic"}},change_order_event:{title:"Trigger Event on Subscription Change",description:"This task will be triggered when a subscription change is completed.",options:{no_action:"No Action",reset_traffic:"Reset User Traffic"}},subscribe_path:{title:"Subscription Path",description:"Subscription path, modifying will change the original subscribe path",current_format:"Current subscription path format: {path}/xxxxxxxxxx"},show_info_to_server:{title:"Show Subscription Info in Nodes",description:"When enabled, subscription information will be output when users subscribe to nodes."},show_protocol_to_server:{title:"Show Protocol in Node Names",description:"When enabled, subscription lines will include protocol names (e.g., [Hy2]Hong Kong)"},saving:"Saving...",plan:{title:"Subscription Plans",add:"Add Plan",search:"Search plans...",sort:{edit:"Edit Sort",save:"Save Sort"},columns:{id:"ID",show:"Show",sell:"Sell",renew:"Renew",renew_tooltip:"Whether existing users can renew when the subscription stops selling",name:"Name",stats:"Statistics",group:"Permission Group",price:"Price",actions:"Actions",edit:"Edit",delete:"Delete",delete_confirm:{title:"Confirm Delete",description:"This action will permanently delete this subscription and cannot be undone. Are you sure you want to continue?",success:"Successfully deleted"},price_period:{monthly:"Monthly",quarterly:"Quarterly",half_yearly:"Half Yearly",yearly:"Yearly",two_yearly:"Two Years",three_yearly:"Three Years",onetime:"One Time",reset_traffic:"Reset Traffic",unit:{month:"/month",quarter:"/quarter",half_year:"/half year",year:"/year",two_year:"/2 years",three_year:"/3 years",times:"/time"}}},form:{add_title:"Add Plan",edit_title:"Edit Plan",name:{label:"Plan Name",placeholder:"Enter plan name"},group:{label:"Permission Group",placeholder:"Select permission group",add:"Add Group"},transfer:{label:"Traffic",placeholder:"Enter traffic size",unit:"GB"},speed:{label:"Speed Limit",placeholder:"Enter speed limit",unit:"Mbps"},price:{title:"Price Settings",base_price:"Base monthly price",clear:{button:"Clear Prices",tooltip:"Clear all period price settings"}},device:{label:"Device Limit",placeholder:"Leave empty for no limit",unit:"devices"},capacity:{label:"Capacity Limit",placeholder:"Leave empty for no limit",unit:"users"},reset_method:{label:"Traffic Reset Method",placeholder:"Select traffic reset method",description:"Set how subscription traffic is reset, different methods affect how user traffic is calculated",options:{follow_system:"Follow System Settings",monthly_first:"1st of Each Month",monthly_reset:"Monthly Reset",no_reset:"No Reset",yearly_first:"January 1st",yearly_reset:"Yearly Reset"}},content:{label:"Plan Description",placeholder:"Write plan description here...",description:"Supports Markdown format, you can use headings, lists, bold, italic and other styles to beautify the content",preview:"Preview",preview_button:{show:"Show Preview",hide:"Hide Preview"},template:{button:"Use Template",tooltip:"Click to use preset plan description template",content:`## Plan Features +• High-speed and stable global network access +• Support multiple devices online simultaneously +• Unlimited traffic reset + +## Usage Instructions +1. Supported devices: iOS, Android, Windows, macOS +2. 24/7 technical support +3. Automatic periodic traffic reset + +## Notes +- No abuse allowed +- Comply with local laws and regulations +- Support plan changes anytime`}},force_update:{label:"Force Update to Users"},submit:{submitting:"Submitting...",submit:"Submit",cancel:"Cancel",success:{add:"Plan added successfully",update:"Plan updated successfully"}}},page:{description:"Here you can configure subscription plans, including adding, deleting, and editing operations."}}},email:{title:"Email Settings",description:"Configure system email service for sending verification codes, password resets, and notifications, supporting various SMTP providers.",email_host:{title:"SMTP Host",description:"SMTP server address, e.g., smtp.gmail.com"},email_port:{title:"SMTP Port",description:"SMTP server port, common ports: 25, 465, 587"},email_username:{title:"SMTP Username",description:"SMTP authentication username"},email_password:{title:"SMTP Password",description:"SMTP authentication password or application-specific password"},email_encryption:{title:"Encryption Method",description:"Email encryption method",none:"None",ssl:"SSL/TLS",tls:"STARTTLS"},email_from:{title:"From Address",description:"Sender's email address"},email_from_name:{title:"From Name",description:"Sender's display name"},email_template:{title:"Email Template",description:"You can check the documentation for how to customize email templates",placeholder:"Select email template"},remind_mail:{title:"Email Reminders",description:"When enabled, users will receive email notifications when their subscription is about to expire or when traffic is running low."},test:{title:"Send Test Email",sending:"Sending...",description:"Send a test email to verify the configuration",success:"Test email sent successfully",error:"Failed to send test email"}},telegram:{title:"Telegram Settings",description:"Configure Telegram bot functionality for user notifications, account binding, and command interactions.",bot_token:{title:"Bot Token",description:"Please enter the token provided by Botfather.",placeholder:"0000000000:xxxxxxxxx_xxxxxxxxxxxxxxx"},webhook:{title:"Set Webhook",description:"Set up webhook for the bot. Without setting it, you won't receive Telegram notifications.",button:"One-Click Setup",setting:"Setting Webhook..."},bot_enable:{title:"Enable Bot Notifications",description:"When enabled, the bot will send basic notifications to administrators and users who have bound their Telegram accounts."},discuss_link:{title:"Group Link",description:"Once filled in, it will be displayed on the user side or used where needed.",placeholder:"https://t.me/xxxxxx"}},app:{title:"APP Settings",description:"Manage mobile application configurations, including API interfaces, version control, and push notifications.",common:{placeholder:"Please input"},windows:{version:{title:"Windows Version",description:"Current version number of Windows client"},download:{title:"Windows Download URL",description:"Download link for Windows client"}},macos:{version:{title:"macOS Version",description:"Current version number of macOS client"},download:{title:"macOS Download URL",description:"Download link for macOS client"}},android:{version:{title:"Android Version",description:"Current version number of Android client"},download:{title:"Android Download URL",description:"Download link for Android client"}}},common:{saving:"Saving...",save_success:"Saved automatically",placeholder:"Please input",autoSaved:"Saved automatically"}},rc={trafficRecord:{title:"Traffic Usage Records",time:"Time",upload:"Upload",download:"Download",rate:"Rate",total:"Total",noRecords:"No records found",perPage:"Show per page",records:"records",page:"Page {{current}} / {{total}}",multiplier:"{{value}}x"}},lc={title:"Ticket Management",description:"Here you can view user tickets, including viewing, replying, and closing operations.",columns:{id:"Ticket ID",subject:"Subject",level:"Priority",status:"Status",updated_at:"Last Updated",created_at:"Created At",actions:"Actions"},status:{closed:"Closed",replied:"Replied",pending:"Pending",processing:"Processing"},level:{low:"Low",medium:"Medium",high:"High"},filter:{placeholder:"Search {field}...",no_results:"No results found.",selected:"{count} selected",clear:"Clear filters"},actions:{view_details:"View Details",close_ticket:"Close Ticket",close_confirm_title:"Confirm Close Ticket",close_confirm_description:"After closing, you will not be able to reply. Are you sure you want to close this ticket?",close_confirm_button:"Close Ticket",close_success:"Ticket closed successfully",view_ticket:"View Ticket"},detail:{no_messages:"No messages yet",created_at:"Created at",user_info:"User Info",traffic_records:"Traffic Records",order_records:"Order Records",input:{closed_placeholder:"Ticket is closed",reply_placeholder:"Type your reply...",sending:"Sending...",send:"Send"}}},ic={manage:{title:"User Management",description:"Here you can manage users, including adding, deleting, editing, and querying operations."},columns:{is_admin:"Admin",is_staff:"Staff",id:"ID",email:"Email",online_count:"Online Devices",status:"Status",subscription:"Subscription",group:"Group",used_traffic:"Used Traffic",total_traffic:"Total Traffic",expire_time:"Expire Time",balance:"Balance",commission:"Commission",register_time:"Register Time",actions:"Actions",device_limit:{unlimited:"No device limit",limited:"Maximum {{count}} devices allowed"},status_text:{normal:"Normal",banned:"Banned"},online_status:{online:"Currently Online",never:"Never Online",last_online:"Last Online: {{time}}",offline_duration:{days:"Offline Duration: {{count}}d",hours:"Offline Duration: {{count}}h",minutes:"Offline Duration: {{count}}m",seconds:"Offline Duration: {{count}}s"}},expire_status:{permanent:"Permanent",expired:"Expired {{days}} days ago",remaining:"{{days}} days remaining"},actions_menu:{edit:"Edit",assign_order:"Assign Order",copy_url:"Copy Subscribe URL",reset_secret:"Reset UUID & URL",orders:"Orders",invites:"Invites",traffic_records:"Traffic Records"}},filter:{selected:"{{count}} selected",no_results:"No results found.",clear:"Clear filters",search_placeholder:"Search...",email_search:"Search user email...",advanced:"Advanced Filter",reset:"Reset Filter",sheet:{title:"Advanced Filter",description:"Add one or more filter conditions to find users precisely",conditions:"Filter Conditions",add:"Add Condition",condition:"Condition {{number}}",field:"Select Field",operator:"Select Operator",value:"Enter Value",value_number:"Enter Value ({{unit}})",reset:"Reset",apply:"Apply Filter"},fields:{email:"Email",id:"User ID",plan_id:"Subscription",transfer_enable:"Traffic",total_used:"Used Traffic",online_count:"Online Devices",expired_at:"Expire Time",uuid:"UUID",token:"Token",banned:"Account Status",remark:"Remark",inviter_email:"Inviter Email",invite_user_id:"Inviter ID",is_admin:"Admin",is_staff:"Staff"},operators:{contains:"Contains",eq:"Equals",gt:"Greater Than",lt:"Less Than"},status:{normal:"Normal",banned:"Banned"},boolean:{true:"Yes",false:"No"}},generate:{button:"Create User",title:"Create User",form:{email:"Email",email_prefix:"Account (leave empty for batch generation)",email_domain:"Domain",password:"Password",password_placeholder:"Leave empty to use email as password",expire_time:"Expire Time",expire_time_placeholder:"Select user expire date, leave empty for permanent",permanent:"Permanent",subscription:"Subscription Plan",subscription_none:"None",generate_count:"Generate Count",generate_count_placeholder:"Enter count for batch generation",cancel:"Cancel",submit:"Generate",success:"Generated successfully"}},edit:{button:"Edit User Info",title:"User Management",form:{email:"Email",email_placeholder:"Please enter email",inviter_email:"Inviter Email",inviter_email_placeholder:"Please enter email",password:"Password",password_placeholder:"Enter new password if you want to change it",balance:"Balance",balance_placeholder:"Please enter balance",commission_balance:"Commission Balance",commission_balance_placeholder:"Please enter commission balance",upload:"Upload Traffic",upload_placeholder:"Upload traffic",download:"Download Traffic",download_placeholder:"Download traffic",total_traffic:"Total Traffic",total_traffic_placeholder:"Please enter traffic",expire_time:"Expire Time",expire_time_placeholder:"Select user expire date, leave empty for permanent",expire_time_specific:"Specific Time",expire_time_today:"Set to end of today",expire_time_permanent:"Permanent",expire_time_1month:"One Month",expire_time_3months:"Three Months",expire_time_confirm:"Confirm",subscription:"Subscription Plan",subscription_none:"None",account_status:"Account Status",commission_type:"Commission Type",commission_type_system:"Follow System Settings",commission_type_cycle:"Cycle Commission",commission_type_onetime:"One-time Commission",commission_rate:"Commission Rate",commission_rate_placeholder:"Leave empty to follow site commission rate",discount:"Exclusive Discount",discount_placeholder:"Leave empty for no exclusive discount",speed_limit:"Speed Limit",speed_limit_placeholder:"Leave empty for no speed limit",device_limit:"Device Limit",device_limit_placeholder:"Leave empty for no device limit",is_admin:"Is Admin",is_staff:"Is Staff",remarks:"Remarks",remarks_placeholder:"Please enter remarks here",cancel:"Cancel",submit:"Submit",success:"Modified successfully"}}},oc={title:"Route Management",description:"Manage all route groups, including adding, deleting, and editing operations.",columns:{id:"Group ID",remarks:"Remarks",action:"Action",actions:"Actions",matchRules:"Match {{count}} rules"},actions:{dns:"Resolve using specified DNS server",block:"Block access"},form:{add:"Add Route",edit:"Edit Route",create:"Create Route",remarks:"Remarks",remarksPlaceholder:"Please enter remarks",match:"Match Rules",matchPlaceholder:`example.com +*.example.com`,action:"Action",actionPlaceholder:"Please select action",dns:"DNS Server",dnsPlaceholder:"Please enter DNS server",cancel:"Cancel",submit:"Submit",validation:{remarks:"Please enter valid remarks"}},toolbar:{searchPlaceholder:"Search routes...",reset:"Reset"},messages:{deleteConfirm:"Confirm Delete",deleteDescription:"This action will permanently delete this route group and cannot be recovered. Are you sure you want to continue?",deleteButton:"Delete",deleteSuccess:"Deleted Successfully",createSuccess:"Created Successfully",updateSuccess:"Updated Successfully"}},cc={title:"Payment Configuration",description:"Configure payment methods including Alipay, WeChat Pay, etc.",table:{columns:{id:"ID",enable:"Enable",name:"Display Name",payment:"Payment Gateway",notify_url:"Notify URL",notify_url_tooltip:"The payment gateway will send notifications to this address. Please ensure it's accessible through your firewall.",actions:"Actions"},actions:{edit:"Edit",delete:{title:"Confirm Delete",description:"Are you sure you want to delete this payment method? This action cannot be undone.",success:"Successfully deleted"}},toolbar:{search:"Search payment methods...",reset:"Reset",sort:{hint:"Drag payment methods to sort, click save when finished",save:"Save Order",edit:"Edit Order"}}},form:{add:{button:"Add Payment Method",title:"Add Payment Method"},edit:{title:"Edit Payment Method"},fields:{name:{label:"Display Name",placeholder:"Enter payment name",description:"Used for frontend display"},icon:{label:"Icon URL",placeholder:"https://example.com/icon.svg",description:"Icon URL for frontend display"},notify_domain:{label:"Notify Domain",placeholder:"https://example.com",description:"Domain for gateway notifications"},handling_fee_percent:{label:"Percentage Fee (%)",placeholder:"0-100"},handling_fee_fixed:{label:"Fixed Fee",placeholder:"0"},payment:{label:"Payment Gateway",placeholder:"Select payment gateway",description:"Choose the payment gateway to use"}},validation:{name:{min:"Name must be at least 2 characters",max:"Name cannot exceed 30 characters"},notify_domain:{url:"Please enter a valid URL"},payment:{required:"Please select a payment gateway"}},buttons:{cancel:"Cancel",submit:"Submit"},messages:{success:"Saved successfully"}}},dc={title:"Notice Management",description:"Here you can configure notices, including adding, deleting, editing and other operations.",table:{columns:{id:"ID",show:"Display Status",title:"Title",actions:"Actions"},toolbar:{search:"Search notice title...",reset:"Reset",sort:{edit:"Edit Order",save:"Save Order"}},actions:{edit:"Edit",delete:{title:"Delete Confirmation",description:"Are you sure you want to delete this notice? This action cannot be undone.",success:"Successfully deleted"}}},form:{add:{title:"Add Notice",button:"Add Notice"},edit:{title:"Edit Notice"},fields:{title:{label:"Title",placeholder:"Please enter notice title"},content:{label:"Content"},img_url:{label:"Background Image",placeholder:"Please enter notice background image URL"},show:{label:"Display"},tags:{label:"Tags",placeholder:"Press Enter to add tags"}},buttons:{cancel:"Cancel",submit:"Submit",success:"Successfully submitted"}}},mc={title:"Theme Configuration",description:"Theme configuration, including theme colors, font sizes, etc. If you deploy V2board in a front-end and back-end separated way, theme configuration will not take effect.",upload:{button:"Upload Theme",title:"Upload Theme",description:"Please upload a valid theme package (.zip format). The theme package should contain a complete theme file structure.",dragText:"Drag and drop theme file here, or",clickText:"click to select",supportText:"Supports .zip format theme packages",uploading:"Uploading...",error:{format:"Only ZIP format theme files are supported"}},preview:{title:"Theme Preview",imageCount:"{{current}} / {{total}}"},card:{version:"Version: {{version}}",currentTheme:"Current Theme",activateTheme:"Activate Theme",configureTheme:"Theme Settings",preview:"Preview",delete:{title:"Delete Theme",description:"Are you sure you want to delete this theme? This action cannot be undone.",button:"Delete",error:{active:"Cannot delete the currently active theme"}}},config:{title:"Configure {{name}} Theme",description:"Modify theme styles, layouts, and other display options.",cancel:"Cancel",save:"Save",success:"Settings saved successfully"}},uc={title:"Coupon Management",description:"Here you can manage coupons, including adding, viewing, and deleting operations.",table:{columns:{id:"ID",show:"Enable",name:"Coupon Name",type:"Type",code:"Code",limitUse:"Remaining Uses",limitUseWithUser:"Uses Per User",validity:"Validity Period",actions:"Actions"},validity:{expired:"Expired {{days}} days ago",notStarted:"Starts in {{days}} days",remaining:"{{days}} days remaining",startTime:"Start Time",endTime:"End Time",unlimited:"Unlimited",noLimit:"No Limit"},actions:{edit:"Edit",delete:"Delete",deleteConfirm:{title:"Confirm Delete",description:"This action will permanently delete this coupon and cannot be undone. Are you sure you want to continue?",confirmText:"Delete"}},toolbar:{search:"Search coupons...",type:"Type",reset:"Reset",types:{1:"Fixed Amount",2:"Percentage"}}},form:{add:"Add Coupon",edit:"Edit Coupon",name:{label:"Coupon Name",placeholder:"Enter coupon name",required:"Please enter coupon name"},type:{label:"Coupon Type and Value",placeholder:"Select coupon type"},value:{placeholder:"Enter value"},validity:{label:"Validity Period",to:"to",endTimeError:"End time must be later than start time"},limitUse:{label:"Maximum Uses",placeholder:"Set maximum uses, leave empty for unlimited",description:"Set the total number of times this coupon can be used, leave empty for unlimited uses"},limitUseWithUser:{label:"Uses Per User",placeholder:"Set uses per user, leave empty for unlimited",description:"Limit how many times each user can use this coupon, leave empty for unlimited uses per user"},limitPeriod:{label:"Subscription Periods",placeholder:"Limit to specific subscription periods, leave empty for no restrictions",description:"Select which subscription periods can use this coupon, leave empty for no period restrictions",empty:"No matching periods found"},limitPlan:{label:"Subscription Plans",placeholder:"Limit to specific subscription plans, leave empty for no restrictions",empty:"No matching plans found"},code:{label:"Custom Coupon Code",placeholder:"Enter custom code, leave empty for auto-generation",description:"Customize the coupon code, leave empty for auto-generation"},generateCount:{label:"Batch Generation Count",placeholder:"Number of coupons to generate, leave empty for single coupon",description:"Generate multiple coupon codes at once, leave empty to generate a single code"},submit:{saving:"Saving...",save:"Save"},error:{saveFailed:"Failed to save coupon"}}},hc={title:"Permission Groups",description:"Manage all permission groups, including adding, deleting, and editing operations.",columns:{id:"Group ID",name:"Group Name",usersCount:"Users Count",serverCount:"Nodes Count",actions:"Actions"},form:{add:"Add Group",edit:"Edit Group",create:"Create Group",update:"Update",name:"Group Name",namePlaceholder:"Please enter group name",nameDescription:"Group name is used to identify different user groups, it's recommended to use meaningful names.",cancel:"Cancel",editDescription:"Modify group information, changes will take effect immediately.",createDescription:"Create a new permission group to assign different permissions to different users."},toolbar:{searchPlaceholder:"Search groups...",reset:"Reset"},messages:{deleteConfirm:"Confirm Delete",deleteDescription:"This action will permanently delete this permission group and cannot be recovered. Are you sure you want to continue?",deleteButton:"Delete",createSuccess:"Created Successfully",updateSuccess:"Updated Successfully",nameValidation:{min:"Group name must be at least 2 characters",max:"Group name cannot exceed 50 characters",pattern:"Group name can only contain letters, numbers, Chinese characters, underscores and hyphens"}}},xc={title:"Knowledge Base",description:"Here you can configure the knowledge base, including adding, deleting, and editing operations.",columns:{id:"ID",status:"Status",title:"Title",category:"Category",actions:"Actions"},form:{add:"Add Knowledge",edit:"Edit Knowledge",title:"Title",titlePlaceholder:"Please enter knowledge title",category:"Category",categoryPlaceholder:"Please enter category, it will be automatically classified",language:"Language",languagePlaceholder:"Please select language",content:"Content",show:"Show",cancel:"Cancel",submit:"Submit"},languages:{"en-US":"English","ja-JP":"日本語","ko-KR":"한국어","vi-VN":"Tiếng Việt","zh-CN":"简体中文","zh-TW":"繁體中文"},messages:{deleteConfirm:"Confirm Delete",deleteDescription:"This action will permanently delete this knowledge base record and cannot be recovered. Are you sure you want to continue?",deleteButton:"Delete",operationSuccess:"Operation Successful"},toolbar:{searchPlaceholder:"Search knowledge...",reset:"Reset",sortModeHint:"Drag knowledge items to sort, click save when done",editSort:"Edit Sort",saveSort:"Save Sort"}},pc={loading:"加载中...",error:"错误",success:"成功",save:"保存",cancel:"取消",delete:"删除",edit:"编辑",view:"查看",toggleNavigation:"切换导航",toggleSidebar:"切换侧边栏",search:"搜索...",theme:{light:"浅色",dark:"深色",system:"跟随系统"},user:"用户",defaultEmail:"user@example.com",settings:"设置",logout:"退出登录"},fc={title:"仪表盘",stats:{newUsers:"新用户",totalScore:"总积分",monthlyUpload:"月上传",vsLastMonth:"对比上月",vsYesterday:"对比昨日",todayIncome:"今日收入",monthlyIncome:"月收入",totalIncome:"总收入",totalUsers:"总用户",activeUsers:"活跃用户: {{count}}",totalOrders:"总订单",revenue:"收入",todayRegistered:"今日注册",monthlyRegistered:"月注册",onlineUsers:"在线用户",pendingTickets:"待处理工单",hasPendingTickets:"有工单需要处理",noPendingTickets:"无待处理工单",pendingCommission:"待处理佣金",hasPendingCommission:"有佣金需要确认",noPendingCommission:"无待处理佣金",monthlyNewUsers:"月新增用户",monthlyDownload:"月下载",todayTraffic:"今日: {{value}}",activeUserTrend:"活跃用户趋势",realtimeUsers:"实时用户",todayPeak:"今日峰值",vsLastWeek:"对比上周"},trafficRank:{nodeTrafficRank:"节点流量排行",userTrafficRank:"用户流量排行",today:"今天",last7days:"最近7天",last30days:"最近30天",customRange:"自定义范围",selectTimeRange:"选择时间范围",selectDateRange:"选择日期范围",currentTraffic:"当前流量",previousTraffic:"上期流量",changeRate:"变化率",recordTime:"记录时间"},overview:{title:"收入概览",thisMonth:"本月",lastMonth:"上月",to:"至",selectTimeRange:"选择范围",selectDate:"选择日期",last7Days:"最近7天",last30Days:"最近30天",last90Days:"最近90天",last180Days:"最近180天",lastYear:"最近一年",customRange:"自定义范围",amount:"金额",count:"数量",transactions:"{{count}} 笔交易",orderAmount:"订单金额",commissionAmount:"佣金金额",orderCount:"订单数量",commissionCount:"佣金数量",totalIncome:"总收入",totalCommission:"总佣金",totalTransactions:"共 {{count}} 笔交易",avgOrderAmount:"平均订单金额:",commissionRate:"佣金比例:"},queue:{title:"队列状态",jobDetails:"作业详情",status:{description:"当前队列运行状态",running:"运行状态",normal:"正常",abnormal:"异常",waitTime:"当前等待时间:{{seconds}} 秒",pending:"等待中",processing:"处理中",completed:"已完成",failed:"失败",cancelled:"已取消"},details:{description:"队列处理详细信息",recentJobs:"近期任务数",statisticsPeriod:"统计时间范围:{{hours}} 小时",jobsPerMinute:"每分钟处理量",maxThroughput:"最高吞吐量:{{value}}",failedJobs7Days:"7日报错数量",retentionPeriod:"保留 {{hours}} 小时",longestRunningQueue:"最长运行队列",activeProcesses:"活跃进程",id:"作业ID",type:"作业类型",status:"状态",progress:"进度",createdAt:"创建时间",updatedAt:"更新时间",error:"错误信息",data:"作业数据",result:"结果",duration:"耗时",attempts:"重试次数",nextRetry:"下次重试"},actions:{retry:"重试",cancel:"取消",delete:"删除",viewDetails:"查看详情"},empty:"队列中暂无作业",loading:"正在加载队列状态...",error:"加载队列状态失败"}},gc={placeholder:"搜索菜单和功能...",title:"菜单导航",noResults:"未找到结果",shortcut:{label:"搜索",key:"⌘K"}},jc={dashboard:"仪表盘",systemManagement:"系统管理",systemConfig:"系统配置",themeConfig:"主题配置",noticeManagement:"公告管理",paymentConfig:"支付配置",knowledgeManagement:"知识库管理",nodeManagement:"节点管理",permissionGroupManagement:"权限组管理",routeManagement:"路由管理",subscriptionManagement:"订阅管理",planManagement:"套餐管理",orderManagement:"订单管理",couponManagement:"优惠券管理",userManagement:"用户管理",ticketManagement:"工单管理"},vc={dashboard:"仪表盘",systemManagement:"系统管理",systemConfig:"系统配置",themeConfig:"主题配置",noticeManagement:"公告管理",paymentConfig:"支付配置",knowledgeManagement:"知识库管理",nodeManagement:"节点管理",permissionGroupManagement:"权限组管理",routeManagement:"路由管理",subscriptionManagement:"订阅管理",planManagement:"套餐管理",orderManagement:"订单管理",couponManagement:"优惠券管理",userManagement:"用户管理",ticketManagement:"工单管理"},bc={manage:{title:"节点管理",description:"管理所有节点,包括添加、删除、编辑等操作。"},columns:{sort:"排序",nodeId:"节点ID",show:"显隐",node:"节点",address:"地址",onlineUsers:{title:"在线人数",tooltip:"在线人数根据服务端上报频率而定"},rate:{title:"倍率",tooltip:"流量扣费倍率"},groups:{title:"权限组",tooltip:"可订阅到该节点的权限组",empty:"--"},type:"类型",actions:"操作",copyAddress:"复制连接地址",internalPort:"内部端口",status:{0:"未运行",1:"无人使用或异常",2:"运行正常"},actions_dropdown:{edit:"编辑",copy:"复制",delete:{title:"确认删除",description:"此操作将永久删除该节点,删除后无法恢复。确定要继续吗?",confirm:"删除"},copy_success:"复制成功",delete_success:"删除成功"}},toolbar:{search:"搜索节点...",type:"类型",reset:"重置",sort:{tip:"拖拽节点进行排序,完成后点击保存",edit:"编辑排序",save:"保存排序"}},form:{add_node:"添加节点",edit_node:"编辑节点",new_node:"新建节点",name:{label:"节点名称",placeholder:"请输入节点名称",error:"请输入有效的节点名称"},rate:{label:"倍率",error:"请输入有效的倍率"},code:{label:"自定义节点ID",optional:"(选填)",placeholder:"请输入自定义节点ID"},tags:{label:"节点标签",placeholder:"输入后回车添加标签"},groups:{label:"权限组",add:"添加权限组",placeholder:"请选择权限组",empty:"未找到结果"},host:{label:"节点地址",placeholder:"请输入节点域名或者IP"},port:{label:"连接端口",placeholder:"用户连接端口",tooltip:"用户实际连接使用的端口,这是客户端配置中需要填写的端口号。如果使用了中转或隧道,这个端口可能与服务器实际监听的端口不同。",sync:"同步到服务端口"},server_port:{label:"服务端口",placeholder:"服务端开放端口",tooltip:"服务器实际监听的端口,这是在服务器上开放的真实端口。如果使用了中转或隧道,这个端口可能与用户连接端口不同。"},parent:{label:"父节点",placeholder:"选择父节点",none:"无"},route:{label:"路由组",placeholder:"选择路由组",empty:"未找到结果"},submit:"提交",cancel:"取消",success:"提交成功"},dynamic_form:{shadowsocks:{cipher:{label:"加密算法",placeholder:"选择加密算法"},obfs:{label:"混淆",placeholder:"选择混淆方式",none:"无",http:"HTTP"},obfs_settings:{path:"路径",host:"Host"}},vmess:{tls:{label:"TLS",placeholder:"请选择安全性",disabled:"不支持",enabled:"支持"},tls_settings:{server_name:{label:"服务器名称指示(SNI)",placeholder:"不使用请留空"},allow_insecure:"允许不安全?"},network:{label:"传输协议",placeholder:"选择传输协议"}},trojan:{server_name:{label:"服务器名称指示(SNI)",placeholder:"当节点地址于证书不一致时用于证书验证"},allow_insecure:"允许不安全?",network:{label:"传输协议",placeholder:"选择传输协议"}},hysteria:{version:{label:"协议版本",placeholder:"协议版本"},alpn:{label:"ALPN",placeholder:"ALPN"},obfs:{label:"混淆",type:{label:"混淆实现",placeholder:"选择混淆实现",salamander:"Salamander"},password:{label:"混淆密码",placeholder:"请输入混淆密码",generate_success:"混淆密码生成成功"}},tls:{server_name:{label:"服务器名称指示(SNI)",placeholder:"当节点地址于证书不一致时用于证书验证"},allow_insecure:"允许不安全?"},bandwidth:{up:{label:"上行宽带",placeholder:"请输入上行宽带",suffix:"Mbps",bbr_tip:",留空则使用BBR"},down:{label:"下行宽带",placeholder:"请输入下行宽带",suffix:"Mbps",bbr_tip:",留空则使用BBR"}}},vless:{tls:{label:"安全性",placeholder:"请选择安全性",none:"无",tls:"TLS",reality:"Reality"},tls_settings:{server_name:{label:"服务器名称指示(SNI)",placeholder:"不使用请留空"},allow_insecure:"允许不安全?"},reality_settings:{server_name:{label:"伪装站点(dest)",placeholder:"例如:example.com"},server_port:{label:"端口(port)",placeholder:"例如:443"},allow_insecure:"允许不安全?",private_key:{label:"私钥(Private key)"},public_key:{label:"公钥(Public key)"},short_id:{label:"Short ID",placeholder:"可留空,长度为2的倍数,最长16位",description:"客户端可用的 shortId 列表,可用于区分不同的客户端,使用0-f的十六进制字符",generate:"生成 Short ID",success:"Short ID 生成成功"},key_pair:{generate:"生成密钥对",success:"密钥对生成成功",error:"生成密钥对失败"}},network:{label:"传输协议",placeholder:"选择传输协议"},flow:{label:"流控",placeholder:"选择流控"}}},network_settings:{edit_protocol:"编辑协议",edit_protocol_config:"编辑协议配置",use_template:"使用{{template}}模板",json_config_placeholder:"请输入JSON配置",json_config_placeholder_with_template:"请输入JSON配置或选择上方模板",validation:{must_be_object:"配置必须是一个JSON对象",invalid_json:"无效的JSON格式"},errors:{save_failed:"保存时发生错误"}},common:{cancel:"取消",confirm:"确定"}},yc={plan:{title:"订阅套餐",add:"添加套餐",search:"搜索套餐...",sort:{edit:"编辑排序",save:"保存排序"},columns:{id:"ID",show:"显示",sell:"新购",renew:"续费",renew_tooltip:"在订阅停止销售时,已购用户是否可以续费",name:"名称",stats:"统计",group:"权限组",price:"价格",actions:"操作",edit:"编辑",delete:"删除",delete_confirm:{title:"确认删除",description:"此操作将永久删除该订阅,删除后无法恢复。确定要继续吗?",success:"删除成功"},price_period:{monthly:"月付",quarterly:"季付",half_yearly:"半年付",yearly:"年付",two_yearly:"两年付",three_yearly:"三年付",onetime:"流量包",reset_traffic:"重置包",unit:{month:"元/月",quarter:"元/季",half_year:"元/半年",year:"元/年",two_year:"元/两年",three_year:"元/三年",times:"元/次"}}},form:{add_title:"添加套餐",edit_title:"编辑套餐",name:{label:"套餐名称",placeholder:"请输入套餐名称"},group:{label:"权限组",placeholder:"选择权限组",add:"添加权限组"},transfer:{label:"流量",placeholder:"请输入流量大小",unit:"GB"},speed:{label:"限速",placeholder:"请输入限速",unit:"Mbps"},price:{title:"售价设置",base_price:"基础月付价格",clear:{button:"清空价格",tooltip:"清空所有周期的价格设置"}},device:{label:"设备限制",placeholder:"留空则不限制",unit:"台"},capacity:{label:"容量限制",placeholder:"留空则不限制",unit:"人"},reset_method:{label:"流量重置方式",placeholder:"选择流量重置方式",description:"设置订阅流量的重置方式,不同的重置方式会影响用户的流量计算方式",options:{follow_system:"跟随系统设置",monthly_first:"每月1号",monthly_reset:"按月重置",no_reset:"不重置",yearly_first:"每年1月1日",yearly_reset:"按年重置"}},content:{label:"套餐描述",placeholder:"在这里编写套餐描述...",description:"支持 Markdown 格式,可以使用标题、列表、粗体、斜体等样式来美化描述内容",preview:"预览",preview_button:{show:"显示预览",hide:"隐藏预览"},template:{button:"使用模板",tooltip:"点击使用预设的套餐描述模板",content:`## 套餐特点 +• 高速稳定的全球网络接入 +• 支持多设备同时在线 +• 无限制的流量重置 + +## 使用说明 +1. 支持设备:iOS、Android、Windows、macOS +2. 24/7 技术支持 +3. 自动定期流量重置 + +## 注意事项 +- 禁止滥用 +- 遵守当地法律法规 +- 支持随时更换套餐`}},force_update:{label:"强制更新到用户"},submit:{submitting:"提交中...",submit:"提交",cancel:"取消",success:{add:"套餐添加成功",update:"套餐更新成功"}}},page:{description:"在这里可以配置订阅计划,包括添加、删除、编辑等操作。"}}},_c={title:"订单管理",description:"在这里可以查看用户订单,包括分配、查看、删除等操作。",table:{columns:{tradeNo:"订单号",type:"类型",plan:"订阅计划",period:"周期",amount:"支付金额",status:"订单状态",commission:"佣金金额",commissionStatus:"佣金状态",createdAt:"创建时间"}},type:{NEW:"新购",RENEWAL:"续费",UPGRADE:"升级",RESET_FLOW:"流量重置"},period:{month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"},status:{PENDING:"待支付",PROCESSING:"开通中",CANCELLED:"已取消",COMPLETED:"已完成",DISCOUNTED:"已折抵",tooltip:"标记为[已支付]后将会由系统进行开通后并完成"},commission:{PENDING:"待确认",PROCESSING:"发放中",VALID:"有效",INVALID:"无效"},actions:{markAsPaid:"标记为已支付",cancel:"取消订单",openMenu:"打开菜单",reset:"重置"},search:{placeholder:"搜索订单..."},dialog:{title:"订单信息",basicInfo:"基本信息",amountInfo:"金额信息",timeInfo:"时间信息",addOrder:"添加订单",assignOrder:"订单分配",fields:{userEmail:"用户邮箱",orderPeriod:"订单周期",subscriptionPlan:"订阅计划",callbackNo:"回调单号",paymentAmount:"支付金额",balancePayment:"余额支付",discountAmount:"优惠金额",refundAmount:"退回金额",deductionAmount:"折抵金额",createdAt:"创建时间",updatedAt:"更新时间"},placeholders:{email:"请输入用户邮箱",plan:"请选择订阅计划",period:"请选择购买时长",amount:"请输入需要支付的金额"},actions:{cancel:"取消",confirm:"确定"},messages:{addSuccess:"添加成功"}}},Nc={title:"系统设置",description:"管理系统核心配置,包括站点、安全、订阅、邀请佣金、节点、邮件和通知等设置",site:{title:"站点设置",description:"配置站点基本信息,包括站点名称、描述、货币单位等核心设置。",form:{siteName:{label:"站点名称",placeholder:"请输入站点名称",description:"用于显示需要站点名称的地方。"},siteDescription:{label:"站点描述",placeholder:"请输入站点描述",description:"用于显示需要站点描述的地方。"},siteUrl:{label:"站点网址",placeholder:"请输入站点URL,末尾不要/",description:"当前网站最新网址,将会在邮件等需要用于网址处体现。"},forceHttps:{label:"强制HTTPS",description:"当站点没有使用HTTPS,CDN或反代开启强制HTTPS时需要开启。"},logo:{label:"LOGO",placeholder:"请输入LOGO URL,末尾不要/",description:"用于显示需要LOGO的地方。"},subscribeUrl:{label:"订阅URL",placeholder:"用于订阅所使用,多个订阅地址用','隔开.留空则为站点URL。",description:"用于订阅所使用,留空则为站点URL。"},tosUrl:{label:"用户条款(TOS)URL",placeholder:"请输入用户条款URL,末尾不要/",description:"用于跳转到用户条款(TOS)"},stopRegister:{label:"停止新用户注册",description:"开启后任何人都将无法进行注册。"},tryOut:{label:"注册试用",placeholder:"关闭",description:"选择需要试用的订阅,如果没有选项请先前往订阅管理添加。",duration:{label:"注册试用时长",placeholder:"0",description:"注册试用时长,单位为小时。"}},currency:{label:"货币单位",placeholder:"CNY",description:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"},currencySymbol:{label:"货币符号",placeholder:"¥",description:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"}}},safe:{title:"安全设置",description:"配置系统安全相关选项,包括登录验证、密码策略、API访问等安全设置。",form:{emailVerify:{label:"邮箱验证",description:"开启后将会强制要求用户进行邮箱验证。"},gmailLimit:{label:"禁止使用Gmail多别名",description:"开启后Gmail多别名将无法注册。"},safeMode:{label:"安全模式",description:"开启后除了站点URL以外的绑定本站点的域名访问都将会被403。"},securePath:{label:"后台路径",placeholder:"admin",description:"后台管理路径,修改后将会改变原有的admin路径"},emailWhitelist:{label:"邮箱后缀白名单",description:"开启后在名单中的邮箱后缀才允许进行注册。",suffixes:{label:"邮箱后缀",placeholder:"输入邮箱后缀,每行一个",description:"输入允许的邮箱后缀,每行一个"}},recaptcha:{enable:{label:"启用reCAPTCHA",description:"开启后用户注册时需要通过reCAPTCHA验证。"},key:{label:"reCAPTCHA密钥",placeholder:"输入reCAPTCHA密钥",description:"输入您的reCAPTCHA密钥"},siteKey:{label:"reCAPTCHA站点密钥",placeholder:"输入reCAPTCHA站点密钥",description:"输入您的reCAPTCHA站点密钥"}},registerLimit:{enable:{label:"IP注册限制",description:"开启后将限制同一IP的注册次数。"},count:{label:"注册次数",placeholder:"输入最大注册次数",description:"同一IP允许的最大注册次数"},expire:{label:"限制时长",placeholder:"输入限制时长(小时)",description:"注册限制的持续时间(小时)"}},passwordLimit:{enable:{label:"密码尝试限制",description:"开启后将限制密码尝试次数。"},count:{label:"尝试次数",placeholder:"输入最大尝试次数",description:"允许的最大密码尝试次数"},expire:{label:"锁定时长",placeholder:"输入锁定时长(小时)",description:"账户锁定的持续时间(小时)"}}}},subscribe:{title:"订阅设置",description:"管理用户订阅相关配置,包括订阅链接格式、更新频率、流量统计等设置。",plan_change_enable:{title:"允许用户更改订阅",description:"开启后用户将会可以对订阅计划进行变更。"},reset_traffic_method:{title:"月流量重置方式",description:"全局流量重置方式,默认每月1号。可以在订阅管理为订阅单独设置。",options:{monthly_first:"每月1号",monthly_reset:"按月重置",no_reset:"不重置",yearly_first:"每年1月1号",yearly_reset:"按年重置"}},surplus_enable:{title:"开启折抵方案",description:"开启后用户更换订阅将会由系统对原有订阅进行折抵,方案参考文档。"},new_order_event:{title:"当订阅新购时触发事件",description:"新购订阅完成时将触发该任务。",options:{no_action:"不执行任何动作",reset_traffic:"重置用户流量"}},renew_order_event:{title:"当订阅续费时触发事件",description:"续费订阅完成时将触发该任务。",options:{no_action:"不执行任何动作",reset_traffic:"重置用户流量"}},change_order_event:{title:"当订阅变更时触发事件",description:"变更订阅完成时将触发该任务。",options:{no_action:"不执行任何动作",reset_traffic:"重置用户流量"}},subscribe_path:{title:"订阅路径",description:"订阅路径,修改后将会改变原有的subscribe路径",current_format:"当前订阅路径格式:{path}/xxxxxxxxxx"},show_info_to_server:{title:"在订阅中展示订阅信息",description:"开启后将会在用户订阅节点时输出订阅信息。"},show_protocol_to_server:{title:"在订阅中线路名称中显示协议名称",description:"开启后订阅线路会附带协议名称(例如: [Hy2]香港)"},saving:"保存中...",plan:{title:"订阅套餐",add:"添加套餐",search:"搜索套餐...",sort:{edit:"编辑排序",save:"保存排序"},columns:{id:"ID",show:"显示",sell:"新购",renew:"续费",renew_tooltip:"在订阅停止销售时,已购用户是否可以续费",name:"名称",stats:"统计",group:"权限组",price:"价格",actions:"操作",edit:"编辑",delete:"删除",delete_confirm:{title:"确认删除",description:"此操作将永久删除该订阅,删除后无法恢复。确定要继续吗?",success:"删除成功"},price_period:{monthly:"月付",quarterly:"季付",half_yearly:"半年付",yearly:"年付",two_yearly:"两年付",three_yearly:"三年付",onetime:"流量包",reset_traffic:"重置包",unit:{month:"元/月",quarter:"元/季",half_year:"元/半年",year:"元/年",two_year:"元/两年",three_year:"元/三年",times:"元/次"}}},form:{add_title:"添加套餐",edit_title:"编辑套餐",name:{label:"套餐名称",placeholder:"请输入套餐名称"},group:{label:"权限组",placeholder:"选择权限组",add:"添加权限组"},transfer:{label:"流量",placeholder:"请输入流量大小",unit:"GB"},speed:{label:"限速",placeholder:"请输入限速",unit:"Mbps"},price:{title:"售价设置",base_price:"基础月付价格",clear:{button:"清空价格",tooltip:"清空所有周期的价格设置"}},device:{label:"设备限制",placeholder:"留空则不限制",unit:"台"},capacity:{label:"容量限制",placeholder:"留空则不限制",unit:"人"},reset_method:{label:"流量重置方式",placeholder:"选择流量重置方式",description:"设置订阅流量的重置方式,不同的重置方式会影响用户的流量计算方式",options:{follow_system:"跟随系统设置",monthly_first:"每月1号",monthly_reset:"按月重置",no_reset:"不重置",yearly_first:"每年1月1日",yearly_reset:"按年重置"}},content:{label:"套餐描述",placeholder:"在这里编写套餐描述...",description:"支持 Markdown 格式,可以使用标题、列表、粗体、斜体等样式来美化描述内容",preview:"预览",preview_button:{show:"显示预览",hide:"隐藏预览"},template:{button:"使用模板",tooltip:"点击使用预设的套餐描述模板",content:`## 套餐特点 +• 高速稳定的全球网络接入 +• 支持多设备同时在线 +• 无限制的流量重置 + +## 使用说明 +1. 支持设备:iOS、Android、Windows、macOS +2. 24/7 技术支持 +3. 自动定期流量重置 + +## 注意事项 +- 禁止滥用 +- 遵守当地法律法规 +- 支持随时更换套餐`}},force_update:{label:"强制更新到用户"},submit:{submitting:"提交中...",submit:"提交",cancel:"取消",success:{add:"套餐添加成功",update:"套餐更新成功"}}},page:{description:"在这里可以配置订阅计划,包括添加、删除、编辑等操作。"}}},email:{title:"邮件设置",description:"配置系统邮件服务,用于发送验证码、密码重置、通知等邮件,支持多种SMTP服务商。",email_host:{title:"SMTP主机",description:"SMTP服务器地址,例如:smtp.gmail.com"},email_port:{title:"SMTP端口",description:"SMTP服务器端口,常用端口:25, 465, 587"},email_username:{title:"SMTP用户名",description:"SMTP认证用户名"},email_password:{title:"SMTP密码",description:"SMTP认证密码或应用专用密码"},email_encryption:{title:"加密方式",description:"邮件加密方式",none:"无",ssl:"SSL/TLS",tls:"STARTTLS"},email_from:{title:"发件人地址",description:"发件人邮箱地址"},email_from_name:{title:"发件人名称",description:"发件人显示名称"},email_template:{title:"邮件模板",description:"自定义邮件模板方式请查看文档",placeholder:"选择邮件模板"},remind_mail:{title:"邮件提醒",description:"开启后用户订阅即将到期或流量不足时会收到邮件通知。"},test:{title:"发送测试邮件",sending:"发送中...",description:"发送测试邮件以验证配置",success:"测试邮件发送成功",error:"测试邮件发送失败"}},telegram:{title:"Telegram设置",description:"配置Telegram机器人功能,实现用户通知、账户绑定、指令交互等自动化服务。",bot_token:{title:"机器人令牌",description:"请输入从Botfather获取的令牌。",placeholder:"0000000000:xxxxxxxxx_xxxxxxxxxxxxxxx"},webhook:{title:"设置Webhook",description:"设置机器人的webhook,不设置将无法收到Telegram通知。",button:"一键设置",setting:"设置中..."},bot_enable:{title:"启用机器人通知",description:"开启后机器人将向管理员和已绑定Telegram的用户发送基础通知。"},discuss_link:{title:"群组链接",description:"填写后将在用户端显示或在需要的地方使用。",placeholder:"https://t.me/xxxxxx"}},app:{title:"APP设置",description:"管理移动应用程序相关配置,包括API接口、版本控制、推送通知等功能设置。",common:{placeholder:"请输入"},windows:{version:{title:"Windows版本",description:"Windows客户端当前版本号"},download:{title:"Windows下载地址",description:"Windows客户端下载链接"}},macos:{version:{title:"macOS版本",description:"macOS客户端当前版本号"},download:{title:"macOS下载地址",description:"macOS客户端下载链接"}},android:{version:{title:"Android版本",description:"Android客户端当前版本号"},download:{title:"Android下载地址",description:"Android客户端下载链接"}}},common:{saving:"保存中...",save_success:"已自动保存",placeholder:"请输入"},invite:{title:"邀请&佣金设置",description:"邀请注册、佣金相关设置。",invite_force:{title:"开启强制邀请",description:"开启后只有被邀请的用户才可以进行注册。"},invite_commission:{title:"邀请佣金百分比",description:"默认全局的佣金分配比例,你可以在用户管理单独配置单个比例。",placeholder:"请输入佣金百分比"},invite_gen_limit:{title:"用户可创建邀请码上限",description:"用户可创建邀请码上限",placeholder:"请输入创建上限"},invite_never_expire:{title:"邀请码永不失效",description:"开启后邀请码被使用后将不会失效,否则使用过后即失效。"},commission_first_time:{title:"佣金仅首次发放",description:"开启后被邀请人首次支付时才会产生佣金,可以在用户管理对用户进行单独配置。"},commission_auto_check:{title:"佣金自动确认",description:"开启后佣金将会在订单完成3日后自动进行确认。"},commission_withdraw_limit:{title:"提现单申请门槛(元)",description:"小于门槛金额的提现单将不会被提交。",placeholder:"请输入提现门槛"},commission_withdraw_method:{title:"提现方式",description:"可以支持的提现方式,多个用逗号分隔。",placeholder:"请输入提现方式,多个用逗号分隔"},withdraw_close:{title:"关闭提现",description:"关闭后将禁止用户申请提现,且邀请佣金将会直接进入用户余额。"},commission_distribution:{title:"三级分销",description:"开启后将佣金将按照设置的3成比例进行分成,三成比例合计请不要大于100%。",l1:"一级邀请人比例",l2:"二级邀请人比例",l3:"三级邀请人比例",placeholder:"请输入比例,如:50"},saving:"保存中..."},server:{title:"节点配置",description:"配置节点通信和同步设置,包括通信密钥、轮询间隔、负载均衡等高级选项。",server_token:{title:"通讯密钥",description:"Xboard与节点通讯的密钥,以便数据不会被他人获取。",placeholder:"请输入通讯密钥",generate_tooltip:"点击生成随机通信密钥"},server_pull_interval:{title:"节点拉取动作轮询间隔",description:"节点从面板获取数据的间隔频率。",placeholder:"请输入拉取间隔"},server_push_interval:{title:"节点推送动作轮询间隔",description:"节点推送数据到面板的间隔频率。",placeholder:"请输入推送间隔"},device_limit_mode:{title:"设备限制模式",description:"宽松模式下,同一IP地址使用多个节点只统计为一个设备。",strict:"严格模式",relaxed:"宽松模式",placeholder:"请选择设备限制模式"},saving:"保存中...",manage:{title:"节点管理",description:"管理所有节点,包括添加、删除、编辑等操作。"}}},wc={trafficRecord:{title:"流量使用记录",time:"时间",upload:"上行流量",download:"下行流量",rate:"倍率",total:"总计",noRecords:"暂无记录",perPage:"每页显示",records:"条记录",page:"第 {{current}} / {{total}} 页",multiplier:"{{value}}x"}},Cc={title:"工单管理",description:"在这里可以查看用户工单,包括查看、回复、关闭等操作。",columns:{id:"工单号",subject:"主题",level:"优先级",status:"状态",updated_at:"最后更新",created_at:"创建时间",actions:"操作"},status:{closed:"已关闭",replied:"已回复",pending:"待回复",processing:"处理中"},level:{low:"低",medium:"中",high:"高"},filter:{placeholder:"搜索{field}...",no_results:"未找到结果",selected:"已选择 {count} 项",clear:"清除筛选"},actions:{view_details:"查看详情",close_ticket:"关闭工单",close_confirm_title:"确认关闭工单",close_confirm_description:"关闭后将无法继续回复,是否确认关闭该工单?",close_confirm_button:"关闭工单",close_success:"工单已关闭",view_ticket:"查看工单"},detail:{no_messages:"暂无消息记录",created_at:"创建于",user_info:"用户信息",traffic_records:"流量记录",order_records:"订单记录",input:{closed_placeholder:"工单已关闭",reply_placeholder:"请输入回复内容...",sending:"发送中...",send:"发送"}}},Sc={manage:{title:"用户管理",description:"在这里可以管理用户,包括增加、删除、编辑、查询等操作。"},columns:{is_admin:"管理员",is_staff:"员工",id:"ID",email:"邮箱",online_count:"在线设备",status:"状态",subscription:"订阅",group:"权限组",used_traffic:"已用流量",total_traffic:"总流量",expire_time:"到期时间",balance:"余额",commission:"佣金",register_time:"注册时间",actions:"操作",device_limit:{unlimited:"无设备数限制",limited:"最多可同时在线 {{count}} 台设备"},status_text:{normal:"正常",banned:"封禁"},online_status:{online:"当前在线",never:"从未在线",last_online:"最后在线时间: {{time}}",offline_duration:{days:"离线时长: {{count}}天",hours:"离线时长: {{count}}小时",minutes:"离线时长: {{count}}分钟",seconds:"离线时长: {{count}}秒"}},expire_status:{permanent:"长期有效",expired:"已过期 {{days}} 天",remaining:"剩余 {{days}} 天"},actions_menu:{edit:"编辑",assign_order:"分配订单",copy_url:"复制订阅URL",reset_secret:"重置UUID及订阅URL",orders:"TA的订单",invites:"TA的邀请",traffic_records:"TA的流量记录"}},filter:{selected:"已选择 {{count}} 项",no_results:"未找到结果",clear:"清除筛选",search_placeholder:"搜索...",email_search:"搜索用户邮箱...",advanced:"高级筛选",reset:"重置筛选",sheet:{title:"高级筛选",description:"添加一个或多个筛选条件来精确查找用户",conditions:"筛选条件",add:"添加条件",condition:"条件 {{number}}",field:"选择字段",operator:"选择操作符",value:"输入值",value_number:"输入数值({{unit}})",reset:"重置",apply:"应用筛选"},fields:{email:"邮箱",id:"用户ID",plan_id:"订阅",transfer_enable:"流量",total_used:"已用流量",online_count:"在线设备",expired_at:"到期时间",uuid:"UUID",token:"Token",banned:"账号状态",remark:"备注",inviter_email:"邀请人邮箱",invite_user_id:"邀请人ID",is_admin:"管理员",is_staff:"员工"},operators:{contains:"包含",eq:"等于",gt:"大于",lt:"小于"},status:{normal:"正常",banned:"禁用"},boolean:{true:"是",false:"否"}},generate:{button:"创建用户",title:"创建用户",form:{email:"邮箱",email_prefix:"帐号(批量生成请留空)",email_domain:"域",password:"密码",password_placeholder:"留空则密码与邮件相同",expire_time:"到期时间",expire_time_placeholder:"请选择用户到期日期,留空为长期有效",permanent:"长期有效",subscription:"订阅计划",subscription_none:"无",generate_count:"生成数量",generate_count_placeholder:"如果为批量生产请输入生成数量",cancel:"取消",submit:"生成",success:"生成成功"}},edit:{button:"编辑用户信息",title:"用户管理",form:{email:"邮箱",email_placeholder:"请输入邮箱",inviter_email:"邀请人邮箱",inviter_email_placeholder:"请输入邮箱",password:"密码",password_placeholder:"如需修改密码请输入",balance:"余额",balance_placeholder:"请输入余额",commission_balance:"佣金余额",commission_balance_placeholder:"请输入佣金余额",upload:"已用上行",upload_placeholder:"已用上行",download:"已用下行",download_placeholder:"已用下行",total_traffic:"流量",total_traffic_placeholder:"请输入流量",expire_time:"到期时间",expire_time_placeholder:"请选择用户到期日期,留空为长期有效",expire_time_specific:"具体时间",expire_time_today:"设为当天结束",expire_time_permanent:"长期有效",expire_time_1month:"一个月",expire_time_3months:"三个月",expire_time_confirm:"确定",subscription:"订阅计划",subscription_none:"无",account_status:"账户状态",commission_type:"佣金类型",commission_type_system:"跟随系统设置",commission_type_cycle:"循环返利",commission_type_onetime:"首次返利",commission_rate:"推荐返利比例",commission_rate_placeholder:"为空则跟随站点设置返利比例",discount:"专享折扣比例",discount_placeholder:"为空则不享受专享折扣",speed_limit:"限速",speed_limit_placeholder:"留空则不限速",device_limit:"设备限制",device_limit_placeholder:"留空则不限制",is_admin:"是否管理员",is_staff:"是否员工",remarks:"备注",remarks_placeholder:"请在这里记录",cancel:"取消",submit:"提交",success:"修改成功"}}},kc={title:"路由管理",description:"管理所有路由组,包括添加、删除、编辑等操作。",columns:{id:"组ID",remarks:"备注",action:"动作",actions:"操作",matchRules:"匹配{{count}}条规则"},actions:{dns:"指定DNS服务器进行解析",block:"禁止访问"},form:{add:"添加路由",edit:"编辑路由",create:"创建路由",remarks:"备注",remarksPlaceholder:"请输入备注",match:"匹配规则",matchPlaceholder:`example.com +*.example.com`,action:"动作",actionPlaceholder:"请选择动作",dns:"DNS服务器",dnsPlaceholder:"请输入DNS服务器",cancel:"取消",submit:"提交",validation:{remarks:"请输入有效的备注"}},toolbar:{searchPlaceholder:"搜索路由...",reset:"重置"},messages:{deleteConfirm:"确认删除",deleteDescription:"此操作将永久删除该路由组,删除后无法恢复。确定要继续吗?",deleteButton:"删除",deleteSuccess:"删除成功",createSuccess:"创建成功",updateSuccess:"更新成功"}},Pc={title:"支付配置",description:"在这里可以配置支付方式,包括支付宝、微信等。",table:{columns:{id:"ID",enable:"启用",name:"显示名称",payment:"支付接口",notify_url:"通知地址",notify_url_tooltip:"支付网关将会把数据通知到本地址,请通过防火墙放行本地址。",actions:"操作"},actions:{edit:"编辑",delete:{title:"删除确认",description:"确定要删除该支付方式吗?此操作无法撤销。",success:"删除成功"}},toolbar:{search:"搜索支付方式...",reset:"重置",sort:{hint:"拖拽支付方式进行排序,完成后点击保存",save:"保存排序",edit:"编辑排序"}}},form:{add:{button:"添加支付方式",title:"添加支付方式"},edit:{title:"编辑支付方式"},fields:{name:{label:"显示名称",placeholder:"请输入支付名称",description:"用于前端显示"},icon:{label:"图标URL",placeholder:"https://example.com/icon.svg",description:"用于前端显示的图标地址"},notify_domain:{label:"通知域名",placeholder:"https://example.com",description:"网关通知将发送到该域名"},handling_fee_percent:{label:"百分比手续费(%)",placeholder:"0-100"},handling_fee_fixed:{label:"固定手续费",placeholder:"0"},payment:{label:"支付接口",placeholder:"请选择支付接口",description:"选择要使用的支付接口"}},validation:{name:{min:"名称至少需要2个字符",max:"名称不能超过30个字符"},notify_domain:{url:"请输入有效的URL"},payment:{required:"请选择支付接口"}},buttons:{cancel:"取消",submit:"提交"},messages:{success:"保存成功"}}},Tc={title:"公告管理",description:"在这里可以配置公告,包括添加、删除、编辑等操作。",table:{columns:{id:"ID",show:"显示状态",title:"标题",actions:"操作"},toolbar:{search:"搜索公告标题...",reset:"重置",sort:{edit:"编辑排序",save:"保存排序"}},actions:{edit:"编辑",delete:{title:"删除确认",description:"确定要删除该条公告吗?此操作无法撤销。",success:"删除成功"}}},form:{add:{title:"添加公告",button:"添加公告"},edit:{title:"编辑公告"},fields:{title:{label:"标题",placeholder:"请输入公告标题"},content:{label:"公告内容"},img_url:{label:"公告背景",placeholder:"请输入公告背景图片URL"},show:{label:"显示"},tags:{label:"节点标签",placeholder:"输入后回车添加标签"}},buttons:{cancel:"取消",submit:"提交",success:"提交成功"}}},Dc={title:"主题配置",description:"主题配置,包括主题色、字体大小等。如果你采用前后分离的方式部署V2board,那么主题配置将不会生效。",upload:{button:"上传主题",title:"上传主题",description:"请上传一个有效的主题压缩包(.zip 格式)。主题包应包含完整的主题文件结构。",dragText:"将主题文件拖放到此处,或者",clickText:"点击选择",supportText:"支持 .zip 格式的主题包",uploading:"正在上传...",error:{format:"只支持上传 ZIP 格式的主题文件"}},preview:{title:"主题预览",imageCount:"{{current}} / {{total}}"},card:{version:"版本: {{version}}",currentTheme:"当前主题",activateTheme:"激活主题",configureTheme:"主题设置",preview:"预览",delete:{title:"删除主题",description:"确定要删除该主题吗?删除后无法恢复。",button:"删除",error:{active:"不能删除当前使用的主题"}}},config:{title:"配置{{name}}主题",description:"修改主题的样式、布局和其他显示选项。",cancel:"取消",save:"保存",success:"保存成功"}},Rc={title:"优惠券管理",description:"在这里可以查看优惠券,包括增加、查看、删除等操作。",table:{columns:{id:"ID",show:"启用",name:"卷名称",type:"类型",code:"卷码",limitUse:"剩余次数",limitUseWithUser:"可用次数/用户",validity:"有效期",actions:"操作"},validity:{expired:"已过期{{days}}天",notStarted:"{{days}}天后开始",remaining:"剩余{{days}}天",startTime:"开始时间",endTime:"结束时间",unlimited:"无限次",noLimit:"无限制"},actions:{edit:"编辑",delete:"删除",deleteConfirm:{title:"确认删除",description:"此操作将永久删除该优惠券,删除后无法恢复。确定要继续吗?",confirmText:"删除"}},toolbar:{search:"搜索优惠券...",type:"类型",reset:"重置",types:{1:"按金额优惠",2:"按比例优惠"}}},form:{add:"添加优惠券",edit:"编辑优惠券",name:{label:"优惠券名称",placeholder:"请输入优惠券名称",required:"请输入优惠券名称"},type:{label:"优惠券类型和值",placeholder:"优惠券类型"},value:{placeholder:"请输入值"},validity:{label:"优惠券有效期",to:"至",endTimeError:"结束时间必须晚于开始时间"},limitUse:{label:"最大使用次数",placeholder:"限制最大使用次数,留空则不限制",description:"设置优惠券的总使用次数限制,留空表示不限制使用次数"},limitUseWithUser:{label:"每个用户可使用次数",placeholder:"限制每个用户可使用次数,留空则不限制",description:"限制每个用户可使用该优惠券的次数,留空表示不限制单用户使用次数"},limitPeriod:{label:"指定周期",placeholder:"限制指定周期可以使用优惠,留空则不限制",description:"选择可以使用优惠券的订阅周期,留空表示不限制使用周期",empty:"没有找到匹配的周期"},limitPlan:{label:"指定订阅",placeholder:"限制指定订阅可以使用优惠,留空则不限制",empty:"没有找到匹配的订阅"},code:{label:"自定义优惠码",placeholder:"自定义优惠码,留空则自动生成",description:"可以自定义优惠码,留空则系统自动生成"},generateCount:{label:"批量生成数量",placeholder:"批量生成优惠码数量,留空则生成单个",description:"批量生成多个优惠码,留空则只生成单个优惠码"},submit:{saving:"保存中...",save:"保存"},error:{saveFailed:"保存优惠券失败"}}},Ec={title:"权限组管理",description:"管理所有权限组,包括添加、删除、编辑等操作。",columns:{id:"组ID",name:"组名称",usersCount:"用户数量",serverCount:"节点数量",actions:"操作"},form:{add:"添加权限组",edit:"编辑权限组",create:"创建权限组",update:"更新",name:"组名称",namePlaceholder:"请输入权限组名称",nameDescription:"权限组名称用于标识不同的用户组,建议使用有意义的名称。",cancel:"取消",editDescription:"修改权限组信息,更新后会立即生效。",createDescription:"创建新的权限组,可以为不同的用户分配不同的权限。"},toolbar:{searchPlaceholder:"搜索权限组...",reset:"重置"},messages:{deleteConfirm:"确认删除",deleteDescription:"此操作将永久删除该权限组,删除后无法恢复。确定要继续吗?",deleteButton:"删除",createSuccess:"创建成功",updateSuccess:"更新成功",nameValidation:{min:"组名至少需要2个字符",max:"组名不能超过50个字符",pattern:"组名只能包含字母、数字、中文、下划线和连字符"}}},Ic={title:"知识库管理",description:"在这里可以配置知识库,包括添加、删除、编辑等操作。",columns:{id:"ID",status:"状态",title:"标题",category:"分类",actions:"操作"},form:{add:"添加知识",edit:"编辑知识",title:"标题",titlePlaceholder:"请输入知识标题",category:"分类",categoryPlaceholder:"请输入分类,分类将会自动归类",language:"语言",languagePlaceholder:"请选择语言",content:"内容",show:"显示",cancel:"取消",submit:"提交"},languages:{"en-US":"English","ja-JP":"日本語","ko-KR":"한국어","vi-VN":"Tiếng Việt","zh-CN":"简体中文","zh-TW":"繁體中文"},messages:{deleteConfirm:"确认删除",deleteDescription:"此操作将永久删除该知识库记录,删除后无法恢复。确定要继续吗?",deleteButton:"删除",operationSuccess:"操作成功"},toolbar:{searchPlaceholder:"搜索知识...",reset:"重置",sortModeHint:"拖拽知识条目进行排序,完成后点击保存",editSort:"编辑排序",saveSort:"保存排序"}},Mc={en:{common:Jo,dashboard:Qo,search:Zo,nav:Xo,sidebar:ec,server:sc,subscribe:tc,order:ac,settings:nc,traffic:rc,ticket:lc,user:ic,route:oc,payment:cc,notice:dc,theme:mc,coupon:uc,group:hc,knowledge:xc},zh:{common:pc,dashboard:fc,search:gc,nav:jc,sidebar:vc,server:bc,subscribe:yc,order:_c,settings:Nc,traffic:wc,ticket:Cc,user:Sc,route:kc,payment:Pc,notice:Tc,theme:Dc,coupon:Rc,group:Ec,knowledge:Ic}};xl.use(pl).use(fl).init({resources:Mc,fallbackLng:"en",supportedLngs:["en","zh"],ns:["common","dashboard","search","nav","sidebar","server","subscribe","order","settings","traffic","ticket","user","route","payment","notice","theme","coupon","group","knowledge"],defaultNS:"common",fallbackNS:"common",detection:{order:["localStorage","navigator"],caches:["localStorage"]},interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Oc=new gl;jl.createRoot(document.getElementById("root")).render(e.jsx(vl.StrictMode,{children:e.jsx(bl,{client:Oc,children:e.jsx(yl,{store:Xn,children:e.jsxs(ko,{defaultTheme:"light",storageKey:"vite-ui-theme",children:[e.jsx(_l,{router:zo}),e.jsx(Nl,{richColors:!0,position:"top-right"})]})})})}));const qe=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("rounded-xl border bg-card text-card-foreground shadow",s),...n}));qe.displayName="Card";const ss=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex flex-col space-y-1.5 p-6",s),...n}));ss.displayName="CardHeader";const bs=m.forwardRef(({className:s,...n},a)=>e.jsx("h3",{ref:a,className:y("font-semibold leading-none tracking-tight",s),...n}));bs.displayName="CardTitle";const tt=m.forwardRef(({className:s,...n},a)=>e.jsx("p",{ref:a,className:y("text-sm text-muted-foreground",s),...n}));tt.displayName="CardDescription";const ts=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("p-6 pt-0",s),...n}));ts.displayName="CardContent";const Vc=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex items-center p-6 pt-0",s),...n}));Vc.displayName="CardFooter";const Lc=Ts("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Nt=m.forwardRef(({className:s,...n},a)=>e.jsx(Ga,{ref:a,className:y(Lc(),s),...n}));Nt.displayName=Ga.displayName;const he=wl,er=m.createContext({}),j=({...s})=>e.jsx(er.Provider,{value:{name:s.name},children:e.jsx(Cl,{...s})}),Et=()=>{const s=m.useContext(er),n=m.useContext(sr),{getFieldState:a,formState:l}=Sl(),r=a(s.name,l);if(!s)throw new Error("useFormField should be used within ");const{id:c}=n;return{id:c,name:s.name,formItemId:`${c}-form-item`,formDescriptionId:`${c}-form-item-description`,formMessageId:`${c}-form-item-message`,...r}},sr=m.createContext({}),g=m.forwardRef(({className:s,...n},a)=>{const l=m.useId();return e.jsx(sr.Provider,{value:{id:l},children:e.jsx("div",{ref:a,className:y("space-y-2",s),...n})})});g.displayName="FormItem";const v=m.forwardRef(({className:s,...n},a)=>{const{error:l,formItemId:r}=Et();return e.jsx(Nt,{ref:a,className:y(l&&"text-destructive",s),htmlFor:r,...n})});v.displayName="FormLabel";const _=m.forwardRef(({...s},n)=>{const{error:a,formItemId:l,formDescriptionId:r,formMessageId:c}=Et();return e.jsx(Xt,{ref:n,id:l,"aria-describedby":a?`${r} ${c}`:`${r}`,"aria-invalid":!!a,...s})});_.displayName="FormControl";const O=m.forwardRef(({className:s,...n},a)=>{const{formDescriptionId:l}=Et();return e.jsx("p",{ref:a,id:l,className:y("text-[0.8rem] text-muted-foreground",s),...n})});O.displayName="FormDescription";const D=m.forwardRef(({className:s,children:n,...a},l)=>{const{error:r,formMessageId:c}=Et(),o=r?String(r?.message):n;return o?e.jsx("p",{ref:l,id:c,className:y("text-[0.8rem] font-medium text-destructive",s),...a,children:o}):null});D.displayName="FormMessage";const T=m.forwardRef(({className:s,type:n,...a},l)=>e.jsx("input",{type:n,className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:l,...a}));T.displayName="Input";const tr=m.forwardRef(({className:s,...n},a)=>{const[l,r]=m.useState(!1);return e.jsxs("div",{className:"relative rounded-md",children:[e.jsx("input",{type:l?"text":"password",className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...n}),e.jsx(R,{type:"button",size:"icon",variant:"ghost",className:"absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 rounded-md text-muted-foreground",onClick:()=>r(c=>!c),children:l?e.jsx(kl,{size:18}):e.jsx(Pl,{size:18})})]})});tr.displayName="PasswordInput";const Ac=s=>L({url:"/passport/auth/login",method:"post",data:s}),Yt=s=>s;function me(s=void 0,n="YYYY-MM-DD HH:mm:ss"){return s==null?"":(Math.floor(s).toString().length===10&&(s=s*1e3),Dl(s).format(n))}function Fc(s=void 0,n="YYYY-MM-DD"){return me(s,n)}function zs(s){const n=typeof s=="string"?parseFloat(s):s;return isNaN(n)?"0.00":n.toFixed(2)}function ks(s,n=!0){if(s==null)return n?"¥0.00":"0.00";const a=typeof s=="string"?parseFloat(s):s;if(isNaN(a))return n?"¥0.00":"0.00";const r=(a/100).toFixed(2).replace(/\.?0+$/,c=>c.includes(".")?".00":c);return n?`¥${r}`:r}function wt(s){navigator.clipboard?navigator.clipboard.writeText(s).then(()=>{$.success(Yt("复制成功"))}).catch(n=>{console.error("复制到剪贴板时出错:",n),Ma(s)}):Ma(s)}function Ma(s){const n=document.createElement("button"),a=new Tl(n,{text:()=>s});a.on("success",()=>{$.success(Yt("复制成功")),a.destroy()}),a.on("error",()=>{$.error(Yt("复制失败")),a.destroy()}),n.click()}function Ze(s){const n=s/1024,a=n/1024,l=a/1024,r=l/1024;return r>=1?zs(r)+" TB":l>=1?zs(l)+" GB":a>=1?zs(a)+" MB":zs(n)+" KB"}const zc="access_token";function Uc(s){Rt.set(zc,s)}const $c=x.object({email:x.string().min(1,{message:"请输入邮箱地址"}).email({message:"邮箱地址格式不正确"}),password:x.string().min(1,{message:"请输入密码"}).min(7,{message:"密码长度至少为7个字符"})});function Hc({className:s,onForgotPassword:n,...a}){const l=os(),r=Ka(),c=ce({resolver:ue($c),defaultValues:{email:"",password:""}});async function o(u){Ac(u).then(({data:h})=>{Uc(h.auth_data),r(Ko(h.auth_data)),r(Xs()).unwrap(),l("/")})}return e.jsx("div",{className:y("grid gap-6",s),...a,children:e.jsx(he,{...c,children:e.jsx("form",{onSubmit:c.handleSubmit(o),children:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{control:c.control,name:"email",render:({field:u})=>e.jsxs(g,{className:"space-y-1",children:[e.jsx(v,{children:"邮箱地址"}),e.jsx(_,{children:e.jsx(T,{placeholder:"name@example.com",...u})}),e.jsx(D,{})]})}),e.jsx(j,{control:c.control,name:"password",render:({field:u})=>e.jsxs(g,{className:"space-y-1",children:[e.jsx(v,{children:"密码"}),e.jsx(_,{children:e.jsx(tr,{placeholder:"请输入密码",...u})}),e.jsx(D,{})]})}),e.jsx(R,{className:"mt-2",loading:c.formState.isSubmitting,children:"登录"}),e.jsx(R,{variant:"link",type:"button",className:"mt-1 text-sm text-muted-foreground hover:text-primary",onClick:n,children:"忘记密码?"})]})})})})}const ge=Ba,Oe=Wa,qc=Ya,dt=ta,ar=m.forwardRef(({className:s,...n},a)=>e.jsx(St,{ref:a,className:y("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",s),...n}));ar.displayName=St.displayName;const xe=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(qc,{children:[e.jsx(ar,{}),e.jsxs(kt,{ref:l,className:y("max-h-[95%] overflow-auto 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",s),...a,children:[n,e.jsxs(ta,{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:[e.jsx(Le,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));xe.displayName=kt.displayName;const ve=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",s),...n});ve.displayName="DialogHeader";const Ve=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});Ve.displayName="DialogFooter";const je=m.forwardRef(({className:s,...n},a)=>e.jsx(Pt,{ref:a,className:y("text-lg font-semibold leading-none tracking-tight",s),...n}));je.displayName=Pt.displayName;const Te=m.forwardRef(({className:s,...n},a)=>e.jsx(Tt,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));Te.displayName=Tt.displayName;const $s=Ts("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_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"}}),J=m.forwardRef(({className:s,variant:n,size:a,asChild:l=!1,...r},c)=>{const o=l?Xt:"button";return e.jsx(o,{className:y($s({variant:n,size:a,className:s})),ref:c,...r})});J.displayName="Button";function Gc(){const[s,n]=m.useState(!1),a="php artisan reset:password 管理员邮箱";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"container grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0",children:e.jsxs("div",{className:"mx-auto flex w-full flex-col justify-center space-y-2 sm:w-[480px] lg:p-8",children:[e.jsx("div",{className:"mb-4 flex items-center justify-center",children:e.jsx("h1",{className:"text-3xl font-medium",children:window?.settings?.title})}),e.jsxs(qe,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-left",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"登录"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"请输入您的邮箱和密码登录系统"})]}),e.jsx(Hc,{onForgotPassword:()=>n(!0)})]})]})}),e.jsx(ge,{open:s,onOpenChange:n,children:e.jsx(xe,{children:e.jsxs(ve,{children:[e.jsx(je,{children:"忘记密码"}),e.jsx(Te,{children:"在站点目录下执行以下命令找回密码"}),e.jsx("div",{className:"mt-2",children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"rounded-md bg-secondary p-4 pr-12",children:a}),e.jsx(J,{variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 hover:bg-secondary-foreground/10",onClick:()=>wt(a),children:e.jsx(Rl,{className:"h-4 w-4"})})]})})]})})})]})}const Kc=Object.freeze(Object.defineProperty({__proto__:null,default:Gc},Symbol.toStringTag,{value:"Module"})),we=m.forwardRef(({className:s,fadedBelow:n=!1,fixedHeight:a=!1,...l},r)=>e.jsx("div",{ref:r,className:y("relative flex h-full w-full flex-col",n&&"after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:hidden after:h-32 after:w-full after:bg-[linear-gradient(180deg,_transparent_10%,_hsl(var(--background))_70%)] after:md:block",a&&"md:h-svh",s),...l}));we.displayName="Layout";const Ce=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex h-[var(--header-height)] flex-none items-center gap-4 bg-background p-4 md:px-8",s),...n}));Ce.displayName="LayoutHeader";const ke=m.forwardRef(({className:s,fixedHeight:n,...a},l)=>e.jsx("div",{ref:l,className:y("flex-1 overflow-hidden px-4 py-6 md:px-8",n&&"h-[calc(100%-var(--header-height))]",s),...a}));ke.displayName="LayoutBody";const nr=El,rr=Il,lr=Ml,ys=Ll,_s=Al,Bc=Fl,Wc=m.forwardRef(({className:s,inset:n,children:a,...l},r)=>e.jsxs(Ja,{ref:r,className:y("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",s),...l,children:[a,e.jsx(aa,{className:"ml-auto h-4 w-4"})]}));Wc.displayName=Ja.displayName;const Yc=m.forwardRef(({className:s,...n},a)=>e.jsx(Qa,{ref:a,className:y("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",s),...n}));Yc.displayName=Qa.displayName;const is=m.forwardRef(({className:s,sideOffset:n=4,...a},l)=>e.jsx(Ol,{children:e.jsx(Za,{ref:l,sideOffset:n,className:y("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",s),...a})}));is.displayName=Za.displayName;const pe=m.forwardRef(({className:s,inset:n,...a},l)=>e.jsx(Xa,{ref:l,className:y("relative flex cursor-default cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",s),...a}));pe.displayName=Xa.displayName;const Jc=m.forwardRef(({className:s,children:n,checked:a,...l},r)=>e.jsxs(en,{ref:r,className:y("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",s),checked:a,...l,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(sn,{children:e.jsx(Ds,{className:"h-4 w-4"})})}),n]}));Jc.displayName=en.displayName;const Qc=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(tn,{ref:l,className:y("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",s),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(sn,{children:e.jsx(Vl,{className:"h-4 w-4 fill-current"})})}),n]}));Qc.displayName=tn.displayName;const oa=m.forwardRef(({className:s,inset:n,...a},l)=>e.jsx(an,{ref:l,className:y("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",s),...a}));oa.displayName=an.displayName;const at=m.forwardRef(({className:s,...n},a)=>e.jsx(nn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...n}));at.displayName=nn.displayName;const Jt=({className:s,...n})=>e.jsx("span",{className:y("ml-auto text-xs tracking-widest opacity-60",s),...n});Jt.displayName="DropdownMenuShortcut";const oe=zl,re=Ul,le=$l,te=m.forwardRef(({className:s,sideOffset:n=4,...a},l)=>e.jsx(rn,{ref:l,sideOffset:n,className:y("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",s),...a}));te.displayName=rn.displayName;function It(){const{pathname:s}=ea();return{checkActiveNav:a=>{if(a==="/"&&s==="/")return!0;const l=a.replace(/^\//,""),r=s.replace(/^\//,"");return l?r.startsWith(l):!1}}}function ir({key:s,defaultValue:n}){const[a,l]=m.useState(()=>{const r=localStorage.getItem(s);return r!==null?JSON.parse(r):n});return m.useEffect(()=>{localStorage.setItem(s,JSON.stringify(a))},[a,s]),[a,l]}function Zc(){const[s,n]=ir({key:"collapsed-sidebar-items",defaultValue:[]}),a=r=>!s.includes(r);return{isExpanded:a,toggleItem:r=>{a(r)?n([...s,r]):n(s.filter(c=>c!==r))}}}function Xc({links:s,isCollapsed:n,className:a,closeNav:l}){const{t:r}=M(),c=({sub:o,...u})=>{const h=`${r(u.title)}-${u.href}`;return n&&o?m.createElement(td,{...u,sub:o,key:h,closeNav:l}):n?m.createElement(sd,{...u,key:h,closeNav:l}):o?m.createElement(ed,{...u,sub:o,key:h,closeNav:l}):m.createElement(or,{...u,key:h,closeNav:l})};return e.jsx("div",{"data-collapsed":n,className:y("group border-b bg-background py-2 transition-[max-height,padding] duration-500 data-[collapsed=true]:py-2 md:border-none",a),children:e.jsx(oe,{delayDuration:0,children:e.jsx("nav",{className:"grid gap-1 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2",children:s.map(c)})})})}function or({title:s,icon:n,label:a,href:l,closeNav:r,subLink:c=!1}){const{checkActiveNav:o}=It(),{t:u}=M();return e.jsxs(Rs,{to:l,onClick:r,className:y(Hs({variant:o(l)?"secondary":"ghost",size:"sm"}),"h-12 justify-start text-wrap rounded-none px-6",c&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":o(l)?"page":void 0,children:[e.jsx("div",{className:"mr-2",children:n}),u(s),a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:u(a)})]})}function ed({title:s,icon:n,label:a,sub:l,closeNav:r}){const{checkActiveNav:c}=It(),{isExpanded:o,toggleItem:u}=Zc(),{t:h}=M(),i=!!l?.find(P=>c(P.href)),d=h(s),f=o(d)||i;return e.jsxs(nr,{open:f,onOpenChange:()=>u(d),children:[e.jsxs(rr,{className:y(Hs({variant:i?"secondary":"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[e.jsx("div",{className:"mr-2",children:n}),h(s),a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:h(a)}),e.jsx("span",{className:y('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:e.jsx(ln,{stroke:1})})]}),e.jsx(lr,{className:"collapsibleDropdown",asChild:!0,children:e.jsx("ul",{children:l.map(P=>e.jsx("li",{className:"my-1 ml-8",children:e.jsx(or,{...P,subLink:!0,closeNav:r})},h(P.title)))})})]})}function sd({title:s,icon:n,label:a,href:l,closeNav:r}){const{checkActiveNav:c}=It(),{t:o}=M();return e.jsxs(re,{delayDuration:0,children:[e.jsx(le,{asChild:!0,children:e.jsxs(Rs,{to:l,onClick:r,className:y(Hs({variant:c(l)?"secondary":"ghost",size:"icon"}),"h-12 w-12"),children:[n,e.jsx("span",{className:"sr-only",children:o(s)})]})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[o(s),a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:o(a)})]})]})}function td({title:s,icon:n,label:a,sub:l,closeNav:r}){const{checkActiveNav:c}=It(),{t:o}=M(),u=!!l?.find(h=>c(h.href));return e.jsxs(ys,{children:[e.jsxs(re,{delayDuration:0,children:[e.jsx(le,{asChild:!0,children:e.jsx(_s,{asChild:!0,children:e.jsx(R,{variant:u?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:n})})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[o(s)," ",a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:o(a)}),e.jsx(ln,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),e.jsxs(is,{side:"right",align:"start",sideOffset:4,children:[e.jsxs(oa,{children:[o(s)," ",a?`(${o(a)})`:""]}),e.jsx(at,{}),l.map(({title:h,icon:i,label:d,href:f})=>e.jsx(pe,{asChild:!0,children:e.jsxs(Rs,{to:f,onClick:r,className:`${c(f)?"bg-secondary":""}`,children:[i," ",e.jsx("span",{className:"ml-2 max-w-52 text-wrap",children:o(h)}),d&&e.jsx("span",{className:"ml-auto text-xs",children:o(d)})]})},`${o(h)}-${f}`))]})]})}const cr=[{title:"nav:dashboard",label:"",href:"/",icon:e.jsx(Hl,{size:18})},{title:"nav:systemManagement",label:"",href:"",icon:e.jsx(ql,{size:18}),sub:[{title:"nav:systemConfig",label:"",href:"/config/system",icon:e.jsx(on,{size:18})},{title:"nav:themeConfig",label:"",href:"/config/theme",icon:e.jsx(Gl,{size:18})},{title:"nav:noticeManagement",label:"",href:"/config/notice",icon:e.jsx(Kl,{size:18})},{title:"nav:paymentConfig",label:"",href:"/config/payment",icon:e.jsx(wa,{size:18})},{title:"nav:knowledgeManagement",label:"",href:"/config/knowledge",icon:e.jsx(Bl,{size:18})}]},{title:"nav:nodeManagement",label:"",href:"",icon:e.jsx(cn,{size:18}),sub:[{title:"nav:nodeManagement",label:"",href:"/server/manage",icon:e.jsx(Wl,{size:18})},{title:"nav:permissionGroupManagement",label:"",href:"/server/group",icon:e.jsx(dn,{size:18})},{title:"nav:routeManagement",label:"",href:"/server/route",icon:e.jsx(Yl,{size:18})}]},{title:"nav:subscriptionManagement",label:"",href:"",icon:e.jsx(Jl,{size:18}),sub:[{title:"nav:planManagement",label:"",href:"/finance/plan",icon:e.jsx(Ql,{size:18})},{title:"nav:orderManagement",label:"",href:"/finance/order",icon:e.jsx(wa,{size:18})},{title:"nav:couponManagement",label:"",href:"/finance/coupon",icon:e.jsx(Zl,{size:18})}]},{title:"nav:userManagement",label:"",href:"",icon:e.jsx(Xl,{size:18}),sub:[{title:"nav:userManagement",label:"",href:"/user/manage",icon:e.jsx(ei,{size:18})},{title:"nav:ticketManagement",label:"",href:"/user/ticket",icon:e.jsx(mn,{size:18})}]}];function ad({className:s,isCollapsed:n,setIsCollapsed:a}){const[l,r]=m.useState(!1),{t:c}=M();return m.useEffect(()=>{l?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden")},[l]),e.jsxs("aside",{className:y(`fixed left-0 right-0 top-0 z-50 w-full border-r-2 border-r-muted transition-[width] md:bottom-0 md:right-auto md:h-svh ${n?"md:w-14":"md:w-64"}`,s),children:[e.jsx("div",{onClick:()=>r(!1),className:`absolute inset-0 transition-[opacity] delay-100 duration-700 ${l?"h-svh opacity-50":"h-0 opacity-0"} w-full bg-black md:hidden`}),e.jsxs(we,{children:[e.jsxs(Ce,{className:"sticky top-0 justify-between px-4 py-3 shadow md:px-4",children:[e.jsxs("div",{className:`flex items-center ${n?"":"gap-2"}`,children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:`transition-all ${n?"h-6 w-6":"h-8 w-8"}`,children:[e.jsx("rect",{width:"256",height:"256",fill:"none"}),e.jsx("line",{x1:"208",y1:"128",x2:"128",y2:"208",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("line",{x1:"192",y1:"40",x2:"40",y2:"192",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("span",{className:"sr-only",children:"Website Name"})]}),e.jsx("div",{className:`flex flex-col justify-end truncate ${n?"invisible w-0":"visible w-auto"}`,children:e.jsx("span",{className:"font-medium",children:window?.settings?.title})})]}),e.jsx(R,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":c("common:toggleNavigation"),"aria-controls":"sidebar-menu","aria-expanded":l,onClick:()=>r(o=>!o),children:l?e.jsx(si,{}):e.jsx(ti,{})})]}),e.jsx(Xc,{id:"sidebar-menu",className:`h-full flex-1 overflow-auto ${l?"max-h-screen":"max-h-0 py-0 md:max-h-screen md:py-2"}`,closeNav:()=>r(!1),isCollapsed:n,links:cr}),e.jsx("div",{className:y("px-4 py-3 text-xs text-muted-foreground/70 border-t border-border/50 bg-muted/20","transition-all duration-200 ease-in-out",n?"text-center":"text-left"),children:e.jsxs("div",{className:y("flex items-center gap-1.5",n?"justify-center":"justify-start"),children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500/70"}),e.jsxs("span",{className:"tracking-wide",children:["v",window?.settings?.version]})]})}),e.jsx(R,{onClick:()=>a(o=>!o),size:"icon",variant:"outline",className:"absolute -right-5 top-1/2 hidden rounded-full md:inline-flex","aria-label":c("common:toggleSidebar"),children:e.jsx(ai,{stroke:1.5,className:`h-5 w-5 ${n?"rotate-180":""}`})})]})]})}function nd(){const[s,n]=ir({key:"collapsed-sidebar",defaultValue:!1});return m.useEffect(()=>{const a=()=>{n(window.innerWidth<768?!1:s)};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[s,n]),[s,n]}function rd(){const[s,n]=nd();return e.jsxs("div",{className:"relative h-full overflow-hidden bg-background",children:[e.jsx(ad,{isCollapsed:s,setIsCollapsed:n}),e.jsx("main",{id:"content",className:`overflow-x-hidden pt-16 transition-[margin] md:overflow-y-hidden md:pt-0 ${s?"md:ml-14":"md:ml-64"} h-full`,children:e.jsx(sa,{})})]})}const ld=Object.freeze(Object.defineProperty({__proto__:null,default:rd},Symbol.toStringTag,{value:"Module"})),Ns=m.forwardRef(({className:s,...n},a)=>e.jsx(Se,{ref:a,className:y("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",s),...n}));Ns.displayName=Se.displayName;const id=({children:s,...n})=>e.jsx(ge,{...n,children:e.jsx(xe,{className:"overflow-hidden p-0",children:e.jsx(Ns,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:s})})}),Is=m.forwardRef(({className:s,...n},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(ni,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(Se.Input,{ref:a,className:y("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",s),...n})]}));Is.displayName=Se.Input.displayName;const ws=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.List,{ref:a,className:y("max-h-[300px] overflow-y-auto overflow-x-hidden",s),...n}));ws.displayName=Se.List.displayName;const Ms=m.forwardRef((s,n)=>e.jsx(Se.Empty,{ref:n,className:"py-6 text-center text-sm",...s}));Ms.displayName=Se.Empty.displayName;const Me=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.Group,{ref:a,className:y("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",s),...n}));Me.displayName=Se.Group.displayName;const qs=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.Separator,{ref:a,className:y("-mx-1 h-px bg-border",s),...n}));qs.displayName=Se.Separator.displayName;const Ne=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.Item,{ref:a,className:y("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...n}));Ne.displayName=Se.Item.displayName;function od(){const s=[];for(const n of cr)if(n.href&&s.push(n),n.sub)for(const a of n.sub)s.push({...a,parent:n.title});return s}function De(){const[s,n]=m.useState(!1),a=os(),l=od(),{t:r}=M("search"),{t:c}=M("nav");m.useEffect(()=>{const u=h=>{h.key==="k"&&(h.metaKey||h.ctrlKey)&&(h.preventDefault(),n(i=>!i))};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[]);const o=m.useCallback(u=>{n(!1),a(u)},[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(J,{variant:"outline",className:"relative h-9 w-9 p-0 xl:h-10 xl:w-60 xl:justify-start xl:px-3 xl:py-2",onClick:()=>n(!0),children:[e.jsx(ri,{className:"h-4 w-4 xl:mr-2"}),e.jsx("span",{className:"hidden xl:inline-flex",children:r("placeholder")}),e.jsx("span",{className:"sr-only",children:r("shortcut.label")}),e.jsx("kbd",{className:"pointer-events-none absolute right-1.5 top-2 hidden h-6 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 xl:flex",children:r("shortcut.key")})]}),e.jsxs(id,{open:s,onOpenChange:n,children:[e.jsx(Is,{placeholder:r("placeholder")}),e.jsxs(ws,{children:[e.jsx(Ms,{children:r("noResults")}),e.jsx(Me,{heading:r("title"),children:l.map(u=>e.jsxs(Ne,{value:`${u.parent?u.parent+" ":""}${u.title}`,onSelect:()=>o(u.href),children:[e.jsx("div",{className:"mr-2",children:u.icon}),e.jsx("span",{children:c(u.title)}),u.parent&&e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:c(u.parent)})]},u.href))})]})]})]})}const At=[{code:"en",name:"English",flag:li,shortName:"EN"},{code:"zh",name:"中文",flag:ii,shortName:"CN"}];function cd(){const{i18n:s}=M(),n=r=>{s.changeLanguage(r)},a=At.find(r=>r.code===s.language)||At[0],l=a.flag;return e.jsxs(ys,{children:[e.jsx(_s,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 px-2 gap-1",children:[e.jsx(l,{className:"h-4 w-5 rounded-sm shadow-sm"}),e.jsx("span",{className:"text-sm font-medium",children:a.shortName})]})}),e.jsx(is,{align:"end",className:"w-[120px]",children:At.map(r=>{const c=r.flag,o=r.code===s.language;return e.jsxs(pe,{onClick:()=>n(r.code),className:y("flex items-center gap-2 px-2 py-1.5 cursor-pointer",o&&"bg-accent"),children:[e.jsx(c,{className:"h-4 w-5 rounded-sm shadow-sm"}),e.jsx("span",{className:y("text-sm",o&&"font-medium"),children:r.name})]},r.code)})})]})}function Re(){const{theme:s,setTheme:n}=Po();return m.useEffect(()=>{const a=s==="dark"?"#020817":"#fff",l=document.querySelector("meta[name='theme-color']");l&&l.setAttribute("content",a)},[s]),e.jsxs(e.Fragment,{children:[e.jsx(R,{size:"icon",variant:"ghost",className:"rounded-full",onClick:()=>n(s==="light"?"dark":"light"),children:s==="light"?e.jsx(oi,{size:20}):e.jsx(ci,{size:20})}),e.jsx(cd,{})]})}const dr=m.forwardRef(({className:s,...n},a)=>e.jsx(un,{ref:a,className:y("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...n}));dr.displayName=un.displayName;const mr=m.forwardRef(({className:s,...n},a)=>e.jsx(hn,{ref:a,className:y("aspect-square h-full w-full",s),...n}));mr.displayName=hn.displayName;const ur=m.forwardRef(({className:s,...n},a)=>e.jsx(xn,{ref:a,className:y("flex h-full w-full items-center justify-center rounded-full bg-muted",s),...n}));ur.displayName=xn.displayName;function Ee(){const s=os(),n=Ka(),a=di(Wo),{t:l}=M(["common"]),r=()=>{Jn(),n(Bo()),s("/sign-in")},c=a?.email?.split("@")[0]||l("common:user"),o=c.substring(0,2).toUpperCase();return e.jsxs(ys,{children:[e.jsx(_s,{asChild:!0,children:e.jsx(R,{variant:"ghost",className:"relative h-8 w-8 rounded-full",children:e.jsxs(dr,{className:"h-8 w-8",children:[e.jsx(mr,{src:a?.avatar_url,alt:c}),e.jsx(ur,{children:o})]})})}),e.jsxs(is,{className:"w-56",align:"end",forceMount:!0,children:[e.jsx(oa,{className:"font-normal",children:e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("p",{className:"text-sm font-medium leading-none",children:c}),e.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:a?.email||l("common:defaultEmail")})]})}),e.jsx(at,{}),e.jsx(pe,{asChild:!0,children:e.jsxs(Rs,{to:"/config/system",children:[l("common:settings"),e.jsx(Jt,{children:"⌘S"})]})}),e.jsx(at,{}),e.jsxs(pe,{onClick:r,children:[l("common:logout"),e.jsx(Jt,{children:"⇧⌘Q"})]})]})]})}const Qe=window?.settings?.secure_path,hr=5*60*1e3,Qt=new Map,dd=s=>{const n=Qt.get(s);return n?Date.now()-n.timestamp>hr?(Qt.delete(s),null):n.data:null},md=(s,n)=>{Qt.set(s,{data:n,timestamp:Date.now()})},ud=async(s,n=hr)=>{const a=dd(s);if(a)return a;const l=await L.get(s);return md(s,l),l},hd={getList:()=>ud(`${Qe}/notice/fetch`),save:s=>L.post(`${Qe}/notice/save`,s),drop:s=>L.post(`${Qe}/notice/drop`,{id:s}),updateStatus:s=>L.post(`${Qe}/notice/show`,{id:s}),sort:s=>L.post(`${Qe}/notice/sort`,{ids:s})},Oa={getSystemStatus:()=>L.get(`${Qe}/system/getSystemStatus`),getQueueStats:()=>L.get(`${Qe}/system/getQueueStats`),getQueueWorkload:()=>L.get(`${Qe}/system/getQueueWorkload`),getQueueMasters:()=>L.get(`${Qe}/system/getQueueMasters`),getSystemLog:s=>L.get(`${Qe}/system/getSystemLog`,{params:s})},F=window?.settings?.secure_path,xd=s=>L.get(F+"/stat/getOrder",{params:s}),pd=()=>L.get(F+"/stat/getStats"),Va=s=>L.get(F+"/stat/getTrafficRank",{params:s}),fd=()=>L.get(F+"/theme/getThemes"),gd=s=>L.post(F+"/theme/getThemeConfig",{name:s}),jd=(s,n)=>L.post(F+"/theme/saveThemeConfig",{name:s,config:n}),vd=s=>{const n=new FormData;return n.append("file",s),L.post(F+"/theme/upload",n,{headers:{"Content-Type":"multipart/form-data"}})},bd=s=>L.post(F+"/theme/delete",{name:s}),yd=s=>L.post(F+"/config/save",s),xr=()=>L.get(F+"/server/manage/getNodes"),_d=s=>L.post(F+"/server/manage/save",s),Nd=s=>L.post(F+"/server/manage/drop",s),wd=s=>L.post(F+"/server/manage/copy",s),Cd=s=>L.post(F+"/server/manage/update",s),Sd=s=>L.post(F+"/server/manage/sort",s),Mt=()=>L.get(F+"/server/group/fetch"),kd=s=>L.post(F+"/server/group/save",s),Pd=s=>L.post(F+"/server/group/drop",s),pr=()=>L.get(F+"/server/route/fetch"),Td=s=>L.post(F+"/server/route/save",s),Dd=s=>L.post(F+"/server/route/drop",s),Rd=()=>L.get(F+"/payment/fetch"),Ed=()=>L.get(F+"/payment/getPaymentMethods"),Id=s=>L.post(F+"/payment/getPaymentForm",s),Md=s=>L.post(F+"/payment/save",s),Od=s=>L.post(F+"/payment/drop",s),Vd=s=>L.post(F+"/payment/show",s),Ld=s=>L.post(F+"/payment/sort",s),Ad=()=>L.get(F+"/notice/fetch"),Fd=s=>L.post(F+"/notice/save",s),zd=s=>L.post(F+"/notice/drop",s),Ud=s=>L.post(F+"/notice/show",s),$d=()=>L.get(F+"/knowledge/fetch"),Hd=s=>L.get(F+"/knowledge/fetch?id="+s),qd=s=>L.post(F+"/knowledge/save",s),Gd=s=>L.post(F+"/knowledge/drop",s),Kd=s=>L.post(F+"/knowledge/show",s),Bd=s=>L.post(F+"/knowledge/sort",s),Os=()=>L.get(F+"/plan/fetch"),Wd=s=>L.post(F+"/plan/save",s),Ft=s=>L.post(F+"/plan/update",s),Yd=s=>L.post(F+"/plan/drop",s),Jd=s=>L.post(F+"/plan/sort",{ids:s}),Qd=async s=>L.post(F+"/order/fetch",s),Zd=s=>L.post(F+"/order/detail",s),Xd=s=>L.post(F+"/order/paid",s),em=s=>L.post(F+"/order/cancel",s),La=s=>L.post(F+"/order/update",s),sm=s=>L.post(F+"/order/assign",s),tm=s=>L.post(F+"/coupon/fetch",s),am=s=>L.post(F+"/coupon/generate",s),nm=s=>L.post(F+"/coupon/drop",s),rm=s=>L.post(F+"/coupon/update",s),lm=s=>L.post(F+"/user/fetch",s),im=s=>L.post(F+"/user/update",s),om=s=>L.post(F+"/user/resetSecret",s),cm=s=>L.post(F+"/user/generate",s),dm=s=>L.post(F+"/stat/getStatUser",s),mm=s=>L.post(F+"/ticket/fetch",s),um=s=>L.get(F+"/ticket/fetch?id= "+s),hm=s=>L.post(F+"/ticket/reply",s),fr=s=>L.post(F+"/ticket/close",{id:s}),us=(s="")=>L.get(F+"/config/fetch?key="+s),hs=s=>L.post(F+"/config/save",s),xm=()=>L.get(F+"/config/getEmailTemplate"),pm=()=>L.post(F+"/config/testSendMail"),fm=()=>L.post(F+"/config/setTelegramWebhook"),gm=hd.sort,gr=mi,ca=m.forwardRef(({className:s,...n},a)=>e.jsx(pn,{ref:a,className:y("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),...n}));ca.displayName=pn.displayName;const nt=m.forwardRef(({className:s,...n},a)=>e.jsx(fn,{ref:a,className:y("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",s),...n}));nt.displayName=fn.displayName;const jm=m.forwardRef(({className:s,...n},a)=>e.jsx(gn,{ref:a,className:y("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...n}));jm.displayName=gn.displayName;const W=ui,ps=bi,Y=hi,K=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(jn,{ref:l,className:y("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",s),...a,children:[n,e.jsx(xi,{asChild:!0,children:e.jsx(na,{className:"h-4 w-4 opacity-50"})})]}));K.displayName=jn.displayName;const jr=m.forwardRef(({className:s,...n},a)=>e.jsx(vn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...n,children:e.jsx(pi,{className:"h-4 w-4"})}));jr.displayName=vn.displayName;const vr=m.forwardRef(({className:s,...n},a)=>e.jsx(bn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...n,children:e.jsx(na,{className:"h-4 w-4"})}));vr.displayName=bn.displayName;const B=m.forwardRef(({className:s,children:n,position:a="popper",...l},r)=>e.jsx(fi,{children:e.jsxs(yn,{ref:r,className:y("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",a==="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",s),position:a,...l,children:[e.jsx(jr,{}),e.jsx(gi,{className:y("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),e.jsx(vr,{})]})}));B.displayName=yn.displayName;const vm=m.forwardRef(({className:s,...n},a)=>e.jsx(_n,{ref:a,className:y("px-2 py-1.5 text-sm font-semibold",s),...n}));vm.displayName=_n.displayName;const U=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(Nn,{ref:l,className:y("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",s),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(ji,{children:e.jsx(Ds,{className:"h-4 w-4"})})}),e.jsx(vi,{children:n})]}));U.displayName=Nn.displayName;const bm=m.forwardRef(({className:s,...n},a)=>e.jsx(wn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...n}));bm.displayName=wn.displayName;function Vs({className:s,classNames:n,showOutsideDays:a=!0,...l}){return e.jsx(yi,{showOutsideDays:a,className:y("p-3",s),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:y($s({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",l.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y($s({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...n},components:{IconLeft:({className:r,...c})=>e.jsx(Cn,{className:y("h-4 w-4",r),...c}),IconRight:({className:r,...c})=>e.jsx(aa,{className:y("h-4 w-4",r),...c})},...l})}Vs.displayName="Calendar";const as=Ni,ns=wi,We=m.forwardRef(({className:s,align:n="center",sideOffset:a=4,...l},r)=>e.jsx(_i,{children:e.jsx(Sn,{ref:r,align:n,sideOffset:a,className:y("z-50 w-72 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",s),...l})}));We.displayName=Sn.displayName;const fs={income:{main:"hsl(var(--primary))",gradient:{start:"hsl(var(--primary))",end:"transparent"}},commission:{main:"hsl(var(--secondary))",gradient:{start:"hsl(var(--secondary))",end:"transparent"}}},Qs=s=>(s/100).toFixed(2),ym=({active:s,payload:n,label:a})=>{const{t:l}=M();return s&&n&&n.length?e.jsxs("div",{className:"rounded-lg border bg-background p-3 shadow-sm",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:a}),n.map((r,c)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:r.color}}),e.jsxs("span",{className:"text-muted-foreground",children:[l(r.name),":"]}),e.jsx("span",{className:"font-medium",children:r.name.includes(l("dashboard:overview.amount"))?`¥${Qs(r.value)}`:l("dashboard:overview.transactions",{count:r.value})})]},c))]}):null},_m=[{value:"7d",label:"dashboard:overview.last7Days"},{value:"30d",label:"dashboard:overview.last30Days"},{value:"90d",label:"dashboard:overview.last90Days"},{value:"180d",label:"dashboard:overview.last180Days"},{value:"365d",label:"dashboard:overview.lastYear"},{value:"custom",label:"dashboard:overview.customRange"}],Nm=(s,n)=>{const a=new Date;if(s==="custom"&&n)return{startDate:n.from,endDate:n.to};let l;switch(s){case"7d":l=$e(a,7);break;case"30d":l=$e(a,30);break;case"90d":l=$e(a,90);break;case"180d":l=$e(a,180);break;case"365d":l=$e(a,365);break;default:l=$e(a,30)}return{startDate:l,endDate:a}};function wm(){const[s,n]=m.useState("amount"),[a,l]=m.useState("30d"),[r,c]=m.useState({from:$e(new Date,7),to:new Date}),{t:o}=M(),{startDate:u,endDate:h}=Nm(a,r),{data:i}=se({queryKey:["orderStat",{start_date:Ue(u,"yyyy-MM-dd"),end_date:Ue(h,"yyyy-MM-dd")}],queryFn:async()=>{const{data:d}=await xd({start_date:Ue(u,"yyyy-MM-dd"),end_date:Ue(h,"yyyy-MM-dd")});return d},refetchInterval:3e4});return e.jsxs(qe,{children:[e.jsx(ss,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(bs,{children:o("dashboard:overview.title")}),e.jsxs(tt,{children:[i?.summary.start_date," ",o("dashboard:overview.to")," ",i?.summary.end_date]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsxs(W,{value:a,onValueChange:d=>l(d),children:[e.jsx(K,{className:"w-[120px]",children:e.jsx(Y,{placeholder:o("dashboard:overview.selectTimeRange")})}),e.jsx(B,{children:_m.map(d=>e.jsx(U,{value:d.value,children:o(d.label)},d.value))})]}),a==="custom"&&e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(J,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[e.jsx(ot,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:r?.from?r.to?e.jsxs(e.Fragment,{children:[Ue(r.from,"yyyy-MM-dd")," -"," ",Ue(r.to,"yyyy-MM-dd")]}):Ue(r.from,"yyyy-MM-dd"):o("dashboard:overview.selectDate")})]})}),e.jsx(We,{className:"w-auto p-0",align:"end",children:e.jsx(Vs,{mode:"range",defaultMonth:r?.from,selected:{from:r?.from,to:r?.to},onSelect:d=>{d?.from&&d?.to&&c({from:d.from,to:d.to})},numberOfMonths:2})})]})]}),e.jsx(gr,{value:s,onValueChange:d=>n(d),children:e.jsxs(ca,{children:[e.jsx(nt,{value:"amount",children:o("dashboard:overview.amount")}),e.jsx(nt,{value:"count",children:o("dashboard:overview.count")})]})})]})]})}),e.jsxs(ts,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:o("dashboard:overview.totalIncome")}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Qs(i?.summary?.paid_total||0)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:o("dashboard:overview.totalTransactions",{count:i?.summary?.paid_count||0})}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[o("dashboard:overview.avgOrderAmount")," ¥",Qs(i?.summary?.avg_paid_amount||0)]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:o("dashboard:overview.totalCommission")}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Qs(i?.summary?.commission_total||0)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:o("dashboard:overview.totalTransactions",{count:i?.summary?.commission_count||0})}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[o("dashboard:overview.commissionRate")," ",i?.summary?.commission_rate.toFixed(2)||0,"%"]})]})]}),e.jsx("div",{className:"h-[400px] w-full",children:e.jsx(Ci,{width:"100%",height:"100%",children:e.jsxs(Si,{data:i?.list||[],margin:{top:20,right:20,left:0,bottom:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"incomeGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:fs.income.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:fs.income.gradient.end,stopOpacity:.1})]}),e.jsxs("linearGradient",{id:"commissionGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:fs.commission.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:fs.commission.gradient.end,stopOpacity:.1})]})]}),e.jsx(ki,{dataKey:"date",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:d=>Ue(new Date(d),"MM-dd",{locale:Ri})}),e.jsx(Pi,{axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:d=>s==="amount"?`¥${Qs(d)}`:o("dashboard:overview.transactions",{count:d})}),e.jsx(Ti,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))",opacity:.3}),e.jsx(Di,{content:e.jsx(ym,{})}),s==="amount"?e.jsxs(e.Fragment,{children:[e.jsx(Ca,{type:"monotone",dataKey:"paid_total",name:o("dashboard:overview.orderAmount"),stroke:fs.income.main,fill:"url(#incomeGradient)",strokeWidth:2}),e.jsx(Ca,{type:"monotone",dataKey:"commission_total",name:o("dashboard:overview.commissionAmount"),stroke:fs.commission.main,fill:"url(#commissionGradient)",strokeWidth:2})]}):e.jsxs(e.Fragment,{children:[e.jsx(Sa,{dataKey:"paid_count",name:o("dashboard:overview.orderCount"),fill:fs.income.main,radius:[4,4,0,0],maxBarSize:40}),e.jsx(Sa,{dataKey:"commission_count",name:o("dashboard:overview.commissionCount"),fill:fs.commission.main,radius:[4,4,0,0],maxBarSize:40})]})]})})})]})]})}function Ie({className:s,...n}){return e.jsx("div",{className:y("animate-pulse rounded-md bg-primary/10",s),...n})}function Cm(){return e.jsxs(qe,{children:[e.jsxs(ss,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ie,{className:"h-4 w-[120px]"}),e.jsx(Ie,{className:"h-4 w-4"})]}),e.jsxs(ts,{children:[e.jsx(Ie,{className:"h-8 w-[140px] mb-2"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:"h-4 w-4"}),e.jsx(Ie,{className:"h-4 w-[100px]"})]})]})]})}function Sm(){return e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:Array.from({length:8}).map((s,n)=>e.jsx(Cm,{},n))})}var Q=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.CANCELLED=2]="CANCELLED",s[s.COMPLETED=3]="COMPLETED",s[s.DISCOUNTED=4]="DISCOUNTED",s))(Q||{});const Ys={0:"待支付",1:"开通中",2:"已取消",3:"已完成",4:"已折抵"},Js={0:"yellow-500",1:"blue-500",2:"red-500",3:"green-500",4:"green-500"};var He=(s=>(s[s.NEW=1]="NEW",s[s.RENEWAL=2]="RENEWAL",s[s.UPGRADE=3]="UPGRADE",s[s.RESET_FLOW=4]="RESET_FLOW",s))(He||{}),ne=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.VALID=2]="VALID",s[s.INVALID=3]="INVALID",s))(ne||{});const ut={0:"待确认",1:"发放中",2:"有效",3:"无效"},ht={0:"yellow-500",1:"blue-500",2:"green-500",3:"red-500"};var de=(s=>(s.MONTH_PRICE="month_price",s.QUARTER_PRICE="quarter_price",s.HALF_YEAR_PRICE="half_year_price",s.YEAR_PRICE="year_price",s.TWO_YEAR_PRICE="two_year_price",s.THREE_YEAR_PRICE="three_year_price",s.ONETIME_PRICE="onetime_price",s.RESET_PRICE="reset_price",s))(de||{});const km={month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"};var ye=(s=>(s.Shadowsocks="shadowsocks",s.Vmess="vmess",s.Trojan="trojan",s.Hysteria="hysteria",s.Vless="vless",s))(ye||{});const Ps=[{type:"shadowsocks",label:"Shadowsocks"},{type:"vmess",label:"VMess"},{type:"trojan",label:"Trojan"},{type:"hysteria",label:"Hysteria"},{type:"vless",label:"VLess"}],ls={shadowsocks:"#489851",vmess:"#CB3180",trojan:"#EBB749",hysteria:"#5684e6",vless:"#1a1a1a"};var js=(s=>(s[s.AMOUNT=1]="AMOUNT",s[s.PERCENTAGE=2]="PERCENTAGE",s))(js||{});const Pm={1:"按金额优惠",2:"按比例优惠"};var et=(s=>(s[s.OPENING=0]="OPENING",s[s.CLOSED=1]="CLOSED",s))(et||{}),Xe=(s=>(s[s.LOW=0]="LOW",s[s.MIDDLE=1]="MIDDLE",s[s.HIGH=2]="HIGH",s))(Xe||{});function gs({title:s,value:n,icon:a,trend:l,description:r,onClick:c,highlight:o,className:u}){return e.jsxs(qe,{className:y("transition-colors",c&&"cursor-pointer hover:bg-muted/50",o&&"border-primary/50",u),onClick:c,children:[e.jsxs(ss,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(bs,{className:"text-sm font-medium",children:s}),a]}),e.jsxs(ts,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n}),l?e.jsxs("div",{className:"flex items-center pt-1",children:[e.jsx(Li,{className:y("h-4 w-4",l.isPositive?"text-emerald-500":"text-red-500")}),e.jsxs("span",{className:y("ml-1 text-xs",l.isPositive?"text-emerald-500":"text-red-500"),children:[l.isPositive?"+":"-",Math.abs(l.value),"%"]}),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:l.label})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})]})}function Tm({className:s}){const n=os(),{t:a}=M(),{data:l,isLoading:r}=se({queryKey:["dashboardStats"],queryFn:async()=>(await pd()).data,refetchInterval:1e3*60*5});if(r||!l)return e.jsx(Sm,{});const c=()=>{const o=new URLSearchParams;o.set("commission_status",ne.PENDING.toString()),o.set("status",Q.COMPLETED.toString()),o.set("commission_balance","gt:0"),n(`/finance/order?${o.toString()}`)};return e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2 lg:grid-cols-4",s),children:[e.jsx(gs,{title:a("dashboard:stats.todayIncome"),value:ks(l.todayIncome),icon:e.jsx(Ei,{className:"h-4 w-4 text-emerald-500"}),trend:{value:l.dayIncomeGrowth,label:a("dashboard:stats.vsYesterday"),isPositive:l.dayIncomeGrowth>0}}),e.jsx(gs,{title:a("dashboard:stats.monthlyIncome"),value:ks(l.currentMonthIncome),icon:e.jsx(Ii,{className:"h-4 w-4 text-blue-500"}),trend:{value:l.monthIncomeGrowth,label:a("dashboard:stats.vsLastMonth"),isPositive:l.monthIncomeGrowth>0}}),e.jsx(gs,{title:a("dashboard:stats.pendingTickets"),value:l.ticketPendingTotal,icon:e.jsx(Mi,{className:y("h-4 w-4",l.ticketPendingTotal>0?"text-orange-500":"text-muted-foreground")}),description:l.ticketPendingTotal>0?a("dashboard:stats.hasPendingTickets"):a("dashboard:stats.noPendingTickets"),onClick:()=>n("/user/ticket"),highlight:l.ticketPendingTotal>0}),e.jsx(gs,{title:a("dashboard:stats.pendingCommission"),value:l.commissionPendingTotal,icon:e.jsx(Oi,{className:y("h-4 w-4",l.commissionPendingTotal>0?"text-blue-500":"text-muted-foreground")}),description:l.commissionPendingTotal>0?a("dashboard:stats.hasPendingCommission"):a("dashboard:stats.noPendingCommission"),onClick:c,highlight:l.commissionPendingTotal>0}),e.jsx(gs,{title:a("dashboard:stats.monthlyNewUsers"),value:l.currentMonthNewUsers,icon:e.jsx(Ht,{className:"h-4 w-4 text-blue-500"}),trend:{value:l.userGrowth,label:a("dashboard:stats.vsLastMonth"),isPositive:l.userGrowth>0}}),e.jsx(gs,{title:a("dashboard:stats.totalUsers"),value:l.totalUsers,icon:e.jsx(Ht,{className:"h-4 w-4 text-muted-foreground"}),description:a("dashboard:stats.activeUsers",{count:l.activeUsers})}),e.jsx(gs,{title:a("dashboard:stats.monthlyUpload"),value:Ze(l.monthTraffic.upload),icon:e.jsx(qt,{className:"h-4 w-4 text-emerald-500"}),description:a("dashboard:stats.todayTraffic",{value:Ze(l.todayTraffic.upload)})}),e.jsx(gs,{title:a("dashboard:stats.monthlyDownload"),value:Ze(l.monthTraffic.download),icon:e.jsx(Vi,{className:"h-4 w-4 text-blue-500"}),description:a("dashboard:stats.todayTraffic",{value:Ze(l.todayTraffic.download)})})]})}const rt=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(kn,{ref:l,className:y("relative overflow-hidden",s),...a,children:[e.jsx(Ai,{className:"h-full w-full rounded-[inherit]",children:n}),e.jsx(Ct,{}),e.jsx(Fi,{})]}));rt.displayName=kn.displayName;const Ct=m.forwardRef(({className:s,orientation:n="vertical",...a},l)=>e.jsx(Pn,{ref:l,orientation:n,className:y("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",s),...a,children:e.jsx(zi,{className:"relative flex-1 rounded-full bg-border"})}));Ct.displayName=Pn.displayName;const Zt={today:{getValue:()=>{const s=$i();return{start:s,end:Hi(s,1)}}},last7days:{getValue:()=>{const s=new Date;return{start:$e(s,7),end:s}}},last30days:{getValue:()=>{const s=new Date;return{start:$e(s,30),end:s}}},custom:{getValue:()=>null}};function Aa({selectedRange:s,customDateRange:n,onRangeChange:a,onCustomRangeChange:l}){const{t:r}=M(),c={today:r("dashboard:trafficRank.today"),last7days:r("dashboard:trafficRank.last7days"),last30days:r("dashboard:trafficRank.last30days"),custom:r("dashboard:trafficRank.customRange")};return e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[e.jsxs(W,{value:s,onValueChange:a,children:[e.jsx(K,{className:"w-[120px]",children:e.jsx(Y,{placeholder:r("dashboard:trafficRank.selectTimeRange")})}),e.jsx(B,{position:"popper",className:"z-50",children:Object.entries(Zt).map(([o])=>e.jsx(U,{value:o,children:c[o]},o))})]}),s==="custom"&&e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(J,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!n&&"text-muted-foreground"),children:[e.jsx(ot,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:n?.from?n.to?e.jsxs(e.Fragment,{children:[Ue(n.from,"yyyy-MM-dd")," -"," ",Ue(n.to,"yyyy-MM-dd")]}):Ue(n.from,"yyyy-MM-dd"):e.jsx("span",{children:r("dashboard:trafficRank.selectDateRange")})})]})}),e.jsx(We,{className:"w-auto p-0",align:"end",children:e.jsx(Vs,{mode:"range",defaultMonth:n?.from,selected:{from:n?.from,to:n?.to},onSelect:o=>{o?.from&&o?.to&&l({from:o.from,to:o.to})},numberOfMonths:2})})]})]})}const As=s=>`${(s/1024/1024/1024).toFixed(2)} GB`;function Dm({className:s}){const{t:n}=M(),[a,l]=m.useState("today"),[r,c]=m.useState({from:$e(new Date,7),to:new Date}),[o,u]=m.useState("today"),[h,i]=m.useState({from:$e(new Date,7),to:new Date}),d=m.useMemo(()=>a==="custom"?{start:r.from,end:r.to}:Zt[a].getValue(),[a,r]),f=m.useMemo(()=>o==="custom"?{start:h.from,end:h.to}:Zt[o].getValue(),[o,h]),{data:P}=se({queryKey:["nodeTrafficRank",d.start,d.end],queryFn:()=>Va({type:"node",start_time:fe.round(d.start.getTime()/1e3),end_time:fe.round(d.end.getTime()/1e3)}),refetchInterval:3e4}),{data:I}=se({queryKey:["userTrafficRank",f.start,f.end],queryFn:()=>Va({type:"user",start_time:fe.round(f.start.getTime()/1e3),end_time:fe.round(f.end.getTime()/1e3)}),refetchInterval:3e4});return e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2",s),children:[e.jsxs(qe,{children:[e.jsx(ss,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(bs,{className:"flex items-center text-base font-medium",children:[e.jsx(Ui,{className:"mr-2 h-4 w-4"}),n("dashboard:trafficRank.nodeTrafficRank")]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(Aa,{selectedRange:a,customDateRange:r,onRangeChange:l,onCustomRangeChange:c}),e.jsx(ka,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(ts,{className:"flex-1",children:P?.data?e.jsxs(rt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:P.data.map(p=>e.jsx(oe,{delayDuration:200,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:p.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",p.change>=0?"text-green-600":"text-red-600"),children:[p.change>=0?e.jsx(Gt,{className:"mr-1 h-3 w-3"}):e.jsx(Kt,{className:"mr-1 h-3 w-3"}),Math.abs(p.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${p.value/P.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:As(p.value)})]})]})})}),e.jsx(te,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.currentTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(p.value)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.previousTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(p.previousValue)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.changeRate"),":"]}),e.jsxs("span",{className:y("font-medium",p.change>=0?"text-green-600":"text-red-600"),children:[p.change>=0?"+":"",p.change,"%"]})]})})]})},p.id))}),e.jsx(Ct,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:n("common:loading")})})})]}),e.jsxs(qe,{children:[e.jsx(ss,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(bs,{className:"flex items-center text-base font-medium",children:[e.jsx(Ht,{className:"mr-2 h-4 w-4"}),n("dashboard:trafficRank.userTrafficRank")]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(Aa,{selectedRange:o,customDateRange:h,onRangeChange:u,onCustomRangeChange:i}),e.jsx(ka,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(ts,{className:"flex-1",children:I?.data?e.jsxs(rt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:I.data.map(p=>e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:p.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",p.change>=0?"text-green-600":"text-red-600"),children:[p.change>=0?e.jsx(Gt,{className:"mr-1 h-3 w-3"}):e.jsx(Kt,{className:"mr-1 h-3 w-3"}),Math.abs(p.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${p.value/I.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:As(p.value)})]})]})})}),e.jsx(te,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.currentTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(p.value)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.previousTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(p.previousValue)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.changeRate"),":"]}),e.jsxs("span",{className:y("font-medium",p.change>=0?"text-green-600":"text-red-600"),children:[p.change>=0?"+":"",p.change,"%"]})]})})]})},p.id))}),e.jsx(Ct,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:n("common:loading")})})})]})]})}const Rm=Ts("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/10",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 H({className:s,variant:n,...a}){return e.jsx("div",{className:y(Rm({variant:n}),s),...a})}const vt=m.forwardRef(({className:s,value:n,...a},l)=>e.jsx(Tn,{ref:l,className:y("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",s),...a,children:e.jsx(qi,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));vt.displayName=Tn.displayName;function Em(){const{t:s}=M(),[n,a]=m.useState(null),[l,r]=m.useState(null),[c,o]=m.useState(!0),[u,h]=m.useState(!1),i=async()=>{try{h(!0);const[P,I]=await Promise.all([Oa.getSystemStatus(),Oa.getQueueStats()]);a(P.data.data),r(I.data.data)}catch(P){console.error("Error fetching system data:",P)}finally{o(!1),h(!1)}};m.useEffect(()=>{i();const P=setInterval(i,3e4);return()=>clearInterval(P)},[]);const d=()=>{i()};if(c)return e.jsx("div",{className:"flex items-center justify-center p-6",children:e.jsx(ra,{className:"h-6 w-6 animate-spin"})});const f=P=>P?e.jsx(Dn,{className:"h-5 w-5 text-green-500"}):e.jsx(Rn,{className:"h-5 w-5 text-red-500"});return e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(qe,{children:[e.jsxs(ss,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(bs,{className:"flex items-center gap-2",children:[e.jsx(Gi,{className:"h-5 w-5"}),s("dashboard:queue.title")]}),e.jsx(tt,{children:s("dashboard:queue.status.description")})]}),e.jsx(J,{variant:"outline",size:"icon",onClick:d,disabled:u,children:e.jsx(Ki,{className:y("h-4 w-4",u&&"animate-spin")})})]}),e.jsx(ts,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[f(l?.status||!1),e.jsx("span",{className:"font-medium",children:s("dashboard:queue.status.running")})]}),e.jsx(H,{variant:l?.status?"secondary":"destructive",children:l?.status?s("dashboard:queue.status.normal"):s("dashboard:queue.status.abnormal")})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.status.waitTime",{seconds:l?.wait?.default||0})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.recentJobs")}),e.jsx("p",{className:"text-2xl font-bold",children:l?.recentJobs||0}),e.jsx(vt,{value:(l?.recentJobs||0)/(l?.periods?.recentJobs||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsx("p",{children:s("dashboard:queue.details.statisticsPeriod",{hours:l?.periods?.recentJobs||0})})})]})}),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.jobsPerMinute")}),e.jsx("p",{className:"text-2xl font-bold",children:l?.jobsPerMinute||0}),e.jsx(vt,{value:(l?.jobsPerMinute||0)/(l?.queueWithMaxThroughput?.throughput||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsx("p",{children:s("dashboard:queue.details.maxThroughput",{value:l?.queueWithMaxThroughput?.throughput||0})})})]})})]})]})})]}),e.jsxs(qe,{children:[e.jsxs(ss,{children:[e.jsxs(bs,{className:"flex items-center gap-2",children:[e.jsx(Bi,{className:"h-5 w-5"}),s("dashboard:queue.jobDetails")]}),e.jsx(tt,{children:s("dashboard:queue.details.description")})]}),e.jsx(ts,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.failedJobs7Days")}),e.jsx("p",{className:"text-2xl font-bold text-destructive",children:l?.failedJobs||0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s("dashboard:queue.details.retentionPeriod",{hours:l?.periods?.failedJobs||0})})]}),e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.longestRunningQueue")}),e.jsxs("p",{className:"text-2xl font-bold",children:[l?.queueWithMaxRuntime?.runtime||0,"s"]}),e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:l?.queueWithMaxRuntime?.name||"N/A"})]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.activeProcesses")}),e.jsxs("span",{className:"font-medium",children:[l?.processes||0," /"," ",(l?.processes||0)+(l?.pausedMasters||0)]})]}),e.jsx(vt,{value:(l?.processes||0)/((l?.processes||0)+(l?.pausedMasters||0))*100,className:"mt-2 h-1"})]})]})})]})]})}function Im(){const{t:s}=M();return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx("div",{className:"flex items-center",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:s("dashboard:title")})}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsx(ke,{children:e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"grid gap-6",children:[e.jsx(Tm,{}),e.jsx(wm,{}),e.jsx(Dm,{}),e.jsx(Em,{})]})})})]})}const Mm=Object.freeze(Object.defineProperty({__proto__:null,default:Im},Symbol.toStringTag,{value:"Module"})),be=m.forwardRef(({className:s,orientation:n="horizontal",decorative:a=!0,...l},r)=>e.jsx(En,{ref:r,decorative:a,orientation:n,className:y("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",s),...l}));be.displayName=En.displayName;function Om({className:s,items:n,...a}){const{pathname:l}=ea(),r=os(),[c,o]=m.useState(l??"/settings"),u=i=>{o(i),r(i)},{t:h}=M("settings");return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-1 md:hidden",children:e.jsxs(W,{value:c,onValueChange:u,children:[e.jsx(K,{className:"h-12 sm:w-48",children:e.jsx(Y,{placeholder:"Theme"})}),e.jsx(B,{children:n.map(i=>e.jsx(U,{value:i.href,children:e.jsxs("div",{className:"flex gap-x-4 px-2 py-1",children:[e.jsx("span",{className:"scale-125",children:i.icon}),e.jsx("span",{className:"text-md",children:h(i.title)})]})},i.href))})]})}),e.jsx("div",{className:"hidden w-full overflow-x-auto bg-background px-1 py-2 md:block",children:e.jsx("nav",{className:y("flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1",s),...a,children:n.map(i=>e.jsxs(Rs,{to:i.href,className:y(Hs({variant:"ghost"}),l===i.href?"bg-muted hover:bg-muted":"hover:bg-transparent hover:underline","justify-start"),children:[e.jsx("span",{className:"mr-2",children:i.icon}),h(i.title)]},i.href))})})]})}const Vm=[{title:"site.title",key:"site",icon:e.jsx(Wi,{size:18}),href:"/config/system",description:"site.description"},{title:"safe.title",key:"safe",icon:e.jsx(dn,{size:18}),href:"/config/system/safe",description:"safe.description"},{title:"subscribe.title",key:"subscribe",icon:e.jsx(mn,{size:18}),href:"/config/system/subscribe",description:"subscribe.description"},{title:"invite.title",key:"invite",icon:e.jsx(Yi,{size:18}),href:"/config/system/invite",description:"invite.description"},{title:"server.title",key:"server",icon:e.jsx(cn,{size:18}),href:"/config/system/server",description:"server.description"},{title:"email.title",key:"email",icon:e.jsx(Ji,{size:18}),href:"/config/system/email",description:"email.description"},{title:"telegram.title",key:"telegram",icon:e.jsx(Qi,{size:18}),href:"/config/system/telegram",description:"telegram.description"},{title:"app.title",key:"app",icon:e.jsx(on,{size:18}),href:"/config/system/app",description:"app.description"}];function Lm(){const{t:s}=M("settings");return e.jsxs(we,{fadedBelow:!0,fixedHeight:!0,children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:s("title")}),e.jsx("div",{className:"text-muted-foreground",children:s("description")})]}),e.jsx(be,{className:"my-6"}),e.jsxs("div",{className:"flex flex-1 flex-col space-y-8 overflow-auto lg:flex-row lg:space-x-12 lg:space-y-0",children:[e.jsx("aside",{className:"sticky top-0 lg:w-1/5",children:e.jsx(Om,{items:Vm})}),e.jsx("div",{className:"w-full p-1 pr-4 lg:max-w-xl",children:e.jsx("div",{className:"pb-16",children:e.jsx(sa,{})})})]})]})]})}const Am=Object.freeze(Object.defineProperty({__proto__:null,default:Lm},Symbol.toStringTag,{value:"Module"})),q=m.forwardRef(({className:s,...n},a)=>e.jsx(In,{className:y("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",s),...n,ref:a,children:e.jsx(Zi,{className:y("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));q.displayName=In.displayName;const Cs=m.forwardRef(({className:s,...n},a)=>e.jsx("textarea",{className:y("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm 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",s),ref:a,...n}));Cs.displayName="Textarea";const Fm=x.object({logo:x.string().nullable().default(""),force_https:x.number().nullable().default(0),stop_register:x.number().nullable().default(0),app_name:x.string().nullable().default(""),app_description:x.string().nullable().default(""),app_url:x.string().nullable().default(""),subscribe_url:x.string().nullable().default(""),try_out_plan_id:x.number().nullable().default(0),try_out_hour:x.coerce.number().nullable().default(0),tos_url:x.string().nullable().default(""),currency:x.string().nullable().default(""),currency_symbol:x.string().nullable().default("")});function zm(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),{data:r}=se({queryKey:["settings","site"],queryFn:()=>us("site")}),{data:c}=se({queryKey:["plans"],queryFn:()=>Os()}),o=ce({resolver:ue(Fm),defaultValues:{},mode:"onBlur"}),{mutateAsync:u}=es({mutationFn:hs,onSuccess:d=>{d.data&&$.success(s("common.autoSaved"))}});m.useEffect(()=>{if(r?.data?.site){const d=r?.data?.site;Object.entries(d).forEach(([f,P])=>{o.setValue(f,P)}),l.current=d}},[r]);const h=m.useCallback(fe.debounce(async d=>{if(!fe.isEqual(d,l.current)){a(!0);try{const f=Object.entries(d).reduce((P,[I,p])=>(P[I]=p===null?"":p,P),{});await u(f),l.current=d}finally{a(!1)}}},1e3),[u]),i=m.useCallback(d=>{h(d)},[h]);return m.useEffect(()=>{const d=o.watch(f=>{i(f)});return()=>d.unsubscribe()},[o.watch,i]),e.jsx(he,{...o,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:o.control,name:"app_name",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.siteName.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.siteName.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.siteName.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"app_description",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.siteDescription.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.siteDescription.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.siteDescription.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"app_url",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.siteUrl.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.siteUrl.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.siteUrl.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"force_https",render:({field:d})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("site.form.forceHttps.label")}),e.jsx(O,{children:s("site.form.forceHttps.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:!!d.value,onCheckedChange:f=>{d.onChange(Number(f)),i(o.getValues())}})})]})}),e.jsx(j,{control:o.control,name:"logo",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.logo.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.logo.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.logo.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"subscribe_url",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.subscribeUrl.label")}),e.jsx(_,{children:e.jsx(Cs,{placeholder:s("site.form.subscribeUrl.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.subscribeUrl.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"tos_url",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.tosUrl.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.tosUrl.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.tosUrl.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"stop_register",render:({field:d})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("site.form.stopRegister.label")}),e.jsx(O,{children:s("site.form.stopRegister.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:!!d.value,onCheckedChange:f=>{d.onChange(Number(f)),i(o.getValues())}})})]})}),e.jsx(j,{control:o.control,name:"try_out_plan_id",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.tryOut.label")}),e.jsx(_,{children:e.jsxs(W,{value:d.value?.toString(),onValueChange:f=>{d.onChange(Number(f)),i(o.getValues())},children:[e.jsx(K,{children:e.jsx(Y,{placeholder:s("site.form.tryOut.placeholder")})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("site.form.tryOut.placeholder")}),c?.data?.map(f=>e.jsx(U,{value:f.id.toString(),children:f.name},f.id.toString()))]})]})}),e.jsx(O,{children:s("site.form.tryOut.description")}),e.jsx(D,{})]})}),!!o.watch("try_out_plan_id")&&e.jsx(j,{control:o.control,name:"try_out_hour",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"",children:s("site.form.tryOut.duration.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.tryOut.duration.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.tryOut.duration.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"currency",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.currency.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.currency.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.currency.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"currency_symbol",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.currencySymbol.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.currencySymbol.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.currencySymbol.description")}),e.jsx(D,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("site.form.saving")})]})})}function Um(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("site.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("site.description")})]}),e.jsx(be,{}),e.jsx(zm,{})]})}const $m=Object.freeze(Object.defineProperty({__proto__:null,default:Um},Symbol.toStringTag,{value:"Module"})),Hm=x.object({email_verify:x.boolean().nullable(),safe_mode_enable:x.boolean().nullable(),secure_path:x.string().nullable(),email_whitelist_enable:x.boolean().nullable(),email_whitelist_suffix:x.array(x.string().nullable()).nullable(),email_gmail_limit_enable:x.boolean().nullable(),recaptcha_enable:x.boolean().nullable(),recaptcha_key:x.string().nullable(),recaptcha_site_key:x.string().nullable(),register_limit_by_ip_enable:x.boolean().nullable(),register_limit_count:x.coerce.string().transform(s=>s===""?null:s).nullable(),register_limit_expire:x.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_enable:x.boolean().nullable(),password_limit_count:x.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_expire:x.coerce.string().transform(s=>s===""?null:s).nullable()}),qm={email_verify:!1,safe_mode_enable:!1,secure_path:"",email_whitelist_enable:!1,email_whitelist_suffix:[],email_gmail_limit_enable:!1,recaptcha_enable:!1,recaptcha_key:"",recaptcha_site_key:"",register_limit_by_ip_enable:!1,register_limit_count:"",register_limit_expire:"",password_limit_enable:!1,password_limit_count:"",password_limit_expire:""};function Gm(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(Hm),defaultValues:qm,mode:"onBlur"}),{data:c}=se({queryKey:["settings","safe"],queryFn:()=>us("safe")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:i=>{i.data&&$.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data.safe){const i=c.data.safe;Object.entries(i).forEach(([d,f])=>{typeof f=="number"?r.setValue(d,String(f)):r.setValue(d,f)}),l.current=i}},[c]);const u=m.useCallback(fe.debounce(async i=>{if(!fe.isEqual(i,l.current)){a(!0);try{await o(i),l.current=i}finally{a(!1)}}},1e3),[o]),h=m.useCallback(i=>{u(i)},[u]);return m.useEffect(()=>{const i=r.watch(d=>{h(d)});return()=>i.unsubscribe()},[r.watch,h]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"email_verify",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.emailVerify.label")}),e.jsx(O,{children:s("safe.form.emailVerify.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"email_gmail_limit_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.gmailLimit.label")}),e.jsx(O,{children:s("safe.form.gmailLimit.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"safe_mode_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.safeMode.label")}),e.jsx(O,{children:s("safe.form.safeMode.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"secure_path",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.securePath.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.securePath.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.securePath.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"email_whitelist_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.emailWhitelist.label")}),e.jsx(O,{children:s("safe.form.emailWhitelist.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("email_whitelist_enable")&&e.jsx(j,{control:r.control,name:"email_whitelist_suffix",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.emailWhitelist.suffixes.label")}),e.jsx(_,{children:e.jsx(Cs,{placeholder:s("safe.form.emailWhitelist.suffixes.placeholder"),...i,value:(i.value||[]).join(` +`),onChange:d=>{const f=d.target.value.split(` +`).filter(Boolean);i.onChange(f),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.emailWhitelist.suffixes.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"recaptcha_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.recaptcha.enable.label")}),e.jsx(O,{children:s("safe.form.recaptcha.enable.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("recaptcha_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"recaptcha_key",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.recaptcha.key.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.recaptcha.key.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.recaptcha.key.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"recaptcha_site_key",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.recaptcha.siteKey.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.recaptcha.siteKey.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.recaptcha.siteKey.description")}),e.jsx(D,{})]})})]}),e.jsx(j,{control:r.control,name:"register_limit_by_ip_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.registerLimit.enable.label")}),e.jsx(O,{children:s("safe.form.registerLimit.enable.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("register_limit_by_ip_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"register_limit_count",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.registerLimit.count.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.registerLimit.count.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.registerLimit.count.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"register_limit_expire",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.registerLimit.expire.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.registerLimit.expire.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.registerLimit.expire.description")}),e.jsx(D,{})]})})]}),e.jsx(j,{control:r.control,name:"password_limit_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.passwordLimit.enable.label")}),e.jsx(O,{children:s("safe.form.passwordLimit.enable.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("password_limit_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"password_limit_count",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.passwordLimit.count.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.passwordLimit.count.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.passwordLimit.count.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"password_limit_expire",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.passwordLimit.expire.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.passwordLimit.expire.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.passwordLimit.expire.description")}),e.jsx(D,{})]})})]}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("safe.form.saving")})]})})}function Km(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("safe.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("safe.description")})]}),e.jsx(be,{}),e.jsx(Gm,{})]})}const Bm=Object.freeze(Object.defineProperty({__proto__:null,default:Km},Symbol.toStringTag,{value:"Module"})),Wm=x.object({plan_change_enable:x.boolean().nullable().default(!1),reset_traffic_method:x.coerce.number().nullable().default(0),surplus_enable:x.boolean().nullable().default(!1),new_order_event_id:x.coerce.number().nullable().default(0),renew_order_event_id:x.coerce.number().nullable().default(0),change_order_event_id:x.coerce.number().nullable().default(0),show_info_to_server_enable:x.boolean().nullable().default(!1),show_protocol_to_server_enable:x.boolean().nullable().default(!1),default_remind_expire:x.boolean().nullable().default(!1),default_remind_traffic:x.boolean().nullable().default(!1),subscribe_path:x.string().nullable().default("s")}),Ym={plan_change_enable:!1,reset_traffic_method:0,surplus_enable:!1,new_order_event_id:0,renew_order_event_id:0,change_order_event_id:0,show_info_to_server_enable:!1,show_protocol_to_server_enable:!1,default_remind_expire:!1,default_remind_traffic:!1,subscribe_path:"s"};function Jm(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(Wm),defaultValues:Ym,mode:"onBlur"}),{data:c}=se({queryKey:["settings","subscribe"],queryFn:()=>us("subscribe")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:i=>{i.data&&$.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data?.subscribe){const i=c?.data?.subscribe;Object.entries(i).forEach(([d,f])=>{r.setValue(d,f)}),l.current=i}},[c]);const u=m.useCallback(fe.debounce(async i=>{if(!fe.isEqual(i,l.current)){a(!0);try{await o(i),l.current=i}finally{a(!1)}}},1e3),[o]),h=m.useCallback(i=>{u(i)},[u]);return m.useEffect(()=>{const i=r.watch(d=>{h(d)});return()=>i.unsubscribe()},[r.watch,h]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"plan_change_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.plan_change_enable.title")}),e.jsx(O,{children:s("subscribe.plan_change_enable.description")}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"reset_traffic_method",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.reset_traffic_method.title")}),e.jsxs(W,{onValueChange:i.onChange,value:i.value?.toString()||"0",children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择重置方式"})})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("subscribe.reset_traffic_method.options.monthly_first")}),e.jsx(U,{value:"1",children:s("subscribe.reset_traffic_method.options.monthly_reset")}),e.jsx(U,{value:"2",children:s("subscribe.reset_traffic_method.options.no_reset")}),e.jsx(U,{value:"3",children:s("subscribe.reset_traffic_method.options.yearly_first")}),e.jsx(U,{value:"4",children:s("subscribe.reset_traffic_method.options.yearly_reset")})]})]}),e.jsx(O,{children:s("subscribe.reset_traffic_method.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"surplus_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.surplus_enable.title")}),e.jsx(O,{children:s("subscribe.surplus_enable.description")}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"new_order_event_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.new_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(_,{children:e.jsxs(W,{onValueChange:i.onChange,value:i.value?.toString(),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("subscribe.new_order_event.options.no_action")}),e.jsx(U,{value:"1",children:s("subscribe.new_order_event.options.reset_traffic")})]})]})})}),e.jsx(O,{children:s("subscribe.new_order_event.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"renew_order_event_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.renew_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(_,{children:e.jsxs(W,{onValueChange:i.onChange,value:i.value?.toString(),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("subscribe.renew_order_event.options.no_action")}),e.jsx(U,{value:"1",children:s("subscribe.renew_order_event.options.reset_traffic")})]})]})})}),e.jsx(O,{children:s("renew_order_event.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"change_order_event_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.change_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(_,{children:e.jsxs(W,{onValueChange:i.onChange,value:i.value?.toString(),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("subscribe.change_order_event.options.no_action")}),e.jsx(U,{value:"1",children:s("subscribe.change_order_event.options.reset_traffic")})]})]})})}),e.jsx(O,{children:s("subscribe.change_order_event.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"subscribe_path",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.subscribe_path.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:"subscribe",...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[s("subscribe.subscribe_path.description"),e.jsx("br",{}),s("subscribe.subscribe_path.current_format",{path:i.value||"s"})]}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"show_info_to_server_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("subscribe.show_info_to_server.title")}),e.jsx(O,{children:s("subscribe.show_info_to_server.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"show_protocol_to_server_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("subscribe.show_protocol_to_server.title")}),e.jsx(O,{children:s("subscribe.show_protocol_to_server.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function Qm(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("subscribe.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("subscribe.description")})]}),e.jsx(be,{}),e.jsx(Jm,{})]})}const Zm=Object.freeze(Object.defineProperty({__proto__:null,default:Qm},Symbol.toStringTag,{value:"Module"})),Xm=x.object({invite_force:x.boolean().default(!1),invite_commission:x.coerce.string().default("0"),invite_gen_limit:x.coerce.string().default("0"),invite_never_expire:x.boolean().default(!1),commission_first_time_enable:x.boolean().default(!1),commission_auto_check_enable:x.boolean().default(!1),commission_withdraw_limit:x.coerce.string().default("0"),commission_withdraw_method:x.array(x.string()).default(["支付宝","USDT","Paypal"]),withdraw_close_enable:x.boolean().default(!1),commission_distribution_enable:x.boolean().default(!1),commission_distribution_l1:x.coerce.number().default(0),commission_distribution_l2:x.coerce.number().default(0),commission_distribution_l3:x.coerce.number().default(0)}),eu={invite_force:!1,invite_commission:"0",invite_gen_limit:"0",invite_never_expire:!1,commission_first_time_enable:!1,commission_auto_check_enable:!1,commission_withdraw_limit:"0",commission_withdraw_method:["支付宝","USDT","Paypal"],withdraw_close_enable:!1,commission_distribution_enable:!1,commission_distribution_l1:0,commission_distribution_l2:0,commission_distribution_l3:0};function su(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(Xm),defaultValues:eu,mode:"onBlur"}),{data:c}=se({queryKey:["settings","invite"],queryFn:()=>us("invite")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:i=>{i.data&&$.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data?.invite){const i=c?.data?.invite;Object.entries(i).forEach(([d,f])=>{typeof f=="number"?r.setValue(d,String(f)):r.setValue(d,f)}),l.current=i}},[c]);const u=m.useCallback(fe.debounce(async i=>{if(!fe.isEqual(i,l.current)){a(!0);try{await o(i),l.current=i}finally{a(!1)}}},1e3),[o]),h=m.useCallback(i=>{u(i)},[u]);return m.useEffect(()=>{const i=r.watch(d=>{h(d)});return()=>i.unsubscribe()},[r.watch,h]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"invite_force",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.invite_force.title")}),e.jsx(O,{children:s("invite.invite_force.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"invite_commission",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("invite.invite_commission.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("invite.invite_commission.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("invite.invite_commission.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"invite_gen_limit",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("invite.invite_gen_limit.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("invite.invite_gen_limit.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("invite.invite_gen_limit.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"invite_never_expire",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.invite_never_expire.title")}),e.jsx(O,{children:s("invite.invite_never_expire.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_first_time_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.commission_first_time.title")}),e.jsx(O,{children:s("invite.commission_first_time.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_auto_check_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.commission_auto_check.title")}),e.jsx(O,{children:s("invite.commission_auto_check.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_withdraw_limit",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("invite.commission_withdraw_limit.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("invite.commission_withdraw_limit.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("invite.commission_withdraw_limit.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"commission_withdraw_method",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("invite.commission_withdraw_method.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("invite.commission_withdraw_method.placeholder"),...i,value:Array.isArray(i.value)?i.value.join(","):"",onChange:d=>{const f=d.target.value.split(",").filter(Boolean);i.onChange(f),h(r.getValues())}})}),e.jsx(O,{children:s("invite.commission_withdraw_method.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"withdraw_close_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.withdraw_close.title")}),e.jsx(O,{children:s("invite.withdraw_close.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_distribution_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.commission_distribution.title")}),e.jsx(O,{children:s("invite.commission_distribution.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("commission_distribution_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"commission_distribution_l1",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:s("invite.commission_distribution.l1")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...i,value:i.value||"",onChange:d=>{const f=d.target.value?Number(d.target.value):0;i.onChange(f),h(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"commission_distribution_l2",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:s("invite.commission_distribution.l2")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...i,value:i.value||"",onChange:d=>{const f=d.target.value?Number(d.target.value):0;i.onChange(f),h(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"commission_distribution_l3",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:s("invite.commission_distribution.l3")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...i,value:i.value||"",onChange:d=>{const f=d.target.value?Number(d.target.value):0;i.onChange(f),h(r.getValues())}})}),e.jsx(D,{})]})})]}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("invite.saving")})]})})}function tu(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("invite.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("invite.description")})]}),e.jsx(be,{}),e.jsx(su,{})]})}const au=Object.freeze(Object.defineProperty({__proto__:null,default:tu},Symbol.toStringTag,{value:"Module"})),nu=x.object({frontend_theme:x.string().nullable(),frontend_theme_sidebar:x.string().nullable(),frontend_theme_header:x.string().nullable(),frontend_theme_color:x.string().nullable(),frontend_background_url:x.string().url().nullable()}),ru={frontend_theme:"",frontend_theme_sidebar:"",frontend_theme_header:"",frontend_theme_color:"",frontend_background_url:""};function lu(){const{data:s}=se({queryKey:["settings","frontend"],queryFn:()=>us("frontend")}),n=ce({resolver:ue(nu),defaultValues:ru,mode:"onChange"});m.useEffect(()=>{if(s?.data?.frontend){const l=s?.data?.frontend;Object.entries(l).forEach(([r,c])=>{n.setValue(r,c)})}},[s]);function a(l){hs(l).then(({data:r})=>{r&&$.success("更新成功")})}return e.jsx(he,{...n,children:e.jsxs("form",{onSubmit:n.handleSubmit(a),className:"space-y-8",children:[e.jsx(j,{control:n.control,name:"frontend_theme_sidebar",render:({field:l})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:"边栏风格"}),e.jsx(O,{children:"边栏风格"})]}),e.jsx(_,{children:e.jsx(q,{checked:l.value,onCheckedChange:l.onChange})})]})}),e.jsx(j,{control:n.control,name:"frontend_theme_header",render:({field:l})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:"头部风格"}),e.jsx(O,{children:"边栏风格"})]}),e.jsx(_,{children:e.jsx(q,{checked:l.value,onCheckedChange:l.onChange})})]})}),e.jsx(j,{control:n.control,name:"frontend_theme_color",render:({field:l})=>e.jsxs(g,{children:[e.jsx(v,{children:"主题色"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(_,{children:e.jsxs("select",{className:y(Hs({variant:"outline"}),"w-[200px] appearance-none font-normal"),...l,children:[e.jsx("option",{value:"default",children:"默认"}),e.jsx("option",{value:"black",children:"黑色"}),e.jsx("option",{value:"blackblue",children:"暗蓝色"}),e.jsx("option",{value:"green",children:"奶绿色"})]})}),e.jsx(na,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(O,{children:"主题色"}),e.jsx(D,{})]})}),e.jsx(j,{control:n.control,name:"frontend_background_url",render:({field:l})=>e.jsxs(g,{children:[e.jsx(v,{children:"背景"}),e.jsx(_,{children:e.jsx(T,{placeholder:"请输入图片地址",...l})}),e.jsx(O,{children:"将会在后台登录页面进行展示。"}),e.jsx(D,{})]})}),e.jsx(R,{type:"submit",children:"保存设置"})]})})}function iu(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"个性化设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"自定义系统界面外观,包括主题风格、布局、颜色方案、背景图等个性化选项。"})]}),e.jsx(be,{}),e.jsx(lu,{})]})}const ou=Object.freeze(Object.defineProperty({__proto__:null,default:iu},Symbol.toStringTag,{value:"Module"})),cu=x.object({server_pull_interval:x.coerce.number().nullable(),server_push_interval:x.coerce.number().nullable(),server_token:x.string().nullable(),device_limit_mode:x.coerce.number().nullable()}),du={server_pull_interval:0,server_push_interval:0,server_token:"",device_limit_mode:0};function mu(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(cu),defaultValues:du,mode:"onBlur"}),{data:c}=se({queryKey:["settings","server"],queryFn:()=>us("server")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:d=>{d.data&&$.success(s("common.AutoSaved"))}});m.useEffect(()=>{if(c?.data.server){const d=c.data.server;Object.entries(d).forEach(([f,P])=>{r.setValue(f,P)}),l.current=d}},[c]);const u=m.useCallback(fe.debounce(async d=>{if(!fe.isEqual(d,l.current)){a(!0);try{await o(d),l.current=d}finally{a(!1)}}},1e3),[o]),h=m.useCallback(d=>{u(d)},[u]);m.useEffect(()=>{const d=r.watch(f=>{h(f)});return()=>d.unsubscribe()},[r.watch,h]);const i=()=>{const d=Math.floor(Math.random()*17)+16,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let P="";for(let I=0;Ie.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("server.server_token.title")}),e.jsx(_,{children:e.jsxs("div",{className:"relative",children:[e.jsx(T,{placeholder:s("server.server_token.placeholder"),...d,value:d.value||"",className:"pr-10"}),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2",onClick:f=>{f.preventDefault(),i()},children:e.jsx(Xi,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"})})}),e.jsx(te,{children:e.jsx("p",{children:s("server.server_token.generate_tooltip")})})]})})]})}),e.jsx(O,{children:s("server.server_token.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"server_pull_interval",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("server.server_pull_interval.title")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("server.server_pull_interval.placeholder"),...d,value:d.value||"",onChange:f=>{const P=f.target.value?Number(f.target.value):null;d.onChange(P)}})}),e.jsx(O,{children:s("server.server_pull_interval.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"server_push_interval",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("server.server_push_interval.title")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("server.server_push_interval.placeholder"),...d,value:d.value||"",onChange:f=>{const P=f.target.value?Number(f.target.value):null;d.onChange(P)}})}),e.jsx(O,{children:s("server.server_push_interval.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"device_limit_mode",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("server.device_limit_mode.title")}),e.jsxs(W,{onValueChange:d.onChange,value:d.value?.toString()||"0",children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:s("server.device_limit_mode.placeholder")})})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("server.device_limit_mode.strict")}),e.jsx(U,{value:"1",children:s("server.device_limit_mode.relaxed")})]})]}),e.jsx(O,{children:s("server.device_limit_mode.description")}),e.jsx(D,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("server.saving")})]})})}function uu(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("server.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("server.description")})]}),e.jsx(be,{}),e.jsx(mu,{})]})}const hu=Object.freeze(Object.defineProperty({__proto__:null,default:uu},Symbol.toStringTag,{value:"Module"}));function xu({open:s,onOpenChange:n,result:a}){const l=!a.error;return e.jsx(ge,{open:s,onOpenChange:n,children:e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l?e.jsx(Dn,{className:"h-5 w-5 text-green-500"}):e.jsx(Rn,{className:"h-5 w-5 text-destructive"}),e.jsx(je,{children:l?"邮件发送成功":"邮件发送失败"})]}),e.jsx(Te,{children:l?"测试邮件已成功发送,请检查收件箱":"发送测试邮件时遇到错误"})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"发送详情"}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2 text-sm",children:[e.jsx("div",{className:"text-muted-foreground",children:"收件地址"}),e.jsx("div",{children:a.email}),e.jsx("div",{className:"text-muted-foreground",children:"邮件主题"}),e.jsx("div",{children:a.subject}),e.jsx("div",{className:"text-muted-foreground",children:"模板名称"}),e.jsx("div",{children:a.template_name})]})]}),a.error&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium text-destructive",children:"错误信息"}),e.jsx("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive break-all",children:a.error})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"配置信息"}),e.jsx(rt,{className:"h-[200px] rounded-md border p-4",children:e.jsx("div",{className:"grid gap-2 text-sm",children:e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2",children:[e.jsx("div",{className:"text-muted-foreground",children:"驱动"}),e.jsx("div",{children:a.config.driver}),e.jsx("div",{className:"text-muted-foreground",children:"服务器"}),e.jsx("div",{children:a.config.host}),e.jsx("div",{className:"text-muted-foreground",children:"端口"}),e.jsx("div",{children:a.config.port}),e.jsx("div",{className:"text-muted-foreground",children:"加密方式"}),e.jsx("div",{children:a.config.encryption||"无"}),e.jsx("div",{className:"text-muted-foreground",children:"发件人"}),e.jsx("div",{children:a.config.from.address?`${a.config.from.address}${a.config.from.name?` (${a.config.from.name})`:""}`:"未设置"}),e.jsx("div",{className:"text-muted-foreground",children:"用户名"}),e.jsx("div",{children:a.config.username||"未设置"})]})})})]})]})]})})}const pu=x.object({email_template:x.string().nullable().default("classic"),email_host:x.string().nullable().default(""),email_port:x.string().regex(/^\d+$/).nullable().default("465"),email_username:x.string().nullable().default(""),email_password:x.string().nullable().default(""),email_encryption:x.string().nullable().default(""),email_from_address:x.string().email().nullable().default(""),remind_mail_enable:x.boolean().nullable().default(!1)});function fu(){const{t:s}=M("settings"),[n,a]=m.useState(null),[l,r]=m.useState(!1),c=m.useRef(null),[o,u]=m.useState(!1),h=ce({resolver:ue(pu),defaultValues:{},mode:"onBlur"}),{data:i}=se({queryKey:["settings","email"],queryFn:()=>us("email")}),{data:d}=se({queryKey:["emailTemplate"],queryFn:()=>xm()}),{mutateAsync:f}=es({mutationFn:hs,onSuccess:k=>{k.data&&$.success(s("common.autoSaved"))}}),{mutate:P,isPending:I}=es({mutationFn:pm,onMutate:()=>{a(null),r(!1)},onSuccess:k=>{a(k.data),r(!0),k.data.error?$.error(s("email.test.error")):$.success(s("email.test.success"))}});m.useEffect(()=>{if(i?.data.email){const k=i.data.email;Object.entries(k).forEach(([b,w])=>{h.setValue(b,w)}),c.current=k}},[i]);const p=m.useCallback(fe.debounce(async k=>{if(!fe.isEqual(k,c.current)){u(!0);try{await f(k),c.current=k}finally{u(!1)}}},1e3),[f]),N=m.useCallback(k=>{p(k)},[p]);return m.useEffect(()=>{const k=h.watch(b=>{N(b)});return()=>k.unsubscribe()},[h.watch,N]),e.jsxs(e.Fragment,{children:[e.jsx(he,{...h,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:h.control,name:"email_host",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email.email_host.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(O,{children:s("email.email_host.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_port",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email.email_port.title")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("common.placeholder"),...k,value:k.value||"",onChange:b=>{const w=b.target.value?Number(b.target.value):null;k.onChange(w)}})}),e.jsx(O,{children:s("email.email_port.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_encryption",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email.email_encryption.title")}),e.jsxs(W,{onValueChange:k.onChange,value:k.value||"none",children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择加密方式"})})}),e.jsxs(B,{children:[e.jsx(U,{value:"none",children:s("email.email_encryption.none")}),e.jsx(U,{value:"ssl",children:s("email.email_encryption.ssl")}),e.jsx(U,{value:"tls",children:s("email.email_encryption.tls")})]})]}),e.jsx(O,{children:s("email.email_encryption.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_username",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email.email_username.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(O,{children:s("email.email_username.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_password",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email_password.title")}),e.jsx(_,{children:e.jsx(T,{type:"password",placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(O,{children:s("email_password.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_from_address",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email_from.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(O,{children:s("email_from.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_template",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email_template.title")}),e.jsxs(W,{onValueChange:b=>{k.onChange(b),N(h.getValues())},value:k.value||void 0,children:[e.jsx(_,{children:e.jsx(K,{className:"w-[200px]",children:e.jsx(Y,{placeholder:s("email_template.placeholder")})})}),e.jsx(B,{children:d?.data?.map(b=>e.jsx(U,{value:b,children:b},b))})]}),e.jsx(O,{children:s("email_template.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"remind_mail_enable",render:({field:k})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("remind_mail.title")}),e.jsx(O,{children:s("remind_mail.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:k.value||!1,onCheckedChange:b=>{k.onChange(b),N(h.getValues())}})})]})}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(R,{onClick:()=>P(),loading:I,disabled:I,children:s(I?"test.sending":"test.title")})})]})}),o&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("saving")}),n&&e.jsx(xu,{open:l,onOpenChange:r,result:n})]})}function gu(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("email.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("email.description")})]}),e.jsx(be,{}),e.jsx(fu,{})]})}const ju=Object.freeze(Object.defineProperty({__proto__:null,default:gu},Symbol.toStringTag,{value:"Module"})),vu=x.object({telegram_bot_enable:x.boolean().nullable(),telegram_bot_token:x.string().nullable(),telegram_discuss_link:x.string().nullable()}),bu={telegram_bot_enable:!1,telegram_bot_token:"",telegram_discuss_link:""};function yu(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(vu),defaultValues:bu,mode:"onBlur"}),{data:c}=se({queryKey:["settings","telegram"],queryFn:()=>us("telegram")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:f=>{f.data&&$.success(s("common.autoSaved"))}}),{mutate:u,isPending:h}=es({mutationFn:fm,onSuccess:f=>{f.data&&$.success(s("telegram.webhook_success"))}});m.useEffect(()=>{if(c?.data.telegram){const f=c.data.telegram;Object.entries(f).forEach(([P,I])=>{r.setValue(P,I)}),l.current=f}},[c]);const i=m.useCallback(fe.debounce(async f=>{if(!fe.isEqual(f,l.current)){a(!0);try{await o(f),l.current=f}finally{a(!1)}}},1e3),[o]),d=m.useCallback(f=>{i(f)},[i]);return m.useEffect(()=>{const f=r.watch(P=>{d(P)});return()=>f.unsubscribe()},[r.watch,d]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"telegram_bot_token",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("telegram.bot_token.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("telegram.bot_token.placeholder"),...f,value:f.value||""})}),e.jsx(O,{children:s("telegram.bot_token.description")}),e.jsx(D,{})]})}),r.watch("telegram_bot_token")&&e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("telegram.webhook.title")}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(R,{loading:h,disabled:h,onClick:()=>u(),children:s(h?"telegram.webhook.setting":"telegram.webhook.button")}),n&&e.jsx("span",{className:"text-sm text-muted-foreground",children:s("common.saving")})]}),e.jsx(O,{children:s("telegram.webhook.description")}),e.jsx(D,{})]}),e.jsx(j,{control:r.control,name:"telegram_bot_enable",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("telegram.bot_enable.title")}),e.jsx(O,{children:s("telegram.bot_enable.description")}),e.jsx(_,{children:e.jsx(q,{checked:f.value||!1,onCheckedChange:P=>{f.onChange(P),d(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"telegram_discuss_link",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("telegram.discuss_link.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("telegram.discuss_link.placeholder"),...f,value:f.value||""})}),e.jsx(O,{children:s("telegram.discuss_link.description")}),e.jsx(D,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function _u(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("telegram.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("telegram.description")})]}),e.jsx(be,{}),e.jsx(yu,{})]})}const Nu=Object.freeze(Object.defineProperty({__proto__:null,default:_u},Symbol.toStringTag,{value:"Module"})),wu=x.object({windows_version:x.string().nullable(),windows_download_url:x.string().nullable(),macos_version:x.string().nullable(),macos_download_url:x.string().nullable(),android_version:x.string().nullable(),android_download_url:x.string().nullable()}),Cu={windows_version:"",windows_download_url:"",macos_version:"",macos_download_url:"",android_version:"",android_download_url:""};function Su(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(wu),defaultValues:Cu,mode:"onBlur"}),{data:c}=se({queryKey:["settings","app"],queryFn:()=>us("app")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:i=>{i.data&&$.success(s("app.save_success"))}});m.useEffect(()=>{if(c?.data.app){const i=c.data.app;Object.entries(i).forEach(([d,f])=>{r.setValue(d,f)}),l.current=i}},[c]);const u=m.useCallback(fe.debounce(async i=>{if(!fe.isEqual(i,l.current)){a(!0);try{await o(i),l.current=i}finally{a(!1)}}},1e3),[o]),h=m.useCallback(i=>{u(i)},[u]);return m.useEffect(()=>{const i=r.watch(d=>{h(d)});return()=>i.unsubscribe()},[r.watch,h]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"windows_version",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.windows.version.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("app.windows.version.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"windows_download_url",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.windows.download.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("app.windows.download.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"macos_version",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.macos.version.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("app.macos.version.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"macos_download_url",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.macos.download.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("app.macos.download.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"android_version",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.android.version.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("app.android.version.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"android_download_url",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.android.download.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("app.android.download.description")}),e.jsx(D,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function ku(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("app.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("app.description")})]}),e.jsx(be,{}),e.jsx(Su,{})]})}const Pu=Object.freeze(Object.defineProperty({__proto__:null,default:ku},Symbol.toStringTag,{value:"Module"})),da=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:y("w-full caption-bottom text-sm",s),...n})}));da.displayName="Table";const ma=m.forwardRef(({className:s,...n},a)=>e.jsx("thead",{ref:a,className:y("[&_tr]:border-b",s),...n}));ma.displayName="TableHeader";const ua=m.forwardRef(({className:s,...n},a)=>e.jsx("tbody",{ref:a,className:y("[&_tr:last-child]:border-0",s),...n}));ua.displayName="TableBody";const Tu=m.forwardRef(({className:s,...n},a)=>e.jsx("tfoot",{ref:a,className:y("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...n}));Tu.displayName="TableFooter";const vs=m.forwardRef(({className:s,...n},a)=>e.jsx("tr",{ref:a,className:y("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...n}));vs.displayName="TableRow";const ha=m.forwardRef(({className:s,...n},a)=>e.jsx("th",{ref:a,className:y("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...n}));ha.displayName="TableHead";const Us=m.forwardRef(({className:s,...n},a)=>e.jsx("td",{ref:a,className:y("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...n}));Us.displayName="TableCell";const Du=m.forwardRef(({className:s,...n},a)=>e.jsx("caption",{ref:a,className:y("mt-4 text-sm text-muted-foreground",s),...n}));Du.displayName="TableCaption";function Ru({table:s}){const[n,a]=m.useState("");m.useEffect(()=>{a((s.getState().pagination.pageIndex+1).toString())},[s.getState().pagination.pageIndex]);const l=r=>{const c=parseInt(r);!isNaN(c)&&c>=1&&c<=s.getPageCount()?s.setPageIndex(c-1):a((s.getState().pagination.pageIndex+1).toString())};return e.jsxs("div",{className:"flex flex-col-reverse gap-4 px-2 py-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex-1 text-sm text-muted-foreground",children:["已选择 ",s.getFilteredSelectedRowModel().rows.length," 项, 共"," ",s.getFilteredRowModel().rows.length," 项"]}),e.jsxs("div",{className:"flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"每页显示"}),e.jsxs(W,{value:`${s.getState().pagination.pageSize}`,onValueChange:r=>{s.setPageSize(Number(r))},children:[e.jsx(K,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:s.getState().pagination.pageSize})}),e.jsx(B,{side:"top",children:[10,20,30,40,50,100,500].map(r=>e.jsx(U,{value:`${r}`,children:r},r))})]})]}),e.jsxs("div",{className:"flex items-center justify-center space-x-2 text-sm font-medium",children:[e.jsx("span",{children:"第"}),e.jsx(T,{type:"text",value:n,onChange:r=>a(r.target.value),onBlur:r=>l(r.target.value),onKeyDown:r=>{r.key==="Enter"&&l(r.currentTarget.value)},className:"h-8 w-[50px] text-center"}),e.jsxs("span",{children:["页,共 ",s.getPageCount()," 页"]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(R,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(0),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到第一页"}),e.jsx(eo,{className:"h-4 w-4"})]}),e.jsxs(R,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.previousPage(),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"上一页"}),e.jsx(Cn,{className:"h-4 w-4"})]}),e.jsxs(R,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.nextPage(),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"下一页"}),e.jsx(aa,{className:"h-4 w-4"})]}),e.jsxs(R,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(s.getPageCount()-1),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到最后一页"}),e.jsx(so,{className:"h-4 w-4"})]})]})]})]})}function Ye({table:s,toolbar:n,draggable:a=!1,onDragStart:l,onDragEnd:r,onDragOver:c,onDragLeave:o,onDrop:u,showPagination:h=!0,isLoading:i=!1}){const d=m.useRef(null),f=s.getAllColumns().filter(N=>N.getIsPinned()==="left"),P=s.getAllColumns().filter(N=>N.getIsPinned()==="right"),I=N=>f.slice(0,N).reduce((k,b)=>k+(b.getSize()??0),0),p=N=>P.slice(N+1).reduce((k,b)=>k+(b.getSize()??0),0);return e.jsxs("div",{className:"space-y-4",children:[typeof n=="function"?n(s):n,e.jsx("div",{ref:d,className:"relative overflow-auto rounded-md border bg-card",children:e.jsx("div",{className:"overflow-auto",children:e.jsxs(da,{children:[e.jsx(ma,{children:s.getHeaderGroups().map(N=>e.jsx(vs,{className:"hover:bg-transparent",children:N.headers.map((k,b)=>{const w=k.column.getIsPinned()==="left",S=k.column.getIsPinned()==="right",C=w?I(f.indexOf(k.column)):void 0,E=S?p(P.indexOf(k.column)):void 0;return e.jsx(ha,{colSpan:k.colSpan,style:{width:k.getSize(),...w&&{left:C},...S&&{right:E}},className:y("h-11 bg-card px-4 text-muted-foreground",(w||S)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",w&&"before:right-0",S&&"before:left-0"]),children:k.isPlaceholder?null:bt(k.column.columnDef.header,k.getContext())},k.id)})},N.id))}),e.jsx(ua,{children:s.getRowModel().rows?.length?s.getRowModel().rows.map((N,k)=>e.jsx(vs,{"data-state":N.getIsSelected()&&"selected",className:"hover:bg-muted/50",draggable:a,onDragStart:b=>l?.(b,k),onDragEnd:r,onDragOver:c,onDragLeave:o,onDrop:b=>u?.(b,k),children:N.getVisibleCells().map((b,w)=>{const S=b.column.getIsPinned()==="left",C=b.column.getIsPinned()==="right",E=S?I(f.indexOf(b.column)):void 0,A=C?p(P.indexOf(b.column)):void 0;return e.jsx(Us,{style:{width:b.column.getSize(),...S&&{left:E},...C&&{right:A}},className:y("bg-card",(S||C)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",S&&"before:right-0",C&&"before:left-0"]),children:bt(b.column.columnDef.cell,b.getContext())},b.id)})},N.id)):e.jsx(vs,{children:e.jsx(Us,{colSpan:s.getAllColumns().length,className:"h-24 text-center",children:"暂无数据"})})})]})})}),h&&e.jsx(Ru,{table:s})]})}const Eu=s=>x.object({id:x.number().nullable(),name:x.string().min(2,s("form.validation.name.min")).max(30,s("form.validation.name.max")),icon:x.string().optional().nullable(),notify_domain:x.string().refine(a=>!a||/^https?:\/\/\S+/.test(a),s("form.validation.notify_domain.url")).optional().nullable(),handling_fee_fixed:x.coerce.number().min(0).optional().nullable(),handling_fee_percent:x.coerce.number().min(0).max(100).optional().nullable(),payment:x.string().min(1,s("form.validation.payment.required")),config:x.record(x.string(),x.string())}),Fa={id:null,name:"",icon:"",notify_domain:"",handling_fee_fixed:0,handling_fee_percent:0,payment:"",config:{}};function br({refetch:s,dialogTrigger:n,type:a="add",defaultFormValues:l=Fa}){const{t:r}=M("payment"),[c,o]=m.useState(!1),[u,h]=m.useState(!1),[i,d]=m.useState([]),[f,P]=m.useState([]),I=Eu(r),p=ce({resolver:ue(I),defaultValues:l,mode:"onChange"}),N=p.watch("payment");m.useEffect(()=>{c&&(async()=>{const{data:w}=await Ed();d(w)})()},[c]),m.useEffect(()=>{if(!N||!c)return;(async()=>{const w={payment:N,...a==="edit"&&{id:Number(p.getValues("id"))}};Id(w).then(({data:S})=>{P(S);const C=S.reduce((E,A)=>(A.field_name&&(E[A.field_name]=A.value??""),E),{});p.setValue("config",C)})})()},[N,c,p,a]);const k=async b=>{h(!0);try{(await Md(b)).data&&($.success(r("form.messages.success")),p.reset(Fa),s(),o(!1))}finally{h(!1)}};return e.jsxs(ge,{open:c,onOpenChange:o,children:[e.jsx(Oe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add.button")})]})}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsx(ve,{children:e.jsx(je,{children:r(a==="add"?"form.add.title":"form.edit.title")})}),e.jsx(he,{...p,children:e.jsxs("form",{onSubmit:p.handleSubmit(k),className:"space-y-4",children:[e.jsx(j,{control:p.control,name:"name",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:r("form.fields.name.placeholder"),...b})}),e.jsx(O,{children:r("form.fields.name.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"icon",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.icon.label")}),e.jsx(_,{children:e.jsx(T,{...b,value:b.value||"",placeholder:r("form.fields.icon.placeholder")})}),e.jsx(O,{children:r("form.fields.icon.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"notify_domain",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.notify_domain.label")}),e.jsx(_,{children:e.jsx(T,{...b,value:b.value||"",placeholder:r("form.fields.notify_domain.placeholder")})}),e.jsx(O,{children:r("form.fields.notify_domain.description")}),e.jsx(D,{})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(j,{control:p.control,name:"handling_fee_percent",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.handling_fee_percent.label")}),e.jsx(_,{children:e.jsx(T,{type:"number",...b,value:b.value||"",placeholder:r("form.fields.handling_fee_percent.placeholder")})}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"handling_fee_fixed",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.handling_fee_fixed.label")}),e.jsx(_,{children:e.jsx(T,{type:"number",...b,value:b.value||"",placeholder:r("form.fields.handling_fee_fixed.placeholder")})}),e.jsx(D,{})]})})]}),e.jsx(j,{control:p.control,name:"payment",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.payment.label")}),e.jsxs(W,{onValueChange:b.onChange,defaultValue:b.value,children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:r("form.fields.payment.placeholder")})})}),e.jsx(B,{children:i.map(w=>e.jsx(U,{value:w,children:w},w))})]}),e.jsx(O,{children:r("form.fields.payment.description")}),e.jsx(D,{})]})}),f.length>0&&e.jsx("div",{className:"space-y-4",children:f.map(b=>e.jsx(j,{control:p.control,name:`config.${b.field_name}`,render:({field:w})=>e.jsxs(g,{children:[e.jsx(v,{children:b.label}),e.jsx(_,{children:e.jsx(T,{...w,value:w.value||""})}),e.jsx(D,{})]})},b.field_name))}),e.jsxs(Ve,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.buttons.cancel")})}),e.jsx(R,{type:"submit",disabled:u,children:r("form.buttons.submit")})]})]})})]})]})}function V({column:s,title:n,tooltip:a,className:l}){return s.getCanSort()?e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(R,{variant:"ghost",size:"default",className:y("-ml-3 flex h-8 items-center gap-2 text-nowrap font-medium hover:bg-muted/60",l),onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),children:[e.jsx("span",{children:n}),a&&e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(Pa,{className:"h-4 w-4 cursor-pointer text-muted-foreground"})}),e.jsx(te,{children:a})]})}),s.getIsSorted()==="asc"?e.jsx(Gt,{className:"h-4 w-4 text-foreground/70"}):s.getIsSorted()==="desc"?e.jsx(Kt,{className:"h-4 w-4 text-foreground/70"}):e.jsx(to,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-foreground/70"})]})})}):e.jsxs("div",{className:y("flex items-center space-x-1 text-nowrap py-2 font-medium text-muted-foreground",l),children:[e.jsx("span",{children:n}),a&&e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx(Pa,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(te,{children:a})]})})]})}const Iu=ao,Mu=no,Ou=ro,yr=m.forwardRef(({className:s,...n},a)=>e.jsx(Mn,{className:y("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",s),...n,ref:a}));yr.displayName=Mn.displayName;const _r=m.forwardRef(({className:s,...n},a)=>e.jsxs(Ou,{children:[e.jsx(yr,{}),e.jsx(On,{ref:a,className:y("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",s),...n})]}));_r.displayName=On.displayName;const Nr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...n});Nr.displayName="AlertDialogHeader";const wr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});wr.displayName="AlertDialogFooter";const Cr=m.forwardRef(({className:s,...n},a)=>e.jsx(Vn,{ref:a,className:y("text-lg font-semibold",s),...n}));Cr.displayName=Vn.displayName;const Sr=m.forwardRef(({className:s,...n},a)=>e.jsx(Ln,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));Sr.displayName=Ln.displayName;const kr=m.forwardRef(({className:s,...n},a)=>e.jsx(An,{ref:a,className:y($s(),s),...n}));kr.displayName=An.displayName;const Pr=m.forwardRef(({className:s,...n},a)=>e.jsx(Fn,{ref:a,className:y($s({variant:"outline"}),"mt-2 sm:mt-0",s),...n}));Pr.displayName=Fn.displayName;function Je({onConfirm:s,children:n,title:a="确认操作",description:l="确定要执行此操作吗?",cancelText:r="取消",confirmText:c="确认",variant:o="default",className:u}){return e.jsxs(Iu,{children:[e.jsx(Mu,{asChild:!0,children:n}),e.jsxs(_r,{className:y("sm:max-w-[425px]",u),children:[e.jsxs(Nr,{children:[e.jsx(Cr,{children:a}),e.jsx(Sr,{children:l})]}),e.jsxs(wr,{children:[e.jsx(Pr,{asChild:!0,children:e.jsx(R,{variant:"outline",children:r})}),e.jsx(kr,{asChild:!0,children:e.jsx(R,{variant:o,onClick:s,children:c})})]})]})]})}const Tr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M11.29 15.29a2 2 0 0 0-.12.15a.8.8 0 0 0-.09.18a.6.6 0 0 0-.06.18a1.4 1.4 0 0 0 0 .2a.84.84 0 0 0 .08.38a.9.9 0 0 0 .54.54a.94.94 0 0 0 .76 0a.9.9 0 0 0 .54-.54A1 1 0 0 0 13 16a1 1 0 0 0-.29-.71a1 1 0 0 0-1.42 0M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8 8 0 0 1-8 8m0-13a3 3 0 0 0-2.6 1.5a1 1 0 1 0 1.73 1A1 1 0 0 1 12 9a1 1 0 0 1 0 2a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-.18A3 3 0 0 0 12 7"})}),Vu=({refetch:s,isSortMode:n=!1})=>{const{t:a}=M("payment");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:n?"cursor-move":"opacity-0",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:l})=>e.jsx(V,{column:l,title:a("table.columns.id")}),cell:({row:l})=>e.jsx(H,{variant:"outline",children:l.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"enable",header:({column:l})=>e.jsx(V,{column:l,title:a("table.columns.enable")}),cell:({row:l})=>e.jsx(q,{defaultChecked:l.getValue("enable"),onCheckedChange:async()=>{const{data:r}=await Vd({id:l.original.id});r||s()}}),enableSorting:!1,size:100},{accessorKey:"name",header:({column:l})=>e.jsx(V,{column:l,title:a("table.columns.name")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:l.getValue("name")})}),enableSorting:!1,size:200},{accessorKey:"payment",header:({column:l})=>e.jsx(V,{column:l,title:a("table.columns.payment")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:l.getValue("payment")})}),enableSorting:!1,size:200},{accessorKey:"notify_url",header:({column:l})=>e.jsxs("div",{className:"flex items-center",children:[e.jsx(V,{column:l,title:a("table.columns.notify_url")}),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{className:"ml-1",children:e.jsx(Tr,{className:"h-4 w-4"})}),e.jsx(te,{children:a("table.columns.notify_url_tooltip")})]})})]}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[300px] truncate font-medium",children:l.getValue("notify_url")})}),enableSorting:!1,size:3e3},{id:"actions",header:({column:l})=>e.jsx(V,{className:"justify-end",column:l,title:a("table.columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(br,{refetch:s,dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:a("table.actions.edit")})]}),type:"edit",defaultFormValues:l.original}),e.jsx(Je,{title:a("table.actions.delete.title"),description:a("table.actions.delete.description"),onConfirm:async()=>{const{data:r}=await Od({id:l.original.id});r&&s()},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-destructive/10",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"}),e.jsx("span",{className:"sr-only",children:a("table.actions.delete.title")})]})})]}),size:100}]};function Lu({table:s,refetch:n,saveOrder:a,isSortMode:l}){const{t:r}=M("payment"),c=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[l?e.jsx("p",{className:"text-sm text-muted-foreground",children:r("table.toolbar.sort.hint")}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(br,{refetch:n}),e.jsx(T,{placeholder:r("table.toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:o=>s.getColumn("name")?.setFilterValue(o.target.value),className:"h-8 w-[250px]"}),c&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:[r("table.toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:l?"default":"outline",onClick:a,size:"sm",children:r(l?"table.toolbar.sort.save":"table.toolbar.sort.edit")})})]})}function Au(){const[s,n]=m.useState([]),[a,l]=m.useState([]),[r,c]=m.useState(!1),[o,u]=m.useState([]),[h,i]=m.useState({"drag-handle":!1}),[d,f]=m.useState({pageSize:20,pageIndex:0}),{refetch:P}=se({queryKey:["paymentList"],queryFn:async()=>{const{data:b}=await Rd();return u(b?.map(w=>({...w,enable:!!w.enable}))||[]),b}});m.useEffect(()=>{i({"drag-handle":r,actions:!r}),f({pageSize:r?99999:10,pageIndex:0})},[r]);const I=(b,w)=>{r&&(b.dataTransfer.setData("text/plain",w.toString()),b.currentTarget.classList.add("opacity-50"))},p=(b,w)=>{if(!r)return;b.preventDefault(),b.currentTarget.classList.remove("bg-muted");const S=parseInt(b.dataTransfer.getData("text/plain"));if(S===w)return;const C=[...o],[E]=C.splice(S,1);C.splice(w,0,E),u(C)},N=async()=>{r?Ld({ids:o.map(b=>b.id)}).then(()=>{P(),c(!1),$.success("排序保存成功")}):c(!0)},k=Ae({data:o,columns:Vu({refetch:P,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:h,pagination:d},onSortingChange:l,onColumnFiltersChange:n,onColumnVisibilityChange:i,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),initialState:{columnPinning:{right:["actions"]}},pageCount:r?1:void 0});return e.jsx(Ye,{table:k,toolbar:b=>e.jsx(Lu,{table:b,refetch:P,saveOrder:N,isSortMode:r}),draggable:r,onDragStart:I,onDragEnd:b=>b.currentTarget.classList.remove("opacity-50"),onDragOver:b=>{b.preventDefault(),b.currentTarget.classList.add("bg-muted")},onDragLeave:b=>b.currentTarget.classList.remove("bg-muted"),onDrop:p,showPagination:!r})}function Fu(){const{t:s}=M("payment");return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(De,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{children:[e.jsx("header",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("section",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Au,{})})]})]})}const zu=Object.freeze(Object.defineProperty({__proto__:null,default:Fu},Symbol.toStringTag,{value:"Module"})),Uu=(s,n)=>{let a=null;switch(s.field_type){case"input":a=e.jsx(T,{placeholder:s.placeholder,...n});break;case"textarea":a=e.jsx(Cs,{placeholder:s.placeholder,...n});break;case"select":a=e.jsx("select",{className:y($s({variant:"outline"}),"w-full appearance-none font-normal"),...n,children:s.select_options&&Object.keys(s.select_options).map(l=>e.jsx("option",{value:l,children:s.select_options?.[l]},l))});break;default:a=null;break}return a};function $u({themeKey:s,themeInfo:n}){const{t:a}=M("theme"),[l,r]=m.useState(!1),[c,o]=m.useState(!1),[u,h]=m.useState(!1),i=ce({defaultValues:n.configs.reduce((P,I)=>(P[I.field_name]="",P),{})}),d=async()=>{o(!0),gd(s).then(({data:P})=>{Object.entries(P).forEach(([I,p])=>{i.setValue(I,p)})}).finally(()=>{o(!1)})},f=async P=>{h(!0),jd(s,P).then(()=>{$.success(a("config.success")),r(!1)}).finally(()=>{h(!1)})};return e.jsxs(ge,{open:l,onOpenChange:P=>{r(P),P?d():i.reset()},children:[e.jsx(Oe,{asChild:!0,children:e.jsx(R,{variant:"outline",children:a("card.configureTheme")})}),e.jsxs(xe,{className:"max-h-[90vh] overflow-auto sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:a("config.title",{name:n.name})}),e.jsx(Te,{children:a("config.description")})]}),c?e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(ra,{className:"h-6 w-6 animate-spin"})}):e.jsx(he,{...i,children:e.jsxs("form",{onSubmit:i.handleSubmit(f),className:"space-y-4",children:[n.configs.map(P=>e.jsx(j,{control:i.control,name:P.field_name,render:({field:I})=>e.jsxs(g,{children:[e.jsx(v,{children:P.label}),e.jsx(_,{children:Uu(P,I)}),e.jsx(D,{})]})},P.field_name)),e.jsxs(Ve,{className:"mt-6 gap-2",children:[e.jsx(R,{type:"button",variant:"secondary",onClick:()=>r(!1),children:a("config.cancel")}),e.jsx(R,{type:"submit",loading:u,children:a("config.save")})]})]})})]})]})}function Hu(){const{t:s}=M("theme"),[n,a]=m.useState(null),[l,r]=m.useState(!1),[c,o]=m.useState(!1),[u,h]=m.useState(!1),[i,d]=m.useState(null),f=m.useRef(null),[P,I]=m.useState(0),{data:p,isLoading:N,refetch:k}=se({queryKey:["themeList"],queryFn:async()=>{const{data:z}=await fd();return z}}),b=async z=>{a(z),yd({frontend_theme:z}).then(()=>{$.success("主题切换成功"),k()}).finally(()=>{a(null)})},w=async z=>{if(!z.name.endsWith(".zip")){$.error(s("upload.error.format"));return}r(!0),vd(z).then(()=>{$.success("主题上传成功"),o(!1),k()}).finally(()=>{r(!1),f.current&&(f.current.value="")})},S=z=>{z.preventDefault(),z.stopPropagation(),z.type==="dragenter"||z.type==="dragover"?h(!0):z.type==="dragleave"&&h(!1)},C=z=>{z.preventDefault(),z.stopPropagation(),h(!1),z.dataTransfer.files&&z.dataTransfer.files[0]&&w(z.dataTransfer.files[0])},E=()=>{i&&I(z=>z===0?i.images.length-1:z-1)},A=()=>{i&&I(z=>z===i.images.length-1?0:z+1)},Z=(z,X)=>{I(0),d({name:z,images:X})};return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(De,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("div",{className:"mb-2",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-muted-foreground",children:s("description")}),e.jsxs(R,{onClick:()=>o(!0),variant:"outline",className:"ml-4 shrink-0",size:"sm",children:[e.jsx(qt,{className:"mr-2 h-4 w-4"}),s("upload.button")]})]})]}),e.jsx("section",{className:"grid gap-6 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3",children:N?e.jsxs(e.Fragment,{children:[e.jsx(za,{}),e.jsx(za,{})]}):p?.themes&&Object.entries(p.themes).map(([z,X])=>e.jsx(qe,{className:"group relative overflow-hidden transition-all hover:shadow-md",style:{backgroundImage:X.background_url?`url(${X.background_url})`:"none",backgroundSize:"cover",backgroundPosition:"center"},children:e.jsxs("div",{className:y("relative z-10 h-full transition-colors",X.background_url?"group-hover:from-background/98 bg-gradient-to-t from-background/95 via-background/80 to-background/60 backdrop-blur-[1px] group-hover:via-background/90 group-hover:to-background/70":"bg-background"),children:[!!X.can_delete&&e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(Je,{title:s("card.delete.title"),description:s("card.delete.description"),confirmText:s("card.delete.button"),variant:"destructive",onConfirm:async()=>{if(z===p?.active){$.error(s("card.delete.error.active"));return}a(z),bd(z).then(()=>{$.success("主题删除成功"),k()}).finally(()=>{a(null)})},children:e.jsx(R,{disabled:n===z,loading:n===z,variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",children:e.jsx(cs,{className:"h-4 w-4"})})})}),e.jsxs(ss,{children:[e.jsx(bs,{children:X.name}),e.jsx(tt,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{children:X.description}),X.version&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("card.version",{version:X.version})})]})})]}),e.jsxs(ts,{className:"flex items-center justify-end space-x-3",children:[X.images&&Array.isArray(X.images)&&X.images.length>0&&e.jsx(R,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>Z(X.name,X.images),children:e.jsx(lo,{className:"h-4 w-4"})}),e.jsx($u,{themeKey:z,themeInfo:X}),e.jsx(R,{onClick:()=>b(z),disabled:n===z||z===p.active,loading:n===z,variant:z===p.active?"secondary":"default",children:z===p.active?s("card.currentTheme"):s("card.activateTheme")})]})]})},z))}),e.jsx(ge,{open:c,onOpenChange:o,children:e.jsxs(xe,{className:"sm:max-w-md",children:[e.jsxs(ve,{children:[e.jsx(je,{children:s("upload.title")}),e.jsx(Te,{children:s("upload.description")})]}),e.jsxs("div",{className:y("relative mt-4 flex h-64 flex-col items-center justify-center rounded-lg border-2 border-dashed border-muted-foreground/25 px-5 py-10 text-center transition-colors",u&&"border-primary/50 bg-muted/50"),onDragEnter:S,onDragLeave:S,onDragOver:S,onDrop:C,children:[e.jsx("input",{type:"file",ref:f,className:"hidden",accept:".zip",onChange:z=>{const X=z.target.files?.[0];X&&w(X)}}),l?e.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[e.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-b-2 border-primary"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("upload.uploading")})]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsx("div",{className:"rounded-full border-2 border-muted-foreground/25 p-3",children:e.jsx(qt,{className:"h-6 w-6 text-muted-foreground/50"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-sm font-medium",children:[s("upload.dragText")," ",e.jsx("button",{type:"button",onClick:()=>f.current?.click(),className:"mx-1 text-primary hover:underline",children:s("upload.clickText")})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s("upload.supportText")})]})]})})]})]})}),e.jsx(ge,{open:!!i,onOpenChange:z=>{z||(d(null),I(0))},children:e.jsxs(xe,{className:"max-w-4xl",children:[e.jsxs(ve,{children:[e.jsxs(je,{children:[i?.name," ",s("preview.title")]}),e.jsx(Te,{className:"text-center",children:i&&s("preview.imageCount",{current:P+1,total:i.images.length})})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"aspect-[16/9] overflow-hidden rounded-lg border bg-muted",children:i?.images[P]&&e.jsx("img",{src:i.images[P],alt:`${i.name} 预览图 ${P+1}`,className:"h-full w-full object-contain"})}),i&&i.images.length>1&&e.jsxs(e.Fragment,{children:[e.jsx(R,{variant:"outline",size:"icon",className:"absolute left-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:E,children:e.jsx(io,{className:"h-4 w-4"})}),e.jsx(R,{variant:"outline",size:"icon",className:"absolute right-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:A,children:e.jsx(oo,{className:"h-4 w-4"})})]})]}),i&&i.images.length>1&&e.jsx("div",{className:"mt-4 flex gap-2 overflow-x-auto pb-2",children:i.images.map((z,X)=>e.jsx("button",{onClick:()=>I(X),className:y("relative h-16 w-16 flex-shrink-0 overflow-hidden rounded-md border-2",P===X?"border-primary":"border-transparent"),children:e.jsx("img",{src:z,alt:`缩略图 ${X+1}`,className:"h-full w-full object-cover"})},X))})]})})]})]})}function za(){return e.jsxs(qe,{children:[e.jsxs(ss,{children:[e.jsx(Ie,{className:"h-6 w-[200px]"}),e.jsx(Ie,{className:"h-4 w-[300px]"})]}),e.jsxs(ts,{className:"flex items-center justify-end space-x-3",children:[e.jsx(Ie,{className:"h-10 w-[100px]"}),e.jsx(Ie,{className:"h-10 w-[100px]"})]})]})}const qu=Object.freeze(Object.defineProperty({__proto__:null,default:Hu},Symbol.toStringTag,{value:"Module"})),xa=m.forwardRef(({className:s,value:n,onChange:a,...l},r)=>{const[c,o]=m.useState("");m.useEffect(()=>{if(c.includes(",")){const h=new Set([...n,...c.split(",").map(i=>i.trim())]);a(Array.from(h)),o("")}},[c,a,n]);const u=()=>{if(c){const h=new Set([...n,c]);a(Array.from(h)),o("")}};return e.jsxs("div",{className:y(" has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-neutral-950 dark:has-[:focus-visible]:ring-neutral-300 flex w-full flex-wrap gap-2 rounded-md border border-input shadow-sm px-3 py-2 text-sm ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",s),children:[n.map(h=>e.jsxs(H,{variant:"secondary",children:[h,e.jsx(J,{variant:"ghost",size:"icon",className:"ml-2 h-3 w-3",onClick:()=>{a(n.filter(i=>i!==h))},children:e.jsx(Bt,{className:"w-3"})})]},h)),e.jsx("input",{className:"flex-1 outline-none placeholder:text-muted-foreground bg-transparent",value:c,onChange:h=>o(h.target.value),onKeyDown:h=>{h.key==="Enter"||h.key===","?(h.preventDefault(),u()):h.key==="Backspace"&&c.length===0&&n.length>0&&(h.preventDefault(),a(n.slice(0,-1)))},...l,ref:r})]})});xa.displayName="InputTags";const Gu=x.object({id:x.number().nullable(),title:x.string().min(1).max(250),content:x.string().min(1),show:x.boolean(),tags:x.array(x.string()),img_url:x.string().nullable()}),Ku={id:null,show:!1,tags:[],img_url:"",title:"",content:""};function Dr({refetch:s,dialogTrigger:n,type:a="add",defaultFormValues:l=Ku}){const{t:r}=M("notice"),[c,o]=m.useState(!1),u=ce({resolver:ue(Gu),defaultValues:l,mode:"onChange",shouldFocusError:!0}),h=new la({html:!0});return e.jsx(he,{...u,children:e.jsxs(ge,{onOpenChange:o,open:c,children:[e.jsx(Oe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add.button")})]})}),e.jsxs(xe,{className:"sm:max-w-[1025px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(a==="add"?"form.add.title":"form.edit.title")}),e.jsx(Te,{})]}),e.jsx(j,{control:u.control,name:"title",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.title.label")}),e.jsx("div",{className:"relative ",children:e.jsx(_,{children:e.jsx(T,{placeholder:r("form.fields.title.placeholder"),...i})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"content",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.content.label")}),e.jsx(_,{children:e.jsx(ia,{style:{height:"500px"},value:i.value,renderHTML:d=>h.render(d),onChange:({text:d})=>{i.onChange(d)}})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"img_url",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.img_url.label")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:r("form.fields.img_url.placeholder"),...i,value:i.value||""})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"show",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.show.label")}),e.jsx("div",{className:"relative py-2",children:e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:i.onChange})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"tags",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.tags.label")}),e.jsx(_,{children:e.jsx(xa,{value:i.value,onChange:i.onChange,placeholder:r("form.fields.tags.placeholder"),className:"w-full"})}),e.jsx(D,{})]})}),e.jsxs(Ve,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.buttons.cancel")})}),e.jsx(R,{type:"submit",onClick:i=>{i.preventDefault(),u.handleSubmit(async d=>{Fd(d).then(({data:f})=>{f&&($.success(r("form.buttons.success")),s(),o(!1))})})()},children:r("form.buttons.submit")})]})]})]})})}function Bu({table:s,refetch:n,saveOrder:a,isSortMode:l}){const{t:r}=M("notice"),c=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between space-x-2 ",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[!l&&e.jsx(Dr,{refetch:n}),!l&&e.jsx(T,{placeholder:r("table.toolbar.search"),value:s.getColumn("title")?.getFilterValue()??"",onChange:o=>s.getColumn("title")?.setFilterValue(o.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),c&&!l&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-9 px-2 lg:px-3",children:[r("table.toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(R,{variant:l?"default":"outline",onClick:a,className:"h-8",size:"sm",children:r(l?"table.toolbar.sort.save":"table.toolbar.sort.edit")})})]})}const Wu=s=>{const{t:n}=M("notice");return[{id:"drag-handle",header:"",cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(co,{className:"h-4 w-4 text-muted-foreground cursor-move"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.id")}),cell:({row:a})=>e.jsx(H,{variant:"outline",className:"font-mono",children:a.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"show",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.show")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(q,{defaultChecked:a.getValue("show"),onCheckedChange:async()=>{const{data:l}=await Ud({id:a.original.id});l||s()}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.title")}),cell:({row:a})=>e.jsx("div",{className:"flex max-w-[500px] items-center",children:e.jsx("span",{className:"truncate font-medium",children:a.getValue("title")})}),enableSorting:!1,size:6e3},{id:"actions",header:({column:a})=>e.jsx(V,{className:"justify-end",column:a,title:n("table.columns.actions")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(Dr,{refetch:s,dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("table.actions.edit")})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Je,{title:n("table.actions.delete.title"),description:n("table.actions.delete.description"),onConfirm:async()=>{zd({id:a.original.id}).then(()=>{$.success(n("table.actions.delete.success")),s()})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("table.actions.delete.title")})]})})]}),size:100}]};function Yu(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[o,u]=m.useState([]),[h,i]=m.useState(!1),[d,f]=m.useState({}),[P,I]=m.useState({pageSize:50,pageIndex:0}),[p,N]=m.useState([]),{refetch:k}=se({queryKey:["notices"],queryFn:async()=>{const{data:E}=await Ad();return N(E),E}});m.useEffect(()=>{l({"drag-handle":h,content:!h,created_at:!h,actions:!h}),I({pageSize:h?99999:50,pageIndex:0})},[h]);const b=(E,A)=>{h&&(E.dataTransfer.setData("text/plain",A.toString()),E.currentTarget.classList.add("opacity-50"))},w=(E,A)=>{if(!h)return;E.preventDefault(),E.currentTarget.classList.remove("bg-muted");const Z=parseInt(E.dataTransfer.getData("text/plain"));if(Z===A)return;const z=[...p],[X]=z.splice(Z,1);z.splice(A,0,X),N(z)},S=async()=>{if(!h){i(!0);return}gm(p.map(E=>E.id)).then(()=>{$.success("排序保存成功"),i(!1),k()}).finally(()=>{i(!1)})},C=Ae({data:p??[],columns:Wu(k),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:d,pagination:P},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,onColumnSizingChange:f,onPaginationChange:I,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx("div",{className:"space-y-4",children:e.jsx(Ye,{table:C,toolbar:E=>e.jsx(Bu,{table:E,refetch:k,saveOrder:S,isSortMode:h}),draggable:h,onDragStart:b,onDragEnd:E=>E.currentTarget.classList.remove("opacity-50"),onDragOver:E=>{E.preventDefault(),E.currentTarget.classList.add("bg-muted")},onDragLeave:E=>E.currentTarget.classList.remove("bg-muted"),onDrop:w,showPagination:!h})})}function Ju(){const{t:s}=M("notice");return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(De,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Yu,{})})]})]})}const Qu=Object.freeze(Object.defineProperty({__proto__:null,default:Ju},Symbol.toStringTag,{value:"Module"})),Zu=x.object({id:x.number().nullable(),language:x.string().max(250),category:x.string().max(250),title:x.string().min(1).max(250),body:x.string().min(1),show:x.boolean()}),Xu={id:null,language:"zh-CN",category:"",title:"",body:"",show:!1};function Rr({refreshData:s,dialogTrigger:n,type:a="add",defaultFormValues:l=Xu}){const{t:r}=M("knowledge"),[c,o]=m.useState(!1),u=ce({resolver:ue(Zu),defaultValues:l,mode:"onChange",shouldFocusError:!0}),h=new la({html:!0});return m.useEffect(()=>{c&&l.id&&Hd(l.id).then(({data:i})=>{u.reset(i)})},[l.id,u,c]),e.jsxs(ge,{onOpenChange:o,open:c,children:[e.jsx(Oe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add")})]})}),e.jsxs(xe,{className:"sm:max-w-[1025px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(a==="add"?"form.add":"form.edit")}),e.jsx(Te,{})]}),e.jsxs(he,{...u,children:[e.jsx(j,{control:u.control,name:"title",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.title")}),e.jsx("div",{className:"relative ",children:e.jsx(_,{children:e.jsx(T,{placeholder:r("form.titlePlaceholder"),...i})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"category",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.category")}),e.jsx("div",{className:"relative ",children:e.jsx(_,{children:e.jsx(T,{placeholder:r("form.categoryPlaceholder"),...i})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"language",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.language")}),e.jsx(_,{children:e.jsxs(W,{value:i.value,onValueChange:i.onChange,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("form.languagePlaceholder")})}),e.jsx(B,{children:[{value:"en-US"},{value:"ja-JP"},{value:"ko-KR"},{value:"vi-VN"},{value:"zh-CN"},{value:"zh-TW"}].map(d=>e.jsx(U,{value:d.value,className:"cursor-pointer",children:r(`languages.${d.value}`)},d.value))})]})})]})}),e.jsx(j,{control:u.control,name:"body",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.content")}),e.jsx(_,{children:e.jsx(ia,{style:{height:"500px"},value:i.value,renderHTML:d=>h.render(d),onChange:({text:d})=>{i.onChange(d)}})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"show",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.show")}),e.jsx("div",{className:"relative py-2",children:e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:i.onChange})})}),e.jsx(D,{})]})}),e.jsxs(Ve,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.cancel")})}),e.jsx(R,{type:"submit",onClick:()=>{u.handleSubmit(i=>{qd(i).then(({data:d})=>{d&&(u.reset(),$.success(r("messages.operationSuccess")),o(!1),s())})})()},children:r("form.submit")})]})]})]})]})}function eh({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Is,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(c=>{const o=r.has(c.value);return e.jsxs(Ne,{onSelect:()=>{o?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",o?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ds,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(qs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}function sh({table:s,refetch:n,saveOrder:a,isSortMode:l}){const r=s.getState().columnFilters.length>0,{t:c}=M("knowledge");return e.jsxs("div",{className:"flex items-center justify-between",children:[l?e.jsx("p",{className:"text-sm text-muted-foreground",children:c("toolbar.sortModeHint")}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Rr,{refreshData:n}),e.jsx(T,{placeholder:c("toolbar.searchPlaceholder"),value:s.getColumn("title")?.getFilterValue()??"",onChange:o=>s.getColumn("title")?.setFilterValue(o.target.value),className:"h-8 w-[250px]"}),s.getColumn("category")&&e.jsx(eh,{column:s.getColumn("category"),title:c("columns.category"),options:Array.from(new Set(s.getCoreRowModel().rows.map(o=>o.getValue("category")))).map(o=>({label:o,value:o}))}),r&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:[c("toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:l?"default":"outline",onClick:a,size:"sm",children:c(l?"toolbar.saveSort":"toolbar.editSort")})})]})}const th=({refetch:s,isSortMode:n=!1})=>{const{t:a}=M("knowledge");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:n?"cursor-move":"opacity-0",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.id")}),cell:({row:l})=>e.jsx(H,{variant:"outline",className:"justify-center",children:l.getValue("id")}),enableSorting:!0,size:70},{accessorKey:"show",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.status")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx(q,{defaultChecked:l.getValue("show"),onCheckedChange:async()=>{Kd({id:l.original.id}).then(({data:r})=>{r||s()})}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.title")}),cell:({row:l})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"line-clamp-2 font-medium",children:l.getValue("title")})}),enableSorting:!0,size:600},{accessorKey:"category",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.category")}),cell:({row:l})=>e.jsx(H,{variant:"secondary",className:"max-w-[180px] truncate",children:l.getValue("category")}),enableSorting:!0,size:1800},{id:"actions",header:({column:l})=>e.jsx(V,{className:"justify-end",column:l,title:a("columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-end space-x-1",children:[e.jsx(Rr,{refreshData:s,dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:a("form.edit")})]}),type:"edit",defaultFormValues:l.original}),e.jsx(Je,{title:a("messages.deleteConfirm"),description:a("messages.deleteDescription"),confirmText:a("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Gd({id:l.original.id}).then(({data:r})=>{r&&($.success(a("messages.operationSuccess")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:a("messages.deleteButton")})]})})]}),size:100}]};function ah(){const[s,n]=m.useState([]),[a,l]=m.useState([]),[r,c]=m.useState(!1),[o,u]=m.useState([]),[h,i]=m.useState({"drag-handle":!1}),[d,f]=m.useState({pageSize:20,pageIndex:0}),{refetch:P,isLoading:I,data:p}=se({queryKey:["knowledge"],queryFn:async()=>{const{data:S}=await $d();return u(S||[]),S}});m.useEffect(()=>{i({"drag-handle":r,actions:!r}),f({pageSize:r?99999:10,pageIndex:0})},[r]);const N=(S,C)=>{r&&(S.dataTransfer.setData("text/plain",C.toString()),S.currentTarget.classList.add("opacity-50"))},k=(S,C)=>{if(!r)return;S.preventDefault(),S.currentTarget.classList.remove("bg-muted");const E=parseInt(S.dataTransfer.getData("text/plain"));if(E===C)return;const A=[...o],[Z]=A.splice(E,1);A.splice(C,0,Z),u(A)},b=async()=>{r?Bd({ids:o.map(S=>S.id)}).then(()=>{P(),c(!1),$.success("排序保存成功")}):c(!0)},w=Ae({data:o,columns:th({refetch:P,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:h,pagination:d},onSortingChange:l,onColumnFiltersChange:n,onColumnVisibilityChange:i,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:w,toolbar:S=>e.jsx(sh,{table:S,refetch:P,saveOrder:b,isSortMode:r}),draggable:r,onDragStart:N,onDragEnd:S=>S.currentTarget.classList.remove("opacity-50"),onDragOver:S=>{S.preventDefault(),S.currentTarget.classList.add("bg-muted")},onDragLeave:S=>S.currentTarget.classList.remove("bg-muted"),onDrop:k,showPagination:!r})}function nh(){const{t:s}=M("knowledge");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight mb-2",children:s("title")}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(ah,{})})]})]})}const rh=Object.freeze(Object.defineProperty({__proto__:null,default:nh},Symbol.toStringTag,{value:"Module"}));function lh(s,n){const[a,l]=m.useState(s);return m.useEffect(()=>{const r=setTimeout(()=>l(s),n);return()=>{clearTimeout(r)}},[s,n]),a}function zt(s,n){if(s.length===0)return{};if(!n)return{"":s};const a={};return s.forEach(l=>{const r=l[n]||"";a[r]||(a[r]=[]),a[r].push(l)}),a}function ih(s,n){const a=JSON.parse(JSON.stringify(s));for(const[l,r]of Object.entries(a))a[l]=r.filter(c=>!n.find(o=>o.value===c.value));return a}function oh(s,n){for(const[,a]of Object.entries(s))if(a.some(l=>n.find(r=>r.value===l.value)))return!0;return!1}const Er=m.forwardRef(({className:s,...n},a)=>mo(r=>r.filtered.count===0)?e.jsx("div",{ref:a,className:y("py-6 text-center text-sm",s),"cmdk-empty":"",role:"presentation",...n}):null);Er.displayName="CommandEmpty";const lt=m.forwardRef(({value:s,onChange:n,placeholder:a,defaultOptions:l=[],options:r,delay:c,onSearch:o,loadingIndicator:u,emptyIndicator:h,maxSelected:i=Number.MAX_SAFE_INTEGER,onMaxSelected:d,hidePlaceholderWhenSelected:f,disabled:P,groupBy:I,className:p,badgeClassName:N,selectFirstItem:k=!0,creatable:b=!1,triggerSearchOnFocus:w=!1,commandProps:S,inputProps:C,hideClearAllButton:E=!1},A)=>{const Z=m.useRef(null),[z,X]=m.useState(!1),Gs=m.useRef(!1),[ba,ya]=m.useState(!1),[ee,Ks]=m.useState(s||[]),[Ss,_a]=m.useState(zt(l,I)),[xs,Vt]=m.useState(""),Bs=lh(xs,c||500);m.useImperativeHandle(A,()=>({selectedValue:[...ee],input:Z.current,focus:()=>Z.current?.focus()}),[ee]);const mt=m.useCallback(G=>{const ae=ee.filter(Pe=>Pe.value!==G.value);Ks(ae),n?.(ae)},[n,ee]),sl=m.useCallback(G=>{const ae=Z.current;ae&&((G.key==="Delete"||G.key==="Backspace")&&ae.value===""&&ee.length>0&&(ee[ee.length-1].fixed||mt(ee[ee.length-1])),G.key==="Escape"&&ae.blur())},[mt,ee]);m.useEffect(()=>{s&&Ks(s)},[s]),m.useEffect(()=>{if(!r||o)return;const G=zt(r||[],I);JSON.stringify(G)!==JSON.stringify(Ss)&&_a(G)},[l,r,I,o,Ss]),m.useEffect(()=>{const G=async()=>{ya(!0);const Pe=await o?.(Bs);_a(zt(Pe||[],I)),ya(!1)};(async()=>{!o||!z||(w&&await G(),Bs&&await G())})()},[Bs,I,z,w]);const tl=()=>{if(!b||oh(Ss,[{value:xs,label:xs}])||ee.find(ae=>ae.value===xs))return;const G=e.jsx(Ne,{value:xs,className:"cursor-pointer",onMouseDown:ae=>{ae.preventDefault(),ae.stopPropagation()},onSelect:ae=>{if(ee.length>=i){d?.(ee.length);return}Vt("");const Pe=[...ee,{value:ae,label:ae}];Ks(Pe),n?.(Pe)},children:`Create "${xs}"`});if(!o&&xs.length>0||o&&Bs.length>0&&!ba)return G},al=m.useCallback(()=>{if(h)return o&&!b&&Object.keys(Ss).length===0?e.jsx(Ne,{value:"-",disabled:!0,children:h}):e.jsx(Er,{children:h})},[b,h,o,Ss]),nl=m.useMemo(()=>ih(Ss,ee),[Ss,ee]),rl=m.useCallback(()=>{if(S?.filter)return S.filter;if(b)return(G,ae)=>G.toLowerCase().includes(ae.toLowerCase())?1:-1},[b,S?.filter]),ll=m.useCallback(()=>{const G=ee.filter(ae=>ae.fixed);Ks(G),n?.(G)},[n,ee]);return e.jsxs(Ns,{...S,onKeyDown:G=>{sl(G),S?.onKeyDown?.(G)},className:y("h-auto overflow-visible bg-transparent",S?.className),shouldFilter:S?.shouldFilter!==void 0?S.shouldFilter:!o,filter:rl(),children:[e.jsx("div",{className:y("rounded-md border border-input text-sm ring-offset-background focus-within:ring-1 focus-within:ring-ring ",{"px-3 py-2":ee.length!==0,"cursor-text":!P&&ee.length!==0},p),onClick:()=>{P||Z.current?.focus()},children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[ee.map(G=>e.jsxs(H,{className:y("data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground","data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground",N),"data-fixed":G.fixed,"data-disabled":P||void 0,children:[G.label,e.jsx("button",{className:y("ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",(P||G.fixed)&&"hidden"),onKeyDown:ae=>{ae.key==="Enter"&&mt(G)},onMouseDown:ae=>{ae.preventDefault(),ae.stopPropagation()},onClick:()=>mt(G),children:e.jsx(Bt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},G.value)),e.jsx(Se.Input,{...C,ref:Z,value:xs,disabled:P,onValueChange:G=>{Vt(G),C?.onValueChange?.(G)},onBlur:G=>{Gs.current===!1&&X(!1),C?.onBlur?.(G)},onFocus:G=>{X(!0),w&&o?.(Bs),C?.onFocus?.(G)},placeholder:f&&ee.length!==0?"":a,className:y("flex-1 bg-transparent outline-none placeholder:text-muted-foreground",{"w-full":f,"px-3 py-2":ee.length===0,"ml-1":ee.length!==0},C?.className)}),e.jsx("button",{type:"button",onClick:ll,className:y((E||P||ee.length<1||ee.filter(G=>G.fixed).length===ee.length)&&"hidden"),children:e.jsx(Bt,{})})]})}),e.jsx("div",{className:"relative",children:z&&e.jsx(ws,{className:"absolute top-1 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",onMouseLeave:()=>{Gs.current=!1},onMouseEnter:()=>{Gs.current=!0},onMouseUp:()=>{Z.current?.focus()},children:ba?e.jsx(e.Fragment,{children:u}):e.jsxs(e.Fragment,{children:[al(),tl(),!k&&e.jsx(Ne,{value:"-",className:"hidden"}),Object.entries(nl).map(([G,ae])=>e.jsx(Me,{heading:G,className:"h-full overflow-auto",children:e.jsx(e.Fragment,{children:ae.map(Pe=>e.jsx(Ne,{value:Pe.value,disabled:Pe.disable,onMouseDown:Ws=>{Ws.preventDefault(),Ws.stopPropagation()},onSelect:()=>{if(ee.length>=i){d?.(ee.length);return}Vt("");const Ws=[...ee,Pe];Ks(Ws),n?.(Ws)},className:y("cursor-pointer",Pe.disable&&"cursor-default text-muted-foreground"),children:Pe.label},Pe.value))})},G))]})})})]})});lt.displayName="MultipleSelector";const ch=s=>x.object({id:x.number().optional(),name:x.string().min(2,s("messages.nameValidation.min")).max(50,s("messages.nameValidation.max")).regex(/^[a-zA-Z0-9\u4e00-\u9fa5_-]+$/,s("messages.nameValidation.pattern"))});function Ot({refetch:s,dialogTrigger:n,defaultValues:a={name:""},type:l="add"}){const{t:r}=M("group"),c=ce({resolver:ue(ch(r)),defaultValues:a,mode:"onChange"}),[o,u]=m.useState(!1),[h,i]=m.useState(!1),d=async f=>{i(!0),kd(f).then(()=>{$.success(r(l==="edit"?"messages.updateSuccess":"messages.createSuccess")),s&&s(),c.reset(),u(!1)}).finally(()=>{i(!1)})};return e.jsxs(ge,{open:o,onOpenChange:u,children:[e.jsx(Oe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("span",{children:r("form.add")})]})}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(l==="edit"?"form.edit":"form.create")}),e.jsx(Te,{children:r(l==="edit"?"form.editDescription":"form.createDescription")})]}),e.jsx(he,{...c,children:e.jsxs("form",{onSubmit:c.handleSubmit(d),className:"space-y-4",children:[e.jsx(j,{control:c.control,name:"name",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.name")}),e.jsx(_,{children:e.jsx(T,{placeholder:r("form.namePlaceholder"),...f,className:"w-full"})}),e.jsx(O,{children:r("form.nameDescription")}),e.jsx(D,{})]})}),e.jsxs(Ve,{className:"gap-2",children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.cancel")})}),e.jsxs(R,{type:"submit",disabled:h||!c.formState.isValid,children:[h&&e.jsx(ra,{className:"mr-2 h-4 w-4 animate-spin"}),r(l==="edit"?"form.update":"form.create")]})]})]})})]})]})}const Ir=m.createContext(void 0);function dh({children:s,refetch:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null),[o,u]=m.useState(ye.Shadowsocks);return e.jsx(Ir.Provider,{value:{isOpen:a,setIsOpen:l,editingServer:r,setEditingServer:c,serverType:o,setServerType:u,refetch:n},children:s})}function Mr(){const s=m.useContext(Ir);if(s===void 0)throw new Error("useServerEdit must be used within a ServerEditProvider");return s}function Ut({dialogTrigger:s,value:n,setValue:a,templateType:l}){const{t:r}=M("server");m.useEffect(()=>{console.log(n)},[n]);const[c,o]=m.useState(!1),[u,h]=m.useState(()=>{if(!n||Object.keys(n).length===0)return"";try{return JSON.stringify(n,null,2)}catch{return""}}),[i,d]=m.useState(null),f=b=>{if(!b)return null;try{const w=JSON.parse(b);return typeof w!="object"||w===null?r("network_settings.validation.must_be_object"):null}catch{return r("network_settings.validation.invalid_json")}},P={tcp:{label:"TCP",content:{acceptProxyProtocol:!1,header:{type:"none"}}},"tcp-http":{label:"TCP + HTTP",content:{acceptProxyProtocol:!1,header:{type:"http",request:{version:"1.1",method:"GET",path:["/"],headers:{Host:["www.example.com"]}},response:{version:"1.1",status:"200",reason:"OK"}}}},grpc:{label:"gRPC",content:{serviceName:"GunService"}},ws:{label:"WebSocket",content:{path:"/",headers:{Host:"v2ray.com"}}}},I=()=>{switch(l){case"tcp":return["tcp","tcp-http"];case"grpc":return["grpc"];case"ws":return["ws"];default:return[]}},p=()=>{const b=f(u||"");if(b){$.error(b);return}try{if(!u){a(null),o(!1);return}a(JSON.parse(u)),o(!1)}catch{$.error(r("network_settings.errors.save_failed"))}},N=b=>{h(b),d(f(b))},k=b=>{const w=P[b];if(w){const S=JSON.stringify(w.content,null,2);h(S),d(null)}};return m.useEffect(()=>{c&&console.log(n)},[c,n]),m.useEffect(()=>{c&&n&&Object.keys(n).length>0&&h(JSON.stringify(n,null,2))},[c,n]),e.jsxs(ge,{open:c,onOpenChange:b=>{!b&&c&&p(),o(b)},children:[e.jsx(Oe,{asChild:!0,children:s??e.jsx(J,{variant:"link",children:r("network_settings.edit_protocol")})}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsx(ve,{children:e.jsx(je,{children:r("network_settings.edit_protocol_config")})}),e.jsxs("div",{className:"space-y-4",children:[I().length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:I().map(b=>e.jsx(J,{variant:"outline",size:"sm",onClick:()=>k(b),children:r("network_settings.use_template",{template:P[b].label})},b))}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Cs,{className:`min-h-[200px] font-mono text-sm ${i?"border-red-500 focus-visible:ring-red-500":""}`,value:u,placeholder:I().length>0?r("network_settings.json_config_placeholder_with_template"):r("network_settings.json_config_placeholder"),onChange:b=>N(b.target.value)}),i&&e.jsx("p",{className:"text-sm text-red-500",children:i})]})]}),e.jsxs(Ve,{className:"gap-2",children:[e.jsx(J,{variant:"outline",onClick:()=>o(!1),children:r("common.cancel")}),e.jsx(J,{onClick:p,disabled:!!i,children:r("common.confirm")})]})]})]})}function dp(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const mh={},uh=Object.freeze(Object.defineProperty({__proto__:null,default:mh},Symbol.toStringTag,{value:"Module"})),mp=Co(uh),Ua=s=>s.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),hh=()=>{try{const s=uo.box.keyPair(),n=Ua(Ta.encodeBase64(s.secretKey)),a=Ua(Ta.encodeBase64(s.publicKey));return{privateKey:n,publicKey:a}}catch(s){throw console.error("Error generating x25519 key pair:",s),s}},xh=()=>{try{return hh()}catch(s){throw console.error("Error generating key pair:",s),s}},ph=s=>{const n=new Uint8Array(Math.ceil(s/2));return window.crypto.getRandomValues(n),Array.from(n).map(a=>a.toString(16).padStart(2,"0")).join("").substring(0,s)},fh=()=>{const s=Math.floor(Math.random()*8)*2+2;return ph(s)},gh=x.object({cipher:x.string().default("aes-128-gcm"),obfs:x.string().default("0"),obfs_settings:x.object({path:x.string().default(""),host:x.string().default("")}).default({})}),jh=x.object({tls:x.coerce.number().default(0),tls_settings:x.object({server_name:x.string().default(""),allow_insecure:x.boolean().default(!1)}).default({}),network:x.string().default("tcp"),network_settings:x.record(x.any()).default({})}),vh=x.object({server_name:x.string().default(""),allow_insecure:x.boolean().default(!1),network:x.string().default("tcp"),network_settings:x.record(x.any()).default({})}),bh=x.object({version:x.coerce.number().default(2),alpn:x.string().default("h2"),obfs:x.object({open:x.coerce.boolean().default(!1),type:x.string().default("salamander"),password:x.string().default("")}).default({}),tls:x.object({server_name:x.string().default(""),allow_insecure:x.boolean().default(!1)}).default({}),bandwidth:x.object({up:x.string().default(""),down:x.string().default("")}).default({})}),yh=x.object({tls:x.coerce.number().default(0),tls_settings:x.object({server_name:x.string().default(""),allow_insecure:x.boolean().default(!1)}).default({}),reality_settings:x.object({server_port:x.coerce.number().default(443),server_name:x.string().default(""),allow_insecure:x.boolean().default(!1),public_key:x.string().default(""),private_key:x.string().default(""),short_id:x.string().default("")}).default({}),network:x.string().default("tcp"),network_settings:x.record(x.any()).default({}),flow:x.string().default("")}),rs={shadowsocks:{schema:gh,ciphers:["aes-128-gcm","aes-192-gcm","aes-256-gcm","chacha20-ietf-poly1305","2022-blake3-aes-128-gcm","2022-blake3-aes-256-gcm"]},vmess:{schema:jh,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},trojan:{schema:vh,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},hysteria:{schema:bh,versions:["1","2"],alpnOptions:["hysteria","http/1.1","h2","h3"]},vless:{schema:yh,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"},{value:"kcp",label:"mKCP"},{value:"httpupgrade",label:"HttpUpgrade"},{value:"xhttp",label:"XHTTP"}],flowOptions:["none","xtls-rprx-direct","xtls-rprx-splice","xtls-rprx-vision"]}},_h=({serverType:s,value:n,onChange:a})=>{const{t:l}=M("server"),r=s?rs[s]:null,c=r?.schema||x.record(x.any()),o=s?c.parse({}):{},u=ce({resolver:ue(c),defaultValues:o,mode:"onChange"});if(m.useEffect(()=>{if(!n||Object.keys(n).length===0){if(s){const p=c.parse({});u.reset(p)}}else u.reset(n)},[s,n,a,u,c]),m.useEffect(()=>{const p=u.watch(N=>{a(N)});return()=>p.unsubscribe()},[u,a]),!s||!r)return null;const I={shadowsocks:()=>e.jsxs(e.Fragment,{children:[e.jsx(j,{control:u.control,name:"cipher",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.shadowsocks.cipher.label")}),e.jsx(_,{children:e.jsxs(W,{onValueChange:p.onChange,value:p.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.shadowsocks.cipher.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:rs.shadowsocks.ciphers.map(N=>e.jsx(U,{value:N,children:N},N))})})]})})]})}),e.jsx(j,{control:u.control,name:"obfs",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.shadowsocks.obfs.label")}),e.jsx(_,{children:e.jsxs(W,{onValueChange:p.onChange,value:p.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.shadowsocks.obfs.placeholder")})}),e.jsx(B,{children:e.jsxs(ps,{children:[e.jsx(U,{value:"0",children:l("dynamic_form.shadowsocks.obfs.none")}),e.jsx(U,{value:"http",children:l("dynamic_form.shadowsocks.obfs.http")})]})})]})})]})}),u.watch("obfs")==="http"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"obfs_settings.path",render:({field:p})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:l("dynamic_form.shadowsocks.obfs_settings.path"),...p})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"obfs_settings.host",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:l("dynamic_form.shadowsocks.obfs_settings.host"),...p})}),e.jsx(D,{})]})})]})]}),vmess:()=>e.jsxs(e.Fragment,{children:[e.jsx(j,{control:u.control,name:"tls",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vmess.tls.label")}),e.jsx(_,{children:e.jsxs(W,{value:p.value?.toString(),onValueChange:N=>p.onChange(Number(N)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vmess.tls.placeholder")})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:l("dynamic_form.vmess.tls.disabled")}),e.jsx(U,{value:"1",children:l("dynamic_form.vmess.tls.enabled")})]})]})})]})}),u.watch("tls")==1&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"tls_settings.server_name",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.vmess.tls_settings.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.vmess.tls_settings.server_name.placeholder"),...p})})]})}),e.jsx(j,{control:u.control,name:"tls_settings.allow_insecure",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vmess.tls_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(q,{checked:p.value,onCheckedChange:p.onChange})})})]})})]}),e.jsx(j,{control:u.control,name:"network",render:({field:p})=>e.jsxs(g,{children:[e.jsxs(v,{children:[l("dynamic_form.vmess.network.label"),e.jsx(Ut,{value:u.watch("network_settings"),setValue:N=>u.setValue("network_settings",N),templateType:u.watch("network")})]}),e.jsx(_,{children:e.jsxs(W,{onValueChange:p.onChange,value:p.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vmess.network.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:rs.vmess.networkOptions.map(N=>e.jsx(U,{value:N.value,className:"cursor-pointer",children:N.label},N.value))})})]})})]})})]}),trojan:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"server_name",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.trojan.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.trojan.server_name.placeholder"),...p,value:p.value||""})})]})}),e.jsx(j,{control:u.control,name:"allow_insecure",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.trojan.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(q,{checked:p.value||!1,onCheckedChange:p.onChange})})})]})})]}),e.jsx(j,{control:u.control,name:"network",render:({field:p})=>e.jsxs(g,{children:[e.jsxs(v,{children:[l("dynamic_form.trojan.network.label"),e.jsx(Ut,{value:u.watch("network_settings")||{},setValue:N=>u.setValue("network_settings",N),templateType:u.watch("network")||"tcp"})]}),e.jsx(_,{children:e.jsxs(W,{onValueChange:p.onChange,value:p.value||"tcp",children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.trojan.network.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:rs.trojan.networkOptions.map(N=>e.jsx(U,{value:N.value,className:"cursor-pointer",children:N.label},N.value))})})]})})]})})]}),hysteria:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"version",render:({field:p})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:l("dynamic_form.hysteria.version.label")}),e.jsx(_,{children:e.jsxs(W,{value:(p.value||2).toString(),onValueChange:N=>p.onChange(Number(N)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.version.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:rs.hysteria.versions.map(N=>e.jsxs(U,{value:N,className:"cursor-pointer",children:["V",N]},N))})})]})})]})}),u.watch("version")==1&&e.jsx(j,{control:u.control,name:"alpn",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.hysteria.alpn.label")}),e.jsx(_,{children:e.jsxs(W,{value:p.value||"h2",onValueChange:p.onChange,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.alpn.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:rs.hysteria.alpnOptions.map(N=>e.jsx(U,{value:N,children:N},N))})})]})})]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"obfs.open",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.hysteria.obfs.label")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(q,{checked:p.value||!1,onCheckedChange:p.onChange})})})]})}),!!u.watch("obfs.open")&&e.jsxs(e.Fragment,{children:[u.watch("version")=="2"&&e.jsx(j,{control:u.control,name:"obfs.type",render:({field:p})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:l("dynamic_form.hysteria.obfs.type.label")}),e.jsx(_,{children:e.jsxs(W,{value:p.value||"salamander",onValueChange:p.onChange,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.obfs.type.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:e.jsx(U,{value:"salamander",children:l("dynamic_form.hysteria.obfs.type.salamander")})})})]})})]})}),e.jsx(j,{control:u.control,name:"obfs.password",render:({field:p})=>e.jsxs(g,{className:u.watch("version")==2?"w-full":"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.hysteria.obfs.password.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.hysteria.obfs.password.placeholder"),...p,value:p.value||"",className:"pr-9"})}),e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",k=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(b=>N[b%N.length]).join("");u.setValue("obfs.password",k),$.success(l("dynamic_form.hysteria.obfs.password.generate_success"))},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(_e,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})]})]})})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"tls.server_name",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.hysteria.tls.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.hysteria.tls.server_name.placeholder"),...p,value:p.value||""})})]})}),e.jsx(j,{control:u.control,name:"tls.allow_insecure",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.hysteria.tls.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(q,{checked:p.value||!1,onCheckedChange:p.onChange})})})]})})]}),e.jsx(j,{control:u.control,name:"bandwidth.up",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.hysteria.bandwidth.up.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:l("dynamic_form.hysteria.bandwidth.up.placeholder")+(u.watch("version")==2?l("dynamic_form.hysteria.bandwidth.up.bbr_tip"):""),className:"rounded-br-none rounded-tr-none",...p,value:p.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:l("dynamic_form.hysteria.bandwidth.up.suffix")})})]})]})}),e.jsx(j,{control:u.control,name:"bandwidth.down",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.hysteria.bandwidth.down.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:l("dynamic_form.hysteria.bandwidth.down.placeholder")+(u.watch("version")==2?l("dynamic_form.hysteria.bandwidth.down.bbr_tip"):""),className:"rounded-br-none rounded-tr-none",...p,value:p.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:l("dynamic_form.hysteria.bandwidth.down.suffix")})})]})]})})]}),vless:()=>e.jsxs(e.Fragment,{children:[e.jsx(j,{control:u.control,name:"tls",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.tls.label")}),e.jsx(_,{children:e.jsxs(W,{value:p.value?.toString(),onValueChange:N=>p.onChange(Number(N)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.tls.placeholder")})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:l("dynamic_form.vless.tls.none")}),e.jsx(U,{value:"1",children:l("dynamic_form.vless.tls.tls")}),e.jsx(U,{value:"2",children:l("dynamic_form.vless.tls.reality")})]})]})})]})}),u.watch("tls")=="1"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"tls_settings.server_name",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.vless.tls_settings.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.vless.tls_settings.server_name.placeholder"),...p})})]})}),e.jsx(j,{control:u.control,name:"tls_settings.allow_insecure",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.tls_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(q,{checked:p.value,onCheckedChange:p.onChange})})})]})})]}),u.watch("tls")==2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"reality_settings.server_name",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.vless.reality_settings.server_name.placeholder"),...p})})]})}),e.jsx(j,{control:u.control,name:"reality_settings.server_port",render:({field:p})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.server_port.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.vless.reality_settings.server_port.placeholder"),...p})})]})}),e.jsx(j,{control:u.control,name:"reality_settings.allow_insecure",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(q,{checked:p.value,onCheckedChange:p.onChange})})})]})})]}),e.jsx("div",{className:"flex items-end gap-2",children:e.jsx(j,{control:u.control,name:"reality_settings.private_key",render:({field:p})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.private_key.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(_,{children:e.jsx(T,{...p,className:"pr-9"})}),e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{try{const N=xh();u.setValue("reality_settings.private_key",N.privateKey),u.setValue("reality_settings.public_key",N.publicKey),$.success(l("dynamic_form.vless.reality_settings.key_pair.success"))}catch{$.error(l("dynamic_form.vless.reality_settings.key_pair.error"))}},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(_e,{icon:"ion:key-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})}),e.jsx(yt,{children:e.jsx(te,{children:e.jsx("p",{children:l("dynamic_form.vless.reality_settings.key_pair.generate")})})})]})]})]})})}),e.jsx(j,{control:u.control,name:"reality_settings.public_key",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.public_key.label")}),e.jsx(_,{children:e.jsx(T,{...p})})]})}),e.jsx(j,{control:u.control,name:"reality_settings.short_id",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.short_id.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(_,{children:e.jsx(T,{...p,className:"pr-9",placeholder:l("dynamic_form.vless.reality_settings.short_id.placeholder")})}),e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const N=fh();u.setValue("reality_settings.short_id",N),$.success(l("dynamic_form.vless.reality_settings.short_id.success"))},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(_e,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})}),e.jsx(yt,{children:e.jsx(te,{children:e.jsx("p",{children:l("dynamic_form.vless.reality_settings.short_id.generate")})})})]})]}),e.jsx(O,{className:"text-xs text-muted-foreground",children:l("dynamic_form.vless.reality_settings.short_id.description")})]})})]}),e.jsx(j,{control:u.control,name:"network",render:({field:p})=>e.jsxs(g,{children:[e.jsxs(v,{children:[l("dynamic_form.vless.network.label"),e.jsx(Ut,{value:u.watch("network_settings"),setValue:N=>u.setValue("network_settings",N),templateType:u.watch("network")})]}),e.jsx(_,{children:e.jsxs(W,{onValueChange:p.onChange,value:p.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.network.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:rs.vless.networkOptions.map(N=>e.jsx(U,{value:N.value,className:"cursor-pointer",children:N.label},N.value))})})]})})]})}),e.jsx(j,{control:u.control,name:"flow",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.flow.label")}),e.jsx(_,{children:e.jsxs(W,{onValueChange:N=>p.onChange(N==="none"?null:N),value:p.value||"none",children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.flow.placeholder")})}),e.jsx(B,{children:rs.vless.flowOptions.map(N=>e.jsx(U,{value:N,children:N},N))})]})})]})})]})};return e.jsx(oe,{children:I[s]?.()})},Nh=x.object({id:x.number().optional().nullable(),code:x.string().optional(),name:x.string().min(1,"form.name.error"),rate:x.string().min(1,"form.rate.error"),tags:x.array(x.string()).default([]),excludes:x.array(x.string()).default([]),ips:x.array(x.string()).default([]),group_ids:x.array(x.string()).default([]),host:x.string().min(1,"form.host.error"),port:x.string().min(1,"form.port.error"),server_port:x.string().min(1,"form.server_port.error"),parent_id:x.string().default("0").nullable(),route_ids:x.array(x.string()).default([]),protocol_settings:x.record(x.any()).default({}).nullable()}),xt={id:null,code:"",name:"",rate:"1",tags:[],excludes:[],ips:[],group_ids:[],host:"",port:"",server_port:"",parent_id:"0",route_ids:[],protocol_settings:null};function wh(){const{t:s}=M("server"),{isOpen:n,setIsOpen:a,editingServer:l,setEditingServer:r,serverType:c,setServerType:o,refetch:u}=Mr(),[h,i]=m.useState([]),[d,f]=m.useState([]),[P,I]=m.useState([]),p=ce({resolver:ue(Nh),defaultValues:xt,mode:"onChange"});m.useEffect(()=>{N()},[n]),m.useEffect(()=>{l?.type&&l.type!==c&&o(l.type)},[l,c,o]),m.useEffect(()=>{l?l.type===c&&p.reset({...xt,...l}):p.reset({...xt,protocol_settings:rs[c].schema.parse({})})},[l,p,c]);const N=async()=>{if(!n)return;const[C,E,A]=await Promise.all([Mt(),pr(),xr()]);i(C.data?.map(Z=>({label:Z.name,value:Z.id.toString()}))||[]),f(E.data?.map(Z=>({label:Z.remarks,value:Z.id.toString()}))||[]),I(A.data||[])},k=m.useMemo(()=>P?.filter(C=>(C.parent_id===0||C.parent_id===null)&&C.type===c&&C.id!==p.watch("id")),[c,P,p]),b=()=>e.jsxs(ys,{children:[e.jsx(_s,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:s("form.add_node")})]})}),e.jsx(is,{align:"start",children:e.jsx(Bc,{children:Ps.map(({type:C,label:E})=>e.jsx(pe,{onClick:()=>{o(C),a(!0)},className:"cursor-pointer",children:e.jsx(H,{variant:"outline",className:"text-white",style:{background:ls[C]},children:E})},C))})})]}),w=()=>{a(!1),r(null),p.reset(xt)},S=async()=>{const C=p.getValues();(await _d({...C,type:c})).data&&(w(),$.success(s("form.success")),u())};return e.jsxs(ge,{open:n,onOpenChange:w,children:[b(),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:s(l?"form.edit_node":"form.new_node")}),e.jsx(Te,{})]}),e.jsxs(he,{...p,children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:p.control,name:"name",render:({field:C})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:s("form.name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("form.name.placeholder"),...C})}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"rate",render:({field:C})=>e.jsxs(g,{className:"flex-[1]",children:[e.jsx(v,{children:s("form.rate.label")}),e.jsx("div",{className:"relative flex",children:e.jsx(_,{children:e.jsx(T,{type:"number",min:"0",step:"0.1",...C})})}),e.jsx(D,{})]})})]}),e.jsx(j,{control:p.control,name:"code",render:({field:C})=>e.jsxs(g,{children:[e.jsxs(v,{children:[s("form.code.label"),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:s("form.code.optional")})]}),e.jsx(_,{children:e.jsx(T,{placeholder:s("form.code.placeholder"),...C,value:C.value||""})}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"tags",render:({field:C})=>e.jsxs(g,{children:[e.jsx(v,{children:s("form.tags.label")}),e.jsx(_,{children:e.jsx(xa,{value:C.value,onChange:C.onChange,placeholder:s("form.tags.placeholder"),className:"w-full"})}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"group_ids",render:({field:C})=>e.jsxs(g,{children:[e.jsxs(v,{className:"flex items-center justify-between",children:[s("form.groups.label"),e.jsx(Ot,{dialogTrigger:e.jsx(R,{variant:"link",children:s("form.groups.add")}),refetch:N})]}),e.jsx(_,{children:e.jsx(lt,{options:h,onChange:E=>C.onChange(E.map(A=>A.value)),value:h?.filter(E=>C.value.includes(E.value)),placeholder:s("form.groups.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:s("form.groups.empty")})})}),e.jsx(D,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:p.control,name:"host",render:({field:C})=>e.jsxs(g,{children:[e.jsx(v,{children:s("form.host.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("form.host.placeholder"),...C})}),e.jsx(D,{})]})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(j,{control:p.control,name:"port",render:({field:C})=>e.jsxs(g,{className:"flex-1",children:[e.jsxs(v,{className:"flex items-center gap-1.5",children:[s("form.port.label"),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(_e,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(yt,{children:e.jsx(te,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:s("form.port.tooltip")})})})]})})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(_,{children:e.jsx(T,{placeholder:s("form.port.placeholder"),...C})}),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0 text-muted-foreground/50 hover:text-muted-foreground",onClick:()=>{const E=C.value;E&&p.setValue("server_port",E)},children:e.jsx(_e,{icon:"tabler:arrows-right",className:"size-3"})})}),e.jsx(te,{side:"right",children:e.jsx("p",{children:s("form.port.sync")})})]})})]}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"server_port",render:({field:C})=>e.jsxs(g,{className:"flex-1",children:[e.jsxs(v,{className:"flex items-center gap-1.5",children:[s("form.server_port.label"),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(_e,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(yt,{children:e.jsx(te,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:s("form.server_port.tooltip")})})})]})})]}),e.jsx(_,{children:e.jsx(T,{placeholder:s("form.server_port.placeholder"),...C})}),e.jsx(D,{})]})})]})]}),n&&e.jsx(_h,{serverType:c,value:p.watch("protocol_settings"),onChange:C=>p.setValue("protocol_settings",C,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}),e.jsx(j,{control:p.control,name:"parent_id",render:({field:C})=>e.jsxs(g,{children:[e.jsx(v,{children:s("form.parent.label")}),e.jsxs(W,{onValueChange:C.onChange,value:C.value?.toString()||"0",children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:s("form.parent.placeholder")})})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("form.parent.none")}),k?.map(E=>e.jsx(U,{value:E.id.toString(),className:"cursor-pointer",children:E.name},E.id))]})]}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"route_ids",render:({field:C})=>e.jsxs(g,{children:[e.jsx(v,{children:s("form.route.label")}),e.jsx(_,{children:e.jsx(lt,{options:d,onChange:E=>C.onChange(E.map(A=>A.value)),value:d?.filter(E=>C.value.includes(E.value)),placeholder:s("form.route.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:s("form.route.empty")})})}),e.jsx(D,{})]})})]}),e.jsxs(Ve,{className:"mt-6",children:[e.jsx(R,{type:"button",variant:"outline",onClick:w,children:s("form.cancel")}),e.jsx(R,{type:"submit",onClick:S,children:s("form.submit")})]})]})]})]})}function $a({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Is,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(c=>{const o=r.has(c.value);return e.jsxs(Ne,{onSelect:()=>{o?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},className:"cursor-pointer",children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",o?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ds,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(qs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center cursor-pointer",children:"Clear filters"})})]})]})]})})]})}const Ch=[{value:ye.Shadowsocks,label:Ps.find(s=>s.type===ye.Shadowsocks)?.label,color:ls[ye.Shadowsocks]},{value:ye.Vmess,label:Ps.find(s=>s.type===ye.Vmess)?.label,color:ls[ye.Vmess]},{value:ye.Trojan,label:Ps.find(s=>s.type===ye.Trojan)?.label,color:ls[ye.Trojan]},{value:ye.Hysteria,label:Ps.find(s=>s.type===ye.Hysteria)?.label,color:ls[ye.Hysteria]},{value:ye.Vless,label:Ps.find(s=>s.type===ye.Vless)?.label,color:ls[ye.Vless]}];function Sh({table:s,saveOrder:n,isSortMode:a,groups:l}){const r=s.getState().columnFilters.length>0,{t:c}=M("server"),o=l.map(u=>({label:u,value:u}));return e.jsxs("div",{className:"flex items-center justify-between ",children:[e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[!a&&e.jsxs(e.Fragment,{children:[e.jsx(wh,{}),e.jsx(T,{placeholder:c("toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:u=>s.getColumn("name")?.setFilterValue(u.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex gap-x-2",children:[s.getColumn("type")&&e.jsx($a,{column:s.getColumn("type"),title:c("toolbar.type"),options:Ch}),s.getColumn("groups")&&e.jsx($a,{column:s.getColumn("groups"),title:c("columns.groups.title"),options:o})]}),r&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[c("toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]}),a&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:c("toolbar.sort.tip")})})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:a?"default":"outline",onClick:n,size:"sm",children:c(a?"toolbar.sort.save":"toolbar.sort.edit")})})]})}const it=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19M12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4"})}),pt={0:"bg-destructive/80 shadow-sm shadow-destructive/50",1:"bg-yellow-500/80 shadow-sm shadow-yellow-500/50",2:"bg-emerald-500/80 shadow-sm shadow-emerald-500/50"},kh=s=>{const{t:n}=M("server");return[{id:"drag-handle",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.sort")}),cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Dt,{className:"size-4 cursor-move text-muted-foreground transition-colors hover:text-primary","aria-hidden":"true"})}),size:50},{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.nodeId")}),cell:({row:a})=>{const l=a.getValue("id"),r=a.original.code;return e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"group/id flex items-center space-x-2",children:[e.jsxs(H,{variant:"outline",className:y("border-2 font-medium transition-all duration-200 hover:opacity-80","flex items-center gap-1.5"),style:{borderColor:ls[a.original.type]},children:[e.jsx(zn,{className:"size-3"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"flex items-center gap-0.5",children:r??l}),a.original.parent?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm text-muted-foreground/30",children:"→"}),e.jsx("span",{children:a.original.parent?.code||a.original.parent?.id})]}):""]})]}),e.jsx(R,{variant:"ghost",size:"icon",className:"size-5 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:text-muted-foreground group-hover/id:opacity-100",onClick:c=>{c.stopPropagation(),wt(r||l.toString())},children:e.jsx(Da,{className:"size-3"})})]})}),e.jsxs(te,{side:"top",className:"flex flex-col gap-1 p-3",children:[e.jsxs("p",{className:"font-medium",children:[Ps.find(c=>c.type===a.original.type)?.label,a.original.parent_id?" (子节点)":""]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r?"点击括号内容或复制按钮可复制节点代码":"点击复制按钮可复制节点ID"})]})]})})},size:200,enableSorting:!0},{accessorKey:"show",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.show")}),cell:({row:a})=>{const[l,r]=m.useState(!!a.getValue("show"));return e.jsx(q,{checked:l,onCheckedChange:async c=>{r(c),Cd({id:a.original.id,type:a.original.type,show:c?1:0}).catch(()=>{r(!c),s()})},style:{backgroundColor:l?ls[a.original.type]:void 0}})},size:50,enableSorting:!1},{accessorKey:"name",header:({column:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(V,{column:a,title:n("columns.node"),tooltip:e.jsxs("div",{className:"grid grid-cols-1 gap-3 p-2",children:[e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",pt[0])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.0")})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",pt[1])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.1")})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",pt[2])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.2")})]})]})})}),cell:({row:a})=>e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("size-2.5 flex-shrink-0 rounded-full transition-all duration-200",pt[a.original.available_status])}),e.jsx("span",{className:"text-left font-medium transition-colors hover:text-primary",children:a.getValue("name")})]})}),e.jsx(te,{children:e.jsx("p",{className:"font-medium",children:n(`columns.status.${a.original.available_status}`)})})]})}),enableSorting:!1,size:200},{accessorKey:"host",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.address")}),cell:({row:a})=>{const l=`${a.original.host}:${a.original.port}`,r=a.original.port!==a.original.server_port;return e.jsxs("div",{className:"group relative flex min-w-0 items-start",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1 gap-y-0.5 pr-7",children:[e.jsx("div",{className:"flex items-center ",children:e.jsxs("span",{className:"font-mono text-sm font-medium text-foreground/90",children:[a.original.host,":",a.original.port]})}),r&&e.jsxs("span",{className:"whitespace-nowrap text-[0.7rem] tracking-tight text-muted-foreground/40",children:["(",n("columns.internalPort")," ",a.original.server_port,")"]})]}),e.jsx("div",{className:"absolute right-0 top-0",children:e.jsx(oe,{delayDuration:0,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"ghost",size:"icon",className:"size-6 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:bg-muted/50 hover:text-muted-foreground group-hover:opacity-100",onClick:c=>{c.stopPropagation(),wt(l)},children:e.jsx(Da,{className:"size-3"})})}),e.jsx(te,{side:"top",sideOffset:10,children:n("columns.copyAddress")})]})})})]})},enableSorting:!1,enableHiding:!0},{accessorKey:"online",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.onlineUsers.title"),tooltip:n("columns.onlineUsers.tooltip")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(it,{className:"size-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("online")})]}),size:80,enableSorting:!0,enableHiding:!0},{accessorKey:"rate",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.rate.title"),tooltip:n("columns.rate.tooltip")}),cell:({row:a})=>e.jsxs(H,{variant:"secondary",className:"font-medium",children:[a.getValue("rate")," x"]}),size:80,enableSorting:!1,enableHiding:!0},{accessorKey:"groups",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.groups.title"),tooltip:n("columns.groups.tooltip")}),cell:({row:a})=>{const l=a.getValue("groups")||[];return e.jsx("div",{className:"flex min-w-[300px] max-w-[600px] flex-wrap items-center gap-1.5",children:l.length>0?l.map((r,c)=>e.jsx(H,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:r.name},c)):e.jsx("span",{className:"text-sm text-muted-foreground",children:n("columns.groups.empty")})})},enableSorting:!1,size:600,filterFn:(a,l,r)=>{const c=a.getValue(l);return c?r.some(o=>c.includes(o)):!1}},{accessorKey:"type",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.type")}),cell:({row:a})=>{const l=a.getValue("type");return e.jsx(H,{variant:"outline",className:"border-2 font-medium transition-colors",style:{borderColor:ls[l]},children:l})},enableSorting:!1,enableHiding:!0,enableColumnFilter:!1,size:8e3},{id:"actions",header:({column:a})=>e.jsx(V,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>{const{setIsOpen:l,setEditingServer:r,setServerType:c}=Mr();return e.jsx("div",{className:"flex justify-center",children:e.jsxs(ys,{modal:!1,children:[e.jsx(_s,{asChild:!0,children:e.jsx(R,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":n("columns.actions"),children:e.jsx(_t,{className:"size-4"})})}),e.jsxs(is,{align:"end",className:"w-40",children:[e.jsx(pe,{className:"cursor-pointer",onClick:()=>{c(a.original.type),r(a.original),l(!0)},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(ho,{className:"mr-2 size-4"}),n("columns.actions_dropdown.edit")]})}),e.jsxs(pe,{className:"cursor-pointer",onClick:async()=>{wd({id:a.original.id}).then(({data:o})=>{o&&($.success(n("columns.actions_dropdown.copy_success")),s())})},children:[e.jsx(xo,{className:"mr-2 size-4"}),n("columns.actions_dropdown.copy")]}),e.jsx(at,{}),e.jsx(pe,{className:"cursor-pointer text-destructive focus:text-destructive",onSelect:o=>o.preventDefault(),children:e.jsx(Je,{title:n("columns.actions_dropdown.delete.title"),description:n("columns.actions_dropdown.delete.description"),confirmText:n("columns.actions_dropdown.delete.confirm"),variant:"destructive",onConfirm:async()=>{Nd({id:a.original.id}).then(({data:o})=>{o&&($.success(n("columns.actions_dropdown.delete_success")),s())})},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(cs,{className:"mr-2 size-4"}),n("columns.actions_dropdown.delete.confirm")]})})})]})]})})},size:50}]};function Ph(){const[s,n]=m.useState({}),[a,l]=m.useState({"drag-handle":!1}),[r,c]=m.useState([]),[o,u]=m.useState({pageSize:500,pageIndex:0}),[h,i]=m.useState([]),[d,f]=m.useState(!1),[P,I]=m.useState({}),[p,N]=m.useState([]),{refetch:k}=se({queryKey:["nodeList"],queryFn:async()=>{const{data:A}=await xr();return N(A),A}}),b=m.useMemo(()=>{const A=new Set;return p.forEach(Z=>{Z.groups&&Z.groups.forEach(z=>A.add(z.name))}),Array.from(A).sort()},[p]);m.useEffect(()=>{l({"drag-handle":d,show:!d,host:!d,online:!d,rate:!d,groups:!d,type:!1,actions:!d}),I({name:d?2e3:200}),u({pageSize:d?99999:500,pageIndex:0})},[d]);const w=(A,Z)=>{d&&(A.dataTransfer.setData("text/plain",Z.toString()),A.currentTarget.classList.add("opacity-50"))},S=(A,Z)=>{if(!d)return;A.preventDefault(),A.currentTarget.classList.remove("bg-muted");const z=parseInt(A.dataTransfer.getData("text/plain"));if(z===Z)return;const X=[...p],[Gs]=X.splice(z,1);X.splice(Z,0,Gs),N(X)},C=async()=>{if(!d){f(!0);return}const A=p?.map((Z,z)=>({id:Z.id,order:z+1}));Sd(A).then(()=>{$.success("排序保存成功"),f(!1),k()}).finally(()=>{f(!1)})},E=Ae({data:p||[],columns:kh(k),state:{sorting:h,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:P,pagination:o},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:i,onColumnFiltersChange:c,onColumnVisibilityChange:l,onColumnSizingChange:I,onPaginationChange:u,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(dh,{refetch:k,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Ye,{table:E,toolbar:A=>e.jsx(Sh,{table:A,refetch:k,saveOrder:C,isSortMode:d,groups:b}),draggable:d,onDragStart:w,onDragEnd:A=>A.currentTarget.classList.remove("opacity-50"),onDragOver:A=>{A.preventDefault(),A.currentTarget.classList.add("bg-muted")},onDragLeave:A=>A.currentTarget.classList.remove("bg-muted"),onDrop:S,showPagination:!d})})})}function Th(){const{t:s}=M("server");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("manage.title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("manage.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ph,{})})]})]})}const Dh=Object.freeze(Object.defineProperty({__proto__:null,default:Th},Symbol.toStringTag,{value:"Module"}));function Rh({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=M("group");return e.jsx("div",{className:"flex items-center justify-between space-x-4",children:e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsx(Ot,{refetch:n}),e.jsx(T,{placeholder:l("toolbar.searchPlaceholder"),value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:y("h-8 w-[150px] lg:w-[250px]",a&&"border-primary/50 ring-primary/20")}),a&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})})}const Eh=s=>{const{t:n}=M("group");return[{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.id")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(H,{variant:"outline",children:a.getValue("id")})}),enableSorting:!0},{accessorKey:"name",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium",children:a.getValue("name")})})},{accessorKey:"users_count",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.usersCount")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(it,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"server_count",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.serverCount")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(zn,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("server_count")})]}),enableSorting:!0,size:8e3},{id:"actions",header:({column:a})=>e.jsx(V,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Ot,{defaultValues:a.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("form.edit")})]})}),e.jsx(Je,{title:n("messages.deleteConfirm"),description:n("messages.deleteDescription"),confirmText:n("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Pd({id:a.original.id}).then(({data:l})=>{l&&($.success(n("messages.updateSuccess")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("messages.deleteButton")})]})})]})}]};function Ih(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[o,u]=m.useState([]),{data:h,refetch:i,isLoading:d}=se({queryKey:["serverGroupList"],queryFn:async()=>{const{data:P}=await Mt();return P}}),f=Ae({data:h||[],columns:Eh(i),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:f,toolbar:P=>e.jsx(Rh,{table:P,refetch:i}),isLoading:d})}function Mh(){const{t:s}=M("group");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ih,{})})]})]})}const Oh=Object.freeze(Object.defineProperty({__proto__:null,default:Mh},Symbol.toStringTag,{value:"Module"})),Vh=s=>x.object({remarks:x.string().min(1,s("form.validation.remarks")),match:x.array(x.string()),action:x.enum(["block","dns"]),action_value:x.string().optional()});function Or({refetch:s,dialogTrigger:n,defaultValues:a={remarks:"",match:[],action:"block",action_value:""},type:l="add"}){const{t:r}=M("route"),c=ce({resolver:ue(Vh(r)),defaultValues:a,mode:"onChange"}),[o,u]=m.useState(!1);return e.jsxs(ge,{open:o,onOpenChange:u,children:[e.jsx(Oe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add")})]})}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(l==="edit"?"form.edit":"form.create")}),e.jsx(Te,{})]}),e.jsxs(he,{...c,children:[e.jsx(j,{control:c.control,name:"remarks",render:({field:h})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:r("form.remarks")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:r("form.remarksPlaceholder"),...h})})}),e.jsx(D,{})]})}),e.jsx(j,{control:c.control,name:"match",render:({field:h})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:r("form.match")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsx(Cs,{className:"min-h-[120px]",placeholder:r("form.matchPlaceholder"),value:h.value.join(` +`),onChange:i=>{h.onChange(i.target.value.split(` +`))}})})}),e.jsx(D,{})]})}),e.jsx(j,{control:c.control,name:"action",render:({field:h})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.action")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsxs(W,{onValueChange:h.onChange,defaultValue:h.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("form.actionPlaceholder")})}),e.jsxs(B,{children:[e.jsx(U,{value:"block",children:r("actions.block")}),e.jsx(U,{value:"dns",children:r("actions.dns")})]})]})})}),e.jsx(D,{})]})}),c.watch("action")==="dns"&&e.jsx(j,{control:c.control,name:"action_value",render:({field:h})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.dns")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:r("form.dnsPlaceholder"),...h})})})]})}),e.jsxs(Ve,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{variant:"outline",children:r("form.cancel")})}),e.jsx(R,{type:"submit",onClick:()=>{Td(c.getValues()).then(({data:h})=>{h&&(u(!1),s&&s(),toast.success(r(l==="edit"?"messages.updateSuccess":"messages.createSuccess")),c.reset())})},children:r("form.submit")})]})]})]})]})}function Lh({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=M("route");return e.jsx("div",{className:"flex items-center justify-between ",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[e.jsx(Or,{refetch:n}),e.jsx(T,{placeholder:l("toolbar.searchPlaceholder"),value:s.getColumn("remarks")?.getFilterValue()??"",onChange:r=>s.getColumn("remarks")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),a&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})})}function Ah({columns:s,data:n,refetch:a}){const[l,r]=m.useState({}),[c,o]=m.useState({}),[u,h]=m.useState([]),[i,d]=m.useState([]),f=Ae({data:n,columns:s,state:{sorting:i,columnVisibility:c,rowSelection:l,columnFilters:u},enableRowSelection:!0,onRowSelectionChange:r,onSortingChange:d,onColumnFiltersChange:h,onColumnVisibilityChange:o,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:f,toolbar:P=>e.jsx(Lh,{table:P,refetch:a})})}const Fh=s=>{const{t:n}=M("route"),a={block:{icon:po,variant:"destructive",className:"bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-400 hover:bg-red-200 dark:hover:bg-red-800"},dns:{icon:fo,variant:"secondary",className:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-400 hover:bg-blue-200 dark:hover:bg-blue-800"}};return[{accessorKey:"id",header:({column:l})=>e.jsx(V,{column:l,title:n("columns.id")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(H,{variant:"outline",children:l.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"remarks",header:({column:l})=>e.jsx(V,{column:l,title:n("columns.remarks")}),cell:({row:l})=>{const r=l.original.match?.length||0;return e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:n("columns.matchRules",{count:r})})})},enableHiding:!1,enableSorting:!1},{accessorKey:"action",header:({column:l})=>e.jsx(V,{column:l,title:n("columns.action")}),cell:({row:l})=>{const r=l.getValue("action"),c=a[r]?.icon;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(H,{variant:a[r]?.variant||"default",className:y("flex items-center gap-1.5 px-3 py-1 capitalize",a[r]?.className),children:[c&&e.jsx(c,{className:"h-3.5 w-3.5"}),n(`actions.${r}`)]})})},enableSorting:!1,size:9e3},{id:"actions",header:()=>e.jsx("div",{className:"text-right",children:n("columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Or,{defaultValues:l.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("form.edit")})]})}),e.jsx(Je,{title:n("messages.deleteConfirm"),description:n("messages.deleteDescription"),confirmText:n("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Dd({id:l.original.id}).then(({data:r})=>{r&&($.success(n("messages.deleteSuccess")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("messages.deleteButton")})]})})]})}]};function zh(){const{t:s}=M("route"),[n,a]=m.useState([]);function l(){pr().then(({data:r})=>{a(r)})}return m.useEffect(()=>{l()},[]),e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ah,{data:n,columns:Fh(l),refetch:l})})]})]})}const Uh=Object.freeze(Object.defineProperty({__proto__:null,default:zh},Symbol.toStringTag,{value:"Module"})),Vr=m.createContext(void 0);function $h({children:s,refreshData:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null);return e.jsx(Vr.Provider,{value:{isOpen:a,setIsOpen:l,editingPlan:r,setEditingPlan:c,refreshData:n},children:s})}function pa(){const s=m.useContext(Vr);if(s===void 0)throw new Error("usePlanEdit must be used within a PlanEditProvider");return s}function Hh({table:s,saveOrder:n,isSortMode:a}){const{setIsOpen:l}=pa(),{t:r}=M("subscribe");return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsxs(R,{variant:"outline",className:"space-x-2",size:"sm",onClick:()=>l(!0),children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:r("plan.add")})]}),e.jsx(T,{placeholder:r("plan.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:c=>s.getColumn("name")?.setFilterValue(c.target.value),className:"h-8 w-[150px] lg:w-[250px]"})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:a?"default":"outline",onClick:n,size:"sm",children:r(a?"plan.sort.save":"plan.sort.edit")})})]})}const Ha={monthly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},quarterly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},half_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},two_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},three_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},onetime:{color:"text-slate-700",bgColor:"bg-slate-100/80"},reset_traffic:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},qh=s=>{const{t:n}=M("subscribe");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:"cursor-move",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.id")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(H,{variant:"outline",children:a.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"show",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.show")}),cell:({row:a})=>e.jsx(q,{defaultChecked:a.getValue("show"),onCheckedChange:l=>{Ft({id:a.original.id,show:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"sell",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.sell")}),cell:({row:a})=>e.jsx(q,{defaultChecked:a.getValue("sell"),onCheckedChange:l=>{Ft({id:a.original.id,sell:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"renew",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.renew"),tooltip:n("plan.columns.renew_tooltip")}),cell:({row:a})=>e.jsx(q,{defaultChecked:a.getValue("renew"),onCheckedChange:l=>{Ft({id:a.original.id,renew:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a.getValue("name")})}),enableSorting:!1,enableHiding:!1,size:900},{accessorKey:"users_count",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.stats")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-2",children:[e.jsx(it,{}),e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"group",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.group")}),cell:({row:a})=>e.jsx("div",{className:"flex max-w-[600px] flex-wrap items-center gap-1.5 text-nowrap",children:e.jsx(H,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:a.getValue("group")?.name})}),enableSorting:!1,enableHiding:!1},{accessorKey:"prices",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.price")}),cell:({row:a})=>{const l=a.getValue("prices"),r=[{period:n("plan.columns.price_period.monthly"),key:"monthly",unit:n("plan.columns.price_period.unit.month")},{period:n("plan.columns.price_period.quarterly"),key:"quarterly",unit:n("plan.columns.price_period.unit.quarter")},{period:n("plan.columns.price_period.half_yearly"),key:"half_yearly",unit:n("plan.columns.price_period.unit.half_year")},{period:n("plan.columns.price_period.yearly"),key:"yearly",unit:n("plan.columns.price_period.unit.year")},{period:n("plan.columns.price_period.two_yearly"),key:"two_yearly",unit:n("plan.columns.price_period.unit.two_year")},{period:n("plan.columns.price_period.three_yearly"),key:"three_yearly",unit:n("plan.columns.price_period.unit.three_year")},{period:n("plan.columns.price_period.onetime"),key:"onetime",unit:""},{period:n("plan.columns.price_period.reset_traffic"),key:"reset_traffic",unit:n("plan.columns.price_period.unit.times")}];return e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:r.map(({period:c,key:o,unit:u})=>l[o]!=null&&e.jsxs(H,{variant:"secondary",className:y("px-2 py-0.5 font-medium transition-colors text-nowrap",Ha[o].color,Ha[o].bgColor,"border border-border/50","hover:bg-slate-200/80"),children:[c," ¥",l[o],u]},o))})},enableSorting:!1,size:9e3},{id:"actions",header:({column:a})=>e.jsx(V,{className:"justify-end",column:a,title:n("plan.columns.actions")}),cell:({row:a})=>{const{setIsOpen:l,setEditingPlan:r}=pa();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>{r(a.original),l(!0)},children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("plan.columns.edit")})]}),e.jsx(Je,{title:n("plan.columns.delete_confirm.title"),description:n("plan.columns.delete_confirm.description"),confirmText:n("plan.columns.delete"),variant:"destructive",onConfirm:async()=>{Yd({id:a.original.id}).then(({data:c})=>{c&&($.success(n("plan.columns.delete_confirm.success")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("plan.columns.delete")})]})})]})}}]},Gh=x.object({id:x.number().nullable(),group_id:x.union([x.number(),x.string()]).nullable().optional(),name:x.string().min(1).max(250),content:x.string().nullable().optional(),transfer_enable:x.union([x.number().min(0),x.string().min(1)]),prices:x.object({monthly:x.union([x.number(),x.string()]).nullable().optional(),quarterly:x.union([x.number(),x.string()]).nullable().optional(),half_yearly:x.union([x.number(),x.string()]).nullable().optional(),yearly:x.union([x.number(),x.string()]).nullable().optional(),two_yearly:x.union([x.number(),x.string()]).nullable().optional(),three_yearly:x.union([x.number(),x.string()]).nullable().optional(),onetime:x.union([x.number(),x.string()]).nullable().optional(),reset_traffic:x.union([x.number(),x.string()]).nullable().optional()}).default({}),speed_limit:x.union([x.number(),x.string()]).nullable().optional(),capacity_limit:x.union([x.number(),x.string()]).nullable().optional(),device_limit:x.union([x.number(),x.string()]).nullable().optional(),force_update:x.boolean().optional(),reset_traffic_method:x.number().nullable(),users_count:x.number().optional()}),Lr=m.forwardRef(({className:s,...n},a)=>e.jsx(Un,{ref:a,className:y("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",s),...n,children:e.jsx(go,{className:y("flex items-center justify-center text-current"),children:e.jsx(Ds,{className:"h-4 w-4"})})}));Lr.displayName=Un.displayName;const ft={id:null,group_id:null,name:"",content:"",transfer_enable:"",prices:{monthly:"",quarterly:"",half_yearly:"",yearly:"",two_yearly:"",three_yearly:"",onetime:"",reset_traffic:""},speed_limit:"",capacity_limit:"",device_limit:"",force_update:!1,reset_traffic_method:null},gt={monthly:{label:"月付",months:1,discount:1},quarterly:{label:"季付",months:3,discount:.95},half_yearly:{label:"半年付",months:6,discount:.9},yearly:{label:"年付",months:12,discount:.85},two_yearly:{label:"两年付",months:24,discount:.8},three_yearly:{label:"三年付",months:36,discount:.75},onetime:{label:"流量包",months:1,discount:1},reset_traffic:{label:"重置包",months:1,discount:1}},Kh=[{value:null,label:"follow_system"},{value:0,label:"monthly_first"},{value:1,label:"monthly_reset"},{value:2,label:"no_reset"},{value:3,label:"yearly_first"},{value:4,label:"yearly_reset"}];function Bh(){const{isOpen:s,setIsOpen:n,editingPlan:a,setEditingPlan:l,refreshData:r}=pa(),[c,o]=m.useState(!1),{t:u}=M("subscribe"),h=ce({resolver:ue(Gh),defaultValues:{...ft,...a||{}},mode:"onChange"});m.useEffect(()=>{a?h.reset({...ft,...a}):h.reset(ft)},[a,h]);const i=new la({html:!0}),[d,f]=m.useState();async function P(){Mt().then(({data:N})=>{f(N)})}m.useEffect(()=>{s&&P()},[s]);const I=N=>{if(isNaN(N))return;const k=Object.entries(gt).reduce((b,[w,S])=>{const C=N*S.months*S.discount;return{...b,[w]:C.toFixed(2)}},{});h.setValue("prices",k,{shouldDirty:!0})},p=()=>{n(!1),l(null),h.reset(ft)};return e.jsx(ge,{open:s,onOpenChange:p,children:e.jsxs(xe,{children:[e.jsxs(ve,{children:[e.jsx(je,{children:u(a?"plan.form.edit_title":"plan.form.add_title")}),e.jsx(Te,{})]}),e.jsxs(he,{...h,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:h.control,name:"name",render:({field:N})=>e.jsxs(g,{children:[e.jsx(v,{children:u("plan.form.name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:u("plan.form.name.placeholder"),...N})}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"group_id",render:({field:N})=>e.jsxs(g,{children:[e.jsxs(v,{className:"flex items-center justify-between",children:[u("plan.form.group.label"),e.jsx(Ot,{dialogTrigger:e.jsx(R,{variant:"link",children:u("plan.form.group.add")}),refetch:P})]}),e.jsxs(W,{value:N.value?.toString()??"",onValueChange:k=>N.onChange(k?Number(k):null),children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:u("plan.form.group.placeholder")})})}),e.jsx(B,{children:d?.map(k=>e.jsx(U,{value:k.id.toString(),children:k.name},k.id))})]}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"transfer_enable",render:({field:N})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:u("plan.form.transfer.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.transfer.placeholder"),className:"rounded-r-none",...N})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.transfer.unit")})]}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"speed_limit",render:({field:N})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:u("plan.form.speed.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.speed.placeholder"),className:"rounded-r-none",...N,value:N.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.speed.unit")})]}),e.jsx(D,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center",children:[e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"}),e.jsx("h3",{className:"mx-4 text-sm font-medium text-gray-500 dark:text-gray-400",children:u("plan.form.price.title")}),e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(T,{type:"number",placeholder:u("plan.form.price.base_price"),className:"h-7 w-32 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500",onChange:N=>{const k=parseFloat(N.target.value);I(k)}})]}),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>{const N=Object.keys(gt).reduce((k,b)=>({...k,[b]:""}),{});h.setValue("prices",N,{shouldDirty:!0})},children:u("plan.form.price.clear.button")})}),e.jsx(te,{side:"top",align:"end",children:e.jsx("p",{className:"text-xs",children:u("plan.form.price.clear.tooltip")})})]})})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-3",children:Object.entries(gt).filter(([N])=>!["onetime","reset_traffic"].includes(N)).map(([N,k])=>e.jsx("div",{className:"group relative rounded-md bg-card p-2 ring-1 ring-gray-200 transition-all hover:ring-primary dark:ring-gray-800",children:e.jsx(j,{control:h.control,name:`prices.${N}`,render:({field:b})=>e.jsxs(g,{children:[e.jsxs(v,{className:"text-xs font-medium text-muted-foreground",children:[u(`plan.columns.price_period.${N}`),e.jsxs("span",{className:"ml-1 text-[10px] text-gray-400",children:["(",k.months===1?u("plan.form.price.period.monthly"):u("plan.form.price.period.months",{count:k.months}),")"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:"0.00",min:0,...b,value:b.value??"",onChange:w=>b.onChange(w.target.value),className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})},N))}),e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:Object.entries(gt).filter(([N])=>["onetime","reset_traffic"].includes(N)).map(([N,k])=>e.jsx("div",{className:"rounded-md border border-dashed border-gray-200 bg-muted/30 p-3 dark:border-gray-700",children:e.jsx(j,{control:h.control,name:`prices.${N}`,render:({field:b})=>e.jsx(g,{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"space-y-0",children:[e.jsx(v,{className:"text-xs font-medium",children:u(`plan.columns.price_period.${N}`)}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:u(N==="onetime"?"plan.form.price.onetime_desc":"plan.form.price.reset_desc")})]}),e.jsxs("div",{className:"relative w-full md:w-32",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:"0.00",min:0,...b,className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})})},N))})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(j,{control:h.control,name:"device_limit",render:({field:N})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:u("plan.form.device.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.device.placeholder"),className:"rounded-r-none",...N,value:N.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.device.unit")})]}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"capacity_limit",render:({field:N})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:u("plan.form.capacity.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.capacity.placeholder"),className:"rounded-r-none",...N,value:N.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.capacity.unit")})]}),e.jsx(D,{})]})})]}),e.jsx(j,{control:h.control,name:"reset_traffic_method",render:({field:N})=>e.jsxs(g,{children:[e.jsx(v,{children:u("plan.form.reset_method.label")}),e.jsxs(W,{value:N.value?.toString()??"null",onValueChange:k=>N.onChange(k=="null"?null:Number(k)),children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:u("plan.form.reset_method.placeholder")})})}),e.jsx(B,{children:Kh.map(k=>e.jsx(U,{value:k.value?.toString()??"null",children:u(`plan.form.reset_method.options.${k.label}`)},k.value))})]}),e.jsx(O,{className:"text-xs",children:u("plan.form.reset_method.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"content",render:({field:N})=>{const[k,b]=m.useState(!1);return e.jsxs(g,{className:"space-y-2",children:[e.jsxs(v,{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[u("plan.form.content.label"),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>b(!k),children:k?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z"}),e.jsx("path",{fillRule:"evenodd",d:"M.664 10.59a1.651 1.651 0 010-1.186A10.004 10.004 0 0110 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0110 17c-4.257 0-7.893-2.66-9.336-6.41zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{fillRule:"evenodd",d:"M3.28 2.22a.75.75 0 00-1.06 1.06l14.5 14.5a.75.75 0 101.06-1.06l-1.745-1.745a10.029 10.029 0 003.3-4.38 1.651 1.651 0 000-1.185A10.004 10.004 0 009.999 3a9.956 9.956 0 00-4.744 1.194L3.28 2.22zM7.752 6.69l1.092 1.092a2.5 2.5 0 013.374 3.373l1.091 1.092a4 4 0 00-5.557-5.557z",clipRule:"evenodd"}),e.jsx("path",{d:"M10.748 13.93l2.523 2.523a9.987 9.987 0 01-3.27.547c-4.258 0-7.894-2.66-9.337-6.41a1.651 1.651 0 010-1.186A10.007 10.007 0 012.839 6.02L6.07 9.252a4 4 0 004.678 4.678z"})]})})}),e.jsx(te,{side:"top",children:e.jsx("p",{className:"text-xs",children:u(k?"plan.form.content.preview_button.hide":"plan.form.content.preview_button.show")})})]})})]}),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"outline",size:"sm",onClick:()=>{N.onChange(u("plan.form.content.template.content"))},children:u("plan.form.content.template.button")})}),e.jsx(te,{side:"left",align:"center",children:e.jsx("p",{className:"text-xs",children:u("plan.form.content.template.tooltip")})})]})})]}),e.jsxs("div",{className:`grid gap-4 ${k?"grid-cols-1 lg:grid-cols-2":"grid-cols-1"}`,children:[e.jsx("div",{className:"space-y-2",children:e.jsx(_,{children:e.jsx(ia,{style:{height:"400px"},value:N.value||"",renderHTML:w=>i.render(w),onChange:({text:w})=>N.onChange(w),config:{view:{menu:!0,md:!0,html:!1},canView:{menu:!0,md:!0,html:!1,fullScreen:!1,hideMenu:!1}},placeholder:u("plan.form.content.placeholder"),className:"rounded-md border"})})}),k&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:u("plan.form.content.preview")}),e.jsx("div",{className:"prose prose-sm dark:prose-invert h-[400px] max-w-none overflow-y-auto rounded-md border p-4",children:e.jsx("div",{dangerouslySetInnerHTML:{__html:i.render(N.value||"")}})})]})]}),e.jsx(O,{className:"text-xs",children:u("plan.form.content.description")}),e.jsx(D,{})]})}})]}),e.jsx(Ve,{className:"mt-6",children:e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsx("div",{className:"flex-shrink-0",children:a&&e.jsx(j,{control:h.control,name:"force_update",render:({field:N})=>e.jsxs(g,{className:"flex flex-row items-center space-x-2 space-y-0",children:[e.jsx(_,{children:e.jsx(Lr,{checked:N.value,onCheckedChange:N.onChange})}),e.jsx("div",{className:"",children:e.jsx(v,{className:"text-sm",children:u("plan.form.force_update.label")})})]})})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(R,{type:"button",variant:"outline",onClick:p,children:u("plan.form.submit.cancel")}),e.jsx(R,{type:"submit",disabled:c,onClick:()=>{h.handleSubmit(async N=>{o(!0),(await Wd(N)).data&&($.success(u(a?"plan.form.submit.success.update":"plan.form.submit.success.add")),p(),r()),o(!1)})()},children:u(c?"plan.form.submit.submitting":"plan.form.submit.submit")})]})]})})]})]})})}function Wh(){const[s,n]=m.useState({}),[a,l]=m.useState({"drag-handle":!1}),[r,c]=m.useState([]),[o,u]=m.useState([]),[h,i]=m.useState(!1),[d,f]=m.useState({pageSize:20,pageIndex:0}),[P,I]=m.useState([]),{refetch:p}=se({queryKey:["planList"],queryFn:async()=>{const{data:S}=await Os();return I(S),S}});m.useEffect(()=>{l({"drag-handle":h}),f({pageSize:h?99999:10,pageIndex:0})},[h]);const N=(S,C)=>{h&&(S.dataTransfer.setData("text/plain",C.toString()),S.currentTarget.classList.add("opacity-50"))},k=(S,C)=>{if(!h)return;S.preventDefault(),S.currentTarget.classList.remove("bg-muted");const E=parseInt(S.dataTransfer.getData("text/plain"));if(E===C)return;const A=[...P],[Z]=A.splice(E,1);A.splice(C,0,Z),I(A)},b=async()=>{if(!h){i(!0);return}const S=P?.map(C=>C.id);Jd(S).then(()=>{$.success("排序保存成功"),i(!1),p()}).finally(()=>{i(!1)})},w=Ae({data:P||[],columns:qh(p),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:d},enableRowSelection:!0,onPaginationChange:f,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}},pageCount:h?1:void 0});return e.jsx($h,{refreshData:p,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(Ye,{table:w,toolbar:S=>e.jsx(Hh,{table:S,refetch:p,saveOrder:b,isSortMode:h}),draggable:h,onDragStart:N,onDragEnd:S=>S.currentTarget.classList.remove("opacity-50"),onDragOver:S=>{S.preventDefault(),S.currentTarget.classList.add("bg-muted")},onDragLeave:S=>S.currentTarget.classList.remove("bg-muted"),onDrop:k,showPagination:!h}),e.jsx(Bh,{})]})})}function Yh(){const{t:s}=M("subscribe");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("plan.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("plan.page.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Wh,{})})]})]})}const Jh=Object.freeze(Object.defineProperty({__proto__:null,default:Yh},Symbol.toStringTag,{value:"Module"})),Fs=[{value:Q.PENDING,label:Ys[Q.PENDING],icon:jo,color:Js[Q.PENDING]},{value:Q.PROCESSING,label:Ys[Q.PROCESSING],icon:$n,color:Js[Q.PROCESSING]},{value:Q.COMPLETED,label:Ys[Q.COMPLETED],icon:Wt,color:Js[Q.COMPLETED]},{value:Q.CANCELLED,label:Ys[Q.CANCELLED],icon:Hn,color:Js[Q.CANCELLED]},{value:Q.DISCOUNTED,label:Ys[Q.DISCOUNTED],icon:Wt,color:Js[Q.DISCOUNTED]}],Zs=[{value:ne.PENDING,label:ut[ne.PENDING],icon:vo,color:ht[ne.PENDING]},{value:ne.PROCESSING,label:ut[ne.PROCESSING],icon:$n,color:ht[ne.PROCESSING]},{value:ne.VALID,label:ut[ne.VALID],icon:Wt,color:ht[ne.VALID]},{value:ne.INVALID,label:ut[ne.INVALID],icon:Hn,color:ht[ne.INVALID]}];function jt({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=s?.getFilterValue(),c=Array.isArray(r)?new Set(r):r!==void 0?new Set([r]):new Set;return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,c?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:c.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:c.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[c.size," selected"]}):a.filter(o=>c.has(o.value)).map(o=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:o.label},o.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Is,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(o=>{const u=c.has(o.value);return e.jsxs(Ne,{onSelect:()=>{const h=new Set(c);u?h.delete(o.value):h.add(o.value);const i=Array.from(h);s?.setFilterValue(i.length?i:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",u?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ds,{className:y("h-4 w-4")})}),o.icon&&e.jsx(o.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${o.color}`}),e.jsx("span",{children:o.label}),l?.get(o.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(o.value)})]},o.value)})}),c.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(qs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const Qh=x.object({email:x.string().min(1),plan_id:x.number(),period:x.string(),total_amount:x.number()}),Zh={email:"",plan_id:0,total_amount:0,period:""};function Ar({refetch:s,trigger:n,defaultValues:a}){const{t:l}=M("order"),[r,c]=m.useState(!1),o=ce({resolver:ue(Qh),defaultValues:{...Zh,...a},mode:"onChange"}),[u,h]=m.useState([]);return m.useEffect(()=>{r&&Os().then(({data:i})=>{h(i)})},[r]),e.jsxs(ge,{open:r,onOpenChange:c,children:[e.jsx(Oe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:l("dialog.addOrder")})]})}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:l("dialog.assignOrder")}),e.jsx(Te,{})]}),e.jsxs(he,{...o,children:[e.jsx(j,{control:o.control,name:"email",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dialog.fields.userEmail")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dialog.placeholders.email"),...i})})]})}),e.jsx(j,{control:o.control,name:"plan_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dialog.fields.subscriptionPlan")}),e.jsx(_,{children:e.jsxs(W,{value:i.value?i.value?.toString():void 0,onValueChange:d=>i.onChange(parseInt(d)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dialog.placeholders.plan")})}),e.jsx(B,{children:u.map(d=>e.jsx(U,{value:d.id.toString(),children:d.name},d.id))})]})})]})}),e.jsx(j,{control:o.control,name:"period",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dialog.fields.orderPeriod")}),e.jsx(_,{children:e.jsxs(W,{value:i.value,onValueChange:i.onChange,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dialog.placeholders.period")})}),e.jsx(B,{children:Object.keys(km).map(d=>e.jsx(U,{value:d,children:l(`period.${d}`)},d))})]})})]})}),e.jsx(j,{control:o.control,name:"total_amount",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dialog.fields.paymentAmount")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:l("dialog.placeholders.amount"),value:i.value/100,onChange:d=>i.onChange(parseFloat(d.currentTarget.value)*100)})}),e.jsx(D,{})]})}),e.jsxs(Ve,{children:[e.jsx(R,{variant:"outline",onClick:()=>c(!1),children:l("dialog.actions.cancel")}),e.jsx(R,{type:"submit",onClick:()=>{o.handleSubmit(i=>{sm(i).then(({data:d})=>{d&&(s&&s(),o.reset(),c(!1),$.success(l("dialog.messages.addSuccess")))})})()},children:l("dialog.actions.confirm")})]})]})]})]})}function Xh({table:s,refetch:n}){const{t:a}=M("order"),l=s.getState().columnFilters.length>0,r=Object.values(He).filter(h=>typeof h=="number").map(h=>({label:a(`type.${He[h]}`),value:h,color:h===He.NEW?"green-500":h===He.RENEWAL?"blue-500":h===He.UPGRADE?"purple-500":"orange-500"})),c=Object.values(de).map(h=>({label:a(`period.${h}`),value:h,color:h===de.MONTH_PRICE?"slate-500":h===de.QUARTER_PRICE?"cyan-500":h===de.HALF_YEAR_PRICE?"indigo-500":h===de.YEAR_PRICE?"violet-500":h===de.TWO_YEAR_PRICE?"fuchsia-500":h===de.THREE_YEAR_PRICE?"pink-500":h===de.ONETIME_PRICE?"rose-500":"orange-500"})),o=Object.values(Q).filter(h=>typeof h=="number").map(h=>({label:a(`status.${Q[h]}`),value:h,icon:h===Q.PENDING?Fs[0].icon:h===Q.PROCESSING?Fs[1].icon:h===Q.COMPLETED?Fs[2].icon:h===Q.CANCELLED?Fs[3].icon:Fs[4].icon,color:h===Q.PENDING?"yellow-500":h===Q.PROCESSING?"blue-500":h===Q.COMPLETED?"green-500":h===Q.CANCELLED?"red-500":"green-500"})),u=Object.values(ne).filter(h=>typeof h=="number").map(h=>({label:a(`commission.${ne[h]}`),value:h,icon:h===ne.PENDING?Zs[0].icon:h===ne.PROCESSING?Zs[1].icon:h===ne.VALID?Zs[2].icon:Zs[3].icon,color:h===ne.PENDING?"yellow-500":h===ne.PROCESSING?"blue-500":h===ne.VALID?"green-500":"red-500"}));return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ar,{refetch:n}),e.jsx(T,{placeholder:a("search.placeholder"),value:s.getColumn("trade_no")?.getFilterValue()??"",onChange:h=>s.getColumn("trade_no")?.setFilterValue(h.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex flex-wrap gap-x-2",children:[s.getColumn("type")&&e.jsx(jt,{column:s.getColumn("type"),title:a("table.columns.type"),options:r}),s.getColumn("period")&&e.jsx(jt,{column:s.getColumn("period"),title:a("table.columns.period"),options:c}),s.getColumn("status")&&e.jsx(jt,{column:s.getColumn("status"),title:a("table.columns.status"),options:o}),s.getColumn("commission_status")&&e.jsx(jt,{column:s.getColumn("commission_status"),title:a("table.columns.commissionStatus"),options:u})]}),l&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[a("actions.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})}function ze({label:s,value:n,className:a,valueClassName:l}){return e.jsxs("div",{className:y("flex items-center py-1.5",a),children:[e.jsx("div",{className:"w-28 shrink-0 text-sm text-muted-foreground",children:s}),e.jsx("div",{className:y("text-sm",l),children:n||"-"})]})}function ex({status:s}){const{t:n}=M("order"),a={[Q.PENDING]:"bg-yellow-100 text-yellow-800 hover:bg-yellow-100",[Q.PROCESSING]:"bg-blue-100 text-blue-800 hover:bg-blue-100",[Q.CANCELLED]:"bg-red-100 text-red-800 hover:bg-red-100",[Q.COMPLETED]:"bg-green-100 text-green-800 hover:bg-green-100",[Q.DISCOUNTED]:"bg-gray-100 text-gray-800 hover:bg-gray-100"};return e.jsx(H,{variant:"secondary",className:y("font-medium",a[s]),children:n(`status.${Q[s]}`)})}function sx({id:s,trigger:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(),{t:o}=M("order");return m.useEffect(()=>{(async()=>{if(a){const{data:h}=await Zd({id:s});c(h)}})()},[a,s]),e.jsxs(ge,{onOpenChange:l,open:a,children:[e.jsx(Oe,{asChild:!0,children:n}),e.jsxs(xe,{className:"max-w-xl",children:[e.jsxs(ve,{className:"space-y-2",children:[e.jsx(je,{className:"text-lg font-medium",children:o("dialog.title")}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsxs("div",{className:"flex items-center space-x-6",children:[e.jsxs("div",{className:"text-muted-foreground",children:[o("table.columns.tradeNo"),":",r?.trade_no]}),r?.status&&e.jsx(ex,{status:r.status})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:o("dialog.basicInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(ze,{label:o("dialog.fields.userEmail"),value:r?.user?.email?e.jsxs(Rs,{to:`/user/manage?email=${r.user.email}`,className:"group inline-flex items-center gap-1 text-primary hover:underline",children:[r.user.email,e.jsx(qn,{className:"h-3.5 w-3.5 opacity-0 transition-opacity group-hover:opacity-100"})]}):"-"}),e.jsx(ze,{label:o("dialog.fields.orderPeriod"),value:r&&o(`period.${r.period}`)}),e.jsx(ze,{label:o("dialog.fields.subscriptionPlan"),value:r?.plan?.name,valueClassName:"font-medium"}),e.jsx(ze,{label:o("dialog.fields.callbackNo"),value:r?.callback_no,valueClassName:"font-mono text-xs"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:o("dialog.amountInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(ze,{label:o("dialog.fields.paymentAmount"),value:ks(r?.total_amount||0),valueClassName:"font-medium text-primary"}),e.jsx(be,{className:"my-2"}),e.jsx(ze,{label:o("dialog.fields.balancePayment"),value:ks(r?.balance_amount||0)}),e.jsx(ze,{label:o("dialog.fields.discountAmount"),value:ks(r?.discount_amount||0),valueClassName:"text-green-600"}),e.jsx(ze,{label:o("dialog.fields.refundAmount"),value:ks(r?.refund_amount||0),valueClassName:"text-red-600"}),e.jsx(ze,{label:o("dialog.fields.deductionAmount"),value:ks(r?.surplus_amount||0)})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:o("dialog.timeInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(ze,{label:o("dialog.fields.createdAt"),value:me(r?.created_at),valueClassName:"font-mono text-xs"}),e.jsx(ze,{label:o("dialog.fields.updatedAt"),value:me(r?.updated_at),valueClassName:"font-mono text-xs"})]})]})]})]})]})}const tx={[He.NEW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.RENEWAL]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.UPGRADE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.RESET_FLOW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},ax={[de.MONTH_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.QUARTER_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.HALF_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.TWO_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.THREE_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.ONETIME_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.RESET_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},nx=s=>Q[s],rx=s=>ne[s],lx=s=>He[s],ix=s=>{const{t:n}=M("order");return[{accessorKey:"trade_no",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.tradeNo")}),cell:({row:a})=>{const l=a.original.trade_no,r=l.length>6?`${l.slice(0,3)}...${l.slice(-3)}`:l;return e.jsx("div",{className:"flex items-center",children:e.jsx(sx,{trigger:e.jsxs(J,{variant:"ghost",size:"sm",className:"flex h-8 items-center gap-1.5 px-2 font-medium text-primary transition-colors hover:bg-primary/10 hover:text-primary/80",children:[e.jsx("span",{className:"font-mono",children:r}),e.jsx(qn,{className:"h-3.5 w-3.5 opacity-70"})]}),id:a.original.id})})},enableSorting:!1,enableHiding:!1},{accessorKey:"type",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.type")}),cell:({row:a})=>{const l=a.getValue("type"),r=tx[l];return e.jsx(H,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",r.color,r.bgColor,"border border-border/50","hover:bg-slate-200/80"),children:n(`type.${lx(l)}`)})},enableSorting:!1,enableHiding:!1},{accessorKey:"plan.name",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.plan")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium text-foreground/90 sm:max-w-72 md:max-w-[31rem]",children:a.original.plan?.name||"-"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"period",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.period")}),cell:({row:a})=>{const l=a.getValue("period"),r=ax[l];return e.jsx(H,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",r.color,r.bgColor,"hover:bg-opacity-80"),children:n(`period.${l}`)})},enableSorting:!1,enableHiding:!1},{accessorKey:"total_amount",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.amount")}),cell:({row:a})=>{const l=a.getValue("total_amount"),r=typeof l=="number"?(l/100).toFixed(2):"N/A";return e.jsxs("div",{className:"flex items-center font-mono text-foreground/90",children:["¥",r]})},enableSorting:!0,enableHiding:!1},{accessorKey:"status",header:({column:a})=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(V,{column:a,title:n("table.columns.status")}),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx(Tr,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-muted-foreground"})}),e.jsx(te,{side:"top",className:"max-w-[200px] text-sm",children:n("status.tooltip")})]})})]}),cell:({row:a})=>{const l=Fs.find(r=>r.value===a.getValue("status"));return l?e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l.icon&&e.jsx(l.icon,{className:`h-4 w-4 text-${l.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n(`status.${nx(l.value)}`)})]}),l.value===Q.PENDING&&e.jsxs(ys,{modal:!0,children:[e.jsx(_s,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(_t,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:n("actions.openMenu")})]})}),e.jsxs(is,{align:"end",className:"w-[140px]",children:[e.jsx(pe,{className:"cursor-pointer",onClick:async()=>{await Xd({trade_no:a.original.trade_no}),s()},children:n("actions.markAsPaid")}),e.jsx(pe,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await em({trade_no:a.original.trade_no}),s()},children:n("actions.cancel")})]})]})]}):null},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_balance",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.commission")}),cell:({row:a})=>{const l=a.getValue("commission_balance"),r=l?(l/100).toFixed(2):"-";return e.jsx("div",{className:"flex items-center font-mono text-foreground/90",children:l?`¥${r}`:"-"})},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_status",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.commissionStatus")}),cell:({row:a})=>{const l=a.original.status,r=a.original.commission_balance,c=Zs.find(o=>o.value===a.getValue("commission_status"));return r==0||!c?e.jsx("span",{className:"text-muted-foreground",children:"-"}):e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[c.icon&&e.jsx(c.icon,{className:`h-4 w-4 text-${c.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n(`commission.${rx(c.value)}`)})]}),c.value===ne.PENDING&&l===Q.COMPLETED&&e.jsxs(ys,{modal:!0,children:[e.jsx(_s,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(_t,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:n("actions.openMenu")})]})}),e.jsxs(is,{align:"end",className:"w-[120px]",children:[e.jsx(pe,{className:"cursor-pointer",onClick:async()=>{await La({trade_no:a.original.trade_no,commission_status:ne.PROCESSING}),s()},children:n("commission.PROCESSING")}),e.jsx(pe,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await La({trade_no:a.original.trade_no,commission_status:ne.INVALID}),s()},children:n("commission.INVALID")})]})]})]})},enableSorting:!0,enableHiding:!1},{accessorKey:"created_at",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.createdAt")}),cell:({row:a})=>e.jsx("div",{className:"text-nowrap font-mono text-sm text-muted-foreground",children:me(a.getValue("created_at"),"YYYY/MM/DD HH:mm:ss")}),enableSorting:!0,enableHiding:!1}]};function ox(){const[s]=Gn(),[n,a]=m.useState({}),[l,r]=m.useState({}),[c,o]=m.useState([]),[u,h]=m.useState([]),[i,d]=m.useState({pageIndex:0,pageSize:20});m.useEffect(()=>{const k=Object.entries({user_id:"string",order_id:"string",commission_status:"number",status:"number",commission_balance:"string"}).map(([b,w])=>{const S=s.get(b);return S?{id:b,value:w==="number"?parseInt(S):S}:null}).filter(Boolean);k.length>0&&o(k)},[s]);const{refetch:f,data:P,isLoading:I}=se({queryKey:["orderList",i,c,u],queryFn:()=>Qd({pageSize:i.pageSize,current:i.pageIndex+1,filter:c,sort:u})}),p=Ae({data:P?.data??[],columns:ix(f),state:{sorting:u,columnVisibility:l,rowSelection:n,columnFilters:c,pagination:i},rowCount:P?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:h,onColumnFiltersChange:o,onColumnVisibilityChange:r,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),onPaginationChange:d,getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:p,toolbar:e.jsx(Xh,{table:p,refetch:f}),showPagination:!0})}function cx(){const{t:s}=M("order");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(ox,{})})]})]})}const dx=Object.freeze(Object.defineProperty({__proto__:null,default:cx},Symbol.toStringTag,{value:"Module"}));function mx({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Is,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(c=>{const o=r.has(c.value);return e.jsxs(Ne,{onSelect:()=>{o?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",o?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ds,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(qs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const ux=x.object({id:x.coerce.number().nullable().optional(),name:x.string().min(1,"请输入优惠券名称"),code:x.string().nullable(),type:x.union([x.string(),x.nativeEnum(js)]),value:x.coerce.number(),started_at:x.coerce.number(),ended_at:x.coerce.number(),limit_use:x.union([x.string(),x.number()]).nullable(),limit_use_with_user:x.union([x.string(),x.number()]).nullable(),generate_count:x.coerce.number().nullable().optional(),limit_plan_ids:x.array(x.number()).default([]).nullable(),limit_period:x.array(x.nativeEnum(de)).default([]).nullable()}).refine(s=>s.ended_at>s.started_at,{message:"结束时间必须晚于开始时间",path:["ended_at"]}),qa={name:"",code:"",type:js.AMOUNT,value:0,started_at:Math.floor(Date.now()/1e3),ended_at:Math.floor(Date.now()/1e3)+7*24*60*60,limit_use:"",limit_use_with_user:"",limit_plan_ids:[],limit_period:[],generate_count:""};function Fr({defaultValues:s,refetch:n,type:a="create",dialogTrigger:l=null,open:r,onOpenChange:c}){const{t:o}=M("coupon"),[u,h]=m.useState(!1),i=r??u,d=c??h,[f,P]=m.useState([]),I=ce({resolver:ue(ux),defaultValues:s||qa});m.useEffect(()=>{s&&I.reset(s)},[s,I]),m.useEffect(()=>{Os().then(({data:b})=>P(b))},[]);const p=b=>{if(!b)return;const w=(S,C)=>{const E=new Date(C*1e3);return S.setHours(E.getHours(),E.getMinutes(),E.getSeconds()),Math.floor(S.getTime()/1e3)};b.from&&I.setValue("started_at",w(b.from,I.watch("started_at"))),b.to&&I.setValue("ended_at",w(b.to,I.watch("ended_at")))},N=async b=>{am(b).then(()=>{d(!1),a==="create"&&I.reset(qa),n()})},k=(b,w)=>e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:w}),e.jsx(T,{type:"datetime-local",step:"1",value:me(I.watch(b),"YYYY-MM-DDTHH:mm:ss"),onChange:S=>{const C=new Date(S.target.value);I.setValue(b,Math.floor(C.getTime()/1e3))},className:"h-8 [&::-webkit-calendar-picker-indicator]:hidden"})]});return e.jsxs(ge,{open:i,onOpenChange:d,children:[l&&e.jsx(Oe,{asChild:!0,children:l}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsx(ve,{children:e.jsx(je,{children:o(a==="create"?"form.add":"form.edit")})}),e.jsx(he,{...I,children:e.jsxs("form",{onSubmit:I.handleSubmit(N),className:"space-y-4",children:[e.jsx(j,{control:I.control,name:"name",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.name.label")}),e.jsx(T,{placeholder:o("form.name.placeholder"),...b}),e.jsx(D,{})]})}),e.jsx(j,{control:I.control,name:"code",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.code.label")}),e.jsx(T,{placeholder:o("form.code.placeholder"),...b,className:"h-9"}),e.jsx(O,{className:"text-xs",children:o("form.code.description")}),e.jsx(D,{})]})}),e.jsxs(g,{children:[e.jsx(v,{children:o("form.type.label")}),e.jsxs("div",{className:"flex",children:[e.jsx(j,{control:I.control,name:"type",render:({field:b})=>e.jsxs(W,{value:b.value.toString(),onValueChange:b.onChange,children:[e.jsx(K,{className:"flex-[1.2] rounded-r-none border-r-0 focus:z-10",children:e.jsx(Y,{placeholder:o("form.type.placeholder")})}),e.jsx(B,{children:Object.entries(Pm).map(([w,S])=>e.jsx(U,{value:w,children:o(`table.toolbar.types.${w}`)},w))})]})}),e.jsx(j,{control:I.control,name:"value",render:({field:b})=>e.jsx(T,{type:"number",placeholder:o("form.value.placeholder"),...b,onChange:w=>b.onChange(w.target.value===""?"":w.target.value),className:"flex-[2] rounded-none border-x-0 text-left"})}),e.jsx("div",{className:"flex min-w-[40px] items-center justify-center rounded-md rounded-l-none border border-l-0 border-input bg-muted/50 px-3 font-medium text-muted-foreground",children:e.jsx("span",{children:I.watch("type")===js.AMOUNT?"¥":"%"})})]})]}),e.jsxs(g,{children:[e.jsx(v,{children:o("form.validity.label")}),e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",className:y("w-full justify-start text-left font-normal",!I.watch("started_at")&&"text-muted-foreground"),children:[e.jsx(ot,{className:"mr-2 h-4 w-4"}),me(I.watch("started_at"),"YYYY-MM-DD HH:mm:ss")," ",o("form.validity.to")," ",me(I.watch("ended_at"),"YYYY-MM-DD HH:mm:ss")]})}),e.jsxs(We,{className:"w-auto p-0",align:"start",children:[e.jsx("div",{className:"border-b border-border",children:e.jsx(Vs,{mode:"range",selected:{from:new Date(I.watch("started_at")*1e3),to:new Date(I.watch("ended_at")*1e3)},onSelect:p,numberOfMonths:2})}),e.jsx("div",{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-4",children:[k("started_at",o("table.validity.startTime")),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:o("form.validity.to")}),k("ended_at",o("table.validity.endTime"))]})})]})]}),e.jsx(D,{})]}),e.jsx(j,{control:I.control,name:"limit_use",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.limitUse.label")}),e.jsx(T,{type:"number",min:0,placeholder:o("form.limitUse.placeholder"),...b,value:b.value===void 0?"":b.value,onChange:w=>b.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(O,{className:"text-xs",children:o("form.limitUse.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:I.control,name:"limit_use_with_user",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.limitUseWithUser.label")}),e.jsx(T,{type:"number",min:0,placeholder:o("form.limitUseWithUser.placeholder"),...b,value:b.value===void 0?"":b.value,onChange:w=>b.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(O,{className:"text-xs",children:o("form.limitUseWithUser.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:I.control,name:"limit_period",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.limitPeriod.label")}),e.jsx(lt,{options:Object.entries(de).filter(([w])=>isNaN(Number(w))).map(([w,S])=>({label:S,value:w})),onChange:w=>{if(w.length===0){b.onChange([]);return}const S=w.map(C=>de[C.value]);b.onChange(S)},value:(b.value||[]).map(w=>({label:Object.entries(de).find(([S,C])=>C===w)?.[1]||"",value:Object.entries(de).find(([S,C])=>C===w)?.[0]||""})),placeholder:o("form.limitPeriod.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:o("form.limitPeriod.empty")})}),e.jsx(O,{className:"text-xs",children:o("form.limitPeriod.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:I.control,name:"limit_plan_ids",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.limitPlan.label")}),e.jsx(lt,{options:f?.map(w=>({label:w.name,value:w.id.toString()}))||[],onChange:w=>b.onChange(w.map(S=>Number(S.value))),value:(f||[]).filter(w=>(b.value||[]).includes(w.id)).map(w=>({label:w.name,value:w.id.toString()})),placeholder:o("form.limitPlan.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:o("form.limitPlan.empty")})}),e.jsx(D,{})]})}),a==="create"&&e.jsx(e.Fragment,{children:e.jsx(j,{control:I.control,name:"generate_count",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.generateCount.label")}),e.jsx(T,{type:"number",min:0,placeholder:o("form.generateCount.placeholder"),...b,value:b.value===void 0?"":b.value,onChange:w=>b.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(O,{className:"text-xs",children:o("form.generateCount.description")}),e.jsx(D,{})]})})}),e.jsx(Ve,{children:e.jsx(R,{type:"submit",disabled:I.formState.isSubmitting,children:I.formState.isSubmitting?o("form.submit.saving"):o("form.submit.save")})})]})})]})]})}function hx({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=M("coupon");return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Fr,{refetch:n,dialogTrigger:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:l("form.add")})]})}),e.jsx(T,{placeholder:l("table.toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),s.getColumn("type")&&e.jsx(mx,{column:s.getColumn("type"),title:l("table.toolbar.type"),options:[{value:js.AMOUNT,label:l(`table.toolbar.types.${js.AMOUNT}`)},{value:js.PERCENTAGE,label:l(`table.toolbar.types.${js.PERCENTAGE}`)}]}),a&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("table.toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})}const zr=m.createContext(void 0);function xx({children:s,refetch:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null),o=h=>{c(h),l(!0)},u=()=>{l(!1),c(null)};return e.jsxs(zr.Provider,{value:{isOpen:a,currentCoupon:r,openEdit:o,closeEdit:u},children:[s,r&&e.jsx(Fr,{defaultValues:r,refetch:n,type:"edit",open:a,onOpenChange:l})]})}function px(){const s=m.useContext(zr);if(s===void 0)throw new Error("useCouponEdit must be used within a CouponEditProvider");return s}const fx=s=>{const{t:n}=M("coupon");return[{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.id")}),cell:({row:a})=>e.jsx(H,{children:a.original.id}),enableSorting:!0},{accessorKey:"show",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.show")}),cell:({row:a})=>e.jsx(q,{defaultChecked:a.original.show,onCheckedChange:l=>{rm({id:a.original.id,show:l}).then(({data:r})=>!r&&s())}}),enableSorting:!1},{accessorKey:"name",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{children:a.original.name})}),enableSorting:!1,size:800},{accessorKey:"type",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.type")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:n(`table.toolbar.types.${a.original.type}`)}),enableSorting:!0},{accessorKey:"code",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.code")}),cell:({row:a})=>e.jsx(H,{variant:"secondary",children:a.original.code}),enableSorting:!0},{accessorKey:"limit_use",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.limitUse")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:a.original.limit_use===null?n("table.validity.unlimited"):a.original.limit_use}),enableSorting:!0},{accessorKey:"limit_use_with_user",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.limitUseWithUser")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:a.original.limit_use_with_user===null?n("table.validity.noLimit"):a.original.limit_use_with_user}),enableSorting:!0},{accessorKey:"#",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.validity")}),cell:({row:a})=>{const[l,r]=m.useState(!1),c=Date.now(),o=a.original.started_at*1e3,u=a.original.ended_at*1e3,h=c>u,i=ce.jsx(V,{className:"justify-end",column:a,title:n("table.columns.actions")}),cell:({row:a})=>{const{openEdit:l}=px();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>l(a.original),children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("table.actions.edit")})]}),e.jsx(Je,{title:n("table.actions.deleteConfirm.title"),description:n("table.actions.deleteConfirm.description"),confirmText:n("table.actions.deleteConfirm.confirmText"),variant:"destructive",onConfirm:async()=>{nm({id:a.original.id}).then(({data:r})=>{r&&($.success("删除成功"),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("table.actions.delete")})]})})]})}}]};function gx(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[o,u]=m.useState([]),[h,i]=m.useState({pageIndex:0,pageSize:20}),{refetch:d,data:f}=se({queryKey:["couponList",h,r,o],queryFn:()=>tm({pageSize:h.pageSize,current:h.pageIndex+1,filter:r,sort:o})}),P=Ae({data:f?.data??[],columns:fx(d),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:h},pageCount:Math.ceil((f?.total??0)/h.pageSize),rowCount:f?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,onPaginationChange:i,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(xx,{refetch:d,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Ye,{table:P,toolbar:e.jsx(hx,{table:P,refetch:d})})})})}function jx(){const{t:s}=M("coupon");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(gx,{})})]})]})}const vx=Object.freeze(Object.defineProperty({__proto__:null,default:jx},Symbol.toStringTag,{value:"Module"})),bx=x.object({email_prefix:x.string().optional(),email_suffix:x.string().min(1),password:x.string().optional(),expired_at:x.number().optional().nullable(),plan_id:x.number().nullable(),generate_count:x.number().optional().nullable()}).refine(s=>s.generate_count===null?s.email_prefix!==void 0&&s.email_prefix!=="":!0,{message:"Email prefix is required when generate_count is null",path:["email_prefix"]}),yx={email_prefix:"",email_suffix:"",password:"",expired_at:null,plan_id:null,generate_count:void 0};function _x({refetch:s}){const{t:n}=M("user"),[a,l]=m.useState(!1),r=ce({resolver:ue(bx),defaultValues:yx,mode:"onChange"}),[c,o]=m.useState([]);return m.useEffect(()=>{a&&Os().then(({data:u})=>{u&&o(u)})},[a]),e.jsxs(ge,{open:a,onOpenChange:l,children:[e.jsx(Oe,{asChild:!0,children:e.jsxs(J,{size:"sm",variant:"outline",className:"space-x-2 gap-0",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:n("generate.button")})]})}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:n("generate.title")}),e.jsx(Te,{})]}),e.jsxs(he,{...r,children:[e.jsxs(g,{children:[e.jsx(v,{children:n("generate.form.email")}),e.jsxs("div",{className:"flex",children:[!r.watch("generate_count")&&e.jsx(j,{control:r.control,name:"email_prefix",render:({field:u})=>e.jsx(T,{className:"flex-[5] rounded-r-none",placeholder:n("generate.form.email_prefix"),...u})}),e.jsx("div",{className:`z-[-1] border border-r-0 border-input px-3 py-1 shadow-sm ${r.watch("generate_count")?"rounded-l-md":"border-l-0"}`,children:"@"}),e.jsx(j,{control:r.control,name:"email_suffix",render:({field:u})=>e.jsx(T,{className:"flex-[4] rounded-l-none",placeholder:n("generate.form.email_domain"),...u})})]})]}),e.jsx(j,{control:r.control,name:"password",render:({field:u})=>e.jsxs(g,{children:[e.jsx(v,{children:n("generate.form.password")}),e.jsx(T,{placeholder:n("generate.form.password_placeholder"),...u}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"expired_at",render:({field:u})=>e.jsxs(g,{className:"flex flex-col",children:[e.jsx(v,{children:n("generate.form.expire_time")}),e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsx(_,{children:e.jsxs(J,{variant:"outline",className:y("w-full pl-3 text-left font-normal",!u.value&&"text-muted-foreground"),children:[u.value?me(u.value):e.jsx("span",{children:n("generate.form.expire_time_placeholder")}),e.jsx(ot,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsxs(We,{className:"flex w-auto flex-col space-y-2 p-2",children:[e.jsx(yo,{asChild:!0,children:e.jsx(J,{variant:"outline",className:"w-full",onClick:()=>{u.onChange(null)},children:n("generate.form.permanent")})}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Vs,{mode:"single",selected:u.value?new Date(u.value*1e3):void 0,onSelect:h=>{h&&u.onChange(h?.getTime()/1e3)}})})]})]})]})}),e.jsx(j,{control:r.control,name:"plan_id",render:({field:u})=>e.jsxs(g,{children:[e.jsx(v,{children:n("generate.form.subscription")}),e.jsx(_,{children:e.jsxs(W,{value:u.value?u.value.toString():"null",onValueChange:h=>u.onChange(h==="null"?null:parseInt(h)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:n("generate.form.subscription_none")})}),e.jsxs(B,{children:[e.jsx(U,{value:"null",children:n("generate.form.subscription_none")}),c.map(h=>e.jsx(U,{value:h.id.toString(),children:h.name},h.id))]})]})})]})}),!r.watch("email_prefix")&&e.jsx(j,{control:r.control,name:"generate_count",render:({field:u})=>e.jsxs(g,{children:[e.jsx(v,{children:n("generate.form.generate_count")}),e.jsx(T,{type:"number",placeholder:n("generate.form.generate_count_placeholder"),value:u.value||"",onChange:h=>u.onChange(h.target.value?parseInt(h.target.value):null)})]})})]}),e.jsxs(Ve,{children:[e.jsx(J,{variant:"outline",onClick:()=>l(!1),children:n("generate.form.cancel")}),e.jsx(J,{onClick:()=>r.handleSubmit(u=>{cm(u).then(({data:h})=>{h&&($.success(n("generate.form.success")),r.reset(),s(),l(!1))})})(),children:n("generate.form.submit")})]})]})]})}const Ur=Ba,$r=Wa,Nx=Ya,Hr=m.forwardRef(({className:s,...n},a)=>e.jsx(St,{className:y("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",s),...n,ref:a}));Hr.displayName=St.displayName;const wx=Ts("fixed overflow-y-scroll z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-md",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-md"}},defaultVariants:{side:"right"}}),fa=m.forwardRef(({side:s="right",className:n,children:a,...l},r)=>e.jsxs(Nx,{children:[e.jsx(Hr,{}),e.jsxs(kt,{ref:r,className:y(wx({side:s}),n),...l,children:[e.jsxs(ta,{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-secondary",children:[e.jsx(Le,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));fa.displayName=kt.displayName;const ga=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...n});ga.displayName="SheetHeader";const qr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});qr.displayName="SheetFooter";const ja=m.forwardRef(({className:s,...n},a)=>e.jsx(Pt,{ref:a,className:y("text-lg font-semibold text-foreground",s),...n}));ja.displayName=Pt.displayName;const va=m.forwardRef(({className:s,...n},a)=>e.jsx(Tt,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));va.displayName=Tt.displayName;function Cx({table:s,refetch:n,permissionGroups:a=[],subscriptionPlans:l=[]}){const{t:r}=M("user"),c=s.getState().columnFilters.length>0,[o,u]=m.useState([]),[h,i]=m.useState(!1),d=[{label:r("filter.fields.email"),value:"email",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.id"),value:"id",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.plan_id"),value:"plan_id",type:"select",operators:[{label:r("filter.operators.eq"),value:"eq"}],useOptions:!0},{label:r("filter.fields.transfer_enable"),value:"transfer_enable",type:"number",unit:"GB",operators:[{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.total_used"),value:"total_used",type:"number",unit:"GB",operators:[{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.online_count"),value:"online_count",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"},{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"}]},{label:r("filter.fields.expired_at"),value:"expired_at",type:"date",operators:[{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.uuid"),value:"uuid",type:"text",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.token"),value:"token",type:"text",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.banned"),value:"banned",type:"select",operators:[{label:r("filter.operators.eq"),value:"eq"}],options:[{label:r("filter.status.normal"),value:"0"},{label:r("filter.status.banned"),value:"1"}]},{label:r("filter.fields.remark"),value:"remark",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.inviter_email"),value:"inviter_email",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.invite_user_id"),value:"invite_user_id",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.is_admin"),value:"is_admin",type:"boolean",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.is_staff"),value:"is_staff",type:"boolean",operators:[{label:r("filter.operators.eq"),value:"eq"}]}],f=w=>w*1024*1024*1024,P=w=>w/(1024*1024*1024),I=()=>{u([...o,{field:"",operator:"",value:""}])},p=w=>{u(o.filter((S,C)=>C!==w))},N=(w,S,C)=>{const E=[...o];if(E[w]={...E[w],[S]:C},S==="field"){const A=d.find(Z=>Z.value===C);A&&(E[w].operator=A.operators[0].value,E[w].value=A.type==="boolean"?!1:"")}u(E)},k=(w,S)=>{const C=d.find(E=>E.value===w.field);if(!C)return null;switch(C.type){case"text":return e.jsx(T,{placeholder:r("filter.sheet.value"),value:w.value,onChange:E=>N(S,"value",E.target.value)});case"number":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(T,{type:"number",placeholder:r("filter.sheet.value_number",{unit:C.unit}),value:C.unit==="GB"?P(w.value||0):w.value,onChange:E=>{const A=Number(E.target.value);N(S,"value",C.unit==="GB"?f(A):A)}}),C.unit&&e.jsx("span",{className:"text-sm text-muted-foreground",children:C.unit})]});case"date":return e.jsx(Vs,{mode:"single",selected:w.value,onSelect:E=>N(S,"value",E),className:"rounded-md border"});case"select":return e.jsxs(W,{value:w.value,onValueChange:E=>N(S,"value",E),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("filter.sheet.value")})}),e.jsx(B,{children:C.useOptions?l.map(E=>e.jsx(U,{value:E.value.toString(),children:E.label},E.value)):C.options?.map(E=>e.jsx(U,{value:E.value.toString(),children:E.label},E.value))})]});case"boolean":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(q,{checked:w.value,onCheckedChange:E=>N(S,"value",E)}),e.jsx(Nt,{children:w.value?r("filter.boolean.true"):r("filter.boolean.false")})]});default:return null}},b=()=>{const w=o.filter(S=>S.field&&S.operator&&S.value!=="").map(S=>{const C=d.find(A=>A.value===S.field);let E=S.value;return S.operator==="contains"?{id:S.field,value:E}:(C?.type==="date"&&E instanceof Date&&(E=Math.floor(E.getTime()/1e3)),C?.type==="boolean"&&(E=E?1:0),{id:S.field,value:`${S.operator}:${E}`})});s.setColumnFilters(w),i(!1)};return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2",children:e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:[e.jsx(_x,{refetch:n}),e.jsx(T,{placeholder:r("filter.email_search"),value:s.getColumn("email")?.getFilterValue()??"",onChange:w=>s.getColumn("email")?.setFilterValue(w.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs(Ur,{open:h,onOpenChange:i,children:[e.jsx($r,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(_o,{className:"mr-2 h-4 w-4"}),r("filter.advanced"),o.length>0&&e.jsx(H,{variant:"secondary",className:"ml-2 rounded-sm px-1",children:o.length})]})}),e.jsxs(fa,{className:"w-[400px] sm:w-[540px]",children:[e.jsxs(ga,{children:[e.jsx(ja,{children:r("filter.sheet.title")}),e.jsx(va,{children:r("filter.sheet.description")})]}),e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{className:"font-medium",children:r("filter.sheet.conditions")}),e.jsx(R,{variant:"outline",size:"sm",onClick:I,children:r("filter.sheet.add")})]}),e.jsx(rt,{className:"h-[calc(100vh-280px)] pr-4",children:e.jsx("div",{className:"space-y-4",children:o.map((w,S)=>e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Nt,{children:r("filter.sheet.condition",{number:S+1})}),e.jsx(R,{variant:"ghost",size:"sm",onClick:()=>p(S),children:e.jsx(Le,{className:"h-4 w-4"})})]}),e.jsxs(W,{value:w.field,onValueChange:C=>N(S,"field",C),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("filter.sheet.field")})}),e.jsx(B,{children:d.map(C=>e.jsx(U,{value:C.value,children:C.label},C.value))})]}),w.field&&e.jsxs(W,{value:w.operator,onValueChange:C=>N(S,"operator",C),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("filter.sheet.operator")})}),e.jsx(B,{children:d.find(C=>C.value===w.field)?.operators.map(C=>e.jsx(U,{value:C.value,children:C.label},C.value))})]}),w.field&&w.operator&&k(w,S)]},S))})}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(R,{variant:"outline",onClick:()=>{u([]),i(!1)},children:r("filter.sheet.reset")}),e.jsx(R,{onClick:b,children:r("filter.sheet.apply")})]})]})]})]}),c&&e.jsxs(R,{variant:"ghost",onClick:()=>{s.resetColumnFilters(),u([])},className:"h-8 px-2 lg:px-3",children:[r("filter.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})})}const Sx=x.object({id:x.number(),email:x.string().email(),invite_user_email:x.string().email().nullable().optional(),password:x.string().optional().nullable(),balance:x.coerce.number(),commission_balance:x.coerce.number(),u:x.number(),d:x.number(),transfer_enable:x.number(),expired_at:x.number().nullable(),plan_id:x.number().nullable(),banned:x.number(),commission_type:x.number(),commission_rate:x.number().nullable(),discount:x.number().nullable(),speed_limit:x.number().nullable(),device_limit:x.number().nullable(),is_admin:x.number(),is_staff:x.number(),remarks:x.string().nullable()}),Gr=m.createContext(void 0);function kx({children:s,defaultValues:n,open:a,onOpenChange:l}){const[r,c]=m.useState(!1),[o,u]=m.useState(!1),[h,i]=m.useState([]),d=ce({resolver:ue(Sx),defaultValues:n,mode:"onChange"});m.useEffect(()=>{a!==void 0&&c(a)},[a]);const f=P=>{c(P),l?.(P)};return e.jsx(Gr.Provider,{value:{form:d,formOpen:r,setFormOpen:f,datePickerOpen:o,setDatePickerOpen:u,planList:h,setPlanList:i},children:s})}function Px(){const s=m.useContext(Gr);if(!s)throw new Error("useUserForm must be used within a UserFormProvider");return s}function Tx({refetch:s}){const{t:n}=M("user"),{form:a,formOpen:l,setFormOpen:r,datePickerOpen:c,setDatePickerOpen:o,planList:u,setPlanList:h}=Px();return m.useEffect(()=>{l&&Os().then(({data:i})=>{h(i)})},[l,h]),e.jsxs(he,{...a,children:[e.jsx(j,{control:a.control,name:"email",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.email")}),e.jsx(_,{children:e.jsx(T,{...i,placeholder:n("edit.form.email_placeholder")})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"invite_user_email",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.inviter_email")}),e.jsx(_,{children:e.jsx(T,{value:i.value||"",onChange:d=>i.onChange(d.target.value?d.target.value:null),placeholder:n("edit.form.inviter_email_placeholder")})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"password",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.password")}),e.jsx(_,{children:e.jsx(T,{value:i.value||"",onChange:i.onChange,placeholder:n("edit.form.password_placeholder")})}),e.jsx(D,{...i})]})}),e.jsxs("div",{className:"grid gap-2 md:grid-cols-2",children:[e.jsx(j,{control:a.control,name:"balance",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.balance")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:i.onChange,placeholder:n("edit.form.balance_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"commission_balance",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.commission_balance")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:i.onChange,placeholder:n("edit.form.commission_balance_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"u",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.upload")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{value:i.value/1024/1024/1024||"",onChange:d=>i.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.upload_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"d",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.download")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value/1024/1024/1024||"",onChange:d=>i.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.download_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(D,{...i})]})})]}),e.jsx(j,{control:a.control,name:"transfer_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.total_traffic")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value/1024/1024/1024||"",onChange:d=>i.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.total_traffic_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"expired_at",render:({field:i})=>e.jsxs(g,{className:"flex flex-col",children:[e.jsx(v,{children:n("edit.form.expire_time")}),e.jsxs(as,{open:c,onOpenChange:o,children:[e.jsx(ns,{asChild:!0,children:e.jsx(_,{children:e.jsxs(R,{type:"button",variant:"outline",className:y("w-full pl-3 text-left font-normal",!i.value&&"text-muted-foreground"),onClick:()=>o(!0),children:[i.value?me(i.value):e.jsx("span",{children:n("edit.form.expire_time_placeholder")}),e.jsx(ot,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsx(We,{className:"w-auto p-0",align:"start",side:"top",sideOffset:4,onInteractOutside:d=>{d.preventDefault()},onEscapeKeyDown:d=>{d.preventDefault()},children:e.jsxs("div",{className:"flex flex-col space-y-3 p-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(R,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{i.onChange(null),o(!1)},children:n("edit.form.expire_time_permanent")}),e.jsx(R,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const d=new Date;d.setMonth(d.getMonth()+1),d.setHours(23,59,59,999),i.onChange(Math.floor(d.getTime()/1e3)),o(!1)},children:n("edit.form.expire_time_1month")}),e.jsx(R,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const d=new Date;d.setMonth(d.getMonth()+3),d.setHours(23,59,59,999),i.onChange(Math.floor(d.getTime()/1e3)),o(!1)},children:n("edit.form.expire_time_3months")})]}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Vs,{mode:"single",selected:i.value?new Date(i.value*1e3):void 0,onSelect:d=>{if(d){const f=new Date(i.value?i.value*1e3:Date.now());d.setHours(f.getHours(),f.getMinutes(),f.getSeconds()),i.onChange(Math.floor(d.getTime()/1e3))}},disabled:d=>d{const d=new Date;d.setHours(23,59,59,999),i.onChange(Math.floor(d.getTime()/1e3))},className:"h-6 px-2 text-xs",children:n("edit.form.expire_time_today")})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(T,{type:"datetime-local",step:"1",value:me(i.value,"YYYY-MM-DDTHH:mm:ss"),onChange:d=>{const f=new Date(d.target.value);isNaN(f.getTime())||i.onChange(Math.floor(f.getTime()/1e3))},className:"flex-1"}),e.jsx(R,{type:"button",variant:"outline",onClick:()=>o(!1),children:n("edit.form.expire_time_confirm")})]})]})]})})]}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"plan_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.subscription")}),e.jsx(_,{children:e.jsxs(W,{value:i.value?i.value.toString():"null",onValueChange:d=>i.onChange(d==="null"?null:parseInt(d)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:n("edit.form.subscription_none")})}),e.jsxs(B,{children:[e.jsx(U,{value:"null",children:n("edit.form.subscription_none")}),u.map(d=>e.jsx(U,{value:d.id.toString(),children:d.name},d.id))]})]})})]})}),e.jsx(j,{control:a.control,name:"banned",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.account_status")}),e.jsx(_,{children:e.jsxs(W,{value:i.value.toString(),onValueChange:d=>i.onChange(parseInt(d)),children:[e.jsx(K,{children:e.jsx(Y,{})}),e.jsxs(B,{children:[e.jsx(U,{value:"1",children:n("columns.status_text.banned")}),e.jsx(U,{value:"0",children:n("columns.status_text.normal")})]})]})})]})}),e.jsx(j,{control:a.control,name:"commission_type",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.commission_type")}),e.jsx(_,{children:e.jsxs(W,{value:i.value.toString(),onValueChange:d=>i.onChange(parseInt(d)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:n("edit.form.subscription_none")})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:n("edit.form.commission_type_system")}),e.jsx(U,{value:"1",children:n("edit.form.commission_type_cycle")}),e.jsx(U,{value:"2",children:n("edit.form.commission_type_onetime")})]})]})})]})}),e.jsx(j,{control:a.control,name:"commission_rate",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.commission_rate")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:d=>i.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.commission_rate_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})})]})}),e.jsx(j,{control:a.control,name:"discount",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.discount")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:d=>i.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.discount_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"speed_limit",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.speed_limit")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:d=>i.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.speed_limit_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"Mbps"})]})}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"device_limit",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.device_limit")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:d=>i.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.device_limit_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"台"})]})}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"is_admin",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.is_admin")}),e.jsx("div",{className:"py-2",children:e.jsx(_,{children:e.jsx(q,{checked:i.value===1,onCheckedChange:d=>i.onChange(d?1:0)})})})]})}),e.jsx(j,{control:a.control,name:"is_staff",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.is_staff")}),e.jsx("div",{className:"py-2",children:e.jsx(_,{children:e.jsx(q,{checked:i.value===1,onCheckedChange:d=>i.onChange(d?1:0)})})})]})}),e.jsx(j,{control:a.control,name:"remarks",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.remarks")}),e.jsx(_,{children:e.jsx(Cs,{className:"h-24",value:i.value||"",onChange:d=>i.onChange(d.currentTarget.value??null),placeholder:n("edit.form.remarks_placeholder")})}),e.jsx(D,{})]})}),e.jsxs(qr,{children:[e.jsx(R,{variant:"outline",onClick:()=>r(!1),children:n("edit.form.cancel")}),e.jsx(R,{type:"submit",onClick:()=>{a.handleSubmit(i=>{im(i).then(({data:d})=>{d&&($.success(n("edit.form.success")),r(!1),s())})})()},children:n("edit.form.submit")})]})]})}function Kr({refetch:s,defaultValues:n,dialogTrigger:a=e.jsxs(R,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),t("edit.button")]})}){const{t:l}=M("user"),[r,c]=m.useState(!1);return e.jsx(kx,{defaultValues:n,open:r,onOpenChange:c,children:e.jsxs(Ur,{open:r,onOpenChange:c,children:[e.jsx($r,{asChild:!0,children:a}),e.jsxs(fa,{className:"max-w-[90%] space-y-4",children:[e.jsxs(ga,{children:[e.jsx(ja,{children:l("edit.title")}),e.jsx(va,{})]}),e.jsx(Tx,{refetch:s})]})]})})}const Br=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m17.71 11.29l-5-5a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21l-5 5a1 1 0 0 0 1.42 1.42L11 9.41V17a1 1 0 0 0 2 0V9.41l3.29 3.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42"})}),Wr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.71 11.29a1 1 0 0 0-1.42 0L13 14.59V7a1 1 0 0 0-2 0v7.59l-3.29-3.3a1 1 0 0 0-1.42 1.42l5 5a1 1 0 0 0 .33.21a.94.94 0 0 0 .76 0a1 1 0 0 0 .33-.21l5-5a1 1 0 0 0 0-1.42"})}),Dx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17 11H9.41l3.3-3.29a1 1 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33a1 1 0 0 0 0 .76a1 1 0 0 0 .21.33l5 5a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42L9.41 13H17a1 1 0 0 0 0-2"})}),Rx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76"})}),$t=[{accessorKey:"record_at",header:"时间",cell:({row:s})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("time",{className:"text-sm text-muted-foreground",children:Fc(s.original.record_at)})})},{accessorKey:"u",header:"上行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Br,{className:"h-4 w-4 text-emerald-500"}),e.jsx("span",{className:"font-mono text-sm",children:Ze(s.original.u)})]})},{accessorKey:"d",header:"下行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Wr,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{className:"font-mono text-sm",children:Ze(s.original.d)})]})},{accessorKey:"server_rate",header:"倍率",cell:({row:s})=>{const n=s.original.server_rate;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(H,{variant:"outline",className:"font-mono",children:[n,"x"]})})}},{id:"total",header:"总计",cell:({row:s})=>{const n=s.original.u+s.original.d;return e.jsx("div",{className:"flex items-center justify-end font-mono text-sm",children:Ze(n)})}}];function Yr({user_id:s,dialogTrigger:n}){const{t:a}=M(["traffic"]),[l,r]=m.useState(!1),[c,o]=m.useState({pageIndex:0,pageSize:20}),{data:u,isLoading:h}=se({queryKey:["userStats",s,c,l],queryFn:()=>l?dm({user_id:s,pageSize:c.pageSize,page:c.pageIndex+1}):null}),i=Ae({data:u?.data??[],columns:$t,pageCount:Math.ceil((u?.total??0)/c.pageSize),state:{pagination:c},manualPagination:!0,getCoreRowModel:Fe(),onPaginationChange:o});return e.jsxs(ge,{open:l,onOpenChange:r,children:[e.jsx(Oe,{asChild:!0,children:n}),e.jsxs(xe,{className:"sm:max-w-[700px]",children:[e.jsx(ve,{children:e.jsx(je,{children:a("trafficRecord.title")})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(da,{children:[e.jsx(ma,{children:i.getHeaderGroups().map(d=>e.jsx(vs,{children:d.headers.map(f=>e.jsx(ha,{className:y("h-10 px-2 text-xs",f.id==="total"&&"text-right"),children:f.isPlaceholder?null:bt(f.column.columnDef.header,f.getContext())},f.id))},d.id))}),e.jsx(ua,{children:h?Array.from({length:c.pageSize}).map((d,f)=>e.jsx(vs,{children:Array.from({length:$t.length}).map((P,I)=>e.jsx(Us,{className:"p-2",children:e.jsx(Ie,{className:"h-6 w-full"})},I))},f)):i.getRowModel().rows?.length?i.getRowModel().rows.map(d=>e.jsx(vs,{"data-state":d.getIsSelected()&&"selected",className:"h-10",children:d.getVisibleCells().map(f=>e.jsx(Us,{className:"px-2",children:bt(f.column.columnDef.cell,f.getContext())},f.id))},d.id)):e.jsx(vs,{children:e.jsx(Us,{colSpan:$t.length,className:"h-24 text-center",children:a("trafficRecord.noRecords")})})})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:a("trafficRecord.perPage")}),e.jsxs(W,{value:`${i.getState().pagination.pageSize}`,onValueChange:d=>{i.setPageSize(Number(d))},children:[e.jsx(K,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:i.getState().pagination.pageSize})}),e.jsx(B,{side:"top",children:[10,20,30,40,50].map(d=>e.jsx(U,{value:`${d}`,children:d},d))})]}),e.jsx("p",{className:"text-sm font-medium",children:a("trafficRecord.records")})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"flex w-[100px] items-center justify-center text-sm",children:a("trafficRecord.page",{current:i.getState().pagination.pageIndex+1,total:i.getPageCount()})}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>i.previousPage(),disabled:!i.getCanPreviousPage()||h,children:e.jsx(Dx,{className:"h-4 w-4"})}),e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>i.nextPage(),disabled:!i.getCanNextPage()||h,children:e.jsx(Rx,{className:"h-4 w-4"})})]})]})]})]})]})]})}const Ex=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M5 18h4.24a1 1 0 0 0 .71-.29l6.92-6.93L19.71 8a1 1 0 0 0 0-1.42l-4.24-4.29a1 1 0 0 0-1.42 0l-2.82 2.83l-6.94 6.93a1 1 0 0 0-.29.71V17a1 1 0 0 0 1 1m9.76-13.59l2.83 2.83l-1.42 1.42l-2.83-2.83ZM6 13.17l5.93-5.93l2.83 2.83L8.83 16H6ZM21 20H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2"})}),Ix=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2"})}),Mx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 8.94a1.3 1.3 0 0 0-.06-.27v-.09a1 1 0 0 0-.19-.28l-6-6a1 1 0 0 0-.28-.19a.3.3 0 0 0-.09 0a.9.9 0 0 0-.33-.11H10a3 3 0 0 0-3 3v1H6a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3zm-6-3.53L17.59 8H16a1 1 0 0 1-1-1ZM15 19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3Z"})}),Ox=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 11a1 1 0 0 0-1 1a8.05 8.05 0 1 1-2.22-5.5h-2.4a1 1 0 0 0 0 2h4.53a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1.77A10 10 0 1 0 22 12a1 1 0 0 0-1-1"})}),Vx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9.5 10.5H12a1 1 0 0 0 0-2h-1V8a1 1 0 0 0-2 0v.55a2.5 2.5 0 0 0 .5 4.95h1a.5.5 0 0 1 0 1H8a1 1 0 0 0 0 2h1v.5a1 1 0 0 0 2 0v-.55a2.5 2.5 0 0 0-.5-4.95h-1a.5.5 0 0 1 0-1M21 12h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Z"})}),Lx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12.3 12.22A4.92 4.92 0 0 0 14 8.5a5 5 0 0 0-10 0a4.92 4.92 0 0 0 1.7 3.72A8 8 0 0 0 1 19.5a1 1 0 0 0 2 0a6 6 0 0 1 12 0a1 1 0 0 0 2 0a8 8 0 0 0-4.7-7.28M9 11.5a3 3 0 1 1 3-3a3 3 0 0 1-3 3m9.74.32A5 5 0 0 0 15 3.5a1 1 0 0 0 0 2a3 3 0 0 1 3 3a3 3 0 0 1-1.5 2.59a1 1 0 0 0-.5.84a1 1 0 0 0 .45.86l.39.26l.13.07a7 7 0 0 1 4 6.38a1 1 0 0 0 2 0a9 9 0 0 0-4.23-7.68"})}),Ax=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 1 1 4 12a1 1 0 0 0-2 0A10 10 0 1 0 12 2m0 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h2a1 1 0 0 0 0-2h-1V9a1 1 0 0 0-1-1"})}),Fx=(s,n)=>{const{t:a}=M("user");return[{accessorKey:"is_admin",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.is_admin")}),enableSorting:!1,enableHiding:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r)),size:0},{accessorKey:"is_staff",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.is_staff")}),enableSorting:!1,enableHiding:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r)),size:0},{accessorKey:"id",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.id")}),cell:({row:l})=>e.jsx(H,{variant:"outline",children:l.original.id}),enableSorting:!0,enableHiding:!1},{accessorKey:"email",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.email")}),cell:({row:l})=>{const r=l.original.t||0,c=Date.now()/1e3-r<120,o=Math.floor(Date.now()/1e3-r);let u=c?a("columns.online_status.online"):r===0?a("columns.online_status.never"):a("columns.online_status.last_online",{time:me(r)});if(!c&&r!==0){const h=Math.floor(o/60),i=Math.floor(h/60),d=Math.floor(i/24);d>0?u+=` +`+a("columns.online_status.offline_duration.days",{count:d}):i>0?u+=` +`+a("columns.online_status.offline_duration.hours",{count:i}):h>0?u+=` +`+a("columns.online_status.offline_duration.minutes",{count:h}):u+=` +`+a("columns.online_status.offline_duration.seconds",{count:o})}return e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:y("size-2.5 rounded-full ring-2 ring-offset-2",c?"bg-green-500 ring-green-500/20":"bg-gray-300 ring-gray-300/20","transition-all duration-300")}),e.jsx("span",{className:"font-medium text-foreground/90",children:l.original.email})]})}),e.jsx(te,{side:"bottom",className:"max-w-[280px]",children:e.jsx("p",{className:"whitespace-pre-line text-sm",children:u})})]})})},enableSorting:!1,enableHiding:!1},{accessorKey:"online_count",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.online_count")}),cell:({row:l})=>{const r=l.original.device_limit,c=l.original.online_count||0;return e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(H,{variant:"outline",className:y("min-w-[4rem] justify-center",r!==null&&c>=r?"border-destructive/50 bg-destructive/10 text-destructive":"border-primary/40 bg-primary/5 text-primary/90"),children:[c," / ",r===null?"∞":r]})})}),e.jsx(te,{side:"bottom",children:e.jsx("p",{className:"text-sm",children:r===null?a("columns.device_limit.unlimited"):a("columns.device_limit.limited",{count:r})})})]})})},enableSorting:!0,enableHiding:!1},{accessorKey:"banned",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.status")}),cell:({row:l})=>{const r=l.original.banned;return e.jsx("div",{className:"flex justify-center",children:e.jsx(H,{className:y("min-w-20 justify-center transition-colors",r?"bg-destructive/15 text-destructive hover:bg-destructive/25":"bg-success/15 text-success hover:bg-success/25"),children:a(r?"columns.status_text.banned":"columns.status_text.normal")})})},enableSorting:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r))},{accessorKey:"plan_id",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.subscription")}),cell:({row:l})=>e.jsx("div",{className:"min-w-[10em] break-all",children:l.original?.plan?.name||"-"}),enableSorting:!1,enableHiding:!1},{accessorKey:"group_id",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.group")}),cell:({row:l})=>e.jsx("div",{className:"flex flex-wrap gap-1",children:e.jsx(H,{variant:"outline",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5 whitespace-nowrap"),children:l.original?.group?.name||"-"})}),enableSorting:!1},{accessorKey:"total_used",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.used_traffic")}),cell:({row:l})=>{const r=Ze(l.original?.total_used),c=Ze(l.original?.transfer_enable),o=l.original?.total_used/l.original?.transfer_enable*100||0;return e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{className:"w-full",children:e.jsxs("div",{className:"w-full space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:r}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.toFixed(1),"%"]})]}),e.jsx("div",{className:"h-1.5 w-full rounded-full bg-secondary",children:e.jsx("div",{className:y("h-full rounded-full transition-all",o>90?"bg-destructive":"bg-primary"),style:{width:`${Math.min(o,100)}%`}})})]})}),e.jsx(te,{side:"bottom",children:e.jsxs("p",{className:"text-sm",children:[a("columns.total_traffic"),": ",c]})})]})})}},{accessorKey:"transfer_enable",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.total_traffic")}),cell:({row:l})=>e.jsx("div",{className:"font-medium text-muted-foreground",children:Ze(l.original?.transfer_enable)})},{accessorKey:"expired_at",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.expire_time")}),cell:({row:l})=>{const r=l.original.expired_at,c=Date.now()/1e3,o=r!=null&&re.jsx(V,{column:l,title:a("columns.balance")}),cell:({row:l})=>{const r=zs(l.original?.balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:r})]})}},{accessorKey:"commission_balance",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.commission")}),cell:({row:l})=>{const r=zs(l.original?.commission_balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:r})]})}},{accessorKey:"created_at",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.register_time")}),cell:({row:l})=>e.jsx("div",{className:"truncate",children:me(l.original?.created_at)}),size:1e3},{id:"actions",header:({column:l})=>e.jsx(V,{column:l,className:"justify-end",title:a("columns.actions")}),cell:({row:l,table:r})=>e.jsxs(ys,{modal:!0,children:[e.jsx(_s,{asChild:!0,children:e.jsx("div",{className:"text-center",children:e.jsx(J,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":a("columns.actions"),children:e.jsx(_t,{className:"size-4"})})})}),e.jsxs(is,{align:"end",className:"min-w-[40px]",children:[e.jsx(pe,{onSelect:c=>{c.preventDefault()},className:"p-0",children:e.jsx(Kr,{defaultValues:{...l.original,invite_user_email:l.original.invite_user?.email},refetch:s,dialogTrigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Ex,{className:"mr-2"}),a("columns.actions_menu.edit")]})})}),e.jsx(pe,{onSelect:c=>c.preventDefault(),className:"p-0",children:e.jsx(Ar,{defaultValues:{email:l.original.email},trigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Ix,{className:"mr-2 "}),a("columns.actions_menu.assign_order")]})})}),e.jsx(pe,{onSelect:()=>{wt(l.original.subscribe_url)},className:"p-0",children:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Mx,{className:"mr-2"}),a("columns.actions_menu.copy_url")]})}),e.jsx(pe,{onSelect:()=>{om({id:l.original.id}).then(({data:c})=>{c&&$.success("重置成功")})},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Ox,{className:"mr-2 "}),a("columns.actions_menu.reset_secret")]})}),e.jsx(pe,{onSelect:()=>{},className:"p-0",children:e.jsxs(Rs,{className:"flex items-center px-2 py-1.5",to:`/finance/order?user_id=${l.original?.id}`,children:[e.jsx(Vx,{className:"mr-2"}),a("columns.actions_menu.orders")]})}),e.jsx(pe,{onSelect:()=>{r.setColumnFilters([{id:"invite_user_id",value:l.original?.id}])},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Lx,{className:"mr-2 "}),a("columns.actions_menu.invites")]})}),e.jsx(pe,{onSelect:c=>c.preventDefault(),className:"p-0",children:e.jsx(Yr,{user_id:l.original?.id,dialogTrigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Ax,{className:"mr-2 "}),a("columns.actions_menu.traffic_records")]})})})]})]})}]};function zx(){const[s]=Gn(),[n,a]=m.useState({}),[l,r]=m.useState({is_admin:!1,is_staff:!1}),[c,o]=m.useState([]),[u,h]=m.useState([]),[i,d]=m.useState({pageIndex:0,pageSize:20});m.useEffect(()=>{const E=s.get("email");E&&o(A=>A.some(z=>z.id==="email")?A:[...A,{id:"email",value:E}])},[s]);const{refetch:f,data:P,isLoading:I}=se({queryKey:["userList",i,c,u],queryFn:()=>lm({pageSize:i.pageSize,current:i.pageIndex+1,filter:c,sort:u})}),[p,N]=m.useState([]),[k,b]=m.useState([]);m.useEffect(()=>{Mt().then(({data:E})=>{N(E)}),Os().then(({data:E})=>{b(E)})},[]);const w=p.map(E=>({label:E.name,value:E.id})),S=k.map(E=>({label:E.name,value:E.id})),C=Ae({data:P?.data??[],columns:Fx(f),state:{sorting:u,columnVisibility:l,rowSelection:n,columnFilters:c,pagination:i},rowCount:P?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:h,onColumnFiltersChange:o,onColumnVisibilityChange:r,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),onPaginationChange:d,getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnVisibility:{commission_balance:!1,created_at:!1,is_admin:!1,is_staff:!1,permission_group:!1,plan_id:!1},columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:C,toolbar:e.jsx(Cx,{table:C,refetch:f,serverGroupList:p,permissionGroups:w,subscriptionPlans:S})})}function Ux(){const{t:s}=M("user");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("manage.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("manage.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx("div",{className:"w-full",children:e.jsx(zx,{})})})]})]})}const $x=Object.freeze(Object.defineProperty({__proto__:null,default:Ux},Symbol.toStringTag,{value:"Module"}));function Hx({column:s,title:n,options:a}){const l=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(J,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(No,{className:"mr-2 h-4 w-4"}),n,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(r=>l.has(r.value)).map(r=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:r.label},`selected-${r.value}`))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Is,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(r=>{const c=l.has(r.value);return e.jsxs(Ne,{onSelect:()=>{c?l.delete(r.value):l.add(r.value);const o=Array.from(l);s?.setFilterValue(o.length?o:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(wo,{className:y("h-4 w-4")})}),r.icon&&e.jsx(r.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:r.label})]},`option-${r.value}`)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(qs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const qx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})});function Gx({table:s}){const{t:n}=M("ticket");return e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-4",children:[e.jsx(gr,{defaultValue:s.getColumn("status")?.getFilterValue(),onValueChange:a=>s.getColumn("status")?.setFilterValue(a),children:e.jsxs(ca,{className:"grid w-full grid-cols-2",children:[e.jsx(nt,{value:"0",children:n("status.pending")}),e.jsx(nt,{value:"1",children:n("status.closed")})]})}),s.getColumn("level")&&e.jsx(Hx,{column:s.getColumn("level"),title:n("columns.level"),options:[{label:n("level.low"),value:Xe.LOW,icon:qx,color:"gray"},{label:n("level.medium"),value:Xe.MIDDLE,icon:Br,color:"yellow"},{label:n("level.high"),value:Xe.HIGH,icon:Wr,color:"red"}]})]})})}function Kx(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"text-foreground",children:[e.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_qFRN",begin:"0;spinner_OcgL.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{begin:"spinner_qFRN.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_OcgL",begin:"spinner_qFRN.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})}const Bx=Ts("flex gap-2 max-w-[60%] items-end relative group",{variants:{variant:{received:"self-start",sent:"self-end flex-row-reverse"},layout:{default:"",ai:"max-w-full w-full items-center"}},defaultVariants:{variant:"received",layout:"default"}}),Jr=m.forwardRef(({className:s,variant:n,layout:a,children:l,...r},c)=>e.jsx("div",{className:y(Bx({variant:n,layout:a,className:s}),"relative group"),ref:c,...r,children:m.Children.map(l,o=>m.isValidElement(o)&&typeof o.type!="string"?m.cloneElement(o,{variant:n,layout:a}):o)}));Jr.displayName="ChatBubble";const Wx=Ts("p-4",{variants:{variant:{received:"bg-secondary text-secondary-foreground rounded-r-lg rounded-tl-lg",sent:"bg-primary text-primary-foreground rounded-l-lg rounded-tr-lg"},layout:{default:"",ai:"border-t w-full rounded-none bg-transparent"}},defaultVariants:{variant:"received",layout:"default"}}),Qr=m.forwardRef(({className:s,variant:n,layout:a,isLoading:l=!1,children:r,...c},o)=>e.jsx("div",{className:y(Wx({variant:n,layout:a,className:s}),"break-words max-w-full whitespace-pre-wrap"),ref:o,...c,children:l?e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(Kx,{})}):r}));Qr.displayName="ChatBubbleMessage";const Yx=m.forwardRef(({variant:s,className:n,children:a,...l},r)=>e.jsx("div",{ref:r,className:y("absolute top-1/2 -translate-y-1/2 flex opacity-0 group-hover:opacity-100 transition-opacity duration-200",s==="sent"?"-left-1 -translate-x-full flex-row-reverse":"-right-1 translate-x-full",n),...l,children:a}));Yx.displayName="ChatBubbleActionWrapper";const Zr=m.forwardRef(({className:s,...n},a)=>e.jsx(Cs,{autoComplete:"off",ref:a,name:"message",className:y("max-h-12 px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",s),...n}));Zr.displayName="ChatInput";const Xr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"})}),el=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.098 12.634L13 11.423V7a1 1 0 0 0-2 0v5a1 1 0 0 0 .5.866l2.598 1.5a1 1 0 1 0 1-1.732M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8.01 8.01 0 0 1-8 8"})}),Jx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M3.71 16.29a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21a1 1 0 0 0-.21.33a1 1 0 0 0 .21 1.09a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1 1 0 0 0 .21-1.09a1 1 0 0 0-.21-.33M7 8h14a1 1 0 0 0 0-2H7a1 1 0 0 0 0 2m-3.29 3.29a1 1 0 0 0-1.09-.21a1.2 1.2 0 0 0-.33.21a1 1 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1 1 0 0 0-.21-.33M21 11H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2M3.71 6.29a1 1 0 0 0-.33-.21a1 1 0 0 0-1.09.21a1.2 1.2 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a1 1 0 0 0 1.09-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1.2 1.2 0 0 0-.21-.33M21 16H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})}),Qx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9 12H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m-1-2h4a1 1 0 0 0 0-2H8a1 1 0 0 0 0 2m1 6H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m12-4h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Zm-6.44-2.83a.8.8 0 0 0-.18-.09a.6.6 0 0 0-.19-.06a1 1 0 0 0-.9.27A1.05 1.05 0 0 0 12 17a1 1 0 0 0 .07.38a1.2 1.2 0 0 0 .22.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21A1 1 0 0 0 14 17a1.05 1.05 0 0 0-.29-.71a2 2 0 0 0-.15-.12m.14-3.88a1 1 0 0 0-1.62.33A1 1 0 0 0 13 14a1 1 0 0 0 1-1a1 1 0 0 0-.08-.38a.9.9 0 0 0-.22-.33"})});function Zx(){return e.jsxs("div",{className:"flex h-full flex-col space-y-4 p-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Ie,{className:"h-8 w-3/4"}),e.jsx(Ie,{className:"h-4 w-1/2"})]}),e.jsx("div",{className:"flex-1 space-y-4",children:[1,2,3].map(s=>e.jsx(Ie,{className:"h-20 w-2/3"},s))})]})}function Xx({ticketId:s,dialogTrigger:n}){const{t:a}=M("ticket"),l=os(),r=m.useRef(null),[c,o]=m.useState(!1),[u,h]=m.useState(""),[i,d]=m.useState(!1),{data:f,refetch:P,isLoading:I}=se({queryKey:["ticket",s,c],queryFn:()=>c?um(s):Promise.resolve(null),refetchInterval:c?5e3:!1,retry:3}),p=f?.data,N=(C="smooth")=>{if(r.current){const{scrollHeight:E,clientHeight:A}=r.current;r.current.scrollTo({top:E-A,behavior:C})}};m.useEffect(()=>{if(!c)return;const C=requestAnimationFrame(()=>{N("instant"),setTimeout(()=>N(),1e3)});return()=>{cancelAnimationFrame(C)}},[c,p?.messages]);const k=async()=>{const C=u.trim();!C||i||(d(!0),hm({id:s,message:C}).then(()=>{h(""),P(),N()}).finally(()=>{d(!1)}))},b=async()=>{fr(s).then(()=>{$.success(a("actions.close_success")),P()})},w=()=>{p?.user&&l("/finance/order?user_id="+p.user.id)},S=p?.status===et.CLOSED;return e.jsxs(ge,{open:c,onOpenChange:o,children:[e.jsx(Oe,{asChild:!0,children:n??e.jsx(J,{variant:"outline",children:a("actions.view_ticket")})}),e.jsxs(xe,{className:"flex h-[90vh] max-w-4xl flex-col gap-0 p-0",children:[e.jsx(je,{}),I?e.jsx(Zx,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col space-y-4 border-b p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:p?.subject}),e.jsx(H,{variant:S?"secondary":"default",children:a(S?"status.closed":"status.processing")}),!S&&e.jsx(Je,{title:a("actions.close_confirm_title"),description:a("actions.close_confirm_description"),confirmText:a("actions.close_confirm_button"),variant:"destructive",onConfirm:b,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"gap-1 text-muted-foreground hover:text-destructive",children:[e.jsx(Xr,{className:"h-4 w-4"}),a("actions.close_ticket")]})})]}),e.jsxs("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(it,{className:"h-4 w-4"}),e.jsx("span",{children:p?.user?.email})]}),e.jsx(be,{orientation:"vertical",className:"h-4"}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(el,{className:"h-4 w-4"}),e.jsxs("span",{children:[a("detail.created_at")," ",me(p?.created_at)]})]}),e.jsx(be,{orientation:"vertical",className:"h-4"}),e.jsx(H,{variant:"outline",children:p?.level!=null&&a(`level.${p.level===Xe.LOW?"low":p.level===Xe.MIDDLE?"medium":"high"}`)})]})]}),p?.user&&e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Kr,{defaultValues:p.user,refetch:P,dialogTrigger:e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.user_info"),children:e.jsx(it,{className:"h-4 w-4"})})}),e.jsx(Yr,{user_id:p.user.id,dialogTrigger:e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.traffic_records"),children:e.jsx(Jx,{className:"h-4 w-4"})})}),e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.order_records"),onClick:w,children:e.jsx(Qx,{className:"h-4 w-4"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx("div",{ref:r,className:"h-full space-y-4 overflow-y-auto p-6",children:p?.messages?.length===0?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:a("detail.no_messages")}):p?.messages?.map(C=>e.jsx(Jr,{variant:C.is_me?"sent":"received",className:C.is_me?"ml-auto":"mr-auto",children:e.jsx(Qr,{children:e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"whitespace-pre-wrap break-words",children:C.message}),e.jsx("div",{className:"text-right",children:e.jsx("time",{className:"text-[10px] text-muted-foreground",children:me(C.created_at)})})]})})},C.id))})}),e.jsx("div",{className:"border-t p-4",children:e.jsxs("div",{className:"relative flex items-center space-x-2",children:[e.jsx(Zr,{disabled:S||i,placeholder:a(S?"detail.input.closed_placeholder":"detail.input.reply_placeholder"),className:"flex-1 resize-none rounded-lg border bg-background p-3 focus-visible:ring-1",value:u,onChange:C=>h(C.target.value),onKeyDown:C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),k())}}),e.jsx(J,{disabled:S||i||!u.trim(),onClick:k,children:a(i?"detail.input.sending":"detail.input.send")})]})})]})]})]})}const ep=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 4H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3m-.41 2l-5.88 5.88a1 1 0 0 1-1.42 0L5.41 6ZM20 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7.41l5.88 5.88a3 3 0 0 0 4.24 0L20 7.41Z"})}),sp=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21.92 11.6C19.9 6.91 16.1 4 12 4s-7.9 2.91-9.92 7.6a1 1 0 0 0 0 .8C4.1 17.09 7.9 20 12 20s7.9-2.91 9.92-7.6a1 1 0 0 0 0-.8M12 18c-3.17 0-6.17-2.29-7.9-6C5.83 8.29 8.83 6 12 6s6.17 2.29 7.9 6c-1.73 3.71-4.73 6-7.9 6m0-10a4 4 0 1 0 4 4a4 4 0 0 0-4-4m0 6a2 2 0 1 1 2-2a2 2 0 0 1-2 2"})}),tp=s=>{const{t:n}=M("ticket");return[{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.id")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:a.getValue("id")}),enableSorting:!1,enableHiding:!1},{accessorKey:"subject",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.subject")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(ep,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"max-w-[500px] truncate font-medium",children:a.getValue("subject")})]}),enableSorting:!1,enableHiding:!1,size:4e3},{accessorKey:"level",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.level")}),cell:({row:a})=>{const l=a.getValue("level"),r=l===Xe.LOW?"default":l===Xe.MIDDLE?"secondary":"destructive";return e.jsx(H,{variant:r,className:"whitespace-nowrap",children:n(`level.${l===Xe.LOW?"low":l===Xe.MIDDLE?"medium":"high"}`)})},filterFn:(a,l,r)=>r.includes(a.getValue(l))},{accessorKey:"status",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.status")}),cell:({row:a})=>{const l=a.getValue("status"),r=a.original.reply_status,c=l===et.CLOSED?n("status.closed"):n(r===0?"status.replied":"status.pending"),o=l===et.CLOSED?"default":r===0?"secondary":"destructive";return e.jsx(H,{variant:o,className:"whitespace-nowrap",children:c})}},{accessorKey:"updated_at",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.updated_at")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[e.jsx(el,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:me(a.getValue("updated_at"))})]}),enableSorting:!0},{accessorKey:"created_at",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.created_at")}),cell:({row:a})=>e.jsx("div",{className:"text-sm text-muted-foreground",children:me(a.getValue("created_at"))}),enableSorting:!0,meta:{isFlexGrow:!0}},{id:"actions",header:({column:a})=>e.jsx(V,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>{const l=a.original.status!==et.CLOSED;return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Xx,{ticketId:a.original.id,dialogTrigger:e.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",title:n("actions.view_details"),children:e.jsx(sp,{className:"h-4 w-4"})})}),l&&e.jsx(Je,{title:n("actions.close_confirm_title"),description:n("actions.close_confirm_description"),confirmText:n("actions.close_confirm_button"),variant:"destructive",onConfirm:async()=>{fr(a.original.id).then(()=>{$.success(n("actions.close_success")),s()})},children:e.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",title:n("actions.close_ticket"),children:e.jsx(Xr,{className:"h-4 w-4"})})})]})}}]};function ap(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([{id:"status",value:"0"}]),[o,u]=m.useState([]),[h,i]=m.useState({pageIndex:0,pageSize:20}),{refetch:d,data:f,isLoading:P}=se({queryKey:["orderList",h,r,o],queryFn:()=>mm({pageSize:h.pageSize,current:h.pageIndex+1,filter:r,sort:o})}),I=Ae({data:f?.data??[],columns:tp(d),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:h},rowCount:f?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),onPaginationChange:i,getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(Gx,{table:I,refetch:d}),e.jsx(Ye,{table:I,showPagination:!0})]})}function np(){const{t:s}=M("ticket");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(ap,{})})]})]})}const rp=Object.freeze(Object.defineProperty({__proto__:null,default:np},Symbol.toStringTag,{value:"Module"}));export{dp as a,op as c,cp as g,mp as r}; diff --git a/public/assets/admin/assets/vendor.js b/public/assets/admin/assets/vendor.js index b1a9950..c9ed53c 100644 --- a/public/assets/admin/assets/vendor.js +++ b/public/assets/admin/assets/vendor.js @@ -1,4 +1,4 @@ -import{g as En,_ as Pre,c as ao,a as kre,r as Tre}from"./index.js";function D4(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var MN={exports:{}},Px={},RN={exports:{}},an={};/** +import{g as Pn,c as la,a as cre,r as fre}from"./index.js";function mN(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var vN={exports:{}},Sx={},yN={exports:{}},an={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ import{g as En,_ as Pre,c as ao,a as kre,r as Tre}from"./index.js";function D4(e * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var hm=Symbol.for("react.element"),Mre=Symbol.for("react.portal"),Rre=Symbol.for("react.fragment"),Dre=Symbol.for("react.strict_mode"),$re=Symbol.for("react.profiler"),Ire=Symbol.for("react.provider"),Nre=Symbol.for("react.context"),Lre=Symbol.for("react.forward_ref"),Fre=Symbol.for("react.suspense"),jre=Symbol.for("react.memo"),Bre=Symbol.for("react.lazy"),Yk=Symbol.iterator;function zre(e){return e===null||typeof e!="object"?null:(e=Yk&&e[Yk]||e["@@iterator"],typeof e=="function"?e:null)}var DN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$N=Object.assign,IN={};function Mh(e,t,n){this.props=e,this.context=t,this.refs=IN,this.updater=n||DN}Mh.prototype.isReactComponent={};Mh.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")};Mh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function NN(){}NN.prototype=Mh.prototype;function $4(e,t,n){this.props=e,this.context=t,this.refs=IN,this.updater=n||DN}var I4=$4.prototype=new NN;I4.constructor=$4;$N(I4,Mh.prototype);I4.isPureReactComponent=!0;var Zk=Array.isArray,LN=Object.prototype.hasOwnProperty,N4={current:null},FN={key:!0,ref:!0,__self:!0,__source:!0};function jN(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)LN.call(t,r)&&!FN.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,Q=F[oe];if(0>>1;oei(de,G))Sei(me,de)?(F[oe]=me,F[Se]=G,oe=Se):(F[oe]=de,F[ue]=G,oe=ue);else if(Sei(me,G))F[oe]=me,F[Se]=G,oe=Se;else break e}}return V}function i(F,V){var G=F.sortIndex-V.sortIndex;return G!==0?G:F.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var u=[],l=[],c=1,f=null,h=3,p=!1,m=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=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 S(F){for(var V=n(l);V!==null;){if(V.callback===null)r(l);else if(V.startTime<=F)r(l),V.sortIndex=V.expirationTime,t(u,V);else break;V=n(l)}}function O(F){if(v=!1,S(F),!m)if(n(u)!==null)m=!0,B(E);else{var V=n(l);V!==null&&U(O,V.startTime-F)}}function E(F,V){m=!1,v&&(v=!1,w(M),M=-1),p=!0;var G=h;try{for(S(V),f=n(u);f!==null&&(!(f.expirationTime>V)||F&&!Y());){var oe=f.callback;if(typeof oe=="function"){f.callback=null,h=f.priorityLevel;var Q=oe(f.expirationTime<=V);V=e.unstable_now(),typeof Q=="function"?f.callback=Q:f===n(u)&&r(u),S(V)}else r(u);f=n(u)}if(f!==null)var X=!0;else{var ue=n(l);ue!==null&&U(O,ue.startTime-V),X=!1}return X}finally{f=null,h=G,p=!1}}var C=!1,k=null,M=-1,N=5,q=-1;function Y(){return!(e.unstable_now()-qF||125oe?(F.sortIndex=G,t(l,F),n(u)===null&&F===n(l)&&(v?(w(M),M=-1):v=!0,U(O,G-oe))):(F.sortIndex=Q,t(u,F),m||p||(m=!0,B(E))),F},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(F){var V=h;return function(){var G=h;h=V;try{return F.apply(this,arguments)}finally{h=G}}}})(VN);HN.exports=VN;var Qre=HN.exports;/** + */(function(e){function t(j,K){var Y=j.length;j.push(K);e:for(;0>>1,Q=j[oe];if(0>>1;oei(de,Y))Sei(me,de)?(j[oe]=me,j[Se]=Y,oe=Se):(j[oe]=de,j[ue]=Y,oe=ue);else if(Sei(me,Y))j[oe]=me,j[Se]=Y,oe=Se;else break e}}return K}function i(j,K){var Y=j.sortIndex-K.sortIndex;return Y!==0?Y:j.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var u=[],l=[],c=1,f=null,h=3,p=!1,m=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=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 S(j){for(var K=n(l);K!==null;){if(K.callback===null)r(l);else if(K.startTime<=j)r(l),K.sortIndex=K.expirationTime,t(u,K);else break;K=n(l)}}function O(j){if(v=!1,S(j),!m)if(n(u)!==null)m=!0,q(E);else{var K=n(l);K!==null&&W(O,K.startTime-j)}}function E(j,K){m=!1,v&&(v=!1,w(M),M=-1),p=!0;var Y=h;try{for(S(K),f=n(u);f!==null&&(!(f.expirationTime>K)||j&&!H());){var oe=f.callback;if(typeof oe=="function"){f.callback=null,h=f.priorityLevel;var Q=oe(f.expirationTime<=K);K=e.unstable_now(),typeof Q=="function"?f.callback=Q:f===n(u)&&r(u),S(K)}else r(u);f=n(u)}if(f!==null)var J=!0;else{var ue=n(l);ue!==null&&W(O,ue.startTime-K),J=!1}return J}finally{f=null,h=Y,p=!1}}var C=!1,k=null,M=-1,N=5,z=-1;function H(){return!(e.unstable_now()-zj||125oe?(j.sortIndex=Y,t(l,j),n(u)===null&&j===n(l)&&(v?(w(M),M=-1):v=!0,W(O,Y-oe))):(j.sortIndex=Q,t(u,j),m||p||(m=!0,q(E))),j},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(j){var K=h;return function(){var Y=h;h=K;try{return j.apply(this,arguments)}finally{h=Y}}}})(TN);kN.exports=TN;var Dre=kN.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ import{g as En,_ as Pre,c as ao,a as kre,r as Tre}from"./index.js";function D4(e * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Jre=y,zo=Qre;function Ve(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"),U3=Object.prototype.hasOwnProperty,eie=/^[: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]*$/,Jk={},eT={};function tie(e){return U3.call(eT,e)?!0:U3.call(Jk,e)?!1:eie.test(e)?eT[e]=!0:(Jk[e]=!0,!1)}function nie(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 rie(e,t,n,r){if(t===null||typeof t>"u"||nie(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 Gi(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var mi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mi[e]=new Gi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mi[t]=new Gi(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mi[e]=new Gi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mi[e]=new Gi(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){mi[e]=new Gi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mi[e]=new Gi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mi[e]=new Gi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mi[e]=new Gi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mi[e]=new Gi(e,5,!1,e.toLowerCase(),null,!1,!1)});var j4=/[\-:]([a-z])/g;function B4(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(j4,B4);mi[t]=new Gi(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(j4,B4);mi[t]=new Gi(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(j4,B4);mi[t]=new Gi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mi[e]=new Gi(e,1,!1,e.toLowerCase(),null,!1,!1)});mi.xlinkHref=new Gi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mi[e]=new Gi(e,1,!1,e.toLowerCase(),null,!0,!0)});function z4(e,t,n,r){var i=mi.hasOwnProperty(t)?mi[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N3=Object.prototype.hasOwnProperty,Ire=/^[: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]*$/,Vk={},Wk={};function Nre(e){return N3.call(Wk,e)?!0:N3.call(Vk,e)?!1:Ire.test(e)?Wk[e]=!0:(Vk[e]=!0,!1)}function Lre(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 Fre(e,t,n,r){if(t===null||typeof t>"u"||Lre(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 Gi(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var mi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mi[e]=new Gi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mi[t]=new Gi(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mi[e]=new Gi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mi[e]=new Gi(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){mi[e]=new Gi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mi[e]=new Gi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mi[e]=new Gi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mi[e]=new Gi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mi[e]=new Gi(e,5,!1,e.toLowerCase(),null,!1,!1)});var k4=/[\-:]([a-z])/g;function T4(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(k4,T4);mi[t]=new Gi(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(k4,T4);mi[t]=new Gi(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(k4,T4);mi[t]=new Gi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mi[e]=new Gi(e,1,!1,e.toLowerCase(),null,!1,!1)});mi.xlinkHref=new Gi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mi[e]=new Gi(e,1,!1,e.toLowerCase(),null,!0,!0)});function M4(e,t,n,r){var i=mi.hasOwnProperty(t)?mi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var u=` -`+i[a].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=a&&0<=s);break}}}finally{I_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?n0(e):""}function iie(e){switch(e.tag){case 5:return n0(e.type);case 16:return n0("Lazy");case 13:return n0("Suspense");case 19:return n0("SuspenseList");case 0:case 2:case 15:return e=N_(e.type,!1),e;case 11:return e=N_(e.type.render,!1),e;case 1:return e=N_(e.type,!0),e;default:return""}}function q3(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 ad:return"Fragment";case od:return"Portal";case H3:return"Profiler";case U4:return"StrictMode";case V3:return"Suspense";case W3:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case KN:return(e.displayName||"Context")+".Consumer";case qN:return(e._context.displayName||"Context")+".Provider";case H4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V4:return t=e.displayName||null,t!==null?t:q3(e.type)||"Memo";case Xu:t=e._payload,e=e._init;try{return q3(e(t))}catch{}}return null}function oie(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 q3(t);case 8:return t===U4?"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 El(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function YN(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function aie(e){var t=YN(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bv(e){e._valueTracker||(e._valueTracker=aie(e))}function ZN(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=YN(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function l1(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 K3(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function nT(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=El(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 XN(e,t){t=t.checked,t!=null&&z4(e,"checked",t,!1)}function G3(e,t){XN(e,t);var n=El(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")?Y3(e,t.type,n):t.hasOwnProperty("defaultValue")&&Y3(e,t.type,El(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rT(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 Y3(e,t,n){(t!=="number"||l1(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var r0=Array.isArray;function wd(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=zv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function N0(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var h0={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},sie=["Webkit","ms","Moz","O"];Object.keys(h0).forEach(function(e){sie.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),h0[t]=h0[e]})});function tL(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||h0.hasOwnProperty(e)&&h0[e]?(""+t).trim():t+"px"}function nL(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=tL(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var uie=hr({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 Q3(e,t){if(t){if(uie[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ve(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ve(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ve(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ve(62))}}function J3(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 eC=null;function W4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tC=null,_d=null,Sd=null;function aT(e){if(e=mm(e)){if(typeof tC!="function")throw Error(Ve(280));var t=e.stateNode;t&&(t=Dx(t),tC(e.stateNode,e.type,t))}}function rL(e){_d?Sd?Sd.push(e):Sd=[e]:_d=e}function iL(){if(_d){var e=_d,t=Sd;if(Sd=_d=null,aT(e),t)for(e=0;e>>=0,e===0?32:31-(bie(e)/xie|0)|0}var Uv=64,Hv=4194304;function i0(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 h1(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=i0(s):(o&=a,o!==0&&(r=i0(o)))}else a=n&~i,a!==0?r=i0(a):o!==0&&(r=i0(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function pm(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ha(t),e[t]=n}function Cie(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=g0),gT=" ",mT=!1;function CL(e,t){switch(e){case"keyup":return Qie.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function EL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sd=!1;function eoe(e,t){switch(e){case"compositionend":return EL(t);case"keypress":return t.which!==32?null:(mT=!0,gT);case"textInput":return e=t.data,e===gT&&mT?null:e;default:return null}}function toe(e,t){if(sd)return e==="compositionend"||!J4&&CL(e,t)?(e=_L(),zy=Z4=al=null,sd=!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=xT(n)}}function kL(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kL(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function TL(){for(var e=window,t=l1();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=l1(e.document)}return t}function eO(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 coe(e){var t=TL(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&kL(n.ownerDocument.documentElement,n)){if(r!==null&&eO(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=wT(n,o);var a=wT(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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,ud=null,sC=null,v0=null,uC=!1;function _T(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uC||ud==null||ud!==l1(r)||(r=ud,"selectionStart"in r&&eO(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}),v0&&U0(v0,r)||(v0=r,r=m1(sC,"onSelect"),0fd||(e.current=pC[fd],pC[fd]=null,fd--)}function Vn(e,t){fd++,pC[fd]=e.current,e.current=t}var Ol={},Di=jl(Ol),co=jl(!1),Lc=Ol;function Ud(e,t){var n=e.type.contextTypes;if(!n)return Ol;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function fo(e){return e=e.childContextTypes,e!=null}function y1(){nr(co),nr(Di)}function kT(e,t,n){if(Di.current!==Ol)throw Error(Ve(168));Vn(Di,t),Vn(co,n)}function jL(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(Ve(108,oie(e)||"Unknown",i));return hr({},n,r)}function b1(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ol,Lc=Di.current,Vn(Di,e),Vn(co,co.current),!0}function TT(e,t,n){var r=e.stateNode;if(!r)throw Error(Ve(169));n?(e=jL(e,t,Lc),r.__reactInternalMemoizedMergedChildContext=e,nr(co),nr(Di),Vn(Di,e)):nr(co),Vn(co,n)}var tu=null,$x=!1,Z_=!1;function BL(e){tu===null?tu=[e]:tu.push(e)}function _oe(e){$x=!0,BL(e)}function Bl(){if(!Z_&&tu!==null){Z_=!0;var e=0,t=Rn;try{var n=tu;for(Rn=1;e>=a,i-=a,ru=1<<32-Ha(t)+i|n<M?(N=k,k=null):N=k.sibling;var q=h(w,k,S[M],O);if(q===null){k===null&&(k=N);break}e&&k&&q.alternate===null&&t(w,k),x=o(q,x,M),C===null?E=q:C.sibling=q,C=q,k=N}if(M===S.length)return n(w,k),or&&uc(w,M),E;if(k===null){for(;MM?(N=k,k=null):N=k.sibling;var Y=h(w,k,q.value,O);if(Y===null){k===null&&(k=N);break}e&&k&&Y.alternate===null&&t(w,k),x=o(Y,x,M),C===null?E=Y:C.sibling=Y,C=Y,k=N}if(q.done)return n(w,k),or&&uc(w,M),E;if(k===null){for(;!q.done;M++,q=S.next())q=f(w,q.value,O),q!==null&&(x=o(q,x,M),C===null?E=q:C.sibling=q,C=q);return or&&uc(w,M),E}for(k=r(w,k);!q.done;M++,q=S.next())q=p(k,w,M,q.value,O),q!==null&&(e&&q.alternate!==null&&k.delete(q.key===null?M:q.key),x=o(q,x,M),C===null?E=q:C.sibling=q,C=q);return e&&k.forEach(function(W){return t(w,W)}),or&&uc(w,M),E}function b(w,x,S,O){if(typeof S=="object"&&S!==null&&S.type===ad&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case jv:e:{for(var E=S.key,C=x;C!==null;){if(C.key===E){if(E=S.type,E===ad){if(C.tag===7){n(w,C.sibling),x=i(C,S.props.children),x.return=w,w=x;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Xu&&DT(E)===C.type){n(w,C.sibling),x=i(C,S.props),x.ref=Pp(w,C,S),x.return=w,w=x;break e}n(w,C);break}else t(w,C);C=C.sibling}S.type===ad?(x=Tc(S.props.children,w.mode,O,S.key),x.return=w,w=x):(O=Yy(S.type,S.key,S.props,null,w.mode,O),O.ref=Pp(w,x,S),O.return=w,w=O)}return a(w);case od:e:{for(C=S.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(w,x.sibling),x=i(x,S.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else t(w,x);x=x.sibling}x=iS(S,w.mode,O),x.return=w,w=x}return a(w);case Xu:return C=S._init,b(w,x,C(S._payload),O)}if(r0(S))return m(w,x,S,O);if(Sp(S))return v(w,x,S,O);Zv(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(w,x.sibling),x=i(x,S),x.return=w,w=x):(n(w,x),x=rS(S,w.mode,O),x.return=w,w=x),a(w)):n(w,x)}return b}var Vd=VL(!0),WL=VL(!1),_1=jl(null),S1=null,pd=null,iO=null;function oO(){iO=pd=S1=null}function aO(e){var t=_1.current;nr(_1),e._currentValue=t}function vC(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 Ed(e,t){S1=e,iO=pd=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(so=!0),e.firstContext=null)}function ga(e){var t=e._currentValue;if(iO!==e)if(e={context:e,memoizedValue:t,next:null},pd===null){if(S1===null)throw Error(Ve(308));pd=e,S1.dependencies={lanes:0,firstContext:e}}else pd=pd.next=e;return t}var bc=null;function sO(e){bc===null?bc=[e]:bc.push(e)}function qL(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,sO(t)):(n.next=i.next,i.next=n),t.interleaved=n,vu(e,r)}function vu(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 Qu=!1;function uO(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function KL(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 uu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bl(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,vn&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,vu(e,n)}return i=r.interleaved,i===null?(t.next=t,sO(r)):(t.next=i.next,i.next=t),r.interleaved=t,vu(e,n)}function Hy(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,K4(e,n)}}function $T(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,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 C1(e,t,n,r){var i=e.updateQueue;Qu=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var u=s,l=u.next;u.next=null,a===null?o=l:a.next=l,a=u;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u))}if(o!==null){var f=i.baseState;a=0,c=l=u=null,s=o;do{var h=s.lane,p=s.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,v=s;switch(h=t,p=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){f=m.call(p,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,h=typeof m=="function"?m.call(p,f,h):m,h==null)break e;f=hr({},f,h);break e;case 2:Qu=!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},c===null?(l=c=p,u=f):c=c.next=p,a|=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(c===null&&(u=f),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Bc|=a,e.lanes=a,e.memoizedState=f}}function IT(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Q_.transition;Q_.transition={};try{e(!1),t()}finally{Rn=n,Q_.transition=r}}function cF(){return ma().memoizedState}function Ooe(e,t,n){var r=wl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},fF(e))dF(t,n);else if(n=qL(e,t,n,r),n!==null){var i=Vi();Va(n,e,r,i),hF(n,t,r)}}function Aoe(e,t,n){var r=wl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(fF(e))dF(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ga(s,a)){var u=t.interleaved;u===null?(i.next=i,sO(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=qL(e,t,i,r),n!==null&&(i=Vi(),Va(n,e,r,i),hF(n,t,r))}}function fF(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function dF(e,t){y0=O1=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hF(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,K4(e,n)}}var A1={readContext:ga,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useInsertionEffect:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useDeferredValue:Si,useTransition:Si,useMutableSource:Si,useSyncExternalStore:Si,useId:Si,unstable_isNewReconciler:!1},Poe={readContext:ga,useCallback:function(e,t){return cs().memoizedState=[e,t===void 0?null:t],e},useContext:ga,useEffect:LT,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wy(4194308,4,oF.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wy(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wy(4,2,e,t)},useMemo:function(e,t){var n=cs();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=cs();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=Ooe.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=cs();return e={current:e},t.memoizedState=e},useState:NT,useDebugValue:mO,useDeferredValue:function(e){return cs().memoizedState=e},useTransition:function(){var e=NT(!1),t=e[0];return e=Eoe.bind(null,e[1]),cs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=cs();if(or){if(n===void 0)throw Error(Ve(407));n=n()}else{if(n=t(),ri===null)throw Error(Ve(349));jc&30||XL(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,LT(JL.bind(null,r,o,e),[e]),r.flags|=2048,Z0(9,QL.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=cs(),t=ri.identifierPrefix;if(or){var n=iu,r=ru;n=(r&~(1<<32-Ha(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=G0++,0")&&(u=u.replace("",e.displayName)),u}while(1<=a&&0<=s);break}}}finally{T_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Jp(e):""}function jre(e){switch(e.tag){case 5:return Jp(e.type);case 16:return Jp("Lazy");case 13:return Jp("Suspense");case 19:return Jp("SuspenseList");case 0:case 2:case 15:return e=M_(e.type,!1),e;case 11:return e=M_(e.type.render,!1),e;case 1:return e=M_(e.type,!0),e;default:return""}}function B3(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 id:return"Fragment";case rd:return"Portal";case L3:return"Profiler";case R4:return"StrictMode";case F3:return"Suspense";case j3:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case DN:return(e.displayName||"Context")+".Consumer";case RN:return(e._context.displayName||"Context")+".Provider";case D4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $4:return t=e.displayName||null,t!==null?t:B3(e.type)||"Memo";case Zu:t=e._payload,e=e._init;try{return B3(e(t))}catch{}}return null}function Bre(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 B3(t);case 8:return t===R4?"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 Cl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function IN(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zre(e){var t=IN(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nv(e){e._valueTracker||(e._valueTracker=zre(e))}function NN(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=IN(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function o1(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 z3(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Kk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Cl(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 LN(e,t){t=t.checked,t!=null&&M4(e,"checked",t,!1)}function U3(e,t){LN(e,t);var n=Cl(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")?V3(e,t.type,n):t.hasOwnProperty("defaultValue")&&V3(e,t.type,Cl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qk(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 V3(e,t,n){(t!=="number"||o1(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var e0=Array.isArray;function bd(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Lv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function D0(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var c0={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},Ure=["Webkit","ms","Moz","O"];Object.keys(c0).forEach(function(e){Ure.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),c0[t]=c0[e]})});function zN(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||c0.hasOwnProperty(e)&&c0[e]?(""+t).trim():t+"px"}function UN(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=zN(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Vre=hr({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 K3(e,t){if(t){if(Vre[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(We(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(We(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(We(61))}if(t.style!=null&&typeof t.style!="object")throw Error(We(62))}}function q3(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 G3=null;function I4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Y3=null,xd=null,wd=null;function Zk(e){if(e=dm(e)){if(typeof Y3!="function")throw Error(We(280));var t=e.stateNode;t&&(t=Px(t),Y3(e.stateNode,e.type,t))}}function VN(e){xd?wd?wd.push(e):wd=[e]:xd=e}function WN(){if(xd){var e=xd,t=wd;if(wd=xd=null,Zk(e),t)for(e=0;e>>=0,e===0?32:31-(eie(e)/tie|0)|0}var Fv=64,jv=4194304;function t0(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 l1(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=t0(s):(o&=a,o!==0&&(r=t0(o)))}else a=n&~i,a!==0?r=t0(a):o!==0&&(r=t0(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function cm(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Va(t),e[t]=n}function oie(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=d0),oT=" ",aT=!1;function cL(e,t){switch(e){case"keyup":return Die.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var od=!1;function Iie(e,t){switch(e){case"compositionend":return fL(t);case"keypress":return t.which!==32?null:(aT=!0,oT);case"textInput":return e=t.data,e===oT&&aT?null:e;default:return null}}function Nie(e,t){if(od)return e==="compositionend"||!V4&&cL(e,t)?(e=uL(),Ly=B4=ol=null,od=!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=cT(n)}}function gL(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gL(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mL(){for(var e=window,t=o1();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=o1(e.document)}return t}function W4(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 Hie(e){var t=mL(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gL(n.ownerDocument.documentElement,n)){if(r!==null&&W4(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=fT(n,o);var a=fT(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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,ad=null,tC=null,p0=null,nC=!1;function dT(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nC||ad==null||ad!==o1(r)||(r=ad,"selectionStart"in r&&W4(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}),p0&&j0(p0,r)||(p0=r,r=d1(tC,"onSelect"),0ld||(e.current=uC[ld],uC[ld]=null,ld--)}function Wn(e,t){ld++,uC[ld]=e.current,e.current=t}var El={},Di=Fl(El),lo=Fl(!1),Nc=El;function Bd(e,t){var n=e.type.contextTypes;if(!n)return El;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function co(e){return e=e.childContextTypes,e!=null}function p1(){nr(lo),nr(Di)}function bT(e,t,n){if(Di.current!==El)throw Error(We(168));Wn(Di,t),Wn(lo,n)}function EL(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(We(108,Bre(e)||"Unknown",i));return hr({},n,r)}function g1(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||El,Nc=Di.current,Wn(Di,e),Wn(lo,lo.current),!0}function xT(e,t,n){var r=e.stateNode;if(!r)throw Error(We(169));n?(e=EL(e,t,Nc),r.__reactInternalMemoizedMergedChildContext=e,nr(lo),nr(Di),Wn(Di,e)):nr(lo),Wn(lo,n)}var tu=null,kx=!1,H_=!1;function OL(e){tu===null?tu=[e]:tu.push(e)}function roe(e){kx=!0,OL(e)}function jl(){if(!H_&&tu!==null){H_=!0;var e=0,t=Rn;try{var n=tu;for(Rn=1;e>=a,i-=a,ru=1<<32-Va(t)+i|n<M?(N=k,k=null):N=k.sibling;var z=h(w,k,S[M],O);if(z===null){k===null&&(k=N);break}e&&k&&z.alternate===null&&t(w,k),x=o(z,x,M),C===null?E=z:C.sibling=z,C=z,k=N}if(M===S.length)return n(w,k),or&&sc(w,M),E;if(k===null){for(;MM?(N=k,k=null):N=k.sibling;var H=h(w,k,z.value,O);if(H===null){k===null&&(k=N);break}e&&k&&H.alternate===null&&t(w,k),x=o(H,x,M),C===null?E=H:C.sibling=H,C=H,k=N}if(z.done)return n(w,k),or&&sc(w,M),E;if(k===null){for(;!z.done;M++,z=S.next())z=f(w,z.value,O),z!==null&&(x=o(z,x,M),C===null?E=z:C.sibling=z,C=z);return or&&sc(w,M),E}for(k=r(w,k);!z.done;M++,z=S.next())z=p(k,w,M,z.value,O),z!==null&&(e&&z.alternate!==null&&k.delete(z.key===null?M:z.key),x=o(z,x,M),C===null?E=z:C.sibling=z,C=z);return e&&k.forEach(function(V){return t(w,V)}),or&&sc(w,M),E}function b(w,x,S,O){if(typeof S=="object"&&S!==null&&S.type===id&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Iv:e:{for(var E=S.key,C=x;C!==null;){if(C.key===E){if(E=S.type,E===id){if(C.tag===7){n(w,C.sibling),x=i(C,S.props.children),x.return=w,w=x;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Zu&&ST(E)===C.type){n(w,C.sibling),x=i(C,S.props),x.ref=Ep(w,C,S),x.return=w,w=x;break e}n(w,C);break}else t(w,C);C=C.sibling}S.type===id?(x=kc(S.props.children,w.mode,O,S.key),x.return=w,w=x):(O=Hy(S.type,S.key,S.props,null,w.mode,O),O.ref=Ep(w,x,S),O.return=w,w=O)}return a(w);case rd:e:{for(C=S.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(w,x.sibling),x=i(x,S.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else t(w,x);x=x.sibling}x=J_(S,w.mode,O),x.return=w,w=x}return a(w);case Zu:return C=S._init,b(w,x,C(S._payload),O)}if(e0(S))return m(w,x,S,O);if(xp(S))return v(w,x,S,O);Kv(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(w,x.sibling),x=i(x,S),x.return=w,w=x):(n(w,x),x=Q_(S,w.mode,O),x.return=w,w=x),a(w)):n(w,x)}return b}var Ud=TL(!0),ML=TL(!1),y1=Fl(null),b1=null,dd=null,G4=null;function Y4(){G4=dd=b1=null}function Z4(e){var t=y1.current;nr(y1),e._currentValue=t}function fC(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 Sd(e,t){b1=e,G4=dd=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ao=!0),e.firstContext=null)}function ga(e){var t=e._currentValue;if(G4!==e)if(e={context:e,memoizedValue:t,next:null},dd===null){if(b1===null)throw Error(We(308));dd=e,b1.dependencies={lanes:0,firstContext:e}}else dd=dd.next=e;return t}var yc=null;function X4(e){yc===null?yc=[e]:yc.push(e)}function RL(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,X4(t)):(n.next=i.next,i.next=n),t.interleaved=n,mu(e,r)}function mu(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 Xu=!1;function Q4(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function DL(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 uu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function yl(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,vn&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,mu(e,n)}return i=r.interleaved,i===null?(t.next=t,X4(r)):(t.next=i.next,i.next=t),r.interleaved=t,mu(e,n)}function jy(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,L4(e,n)}}function CT(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,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 x1(e,t,n,r){var i=e.updateQueue;Xu=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var u=s,l=u.next;u.next=null,a===null?o=l:a.next=l,a=u;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u))}if(o!==null){var f=i.baseState;a=0,c=l=u=null,s=o;do{var h=s.lane,p=s.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,v=s;switch(h=t,p=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){f=m.call(p,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,h=typeof m=="function"?m.call(p,f,h):m,h==null)break e;f=hr({},f,h);break e;case 2:Xu=!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},c===null?(l=c=p,u=f):c=c.next=p,a|=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(c===null&&(u=f),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);jc|=a,e.lanes=a,e.memoizedState=f}}function ET(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=q_.transition;q_.transition={};try{e(!1),t()}finally{Rn=n,q_.transition=r}}function ZL(){return ma().memoizedState}function soe(e,t,n){var r=xl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},XL(e))QL(t,n);else if(n=RL(e,t,n,r),n!==null){var i=Wi();Wa(n,e,r,i),JL(n,t,r)}}function uoe(e,t,n){var r=xl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(XL(e))QL(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ga(s,a)){var u=t.interleaved;u===null?(i.next=i,X4(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=RL(e,t,i,r),n!==null&&(i=Wi(),Wa(n,e,r,i),JL(n,t,r))}}function XL(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function QL(e,t){g0=_1=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function JL(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,L4(e,n)}}var S1={readContext:ga,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useInsertionEffect:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useDeferredValue:Si,useTransition:Si,useMutableSource:Si,useSyncExternalStore:Si,useId:Si,unstable_isNewReconciler:!1},loe={readContext:ga,useCallback:function(e,t){return cs().memoizedState=[e,t===void 0?null:t],e},useContext:ga,useEffect:AT,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zy(4194308,4,HL.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zy(4194308,4,e,t)},useInsertionEffect:function(e,t){return zy(4,2,e,t)},useMemo:function(e,t){var n=cs();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=cs();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=soe.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=cs();return e={current:e},t.memoizedState=e},useState:OT,useDebugValue:aO,useDeferredValue:function(e){return cs().memoizedState=e},useTransition:function(){var e=OT(!1),t=e[0];return e=aoe.bind(null,e[1]),cs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=cs();if(or){if(n===void 0)throw Error(We(407));n=n()}else{if(n=t(),ri===null)throw Error(We(349));Fc&30||LL(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,AT(jL.bind(null,r,o,e),[e]),r.flags|=2048,q0(9,FL.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=cs(),t=ri.identifierPrefix;if(or){var n=iu,r=ru;n=(r&~(1<<32-Va(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=H0++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ds]=t,e[W0]=r,SF(e,t,!1,!1),t.stateNode=e;e:{switch(a=J3(n,r),n){case"dialog":Jn("cancel",e),Jn("close",e),i=r;break;case"iframe":case"object":case"embed":Jn("load",e),i=r;break;case"video":case"audio":for(i=0;iKd&&(t.flags|=128,r=!0,kp(o,!1),t.lanes=4194304)}else{if(!r)if(e=E1(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),kp(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!or)return Ci(t),null}else 2*Cr()-o.renderingStartTime>Kd&&n!==1073741824&&(t.flags|=128,r=!0,kp(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Cr(),t.sibling=null,n=fr.current,Vn(fr,r?n&1|2:n&1),t):(Ci(t),null);case 22:case 23:return _O(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?To&1073741824&&(Ci(t),t.subtreeFlags&6&&(t.flags|=8192)):Ci(t),null;case 24:return null;case 25:return null}throw Error(Ve(156,t.tag))}function Noe(e,t){switch(nO(t),t.tag){case 1:return fo(t.type)&&y1(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wd(),nr(co),nr(Di),fO(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return cO(t),null;case 13:if(nr(fr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ve(340));Hd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return nr(fr),null;case 4:return Wd(),null;case 10:return aO(t.type._context),null;case 22:case 23:return _O(),null;case 24:return null;default:return null}}var Qv=!1,Pi=!1,Loe=typeof WeakSet=="function"?WeakSet:Set,at=null;function gd(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){gr(e,t,r)}else n.current=null}function OC(e,t,n){try{n()}catch(r){gr(e,t,r)}}var GT=!1;function Foe(e,t){if(lC=p1,e=TL(),eO(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,u=-1,l=0,c=0,f=e,h=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=a+i),f!==o||r!==0&&f.nodeType!==3||(u=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++l===i&&(s=a),h===o&&++c===r&&(u=a),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(cC={focusedElem:e,selectionRange:n},p1=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){t=at;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,b=m.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ma(t.type,v),b);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ve(163))}}catch(O){gr(t,t.return,O)}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}return m=GT,GT=!1,m}function b0(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&OC(t,n,o)}i=i.next}while(i!==r)}}function Lx(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 AC(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 OF(e){var t=e.alternate;t!==null&&(e.alternate=null,OF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ds],delete t[W0],delete t[hC],delete t[xoe],delete t[woe])),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 AF(e){return e.tag===5||e.tag===3||e.tag===4}function YT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||AF(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 PC(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=v1));else if(r!==4&&(e=e.child,e!==null))for(PC(e,t,n),e=e.sibling;e!==null;)PC(e,t,n),e=e.sibling}function kC(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(kC(e,t,n),e=e.sibling;e!==null;)kC(e,t,n),e=e.sibling}var hi=null,Ra=!1;function Vu(e,t,n){for(n=n.child;n!==null;)PF(e,t,n),n=n.sibling}function PF(e,t,n){if(Ss&&typeof Ss.onCommitFiberUnmount=="function")try{Ss.onCommitFiberUnmount(kx,n)}catch{}switch(n.tag){case 5:Pi||gd(n,t);case 6:var r=hi,i=Ra;hi=null,Vu(e,t,n),hi=r,Ra=i,hi!==null&&(Ra?(e=hi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):hi.removeChild(n.stateNode));break;case 18:hi!==null&&(Ra?(e=hi,n=n.stateNode,e.nodeType===8?Y_(e.parentNode,n):e.nodeType===1&&Y_(e,n),B0(e)):Y_(hi,n.stateNode));break;case 4:r=hi,i=Ra,hi=n.stateNode.containerInfo,Ra=!0,Vu(e,t,n),hi=r,Ra=i;break;case 0:case 11:case 14:case 15:if(!Pi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&OC(n,t,a),i=i.next}while(i!==r)}Vu(e,t,n);break;case 1:if(!Pi&&(gd(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){gr(n,t,s)}Vu(e,t,n);break;case 21:Vu(e,t,n);break;case 22:n.mode&1?(Pi=(r=Pi)||n.memoizedState!==null,Vu(e,t,n),Pi=r):Vu(e,t,n);break;default:Vu(e,t,n)}}function ZT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Loe),t.forEach(function(r){var i=Koe.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Pa(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Cr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Boe(r/1960))-r,10e?16:e,sl===null)var r=!1;else{if(e=sl,sl=null,T1=0,vn&6)throw Error(Ve(331));var i=vn;for(vn|=4,at=e.current;at!==null;){var o=at,a=o.child;if(at.flags&16){var s=o.deletions;if(s!==null){for(var u=0;uCr()-xO?kc(e,0):bO|=n),ho(e,t)}function NF(e,t){t===0&&(e.mode&1?(t=Hv,Hv<<=1,!(Hv&130023424)&&(Hv=4194304)):t=1);var n=Vi();e=vu(e,t),e!==null&&(pm(e,t,n),ho(e,n))}function qoe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),NF(e,n)}function Koe(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(Ve(314))}r!==null&&r.delete(t),NF(e,n)}var LF;LF=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||co.current)so=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return so=!1,$oe(e,t,n);so=!!(e.flags&131072)}else so=!1,or&&t.flags&1048576&&zL(t,w1,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qy(e,t),e=t.pendingProps;var i=Ud(t,Di.current);Ed(t,n),i=hO(null,t,r,e,i,n);var o=pO();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,fo(r)?(o=!0,b1(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,uO(t),i.updater=Nx,t.stateNode=i,i._reactInternals=t,bC(t,r,e,n),t=_C(null,t,r,!0,o,n)):(t.tag=0,or&&o&&tO(t),Bi(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qy(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Yoe(r),e=Ma(r,e),i){case 0:t=wC(null,t,r,e,n);break e;case 1:t=WT(null,t,r,e,n);break e;case 11:t=HT(null,t,r,e,n);break e;case 14:t=VT(null,t,r,Ma(r.type,e),n);break e}throw Error(Ve(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),wC(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),WT(e,t,r,i,n);case 3:e:{if(xF(t),e===null)throw Error(Ve(387));r=t.pendingProps,o=t.memoizedState,i=o.element,KL(e,t),C1(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=qd(Error(Ve(423)),t),t=qT(e,t,r,n,i);break e}else if(r!==i){i=qd(Error(Ve(424)),t),t=qT(e,t,r,n,i);break e}else for(Io=yl(t.stateNode.containerInfo.firstChild),No=t,or=!0,Na=null,n=WL(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Hd(),r===i){t=yu(e,t,n);break e}Bi(e,t,r,n)}t=t.child}return t;case 5:return GL(t),e===null&&mC(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,fC(r,i)?a=null:o!==null&&fC(r,o)&&(t.flags|=32),bF(e,t),Bi(e,t,a,n),t.child;case 6:return e===null&&mC(t),null;case 13:return wF(e,t,n);case 4:return lO(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vd(t,null,r,n):Bi(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),HT(e,t,r,i,n);case 7:return Bi(e,t,t.pendingProps,n),t.child;case 8:return Bi(e,t,t.pendingProps.children,n),t.child;case 12:return Bi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Vn(_1,r._currentValue),r._currentValue=a,o!==null)if(Ga(o.value,a)){if(o.children===i.children&&!co.current){t=yu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=uu(-1,n&-n),u.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),vC(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ve(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),vC(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Bi(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ed(t,n),i=ga(i),r=r(i),t.flags|=1,Bi(e,t,r,n),t.child;case 14:return r=t.type,i=Ma(r,t.pendingProps),i=Ma(r.type,i),VT(e,t,r,i,n);case 15:return vF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),qy(e,t),t.tag=1,fo(r)?(e=!0,b1(t)):e=!1,Ed(t,n),pF(t,r,i),bC(t,r,i,n),_C(null,t,r,!0,e,n);case 19:return _F(e,t,n);case 22:return yF(e,t,n)}throw Error(Ve(156,t.tag))};function FF(e,t){return fL(e,t)}function Goe(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 ca(e,t,n,r){return new Goe(e,t,n,r)}function CO(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yoe(e){if(typeof e=="function")return CO(e)?1:0;if(e!=null){if(e=e.$$typeof,e===H4)return 11;if(e===V4)return 14}return 2}function _l(e,t){var n=e.alternate;return n===null?(n=ca(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 Yy(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")CO(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ad:return Tc(n.children,i,o,t);case U4:a=8,i|=8;break;case H3:return e=ca(12,n,t,i|2),e.elementType=H3,e.lanes=o,e;case V3:return e=ca(13,n,t,i),e.elementType=V3,e.lanes=o,e;case W3:return e=ca(19,n,t,i),e.elementType=W3,e.lanes=o,e;case GN:return jx(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qN:a=10;break e;case KN:a=9;break e;case H4:a=11;break e;case V4:a=14;break e;case Xu:a=16,r=null;break e}throw Error(Ve(130,e==null?e:typeof e,""))}return t=ca(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Tc(e,t,n,r){return e=ca(7,e,r,t),e.lanes=n,e}function jx(e,t,n,r){return e=ca(22,e,r,t),e.elementType=GN,e.lanes=n,e.stateNode={isHidden:!1},e}function rS(e,t,n){return e=ca(6,e,null,t),e.lanes=n,e}function iS(e,t,n){return t=ca(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zoe(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=F_(0),this.expirationTimes=F_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=F_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function EO(e,t,n,r,i,o,a,s,u){return e=new Zoe(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ca(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},uO(o),e}function Xoe(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(UF)}catch(e){console.error(e)}}UF(),UN.exports=qo;var Pu=UN.exports;const Vx=En(Pu),tae=D4({__proto__:null,default:Vx},[Pu]);var iM=Pu;Qk.createRoot=iM.createRoot,Qk.hydrateRoot=iM.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Z_(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function pC(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var doe=typeof WeakMap=="function"?WeakMap:Map;function tF(e,t,n){n=uu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){E1||(E1=!0,CC=r),pC(e,t)},n}function nF(e,t,n){n=uu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){pC(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){pC(e,t),typeof r!="function"&&(bl===null?bl=new Set([this]):bl.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function TT(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new doe;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ooe.bind(null,e,t,n),t.then(e,e))}function MT(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function RT(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=uu(-1,1),t.tag=2,yl(n,t,1))),n.lanes|=1),e)}var hoe=Ou.ReactCurrentOwner,ao=!1;function Bi(e,t,n,r){t.child=e===null?ML(t,null,n,r):Ud(t,e.child,n,r)}function DT(e,t,n,r,i){n=n.render;var o=t.ref;return Sd(t,i),r=rO(e,t,n,r,o,i),n=iO(),e!==null&&!ao?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,vu(e,t,i)):(or&&n&&H4(t),t.flags|=1,Bi(e,t,r,i),t.child)}function $T(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!pO(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,rF(e,t,o,r,i)):(e=Hy(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:j0,n(a,r)&&e.ref===t.ref)return vu(e,t,i)}return t.flags|=1,e=wl(o,r),e.ref=t.ref,e.return=t,t.child=e}function rF(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(j0(o,r)&&e.ref===t.ref)if(ao=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(ao=!0);else return t.lanes=e.lanes,vu(e,t,i)}return gC(e,t,n,r,i)}function iF(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Wn(pd,ko),ko|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Wn(pd,ko),ko|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Wn(pd,ko),ko|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Wn(pd,ko),ko|=r;return Bi(e,t,i,n),t.child}function oF(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function gC(e,t,n,r,i){var o=co(n)?Nc:Di.current;return o=Bd(t,o),Sd(t,i),n=rO(e,t,n,r,o,i),r=iO(),e!==null&&!ao?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,vu(e,t,i)):(or&&r&&H4(t),t.flags|=1,Bi(e,t,n,i),t.child)}function IT(e,t,n,r,i){if(co(n)){var o=!0;g1(t)}else o=!1;if(Sd(t,i),t.stateNode===null)Uy(e,t),eF(t,n,r),hC(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;typeof l=="object"&&l!==null?l=ga(l):(l=co(n)?Nc:Di.current,l=Bd(t,l));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||u!==l)&&kT(t,a,r,l),Xu=!1;var h=t.memoizedState;a.state=h,x1(t,r,a,i),u=t.memoizedState,s!==r||h!==u||lo.current||Xu?(typeof c=="function"&&(dC(t,n,c,r),u=t.memoizedState),(s=Xu||PT(t,n,s,r,h,u,l))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,DL(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Ma(t.type,s),a.props=l,f=t.pendingProps,h=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=ga(u):(u=co(n)?Nc:Di.current,u=Bd(t,u));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==f||h!==u)&&kT(t,a,r,u),Xu=!1,h=t.memoizedState,a.state=h,x1(t,r,a,i);var m=t.memoizedState;s!==f||h!==m||lo.current||Xu?(typeof p=="function"&&(dC(t,n,p,r),m=t.memoizedState),(l=Xu||PT(t,n,l,r,h,m,u)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=u,r=l):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return mC(e,t,n,r,o,i)}function mC(e,t,n,r,i,o){oF(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&xT(t,n,!1),vu(e,t,o);r=t.stateNode,hoe.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Ud(t,e.child,null,o),t.child=Ud(t,null,s,o)):Bi(e,t,s,o),t.memoizedState=r.state,i&&xT(t,n,!0),t.child}function aF(e){var t=e.stateNode;t.pendingContext?bT(e,t.pendingContext,t.pendingContext!==t.context):t.context&&bT(e,t.context,!1),J4(e,t.containerInfo)}function NT(e,t,n,r,i){return zd(),q4(i),t.flags|=256,Bi(e,t,n,r),t.child}var vC={dehydrated:null,treeContext:null,retryLane:0};function yC(e){return{baseLanes:e,cachePool:null,transitions:null}}function sF(e,t,n){var r=t.pendingProps,i=fr.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Wn(fr,i&1),e===null)return cC(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=$x(a,r,0,null),e=kc(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=yC(n),t.memoizedState=vC,e):sO(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return poe(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=wl(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=wl(s,o):(o=kc(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?yC(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=vC,r}return o=e.child,e=o.sibling,r=wl(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function sO(e,t){return t=$x({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function qv(e,t,n,r){return r!==null&&q4(r),Ud(t,e.child,null,n),e=sO(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function poe(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Z_(Error(We(422))),qv(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=$x({mode:"visible",children:r.children},i,0,null),o=kc(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Ud(t,e.child,null,a),t.child.memoizedState=yC(a),t.memoizedState=vC,o);if(!(t.mode&1))return qv(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(We(419)),r=Z_(o,r,void 0),qv(e,t,a,r)}if(s=(a&e.childLanes)!==0,ao||s){if(r=ri,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,mu(e,i),Wa(r,e,i,-1))}return hO(),r=Z_(Error(We(421))),qv(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Aoe.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,$o=vl(i.nextSibling),Io=t,or=!0,Na=null,e!==null&&(sa[ua++]=ru,sa[ua++]=iu,sa[ua++]=Lc,ru=e.id,iu=e.overflow,Lc=t),t=sO(t,r.children),t.flags|=4096,t)}function LT(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),fC(e.return,t,n)}function X_(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function uF(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Bi(e,t,r.children,n),r=fr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&<(e,n,t);else if(e.tag===19)LT(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Wn(fr,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&w1(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),X_(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&w1(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}X_(t,!0,n,null,o);break;case"together":X_(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Uy(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function vu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),jc|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(We(153));if(t.child!==null){for(e=t.child,n=wl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function goe(e,t,n){switch(t.tag){case 3:aF(t),zd();break;case 5:$L(t);break;case 1:co(t.type)&&g1(t);break;case 4:J4(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Wn(y1,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Wn(fr,fr.current&1),t.flags|=128,null):n&t.child.childLanes?sF(e,t,n):(Wn(fr,fr.current&1),e=vu(e,t,n),e!==null?e.sibling:null);Wn(fr,fr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return uF(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Wn(fr,fr.current),r)break;return null;case 22:case 23:return t.lanes=0,iF(e,t,n)}return vu(e,t,n)}var lF,bC,cF,fF;lF=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};bC=function(){};cF=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,bc(Cs.current);var o=null;switch(n){case"input":i=z3(e,i),r=z3(e,r),o=[];break;case"select":i=hr({},i,{value:void 0}),r=hr({},r,{value:void 0}),o=[];break;case"textarea":i=W3(e,i),r=W3(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=h1)}K3(n,r);var a;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(R0.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var u=r[l];if(s=i?.[l],r.hasOwnProperty(l)&&u!==s&&(u!=null||s!=null))if(l==="style")if(s){for(a in s)!s.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&s[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(o=o||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(R0.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&Jn("scroll",e),o||s===u||(o=[])):(o=o||[]).push(l,u))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}};fF=function(e,t,n,r){n!==r&&(t.flags|=4)};function Op(e,t){if(!or)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ci(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function moe(e,t,n){var r=t.pendingProps;switch(K4(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ci(t),null;case 1:return co(t.type)&&p1(),Ci(t),null;case 3:return r=t.stateNode,Vd(),nr(lo),nr(Di),tO(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Hv(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Na!==null&&(AC(Na),Na=null))),bC(e,t),Ci(t),null;case 5:eO(t);var i=bc(W0.current);if(n=t.type,e!==null&&t.stateNode!=null)cF(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(We(166));return Ci(t),null}if(e=bc(Cs.current),Hv(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ds]=t,r[U0]=o,e=(t.mode&1)!==0,n){case"dialog":Jn("cancel",r),Jn("close",r);break;case"iframe":case"object":case"embed":Jn("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ds]=t,e[U0]=r,lF(e,t,!1,!1),t.stateNode=e;e:{switch(a=q3(n,r),n){case"dialog":Jn("cancel",e),Jn("close",e),i=r;break;case"iframe":case"object":case"embed":Jn("load",e),i=r;break;case"video":case"audio":for(i=0;iHd&&(t.flags|=128,r=!0,Op(o,!1),t.lanes=4194304)}else{if(!r)if(e=w1(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Op(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!or)return Ci(t),null}else 2*Cr()-o.renderingStartTime>Hd&&n!==1073741824&&(t.flags|=128,r=!0,Op(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Cr(),t.sibling=null,n=fr.current,Wn(fr,r?n&1|2:n&1),t):(Ci(t),null);case 22:case 23:return dO(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ko&1073741824&&(Ci(t),t.subtreeFlags&6&&(t.flags|=8192)):Ci(t),null;case 24:return null;case 25:return null}throw Error(We(156,t.tag))}function voe(e,t){switch(K4(t),t.tag){case 1:return co(t.type)&&p1(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vd(),nr(lo),nr(Di),tO(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return eO(t),null;case 13:if(nr(fr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(We(340));zd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return nr(fr),null;case 4:return Vd(),null;case 10:return Z4(t.type._context),null;case 22:case 23:return dO(),null;case 24:return null;default:return null}}var Gv=!1,Pi=!1,yoe=typeof WeakSet=="function"?WeakSet:Set,at=null;function hd(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){gr(e,t,r)}else n.current=null}function xC(e,t,n){try{n()}catch(r){gr(e,t,r)}}var FT=!1;function boe(e,t){if(rC=c1,e=mL(),W4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,u=-1,l=0,c=0,f=e,h=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=a+i),f!==o||r!==0&&f.nodeType!==3||(u=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++l===i&&(s=a),h===o&&++c===r&&(u=a),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(iC={focusedElem:e,selectionRange:n},c1=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){t=at;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,b=m.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ma(t.type,v),b);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(We(163))}}catch(O){gr(t,t.return,O)}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}return m=FT,FT=!1,m}function m0(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&xC(t,n,o)}i=i.next}while(i!==r)}}function Rx(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 wC(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 dF(e){var t=e.alternate;t!==null&&(e.alternate=null,dF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ds],delete t[U0],delete t[sC],delete t[toe],delete t[noe])),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 hF(e){return e.tag===5||e.tag===3||e.tag===4}function jT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hF(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 _C(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=h1));else if(r!==4&&(e=e.child,e!==null))for(_C(e,t,n),e=e.sibling;e!==null;)_C(e,t,n),e=e.sibling}function SC(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(SC(e,t,n),e=e.sibling;e!==null;)SC(e,t,n),e=e.sibling}var hi=null,Ra=!1;function Vu(e,t,n){for(n=n.child;n!==null;)pF(e,t,n),n=n.sibling}function pF(e,t,n){if(Ss&&typeof Ss.onCommitFiberUnmount=="function")try{Ss.onCommitFiberUnmount(Cx,n)}catch{}switch(n.tag){case 5:Pi||hd(n,t);case 6:var r=hi,i=Ra;hi=null,Vu(e,t,n),hi=r,Ra=i,hi!==null&&(Ra?(e=hi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):hi.removeChild(n.stateNode));break;case 18:hi!==null&&(Ra?(e=hi,n=n.stateNode,e.nodeType===8?W_(e.parentNode,n):e.nodeType===1&&W_(e,n),L0(e)):W_(hi,n.stateNode));break;case 4:r=hi,i=Ra,hi=n.stateNode.containerInfo,Ra=!0,Vu(e,t,n),hi=r,Ra=i;break;case 0:case 11:case 14:case 15:if(!Pi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&xC(n,t,a),i=i.next}while(i!==r)}Vu(e,t,n);break;case 1:if(!Pi&&(hd(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){gr(n,t,s)}Vu(e,t,n);break;case 21:Vu(e,t,n);break;case 22:n.mode&1?(Pi=(r=Pi)||n.memoizedState!==null,Vu(e,t,n),Pi=r):Vu(e,t,n);break;default:Vu(e,t,n)}}function BT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yoe),t.forEach(function(r){var i=Poe.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Pa(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Cr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*woe(r/1960))-r,10e?16:e,al===null)var r=!1;else{if(e=al,al=null,O1=0,vn&6)throw Error(We(331));var i=vn;for(vn|=4,at=e.current;at!==null;){var o=at,a=o.child;if(at.flags&16){var s=o.deletions;if(s!==null){for(var u=0;uCr()-cO?Pc(e,0):lO|=n),fo(e,t)}function _F(e,t){t===0&&(e.mode&1?(t=jv,jv<<=1,!(jv&130023424)&&(jv=4194304)):t=1);var n=Wi();e=mu(e,t),e!==null&&(cm(e,t,n),fo(e,n))}function Aoe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_F(e,n)}function Poe(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(We(314))}r!==null&&r.delete(t),_F(e,n)}var SF;SF=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||lo.current)ao=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ao=!1,goe(e,t,n);ao=!!(e.flags&131072)}else ao=!1,or&&t.flags&1048576&&AL(t,v1,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Uy(e,t),e=t.pendingProps;var i=Bd(t,Di.current);Sd(t,n),i=rO(null,t,r,e,i,n);var o=iO();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,co(r)?(o=!0,g1(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Q4(t),i.updater=Mx,t.stateNode=i,i._reactInternals=t,hC(t,r,e,n),t=mC(null,t,r,!0,o,n)):(t.tag=0,or&&o&&H4(t),Bi(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Uy(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Toe(r),e=Ma(r,e),i){case 0:t=gC(null,t,r,e,n);break e;case 1:t=IT(null,t,r,e,n);break e;case 11:t=DT(null,t,r,e,n);break e;case 14:t=$T(null,t,r,Ma(r.type,e),n);break e}throw Error(We(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),gC(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),IT(e,t,r,i,n);case 3:e:{if(aF(t),e===null)throw Error(We(387));r=t.pendingProps,o=t.memoizedState,i=o.element,DL(e,t),x1(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Wd(Error(We(423)),t),t=NT(e,t,r,n,i);break e}else if(r!==i){i=Wd(Error(We(424)),t),t=NT(e,t,r,n,i);break e}else for($o=vl(t.stateNode.containerInfo.firstChild),Io=t,or=!0,Na=null,n=ML(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zd(),r===i){t=vu(e,t,n);break e}Bi(e,t,r,n)}t=t.child}return t;case 5:return $L(t),e===null&&cC(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,oC(r,i)?a=null:o!==null&&oC(r,o)&&(t.flags|=32),oF(e,t),Bi(e,t,a,n),t.child;case 6:return e===null&&cC(t),null;case 13:return sF(e,t,n);case 4:return J4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ud(t,null,r,n):Bi(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),DT(e,t,r,i,n);case 7:return Bi(e,t,t.pendingProps,n),t.child;case 8:return Bi(e,t,t.pendingProps.children,n),t.child;case 12:return Bi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Wn(y1,r._currentValue),r._currentValue=a,o!==null)if(Ga(o.value,a)){if(o.children===i.children&&!lo.current){t=vu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=uu(-1,n&-n),u.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),fC(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(We(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),fC(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Bi(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Sd(t,n),i=ga(i),r=r(i),t.flags|=1,Bi(e,t,r,n),t.child;case 14:return r=t.type,i=Ma(r,t.pendingProps),i=Ma(r.type,i),$T(e,t,r,i,n);case 15:return rF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),Uy(e,t),t.tag=1,co(r)?(e=!0,g1(t)):e=!1,Sd(t,n),eF(t,r,i),hC(t,r,i,n),mC(null,t,r,!0,e,n);case 19:return uF(e,t,n);case 22:return iF(e,t,n)}throw Error(We(156,t.tag))};function CF(e,t){return XN(e,t)}function koe(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 ca(e,t,n,r){return new koe(e,t,n,r)}function pO(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Toe(e){if(typeof e=="function")return pO(e)?1:0;if(e!=null){if(e=e.$$typeof,e===D4)return 11;if(e===$4)return 14}return 2}function wl(e,t){var n=e.alternate;return n===null?(n=ca(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 Hy(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")pO(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case id:return kc(n.children,i,o,t);case R4:a=8,i|=8;break;case L3:return e=ca(12,n,t,i|2),e.elementType=L3,e.lanes=o,e;case F3:return e=ca(13,n,t,i),e.elementType=F3,e.lanes=o,e;case j3:return e=ca(19,n,t,i),e.elementType=j3,e.lanes=o,e;case $N:return $x(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case RN:a=10;break e;case DN:a=9;break e;case D4:a=11;break e;case $4:a=14;break e;case Zu:a=16,r=null;break e}throw Error(We(130,e==null?e:typeof e,""))}return t=ca(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function kc(e,t,n,r){return e=ca(7,e,r,t),e.lanes=n,e}function $x(e,t,n,r){return e=ca(22,e,r,t),e.elementType=$N,e.lanes=n,e.stateNode={isHidden:!1},e}function Q_(e,t,n){return e=ca(6,e,null,t),e.lanes=n,e}function J_(e,t,n){return t=ca(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Moe(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=D_(0),this.expirationTimes=D_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=D_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gO(e,t,n,r,i,o,a,s,u){return e=new Moe(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ca(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Q4(o),e}function Roe(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(PF)}catch(e){console.error(e)}}PF(),PN.exports=Ho;var Au=PN.exports;const jx=Pn(Au),Noe=mN({__proto__:null,default:jx},[Au]);var GT=Au;Uk.createRoot=GT.createRoot,Uk.hydrateRoot=GT.hydrateRoot;/** * @remix-run/router v1.21.0 * * Copyright (c) Remix Software Inc. @@ -46,8 +46,8 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Uc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rae(){return Math.random().toString(36).substr(2,8)}function aM(e,t){return{usr:e.state,key:e.key,idx:t}}function Q0(e,t,n,r){return n===void 0&&(n=null),ir({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ku(t):t,{state:n,key:t&&t.key||r||rae()})}function Hc(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 ku(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 iae(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=kr.Pop,u=null,l=c();l==null&&(l=0,a.replaceState(ir({},a.state,{idx:l}),""));function c(){return(a.state||{idx:null}).idx}function f(){s=kr.Pop;let b=c(),w=b==null?null:b-l;l=b,u&&u({action:s,location:v.location,delta:w})}function h(b,w){s=kr.Push;let x=Q0(v.location,b,w);n(x,b),l=c()+1;let S=aM(x,l),O=v.createHref(x);try{a.pushState(S,"",O)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(O)}o&&u&&u({action:s,location:v.location,delta:1})}function p(b,w){s=kr.Replace;let x=Q0(v.location,b,w);n(x,b),l=c();let S=aM(x,l),O=v.createHref(x);a.replaceState(S,"",O),o&&u&&u({action:s,location:v.location,delta:0})}function m(b){let w=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof b=="string"?b:Hc(b);return x=x.replace(/ $/,"%20"),fn(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let v={get action(){return s},get location(){return e(i,a)},listen(b){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(oM,f),u=b,()=>{i.removeEventListener(oM,f),u=null}},createHref(b){return t(i,b)},createURL:m,encodeLocation(b){let w=m(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:p,go(b){return a.go(b)}};return v}var In;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(In||(In={}));const oae=new Set(["lazy","caseSensitive","path","id","index","children"]);function aae(e){return e.index===!0}function D1(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let a=[...n,String(o)],s=typeof i.id=="string"?i.id:a.join("-");if(fn(i.index!==!0||!i.children,"Cannot specify children on an index route"),fn(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),aae(i)){let u=ir({},i,t(i),{id:s});return r[s]=u,u}else{let u=ir({},i,t(i),{id:s,children:void 0});return r[s]=u,i.children&&(u.children=D1(i.children,t,a,r)),u}})}function mc(e,t,n){return n===void 0&&(n="/"),Zy(e,t,n,!1)}function Zy(e,t,n,r){let i=typeof t=="string"?ku(t):t,o=$h(i.pathname||"/",n);if(o==null)return null;let a=HF(e);uae(a);let s=null;for(let u=0;s==null&&u{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};u.relativePath.startsWith("/")&&(fn(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let l=lu([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(fn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),HF(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:gae(l,o.index),routesMeta:c})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let u of VF(o.path))i(o,a,u)}),t}function VF(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=VF(r.join("/")),s=[];return s.push(...a.map(u=>u===""?o:[o,u].join("/"))),i&&s.push(...a),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function uae(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mae(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const lae=/^:[\w-]+$/,cae=3,fae=2,dae=1,hae=10,pae=-2,sM=e=>e==="*";function gae(e,t){let n=e.split("/"),r=n.length;return n.some(sM)&&(r+=pae),t&&(r+=fae),n.filter(i=>!sM(i)).reduce((i,o)=>i+(lae.test(o)?cae:o===""?dae:hae),r)}function mae(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 vae(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s{let{paramName:h,isOptional:p}=c;if(h==="*"){let v=s[f]||"";a=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const m=s[f];return p&&!m?l[h]=void 0:l[h]=(m||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function yae(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Uc(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,(a,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function bae(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Uc(!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 $h(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 xae(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ku(e):e;return{pathname:n?n.startsWith("/")?n:wae(n,t):t,search:Sae(r),hash:Cae(i)}}function wae(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 oS(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 WF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function kO(e,t){let n=WF(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function TO(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ku(e):(i=ir({},e),fn(!i.pathname||!i.pathname.includes("?"),oS("?","pathname","search",i)),fn(!i.pathname||!i.pathname.includes("#"),oS("#","pathname","hash",i)),fn(!i.search||!i.search.includes("#"),oS("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let u=xae(i,s),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(l||c)&&(u.pathname+="/"),u}const lu=e=>e.join("/").replace(/\/\/+/g,"/"),_ae=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Sae=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Cae=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class $1{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Wx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const qF=["post","put","patch","delete"],Eae=new Set(qF),Oae=["get",...qF],Aae=new Set(Oae),Pae=new Set([301,302,303,307,308]),kae=new Set([307,308]),aS={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Tae={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Mp={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},MO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mae=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),KF="remix-router-transitions";function Rae(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;fn(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let ae=e.detectErrorBoundary;i=le=>({hasErrorBoundary:ae(le)})}else i=Mae;let o={},a=D1(e.routes,i,void 0,o),s,u=e.basename||"/",l=e.dataStrategy||Nae,c=e.patchRoutesOnNavigation,f=ir({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,p=new Set,m=null,v=null,b=null,w=e.hydrationData!=null,x=mc(a,e.history.location,u),S=null;if(x==null&&!c){let ae=ro(404,{pathname:e.history.location.pathname}),{matches:le,route:xe}=bM(a);x=le,S={[xe.id]:ae}}x&&!e.hydrationData&&Xr(x,a,e.history.location.pathname).active&&(x=null);let O;if(x)if(x.some(ae=>ae.route.lazy))O=!1;else if(!x.some(ae=>ae.route.loader))O=!0;else if(f.v7_partialHydration){let ae=e.hydrationData?e.hydrationData.loaderData:null,le=e.hydrationData?e.hydrationData.errors:null;if(le){let xe=x.findIndex(T=>le[T.route.id]!==void 0);O=x.slice(0,xe+1).every(T=>!IC(T.route,ae,le))}else O=x.every(xe=>!IC(xe.route,ae,le))}else O=e.hydrationData!=null;else if(O=!1,x=[],f.v7_partialHydration){let ae=Xr(null,a,e.history.location.pathname);ae.active&&ae.matches&&(x=ae.matches)}let E,C={historyAction:e.history.action,location:e.history.location,matches:x,initialized:O,navigation:aS,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},k=kr.Pop,M=!1,N,q=!1,Y=new Map,W=null,ne=!1,Z=!1,R=[],B=new Set,U=new Map,F=0,V=-1,G=new Map,oe=new Set,Q=new Map,X=new Map,ue=new Set,de=new Map,Se=new Map,me;function Ze(){if(h=e.history.listen(ae=>{let{action:le,location:xe,delta:T}=ae;if(me){me(),me=void 0;return}Uc(Se.size===0||T!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let $=Dr({currentLocation:C.location,nextLocation:xe,historyAction:le});if($&&T!=null){let I=new Promise(A=>{me=A});e.history.go(T*-1),xi($,{state:"blocked",location:xe,proceed(){xi($,{state:"proceeding",proceed:void 0,reset:void 0,location:xe}),I.then(()=>e.history.go(T))},reset(){let A=new Map(C.blockers);A.set($,Mp),$e({blockers:A})}});return}return Nt(le,xe)}),n){Zae(t,Y);let ae=()=>Xae(t,Y);t.addEventListener("pagehide",ae),W=()=>t.removeEventListener("pagehide",ae)}return C.initialized||Nt(kr.Pop,C.location,{initialHydration:!0}),E}function Ae(){h&&h(),W&&W(),p.clear(),N&&N.abort(),C.fetchers.forEach((ae,le)=>br(le)),C.blockers.forEach((ae,le)=>bo(le))}function Le(ae){return p.add(ae),()=>p.delete(ae)}function $e(ae,le){le===void 0&&(le={}),C=ir({},C,ae);let xe=[],T=[];f.v7_fetcherPersist&&C.fetchers.forEach(($,I)=>{$.state==="idle"&&(ue.has(I)?T.push(I):xe.push(I))}),[...p].forEach($=>$(C,{deletedFetchers:T,viewTransitionOpts:le.viewTransitionOpts,flushSync:le.flushSync===!0})),f.v7_fetcherPersist&&(xe.forEach($=>C.fetchers.delete($)),T.forEach($=>br($)))}function be(ae,le,xe){var T,$;let{flushSync:I}=xe===void 0?{}:xe,A=C.actionData!=null&&C.navigation.formMethod!=null&&Da(C.navigation.formMethod)&&C.navigation.state==="loading"&&((T=ae.state)==null?void 0:T._isRedirect)!==!0,j;le.actionData?Object.keys(le.actionData).length>0?j=le.actionData:j=null:A?j=C.actionData:j=null;let ee=le.loaderData?vM(C.loaderData,le.loaderData,le.matches||[],le.errors):C.loaderData,re=C.blockers;re.size>0&&(re=new Map(re),re.forEach((Be,We)=>re.set(We,Mp)));let he=M===!0||C.navigation.formMethod!=null&&Da(C.navigation.formMethod)&&(($=ae.state)==null?void 0:$._isRedirect)!==!0;s&&(a=s,s=void 0),ne||k===kr.Pop||(k===kr.Push?e.history.push(ae,ae.state):k===kr.Replace&&e.history.replace(ae,ae.state));let Ce;if(k===kr.Pop){let Be=Y.get(C.location.pathname);Be&&Be.has(ae.pathname)?Ce={currentLocation:C.location,nextLocation:ae}:Y.has(ae.pathname)&&(Ce={currentLocation:ae,nextLocation:C.location})}else if(q){let Be=Y.get(C.location.pathname);Be?Be.add(ae.pathname):(Be=new Set([ae.pathname]),Y.set(C.location.pathname,Be)),Ce={currentLocation:C.location,nextLocation:ae}}$e(ir({},le,{actionData:j,loaderData:ee,historyAction:k,location:ae,initialized:!0,navigation:aS,revalidation:"idle",restoreScrollPosition:ur(ae,le.matches||C.matches),preventScrollReset:he,blockers:re}),{viewTransitionOpts:Ce,flushSync:I===!0}),k=kr.Pop,M=!1,q=!1,ne=!1,Z=!1,R=[]}async function yt(ae,le){if(typeof ae=="number"){e.history.go(ae);return}let xe=$C(C.location,C.matches,u,f.v7_prependBasename,ae,f.v7_relativeSplatPath,le?.fromRouteId,le?.relative),{path:T,submission:$,error:I}=lM(f.v7_normalizeFormMethod,!1,xe,le),A=C.location,j=Q0(C.location,T,le&&le.state);j=ir({},j,e.history.encodeLocation(j));let ee=le&&le.replace!=null?le.replace:void 0,re=kr.Push;ee===!0?re=kr.Replace:ee===!1||$!=null&&Da($.formMethod)&&$.formAction===C.location.pathname+C.location.search&&(re=kr.Replace);let he=le&&"preventScrollReset"in le?le.preventScrollReset===!0:void 0,Ce=(le&&le.flushSync)===!0,Be=Dr({currentLocation:A,nextLocation:j,historyAction:re});if(Be){xi(Be,{state:"blocked",location:j,proceed(){xi(Be,{state:"proceeding",proceed:void 0,reset:void 0,location:j}),yt(ae,le)},reset(){let We=new Map(C.blockers);We.set(Be,Mp),$e({blockers:We})}});return}return await Nt(re,j,{submission:$,pendingError:I,preventScrollReset:he,replace:le&&le.replace,enableViewTransition:le&&le.viewTransition,flushSync:Ce})}function lt(){if(xn(),$e({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){Nt(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}Nt(k||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:q===!0})}}async function Nt(ae,le,xe){N&&N.abort(),N=null,k=ae,ne=(xe&&xe.startUninterruptedRevalidation)===!0,Kn(C.location,C.matches),M=(xe&&xe.preventScrollReset)===!0,q=(xe&&xe.enableViewTransition)===!0;let T=s||a,$=xe&&xe.overrideNavigation,I=mc(T,le,u),A=(xe&&xe.flushSync)===!0,j=Xr(I,T,le.pathname);if(j.active&&j.matches&&(I=j.matches),!I){let{error:ct,notFoundMatches:Ne,route:rt}=Sa(le.pathname);be(le,{matches:Ne,loaderData:{},errors:{[rt.id]:ct}},{flushSync:A});return}if(C.initialized&&!Z&&Uae(C.location,le)&&!(xe&&xe.submission&&Da(xe.submission.formMethod))){be(le,{matches:I},{flushSync:A});return}N=new AbortController;let ee=Bf(e.history,le,N.signal,xe&&xe.submission),re;if(xe&&xe.pendingError)re=[vc(I).route.id,{type:In.error,error:xe.pendingError}];else if(xe&&xe.submission&&Da(xe.submission.formMethod)){let ct=await yn(ee,le,xe.submission,I,j.active,{replace:xe.replace,flushSync:A});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[Ne,rt]=ct.pendingActionResult;if(Ro(rt)&&Wx(rt.error)&&rt.error.status===404){N=null,be(le,{matches:ct.matches,loaderData:{},errors:{[Ne]:rt.error}});return}}I=ct.matches||I,re=ct.pendingActionResult,$=sS(le,xe.submission),A=!1,j.active=!1,ee=Bf(e.history,ee.url,ee.signal)}let{shortCircuited:he,matches:Ce,loaderData:Be,errors:We}=await nn(ee,le,I,j.active,$,xe&&xe.submission,xe&&xe.fetcherSubmission,xe&&xe.replace,xe&&xe.initialHydration===!0,A,re);he||(N=null,be(le,ir({matches:Ce||I},yM(re),{loaderData:Be,errors:We})))}async function yn(ae,le,xe,T,$,I){I===void 0&&(I={}),xn();let A=Gae(le,xe);if($e({navigation:A},{flushSync:I.flushSync===!0}),$){let re=await xo(T,le.pathname,ae.signal);if(re.type==="aborted")return{shortCircuited:!0};if(re.type==="error"){let he=vc(re.partialMatches).route.id;return{matches:re.partialMatches,pendingActionResult:[he,{type:In.error,error:re.error}]}}else if(re.matches)T=re.matches;else{let{notFoundMatches:he,error:Ce,route:Be}=Sa(le.pathname);return{matches:he,pendingActionResult:[Be.id,{type:In.error,error:Ce}]}}}let j,ee=a0(T,le);if(!ee.route.action&&!ee.route.lazy)j={type:In.error,error:ro(405,{method:ae.method,pathname:le.pathname,routeId:ee.route.id})};else if(j=(await nt("action",C,ae,[ee],T,null))[ee.route.id],ae.signal.aborted)return{shortCircuited:!0};if(wc(j)){let re;return I&&I.replace!=null?re=I.replace:re=pM(j.response.headers.get("Location"),new URL(ae.url),u)===C.location.pathname+C.location.search,await ke(ae,j,!0,{submission:xe,replace:re}),{shortCircuited:!0}}if(ul(j))throw ro(400,{type:"defer-action"});if(Ro(j)){let re=vc(T,ee.route.id);return(I&&I.replace)!==!0&&(k=kr.Push),{matches:T,pendingActionResult:[re.route.id,j]}}return{matches:T,pendingActionResult:[ee.route.id,j]}}async function nn(ae,le,xe,T,$,I,A,j,ee,re,he){let Ce=$||sS(le,I),Be=I||A||wM(Ce),We=!ne&&(!f.v7_partialHydration||!ee);if(T){if(We){let qe=ie(he);$e(ir({navigation:Ce},qe!==void 0?{actionData:qe}:{}),{flushSync:re})}let Fe=await xo(xe,le.pathname,ae.signal);if(Fe.type==="aborted")return{shortCircuited:!0};if(Fe.type==="error"){let qe=vc(Fe.partialMatches).route.id;return{matches:Fe.partialMatches,loaderData:{},errors:{[qe]:Fe.error}}}else if(Fe.matches)xe=Fe.matches;else{let{error:qe,notFoundMatches:Ge,route:ve}=Sa(le.pathname);return{matches:Ge,loaderData:{},errors:{[ve.id]:qe}}}}let ct=s||a,[Ne,rt]=fM(e.history,C,xe,Be,le,f.v7_partialHydration&&ee===!0,f.v7_skipActionErrorRevalidation,Z,R,B,ue,Q,oe,ct,u,he);if(_t(Fe=>!(xe&&xe.some(qe=>qe.route.id===Fe))||Ne&&Ne.some(qe=>qe.route.id===Fe)),V=++F,Ne.length===0&&rt.length===0){let Fe=bi();return be(le,ir({matches:xe,loaderData:{},errors:he&&Ro(he[1])?{[he[0]]:he[1].error}:null},yM(he),Fe?{fetchers:new Map(C.fetchers)}:{}),{flushSync:re}),{shortCircuited:!0}}if(We){let Fe={};if(!T){Fe.navigation=Ce;let qe=ie(he);qe!==void 0&&(Fe.actionData=qe)}rt.length>0&&(Fe.fetchers=pe(rt)),$e(Fe,{flushSync:re})}rt.forEach(Fe=>{sr(Fe.key),Fe.controller&&U.set(Fe.key,Fe.controller)});let bt=()=>rt.forEach(Fe=>sr(Fe.key));N&&N.signal.addEventListener("abort",bt);let{loaderResults:Ot,fetcherResults:gt}=await mt(C,xe,Ne,rt,ae);if(ae.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",bt),rt.forEach(Fe=>U.delete(Fe.key));let ht=ty(Ot);if(ht)return await ke(ae,ht.result,!0,{replace:j}),{shortCircuited:!0};if(ht=ty(gt),ht)return oe.add(ht.key),await ke(ae,ht.result,!0,{replace:j}),{shortCircuited:!0};let{loaderData:xt,errors:wt}=mM(C,xe,Ot,he,rt,gt,de);de.forEach((Fe,qe)=>{Fe.subscribe(Ge=>{(Ge||Fe.done)&&de.delete(qe)})}),f.v7_partialHydration&&ee&&C.errors&&(wt=ir({},C.errors,wt));let Je=bi(),ut=Rr(V),Qe=Je||ut||rt.length>0;return ir({matches:xe,loaderData:xt,errors:wt},Qe?{fetchers:new Map(C.fetchers)}:{})}function ie(ae){if(ae&&!Ro(ae[1]))return{[ae[0]]:ae[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function pe(ae){return ae.forEach(le=>{let xe=C.fetchers.get(le.key),T=Rp(void 0,xe?xe.data:void 0);C.fetchers.set(le.key,T)}),new Map(C.fetchers)}function ye(ae,le,xe,T){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");sr(ae);let $=(T&&T.flushSync)===!0,I=s||a,A=$C(C.location,C.matches,u,f.v7_prependBasename,xe,f.v7_relativeSplatPath,le,T?.relative),j=mc(I,A,u),ee=Xr(j,I,A);if(ee.active&&ee.matches&&(j=ee.matches),!j){wn(ae,le,ro(404,{pathname:A}),{flushSync:$});return}let{path:re,submission:he,error:Ce}=lM(f.v7_normalizeFormMethod,!0,A,T);if(Ce){wn(ae,le,Ce,{flushSync:$});return}let Be=a0(j,re),We=(T&&T.preventScrollReset)===!0;if(he&&Da(he.formMethod)){Ue(ae,le,re,Be,j,ee.active,$,We,he);return}Q.set(ae,{routeId:le,path:re}),je(ae,le,re,Be,j,ee.active,$,We,he)}async function Ue(ae,le,xe,T,$,I,A,j,ee){xn(),Q.delete(ae);function re(ge){if(!ge.route.action&&!ge.route.lazy){let De=ro(405,{method:ee.formMethod,pathname:xe,routeId:le});return wn(ae,le,De,{flushSync:A}),!0}return!1}if(!I&&re(T))return;let he=C.fetchers.get(ae);Wt(ae,Yae(ee,he),{flushSync:A});let Ce=new AbortController,Be=Bf(e.history,xe,Ce.signal,ee);if(I){let ge=await xo($,xe,Be.signal);if(ge.type==="aborted")return;if(ge.type==="error"){wn(ae,le,ge.error,{flushSync:A});return}else if(ge.matches){if($=ge.matches,T=a0($,xe),re(T))return}else{wn(ae,le,ro(404,{pathname:xe}),{flushSync:A});return}}U.set(ae,Ce);let We=F,Ne=(await nt("action",C,Be,[T],$,ae))[T.route.id];if(Be.signal.aborted){U.get(ae)===Ce&&U.delete(ae);return}if(f.v7_fetcherPersist&&ue.has(ae)){if(wc(Ne)||Ro(Ne)){Wt(ae,Gu(void 0));return}}else{if(wc(Ne))if(U.delete(ae),V>We){Wt(ae,Gu(void 0));return}else return oe.add(ae),Wt(ae,Rp(ee)),ke(Be,Ne,!1,{fetcherSubmission:ee,preventScrollReset:j});if(Ro(Ne)){wn(ae,le,Ne.error);return}}if(ul(Ne))throw ro(400,{type:"defer-action"});let rt=C.navigation.location||C.location,bt=Bf(e.history,rt,Ce.signal),Ot=s||a,gt=C.navigation.state!=="idle"?mc(Ot,C.navigation.location,u):C.matches;fn(gt,"Didn't find any matches after fetcher action");let ht=++F;G.set(ae,ht);let xt=Rp(ee,Ne.data);C.fetchers.set(ae,xt);let[wt,Je]=fM(e.history,C,gt,ee,rt,!1,f.v7_skipActionErrorRevalidation,Z,R,B,ue,Q,oe,Ot,u,[T.route.id,Ne]);Je.filter(ge=>ge.key!==ae).forEach(ge=>{let De=ge.key,Pe=C.fetchers.get(De),Te=Rp(void 0,Pe?Pe.data:void 0);C.fetchers.set(De,Te),sr(De),ge.controller&&U.set(De,ge.controller)}),$e({fetchers:new Map(C.fetchers)});let ut=()=>Je.forEach(ge=>sr(ge.key));Ce.signal.addEventListener("abort",ut);let{loaderResults:Qe,fetcherResults:Fe}=await mt(C,gt,wt,Je,bt);if(Ce.signal.aborted)return;Ce.signal.removeEventListener("abort",ut),G.delete(ae),U.delete(ae),Je.forEach(ge=>U.delete(ge.key));let qe=ty(Qe);if(qe)return ke(bt,qe.result,!1,{preventScrollReset:j});if(qe=ty(Fe),qe)return oe.add(qe.key),ke(bt,qe.result,!1,{preventScrollReset:j});let{loaderData:Ge,errors:ve}=mM(C,gt,Qe,void 0,Je,Fe,de);if(C.fetchers.has(ae)){let ge=Gu(Ne.data);C.fetchers.set(ae,ge)}Rr(ht),C.navigation.state==="loading"&&ht>V?(fn(k,"Expected pending action"),N&&N.abort(),be(C.navigation.location,{matches:gt,loaderData:Ge,errors:ve,fetchers:new Map(C.fetchers)})):($e({errors:ve,loaderData:vM(C.loaderData,Ge,gt,ve),fetchers:new Map(C.fetchers)}),Z=!1)}async function je(ae,le,xe,T,$,I,A,j,ee){let re=C.fetchers.get(ae);Wt(ae,Rp(ee,re?re.data:void 0),{flushSync:A});let he=new AbortController,Ce=Bf(e.history,xe,he.signal);if(I){let Ne=await xo($,xe,Ce.signal);if(Ne.type==="aborted")return;if(Ne.type==="error"){wn(ae,le,Ne.error,{flushSync:A});return}else if(Ne.matches)$=Ne.matches,T=a0($,xe);else{wn(ae,le,ro(404,{pathname:xe}),{flushSync:A});return}}U.set(ae,he);let Be=F,ct=(await nt("loader",C,Ce,[T],$,ae))[T.route.id];if(ul(ct)&&(ct=await RO(ct,Ce.signal,!0)||ct),U.get(ae)===he&&U.delete(ae),!Ce.signal.aborted){if(ue.has(ae)){Wt(ae,Gu(void 0));return}if(wc(ct))if(V>Be){Wt(ae,Gu(void 0));return}else{oe.add(ae),await ke(Ce,ct,!1,{preventScrollReset:j});return}if(Ro(ct)){wn(ae,le,ct.error);return}fn(!ul(ct),"Unhandled fetcher deferred data"),Wt(ae,Gu(ct.data))}}async function ke(ae,le,xe,T){let{submission:$,fetcherSubmission:I,preventScrollReset:A,replace:j}=T===void 0?{}:T;le.response.headers.has("X-Remix-Revalidate")&&(Z=!0);let ee=le.response.headers.get("Location");fn(ee,"Expected a Location header on the redirect Response"),ee=pM(ee,new URL(ae.url),u);let re=Q0(C.location,ee,{_isRedirect:!0});if(n){let Ne=!1;if(le.response.headers.has("X-Remix-Reload-Document"))Ne=!0;else if(MO.test(ee)){const rt=e.history.createURL(ee);Ne=rt.origin!==t.location.origin||$h(rt.pathname,u)==null}if(Ne){j?t.location.replace(ee):t.location.assign(ee);return}}N=null;let he=j===!0||le.response.headers.has("X-Remix-Replace")?kr.Replace:kr.Push,{formMethod:Ce,formAction:Be,formEncType:We}=C.navigation;!$&&!I&&Ce&&Be&&We&&($=wM(C.navigation));let ct=$||I;if(kae.has(le.response.status)&&ct&&Da(ct.formMethod))await Nt(he,re,{submission:ir({},ct,{formAction:ee}),preventScrollReset:A||M,enableViewTransition:xe?q:void 0});else{let Ne=sS(re,$);await Nt(he,re,{overrideNavigation:Ne,fetcherSubmission:I,preventScrollReset:A||M,enableViewTransition:xe?q:void 0})}}async function nt(ae,le,xe,T,$,I){let A,j={};try{A=await Lae(l,ae,le,xe,T,$,I,o,i)}catch(ee){return T.forEach(re=>{j[re.route.id]={type:In.error,error:ee}}),j}for(let[ee,re]of Object.entries(A))if(Hae(re)){let he=re.result;j[ee]={type:In.redirect,response:Bae(he,xe,ee,$,u,f.v7_relativeSplatPath)}}else j[ee]=await jae(re);return j}async function mt(ae,le,xe,T,$){let I=ae.matches,A=nt("loader",ae,$,xe,le,null),j=Promise.all(T.map(async he=>{if(he.matches&&he.match&&he.controller){let Be=(await nt("loader",ae,Bf(e.history,he.path,he.controller.signal),[he.match],he.matches,he.key))[he.match.route.id];return{[he.key]:Be}}else return Promise.resolve({[he.key]:{type:In.error,error:ro(404,{pathname:he.path})}})})),ee=await A,re=(await j).reduce((he,Ce)=>Object.assign(he,Ce),{});return await Promise.all([qae(le,ee,$.signal,I,ae.loaderData),Kae(le,re,T)]),{loaderResults:ee,fetcherResults:re}}function xn(){Z=!0,R.push(..._t()),Q.forEach((ae,le)=>{U.has(le)&&B.add(le),sr(le)})}function Wt(ae,le,xe){xe===void 0&&(xe={}),C.fetchers.set(ae,le),$e({fetchers:new Map(C.fetchers)},{flushSync:(xe&&xe.flushSync)===!0})}function wn(ae,le,xe,T){T===void 0&&(T={});let $=vc(C.matches,le);br(ae),$e({errors:{[$.route.id]:xe},fetchers:new Map(C.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function Ii(ae){return f.v7_fetcherPersist&&(X.set(ae,(X.get(ae)||0)+1),ue.has(ae)&&ue.delete(ae)),C.fetchers.get(ae)||Tae}function br(ae){let le=C.fetchers.get(ae);U.has(ae)&&!(le&&le.state==="loading"&&G.has(ae))&&sr(ae),Q.delete(ae),G.delete(ae),oe.delete(ae),ue.delete(ae),B.delete(ae),C.fetchers.delete(ae)}function yi(ae){if(f.v7_fetcherPersist){let le=(X.get(ae)||0)-1;le<=0?(X.delete(ae),ue.add(ae)):X.set(ae,le)}else br(ae);$e({fetchers:new Map(C.fetchers)})}function sr(ae){let le=U.get(ae);le&&(le.abort(),U.delete(ae))}function si(ae){for(let le of ae){let xe=Ii(le),T=Gu(xe.data);C.fetchers.set(le,T)}}function bi(){let ae=[],le=!1;for(let xe of oe){let T=C.fetchers.get(xe);fn(T,"Expected fetcher: "+xe),T.state==="loading"&&(oe.delete(xe),ae.push(xe),le=!0)}return si(ae),le}function Rr(ae){let le=[];for(let[xe,T]of G)if(T0}function Xi(ae,le){let xe=C.blockers.get(ae)||Mp;return Se.get(ae)!==le&&Se.set(ae,le),xe}function bo(ae){C.blockers.delete(ae),Se.delete(ae)}function xi(ae,le){let xe=C.blockers.get(ae)||Mp;fn(xe.state==="unblocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="proceeding"||xe.state==="blocked"&&le.state==="unblocked"||xe.state==="proceeding"&&le.state==="unblocked","Invalid blocker state transition: "+xe.state+" -> "+le.state);let T=new Map(C.blockers);T.set(ae,le),$e({blockers:T})}function Dr(ae){let{currentLocation:le,nextLocation:xe,historyAction:T}=ae;if(Se.size===0)return;Se.size>1&&Uc(!1,"A router only supports one blocker at a time");let $=Array.from(Se.entries()),[I,A]=$[$.length-1],j=C.blockers.get(I);if(!(j&&j.state==="proceeding")&&A({currentLocation:le,nextLocation:xe,historyAction:T}))return I}function Sa(ae){let le=ro(404,{pathname:ae}),xe=s||a,{matches:T,route:$}=bM(xe);return _t(),{notFoundMatches:T,route:$,error:le}}function _t(ae){let le=[];return de.forEach((xe,T)=>{(!ae||ae(T))&&(xe.cancel(),le.push(T),de.delete(T))}),le}function hn(ae,le,xe){if(m=ae,b=le,v=xe||null,!w&&C.navigation===aS){w=!0;let T=ur(C.location,C.matches);T!=null&&$e({restoreScrollPosition:T})}return()=>{m=null,b=null,v=null}}function _n(ae,le){return v&&v(ae,le.map(T=>sae(T,C.loaderData)))||ae.key}function Kn(ae,le){if(m&&b){let xe=_n(ae,le);m[xe]=b()}}function ur(ae,le){if(m){let xe=_n(ae,le),T=m[xe];if(typeof T=="number")return T}return null}function Xr(ae,le,xe){if(c)if(ae){if(Object.keys(ae[0].params).length>0)return{active:!0,matches:Zy(le,xe,u,!0)}}else return{active:!0,matches:Zy(le,xe,u,!0)||[]};return{active:!1,matches:null}}async function xo(ae,le,xe){if(!c)return{type:"success",matches:ae};let T=ae;for(;;){let $=s==null,I=s||a,A=o;try{await c({path:le,matches:T,patch:(re,he)=>{xe.aborted||hM(re,he,I,A,i)}})}catch(re){return{type:"error",error:re,partialMatches:T}}finally{$&&!xe.aborted&&(a=[...a])}if(xe.aborted)return{type:"aborted"};let j=mc(I,le,u);if(j)return{type:"success",matches:j};let ee=Zy(I,le,u,!0);if(!ee||T.length===ee.length&&T.every((re,he)=>re.route.id===ee[he].route.id))return{type:"success",matches:null};T=ee}}function Xl(ae){o={},s=D1(ae,i,void 0,o)}function Ef(ae,le){let xe=s==null;hM(ae,le,s||a,o,i),xe&&(a=[...a],$e({}))}return E={get basename(){return u},get future(){return f},get state(){return C},get routes(){return a},get window(){return t},initialize:Ze,subscribe:Le,enableScrollRestoration:hn,navigate:yt,fetch:ye,revalidate:lt,createHref:ae=>e.history.createHref(ae),encodeLocation:ae=>e.history.encodeLocation(ae),getFetcher:Ii,deleteFetcher:yi,dispose:Ae,getBlocker:Xi,deleteBlocker:bo,patchRoutes:Ef,_internalFetchControllers:U,_internalActiveDeferreds:de,_internalSetRoutes:Xl},E}function Dae(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function $C(e,t,n,r,i,o,a,s){let u,l;if(a){u=[];for(let f of t)if(u.push(f),f.route.id===a){l=f;break}}else u=t,l=t[t.length-1];let c=TO(i||".",kO(u,o),$h(e.pathname,n)||e.pathname,s==="path");if(i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&l){let f=DO(c.search);if(l.route.index&&!f)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&f){let h=new URLSearchParams(c.search),p=h.getAll("index");h.delete("index"),p.filter(v=>v).forEach(v=>h.append("index",v));let m=h.toString();c.search=m?"?"+m:""}}return r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:lu([n,c.pathname])),Hc(c)}function lM(e,t,n,r){if(!r||!Dae(r))return{path:n};if(r.formMethod&&!Wae(r.formMethod))return{path:n,error:ro(405,{method:r.formMethod})};let i=()=>({path:n,error:ro(400,{type:"invalid-body"})}),o=r.formMethod||"get",a=e?o.toUpperCase():o.toLowerCase(),s=ZF(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Da(a))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,m)=>{let[v,b]=m;return""+p+v+"="+b+` -`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Da(a))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:s,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}fn(typeof FormData=="function","FormData is not available in this environment");let u,l;if(r.formData)u=NC(r.formData),l=r.formData;else if(r.body instanceof FormData)u=NC(r.body),l=r.body;else if(r.body instanceof URLSearchParams)u=r.body,l=gM(u);else if(r.body==null)u=new URLSearchParams,l=new FormData;else try{u=new URLSearchParams(r.body),l=gM(u)}catch{return i()}let c={formMethod:a,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Da(c.formMethod))return{path:n,submission:c};let f=ku(n);return t&&f.search&&DO(f.search)&&u.append("index",""),f.search="?"+u,{path:Hc(f),submission:c}}function cM(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function fM(e,t,n,r,i,o,a,s,u,l,c,f,h,p,m,v){let b=v?Ro(v[1])?v[1].error:v[1].data:void 0,w=e.createURL(t.location),x=e.createURL(i),S=n;o&&t.errors?S=cM(n,Object.keys(t.errors)[0],!0):v&&Ro(v[1])&&(S=cM(n,v[0]));let O=v?v[1].statusCode:void 0,E=a&&O&&O>=400,C=S.filter((M,N)=>{let{route:q}=M;if(q.lazy)return!0;if(q.loader==null)return!1;if(o)return IC(q,t.loaderData,t.errors);if($ae(t.loaderData,t.matches[N],M)||u.some(ne=>ne===M.route.id))return!0;let Y=t.matches[N],W=M;return dM(M,ir({currentUrl:w,currentParams:Y.params,nextUrl:x,nextParams:W.params},r,{actionResult:b,actionStatus:O,defaultShouldRevalidate:E?!1:s||w.pathname+w.search===x.pathname+x.search||w.search!==x.search||GF(Y,W)}))}),k=[];return f.forEach((M,N)=>{if(o||!n.some(Z=>Z.route.id===M.routeId)||c.has(N))return;let q=mc(p,M.path,m);if(!q){k.push({key:N,routeId:M.routeId,path:M.path,matches:null,match:null,controller:null});return}let Y=t.fetchers.get(N),W=a0(q,M.path),ne=!1;h.has(N)?ne=!1:l.has(N)?(l.delete(N),ne=!0):Y&&Y.state!=="idle"&&Y.data===void 0?ne=s:ne=dM(W,ir({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:n[n.length-1].params},r,{actionResult:b,actionStatus:O,defaultShouldRevalidate:E?!1:s})),ne&&k.push({key:N,routeId:M.routeId,path:M.path,matches:q,match:W,controller:new AbortController})}),[C,k]}function IC(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function $ae(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function GF(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function dM(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function hM(e,t,n,r,i){var o;let a;if(e){let l=r[e];fn(l,"No route found to patch children into: routeId = "+e),l.children||(l.children=[]),a=l.children}else a=n;let s=t.filter(l=>!a.some(c=>YF(l,c))),u=D1(s,i,[e||"_","patch",String(((o=a)==null?void 0:o.length)||"0")],r);a.push(...u)}function YF(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(o=>YF(n,o))}):!1}async function Iae(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];fn(i,"No route found in manifest");let o={};for(let a in r){let u=i[a]!==void 0&&a!=="hasErrorBoundary";Uc(!u,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!u&&!oae.has(a)&&(o[a]=r[a])}Object.assign(i,o),Object.assign(i,ir({},t(i),{lazy:void 0}))}async function Nae(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,o,a)=>Object.assign(i,{[n[a].route.id]:o}),{})}async function Lae(e,t,n,r,i,o,a,s,u,l){let c=o.map(p=>p.route.lazy?Iae(p.route,u,s):void 0),f=o.map((p,m)=>{let v=c[m],b=i.some(x=>x.route.id===p.route.id);return ir({},p,{shouldLoad:b,resolve:async x=>(x&&r.method==="GET"&&(p.route.lazy||p.route.loader)&&(b=!0),b?Fae(t,r,p,v,x,l):Promise.resolve({type:In.data,result:void 0}))})}),h=await e({matches:f,request:r,params:o[0].params,fetcherKey:a,context:l});try{await Promise.all(c)}catch{}return h}async function Fae(e,t,n,r,i,o){let a,s,u=l=>{let c,f=new Promise((m,v)=>c=v);s=()=>c(),t.signal.addEventListener("abort",s);let h=m=>typeof l!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):l({request:t,params:n.params,context:o},...m!==void 0?[m]:[]),p=(async()=>{try{return{type:"data",result:await(i?i(v=>h(v)):h())}}catch(m){return{type:"error",result:m}}})();return Promise.race([p,f])};try{let l=n.route[e];if(r)if(l){let c,[f]=await Promise.all([u(l).catch(h=>{c=h}),r]);if(c!==void 0)throw c;a=f}else if(await r,l=n.route[e],l)a=await u(l);else if(e==="action"){let c=new URL(t.url),f=c.pathname+c.search;throw ro(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:In.data,result:void 0};else if(l)a=await u(l);else{let c=new URL(t.url),f=c.pathname+c.search;throw ro(404,{pathname:f})}fn(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(l){return{type:In.error,result:l}}finally{s&&t.signal.removeEventListener("abort",s)}return a}async function jae(e){let{result:t,type:n}=e;if(XF(t)){let l;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?l=null:l=await t.json():l=await t.text()}catch(c){return{type:In.error,error:c}}return n===In.error?{type:In.error,error:new $1(t.status,t.statusText,l),statusCode:t.status,headers:t.headers}:{type:In.data,data:l,statusCode:t.status,headers:t.headers}}if(n===In.error){if(xM(t)){var r;if(t.data instanceof Error){var i;return{type:In.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new $1(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:In.error,error:t,statusCode:Wx(t)?t.status:void 0}}if(Vae(t)){var o,a;return{type:In.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}if(xM(t)){var s,u;return{type:In.data,data:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:In.data,data:t}}function Bae(e,t,n,r,i,o){let a=e.headers.get("Location");if(fn(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!MO.test(a)){let s=r.slice(0,r.findIndex(u=>u.route.id===n)+1);a=$C(new URL(t.url),s,i,!0,a,o),e.headers.set("Location",a)}return e}function pM(e,t,n){if(MO.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=$h(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function Bf(e,t,n,r){let i=e.createURL(ZF(t)).toString(),o={signal:n};if(r&&Da(r.formMethod)){let{formMethod:a,formEncType:s}=r;o.method=a.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(r.json)):s==="text/plain"?o.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?o.body=NC(r.formData):o.body=r.formData}return new Request(i,o)}function NC(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function gM(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function zae(e,t,n,r,i){let o={},a=null,s,u=!1,l={},c=n&&Ro(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let h=f.route.id,p=t[h];if(fn(!wc(p),"Cannot handle redirect results in processLoaderData"),Ro(p)){let m=p.error;c!==void 0&&(m=c,c=void 0),a=a||{};{let v=vc(e,h);a[v.route.id]==null&&(a[v.route.id]=m)}o[h]=void 0,u||(u=!0,s=Wx(p.error)?p.error.status:500),p.headers&&(l[h]=p.headers)}else ul(p)?(r.set(h,p.deferredData),o[h]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!u&&(s=p.statusCode),p.headers&&(l[h]=p.headers)):(o[h]=p.data,p.statusCode&&p.statusCode!==200&&!u&&(s=p.statusCode),p.headers&&(l[h]=p.headers))}),c!==void 0&&n&&(a={[n[0]]:c},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:s||200,loaderHeaders:l}}function mM(e,t,n,r,i,o,a){let{loaderData:s,errors:u}=zae(t,n,r,a);return i.forEach(l=>{let{key:c,match:f,controller:h}=l,p=o[c];if(fn(p,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(Ro(p)){let m=vc(e.matches,f?.route.id);u&&u[m.route.id]||(u=ir({},u,{[m.route.id]:p.error})),e.fetchers.delete(c)}else if(wc(p))fn(!1,"Unhandled fetcher revalidation redirect");else if(ul(p))fn(!1,"Unhandled fetcher deferred data");else{let m=Gu(p.data);e.fetchers.set(c,m)}}),{loaderData:s,errors:u}}function vM(e,t,n,r){let i=ir({},t);for(let o of n){let a=o.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(i[a]=t[a]):e[a]!==void 0&&o.route.loader&&(i[a]=e[a]),r&&r.hasOwnProperty(a))break}return i}function yM(e){return e?Ro(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function vc(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function bM(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ro(e,t){let{pathname:n,routeId:r,method:i,type:o,message:a}=t===void 0?{}:t,s="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?u="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?u="defer() is not supported in actions":o==="invalid-body"&&(u="Unable to encode submission body")):e===403?(s="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",u='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?u="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(u='Invalid request method "'+i.toUpperCase()+'"')),new $1(e||500,s,new Error(u),!0)}function ty(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(wc(i))return{key:r,result:i}}}function ZF(e){let t=typeof e=="string"?ku(e):e;return Hc(ir({},t,{hash:""}))}function Uae(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Hae(e){return XF(e.result)&&Pae.has(e.result.status)}function ul(e){return e.type===In.deferred}function Ro(e){return e.type===In.error}function wc(e){return(e&&e.type)===In.redirect}function xM(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Vae(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function XF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Wae(e){return Aae.has(e.toLowerCase())}function Da(e){return Eae.has(e.toLowerCase())}async function qae(e,t,n,r,i){let o=Object.entries(t);for(let a=0;ah?.route.id===s);if(!l)continue;let c=r.find(h=>h.route.id===l.route.id),f=c!=null&&!GF(c,l)&&(i&&i[l.route.id])!==void 0;ul(u)&&f&&await RO(u,n,!1).then(h=>{h&&(t[s]=h)})}}async function Kae(e,t,n){for(let r=0;rl?.route.id===o)&&ul(s)&&(fn(a,"Expected an AbortController for revalidating fetcher deferred result"),await RO(s,a.signal,!0).then(l=>{l&&(t[i]=l)}))}}async function RO(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:In.data,data:e.deferredData.unwrappedData}}catch(i){return{type:In.error,error:i}}return{type:In.data,data:e.deferredData.data}}}function DO(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function a0(e,t){let n=typeof t=="string"?ku(t).search:t.search;if(e[e.length-1].route.index&&DO(n||""))return e[e.length-1];let r=WF(e);return r[r.length-1]}function wM(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:a}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function sS(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Gae(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Rp(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Yae(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Gu(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Zae(e,t){try{let n=e.sessionStorage.getItem(KF);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function Xae(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(KF,JSON.stringify(n))}catch(r){Uc(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + */function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function zc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Foe(){return Math.random().toString(36).substr(2,8)}function ZT(e,t){return{usr:e.state,key:e.key,idx:t}}function Y0(e,t,n,r){return n===void 0&&(n=null),ir({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Pu(t):t,{state:n,key:t&&t.key||r||Foe()})}function Uc(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 Pu(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 joe(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=kr.Pop,u=null,l=c();l==null&&(l=0,a.replaceState(ir({},a.state,{idx:l}),""));function c(){return(a.state||{idx:null}).idx}function f(){s=kr.Pop;let b=c(),w=b==null?null:b-l;l=b,u&&u({action:s,location:v.location,delta:w})}function h(b,w){s=kr.Push;let x=Y0(v.location,b,w);n(x,b),l=c()+1;let S=ZT(x,l),O=v.createHref(x);try{a.pushState(S,"",O)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(O)}o&&u&&u({action:s,location:v.location,delta:1})}function p(b,w){s=kr.Replace;let x=Y0(v.location,b,w);n(x,b),l=c();let S=ZT(x,l),O=v.createHref(x);a.replaceState(S,"",O),o&&u&&u({action:s,location:v.location,delta:0})}function m(b){let w=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof b=="string"?b:Uc(b);return x=x.replace(/ $/,"%20"),fn(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let v={get action(){return s},get location(){return e(i,a)},listen(b){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(YT,f),u=b,()=>{i.removeEventListener(YT,f),u=null}},createHref(b){return t(i,b)},createURL:m,encodeLocation(b){let w=m(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:p,go(b){return a.go(b)}};return v}var In;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(In||(In={}));const Boe=new Set(["lazy","caseSensitive","path","id","index","children"]);function zoe(e){return e.index===!0}function k1(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let a=[...n,String(o)],s=typeof i.id=="string"?i.id:a.join("-");if(fn(i.index!==!0||!i.children,"Cannot specify children on an index route"),fn(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),zoe(i)){let u=ir({},i,t(i),{id:s});return r[s]=u,u}else{let u=ir({},i,t(i),{id:s,children:void 0});return r[s]=u,i.children&&(u.children=k1(i.children,t,a,r)),u}})}function gc(e,t,n){return n===void 0&&(n="/"),Ky(e,t,n,!1)}function Ky(e,t,n,r){let i=typeof t=="string"?Pu(t):t,o=Mh(i.pathname||"/",n);if(o==null)return null;let a=kF(e);Voe(a);let s=null;for(let u=0;s==null&&u{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};u.relativePath.startsWith("/")&&(fn(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let l=lu([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(fn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),kF(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:Zoe(l,o.index),routesMeta:c})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let u of TF(o.path))i(o,a,u)}),t}function TF(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=TF(r.join("/")),s=[];return s.push(...a.map(u=>u===""?o:[o,u].join("/"))),i&&s.push(...a),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function Voe(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Xoe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Woe=/^:[\w-]+$/,Hoe=3,Koe=2,qoe=1,Goe=10,Yoe=-2,XT=e=>e==="*";function Zoe(e,t){let n=e.split("/"),r=n.length;return n.some(XT)&&(r+=Yoe),t&&(r+=Koe),n.filter(i=>!XT(i)).reduce((i,o)=>i+(Woe.test(o)?Hoe:o===""?qoe:Goe),r)}function Xoe(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 Qoe(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s{let{paramName:h,isOptional:p}=c;if(h==="*"){let v=s[f]||"";a=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const m=s[f];return p&&!m?l[h]=void 0:l[h]=(m||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function Joe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),zc(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,(a,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function eae(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return zc(!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 Mh(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 tae(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Pu(e):e;return{pathname:n?n.startsWith("/")?n:nae(n,t):t,search:iae(r),hash:oae(i)}}function nae(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 eS(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 MF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function bO(e,t){let n=MF(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xO(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Pu(e):(i=ir({},e),fn(!i.pathname||!i.pathname.includes("?"),eS("?","pathname","search",i)),fn(!i.pathname||!i.pathname.includes("#"),eS("#","pathname","hash",i)),fn(!i.search||!i.search.includes("#"),eS("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let u=tae(i,s),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(l||c)&&(u.pathname+="/"),u}const lu=e=>e.join("/").replace(/\/\/+/g,"/"),rae=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),iae=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,oae=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class T1{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Bx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const RF=["post","put","patch","delete"],aae=new Set(RF),sae=["get",...RF],uae=new Set(sae),lae=new Set([301,302,303,307,308]),cae=new Set([307,308]),tS={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},fae={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Pp={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},wO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dae=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),DF="remix-router-transitions";function hae(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;fn(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let ae=e.detectErrorBoundary;i=le=>({hasErrorBoundary:ae(le)})}else i=dae;let o={},a=k1(e.routes,i,void 0,o),s,u=e.basename||"/",l=e.dataStrategy||vae,c=e.patchRoutesOnNavigation,f=ir({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,p=new Set,m=null,v=null,b=null,w=e.hydrationData!=null,x=gc(a,e.history.location,u),S=null;if(x==null&&!c){let ae=ro(404,{pathname:e.history.location.pathname}),{matches:le,route:xe}=lM(a);x=le,S={[xe.id]:ae}}x&&!e.hydrationData&&Xr(x,a,e.history.location.pathname).active&&(x=null);let O;if(x)if(x.some(ae=>ae.route.lazy))O=!1;else if(!x.some(ae=>ae.route.loader))O=!0;else if(f.v7_partialHydration){let ae=e.hydrationData?e.hydrationData.loaderData:null,le=e.hydrationData?e.hydrationData.errors:null;if(le){let xe=x.findIndex(T=>le[T.route.id]!==void 0);O=x.slice(0,xe+1).every(T=>!kC(T.route,ae,le))}else O=x.every(xe=>!kC(xe.route,ae,le))}else O=e.hydrationData!=null;else if(O=!1,x=[],f.v7_partialHydration){let ae=Xr(null,a,e.history.location.pathname);ae.active&&ae.matches&&(x=ae.matches)}let E,C={historyAction:e.history.action,location:e.history.location,matches:x,initialized:O,navigation:tS,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},k=kr.Pop,M=!1,N,z=!1,H=new Map,V=null,ne=!1,Z=!1,G=[],q=new Set,W=new Map,j=0,K=-1,Y=new Map,oe=new Set,Q=new Map,J=new Map,ue=new Set,de=new Map,Se=new Map,me;function Ze(){if(h=e.history.listen(ae=>{let{action:le,location:xe,delta:T}=ae;if(me){me(),me=void 0;return}zc(Se.size===0||T!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let D=Dr({currentLocation:C.location,nextLocation:xe,historyAction:le});if(D&&T!=null){let $=new Promise(A=>{me=A});e.history.go(T*-1),xi(D,{state:"blocked",location:xe,proceed(){xi(D,{state:"proceeding",proceed:void 0,reset:void 0,location:xe}),$.then(()=>e.history.go(T))},reset(){let A=new Map(C.blockers);A.set(D,Pp),$e({blockers:A})}});return}return Nt(le,xe)}),n){Mae(t,H);let ae=()=>Rae(t,H);t.addEventListener("pagehide",ae),V=()=>t.removeEventListener("pagehide",ae)}return C.initialized||Nt(kr.Pop,C.location,{initialHydration:!0}),E}function Ae(){h&&h(),V&&V(),p.clear(),N&&N.abort(),C.fetchers.forEach((ae,le)=>br(le)),C.blockers.forEach((ae,le)=>yo(le))}function Le(ae){return p.add(ae),()=>p.delete(ae)}function $e(ae,le){le===void 0&&(le={}),C=ir({},C,ae);let xe=[],T=[];f.v7_fetcherPersist&&C.fetchers.forEach((D,$)=>{D.state==="idle"&&(ue.has($)?T.push($):xe.push($))}),[...p].forEach(D=>D(C,{deletedFetchers:T,viewTransitionOpts:le.viewTransitionOpts,flushSync:le.flushSync===!0})),f.v7_fetcherPersist&&(xe.forEach(D=>C.fetchers.delete(D)),T.forEach(D=>br(D)))}function be(ae,le,xe){var T,D;let{flushSync:$}=xe===void 0?{}:xe,A=C.actionData!=null&&C.navigation.formMethod!=null&&Da(C.navigation.formMethod)&&C.navigation.state==="loading"&&((T=ae.state)==null?void 0:T._isRedirect)!==!0,L;le.actionData?Object.keys(le.actionData).length>0?L=le.actionData:L=null:A?L=C.actionData:L=null;let ee=le.loaderData?sM(C.loaderData,le.loaderData,le.matches||[],le.errors):C.loaderData,re=C.blockers;re.size>0&&(re=new Map(re),re.forEach((Be,He)=>re.set(He,Pp)));let he=M===!0||C.navigation.formMethod!=null&&Da(C.navigation.formMethod)&&((D=ae.state)==null?void 0:D._isRedirect)!==!0;s&&(a=s,s=void 0),ne||k===kr.Pop||(k===kr.Push?e.history.push(ae,ae.state):k===kr.Replace&&e.history.replace(ae,ae.state));let Ce;if(k===kr.Pop){let Be=H.get(C.location.pathname);Be&&Be.has(ae.pathname)?Ce={currentLocation:C.location,nextLocation:ae}:H.has(ae.pathname)&&(Ce={currentLocation:ae,nextLocation:C.location})}else if(z){let Be=H.get(C.location.pathname);Be?Be.add(ae.pathname):(Be=new Set([ae.pathname]),H.set(C.location.pathname,Be)),Ce={currentLocation:C.location,nextLocation:ae}}$e(ir({},le,{actionData:L,loaderData:ee,historyAction:k,location:ae,initialized:!0,navigation:tS,revalidation:"idle",restoreScrollPosition:ur(ae,le.matches||C.matches),preventScrollReset:he,blockers:re}),{viewTransitionOpts:Ce,flushSync:$===!0}),k=kr.Pop,M=!1,z=!1,ne=!1,Z=!1,G=[]}async function yt(ae,le){if(typeof ae=="number"){e.history.go(ae);return}let xe=PC(C.location,C.matches,u,f.v7_prependBasename,ae,f.v7_relativeSplatPath,le?.fromRouteId,le?.relative),{path:T,submission:D,error:$}=JT(f.v7_normalizeFormMethod,!1,xe,le),A=C.location,L=Y0(C.location,T,le&&le.state);L=ir({},L,e.history.encodeLocation(L));let ee=le&&le.replace!=null?le.replace:void 0,re=kr.Push;ee===!0?re=kr.Replace:ee===!1||D!=null&&Da(D.formMethod)&&D.formAction===C.location.pathname+C.location.search&&(re=kr.Replace);let he=le&&"preventScrollReset"in le?le.preventScrollReset===!0:void 0,Ce=(le&&le.flushSync)===!0,Be=Dr({currentLocation:A,nextLocation:L,historyAction:re});if(Be){xi(Be,{state:"blocked",location:L,proceed(){xi(Be,{state:"proceeding",proceed:void 0,reset:void 0,location:L}),yt(ae,le)},reset(){let He=new Map(C.blockers);He.set(Be,Pp),$e({blockers:He})}});return}return await Nt(re,L,{submission:D,pendingError:$,preventScrollReset:he,replace:le&&le.replace,enableViewTransition:le&&le.viewTransition,flushSync:Ce})}function lt(){if(xn(),$e({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){Nt(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}Nt(k||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:z===!0})}}async function Nt(ae,le,xe){N&&N.abort(),N=null,k=ae,ne=(xe&&xe.startUninterruptedRevalidation)===!0,qn(C.location,C.matches),M=(xe&&xe.preventScrollReset)===!0,z=(xe&&xe.enableViewTransition)===!0;let T=s||a,D=xe&&xe.overrideNavigation,$=gc(T,le,u),A=(xe&&xe.flushSync)===!0,L=Xr($,T,le.pathname);if(L.active&&L.matches&&($=L.matches),!$){let{error:ct,notFoundMatches:Ne,route:rt}=Sa(le.pathname);be(le,{matches:Ne,loaderData:{},errors:{[rt.id]:ct}},{flushSync:A});return}if(C.initialized&&!Z&&Sae(C.location,le)&&!(xe&&xe.submission&&Da(xe.submission.formMethod))){be(le,{matches:$},{flushSync:A});return}N=new AbortController;let ee=Ff(e.history,le,N.signal,xe&&xe.submission),re;if(xe&&xe.pendingError)re=[mc($).route.id,{type:In.error,error:xe.pendingError}];else if(xe&&xe.submission&&Da(xe.submission.formMethod)){let ct=await yn(ee,le,xe.submission,$,L.active,{replace:xe.replace,flushSync:A});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[Ne,rt]=ct.pendingActionResult;if(Mo(rt)&&Bx(rt.error)&&rt.error.status===404){N=null,be(le,{matches:ct.matches,loaderData:{},errors:{[Ne]:rt.error}});return}}$=ct.matches||$,re=ct.pendingActionResult,D=nS(le,xe.submission),A=!1,L.active=!1,ee=Ff(e.history,ee.url,ee.signal)}let{shortCircuited:he,matches:Ce,loaderData:Be,errors:He}=await nn(ee,le,$,L.active,D,xe&&xe.submission,xe&&xe.fetcherSubmission,xe&&xe.replace,xe&&xe.initialHydration===!0,A,re);he||(N=null,be(le,ir({matches:Ce||$},uM(re),{loaderData:Be,errors:He})))}async function yn(ae,le,xe,T,D,$){$===void 0&&($={}),xn();let A=kae(le,xe);if($e({navigation:A},{flushSync:$.flushSync===!0}),D){let re=await bo(T,le.pathname,ae.signal);if(re.type==="aborted")return{shortCircuited:!0};if(re.type==="error"){let he=mc(re.partialMatches).route.id;return{matches:re.partialMatches,pendingActionResult:[he,{type:In.error,error:re.error}]}}else if(re.matches)T=re.matches;else{let{notFoundMatches:he,error:Ce,route:Be}=Sa(le.pathname);return{matches:he,pendingActionResult:[Be.id,{type:In.error,error:Ce}]}}}let L,ee=r0(T,le);if(!ee.route.action&&!ee.route.lazy)L={type:In.error,error:ro(405,{method:ae.method,pathname:le.pathname,routeId:ee.route.id})};else if(L=(await nt("action",C,ae,[ee],T,null))[ee.route.id],ae.signal.aborted)return{shortCircuited:!0};if(xc(L)){let re;return $&&$.replace!=null?re=$.replace:re=iM(L.response.headers.get("Location"),new URL(ae.url),u)===C.location.pathname+C.location.search,await ke(ae,L,!0,{submission:xe,replace:re}),{shortCircuited:!0}}if(sl(L))throw ro(400,{type:"defer-action"});if(Mo(L)){let re=mc(T,ee.route.id);return($&&$.replace)!==!0&&(k=kr.Push),{matches:T,pendingActionResult:[re.route.id,L]}}return{matches:T,pendingActionResult:[ee.route.id,L]}}async function nn(ae,le,xe,T,D,$,A,L,ee,re,he){let Ce=D||nS(le,$),Be=$||A||fM(Ce),He=!ne&&(!f.v7_partialHydration||!ee);if(T){if(He){let Ke=ie(he);$e(ir({navigation:Ce},Ke!==void 0?{actionData:Ke}:{}),{flushSync:re})}let Fe=await bo(xe,le.pathname,ae.signal);if(Fe.type==="aborted")return{shortCircuited:!0};if(Fe.type==="error"){let Ke=mc(Fe.partialMatches).route.id;return{matches:Fe.partialMatches,loaderData:{},errors:{[Ke]:Fe.error}}}else if(Fe.matches)xe=Fe.matches;else{let{error:Ke,notFoundMatches:Ge,route:ve}=Sa(le.pathname);return{matches:Ge,loaderData:{},errors:{[ve.id]:Ke}}}}let ct=s||a,[Ne,rt]=tM(e.history,C,xe,Be,le,f.v7_partialHydration&&ee===!0,f.v7_skipActionErrorRevalidation,Z,G,q,ue,Q,oe,ct,u,he);if(_t(Fe=>!(xe&&xe.some(Ke=>Ke.route.id===Fe))||Ne&&Ne.some(Ke=>Ke.route.id===Fe)),K=++j,Ne.length===0&&rt.length===0){let Fe=bi();return be(le,ir({matches:xe,loaderData:{},errors:he&&Mo(he[1])?{[he[0]]:he[1].error}:null},uM(he),Fe?{fetchers:new Map(C.fetchers)}:{}),{flushSync:re}),{shortCircuited:!0}}if(He){let Fe={};if(!T){Fe.navigation=Ce;let Ke=ie(he);Ke!==void 0&&(Fe.actionData=Ke)}rt.length>0&&(Fe.fetchers=pe(rt)),$e(Fe,{flushSync:re})}rt.forEach(Fe=>{sr(Fe.key),Fe.controller&&W.set(Fe.key,Fe.controller)});let bt=()=>rt.forEach(Fe=>sr(Fe.key));N&&N.signal.addEventListener("abort",bt);let{loaderResults:Ot,fetcherResults:gt}=await mt(C,xe,Ne,rt,ae);if(ae.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",bt),rt.forEach(Fe=>W.delete(Fe.key));let ht=Xv(Ot);if(ht)return await ke(ae,ht.result,!0,{replace:L}),{shortCircuited:!0};if(ht=Xv(gt),ht)return oe.add(ht.key),await ke(ae,ht.result,!0,{replace:L}),{shortCircuited:!0};let{loaderData:xt,errors:wt}=aM(C,xe,Ot,he,rt,gt,de);de.forEach((Fe,Ke)=>{Fe.subscribe(Ge=>{(Ge||Fe.done)&&de.delete(Ke)})}),f.v7_partialHydration&&ee&&C.errors&&(wt=ir({},C.errors,wt));let Je=bi(),ut=Rr(K),Qe=Je||ut||rt.length>0;return ir({matches:xe,loaderData:xt,errors:wt},Qe?{fetchers:new Map(C.fetchers)}:{})}function ie(ae){if(ae&&!Mo(ae[1]))return{[ae[0]]:ae[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function pe(ae){return ae.forEach(le=>{let xe=C.fetchers.get(le.key),T=kp(void 0,xe?xe.data:void 0);C.fetchers.set(le.key,T)}),new Map(C.fetchers)}function ye(ae,le,xe,T){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");sr(ae);let D=(T&&T.flushSync)===!0,$=s||a,A=PC(C.location,C.matches,u,f.v7_prependBasename,xe,f.v7_relativeSplatPath,le,T?.relative),L=gc($,A,u),ee=Xr(L,$,A);if(ee.active&&ee.matches&&(L=ee.matches),!L){wn(ae,le,ro(404,{pathname:A}),{flushSync:D});return}let{path:re,submission:he,error:Ce}=JT(f.v7_normalizeFormMethod,!0,A,T);if(Ce){wn(ae,le,Ce,{flushSync:D});return}let Be=r0(L,re),He=(T&&T.preventScrollReset)===!0;if(he&&Da(he.formMethod)){Ue(ae,le,re,Be,L,ee.active,D,He,he);return}Q.set(ae,{routeId:le,path:re}),je(ae,le,re,Be,L,ee.active,D,He,he)}async function Ue(ae,le,xe,T,D,$,A,L,ee){xn(),Q.delete(ae);function re(ge){if(!ge.route.action&&!ge.route.lazy){let De=ro(405,{method:ee.formMethod,pathname:xe,routeId:le});return wn(ae,le,De,{flushSync:A}),!0}return!1}if(!$&&re(T))return;let he=C.fetchers.get(ae);Ht(ae,Tae(ee,he),{flushSync:A});let Ce=new AbortController,Be=Ff(e.history,xe,Ce.signal,ee);if($){let ge=await bo(D,xe,Be.signal);if(ge.type==="aborted")return;if(ge.type==="error"){wn(ae,le,ge.error,{flushSync:A});return}else if(ge.matches){if(D=ge.matches,T=r0(D,xe),re(T))return}else{wn(ae,le,ro(404,{pathname:xe}),{flushSync:A});return}}W.set(ae,Ce);let He=j,Ne=(await nt("action",C,Be,[T],D,ae))[T.route.id];if(Be.signal.aborted){W.get(ae)===Ce&&W.delete(ae);return}if(f.v7_fetcherPersist&&ue.has(ae)){if(xc(Ne)||Mo(Ne)){Ht(ae,qu(void 0));return}}else{if(xc(Ne))if(W.delete(ae),K>He){Ht(ae,qu(void 0));return}else return oe.add(ae),Ht(ae,kp(ee)),ke(Be,Ne,!1,{fetcherSubmission:ee,preventScrollReset:L});if(Mo(Ne)){wn(ae,le,Ne.error);return}}if(sl(Ne))throw ro(400,{type:"defer-action"});let rt=C.navigation.location||C.location,bt=Ff(e.history,rt,Ce.signal),Ot=s||a,gt=C.navigation.state!=="idle"?gc(Ot,C.navigation.location,u):C.matches;fn(gt,"Didn't find any matches after fetcher action");let ht=++j;Y.set(ae,ht);let xt=kp(ee,Ne.data);C.fetchers.set(ae,xt);let[wt,Je]=tM(e.history,C,gt,ee,rt,!1,f.v7_skipActionErrorRevalidation,Z,G,q,ue,Q,oe,Ot,u,[T.route.id,Ne]);Je.filter(ge=>ge.key!==ae).forEach(ge=>{let De=ge.key,Pe=C.fetchers.get(De),Te=kp(void 0,Pe?Pe.data:void 0);C.fetchers.set(De,Te),sr(De),ge.controller&&W.set(De,ge.controller)}),$e({fetchers:new Map(C.fetchers)});let ut=()=>Je.forEach(ge=>sr(ge.key));Ce.signal.addEventListener("abort",ut);let{loaderResults:Qe,fetcherResults:Fe}=await mt(C,gt,wt,Je,bt);if(Ce.signal.aborted)return;Ce.signal.removeEventListener("abort",ut),Y.delete(ae),W.delete(ae),Je.forEach(ge=>W.delete(ge.key));let Ke=Xv(Qe);if(Ke)return ke(bt,Ke.result,!1,{preventScrollReset:L});if(Ke=Xv(Fe),Ke)return oe.add(Ke.key),ke(bt,Ke.result,!1,{preventScrollReset:L});let{loaderData:Ge,errors:ve}=aM(C,gt,Qe,void 0,Je,Fe,de);if(C.fetchers.has(ae)){let ge=qu(Ne.data);C.fetchers.set(ae,ge)}Rr(ht),C.navigation.state==="loading"&&ht>K?(fn(k,"Expected pending action"),N&&N.abort(),be(C.navigation.location,{matches:gt,loaderData:Ge,errors:ve,fetchers:new Map(C.fetchers)})):($e({errors:ve,loaderData:sM(C.loaderData,Ge,gt,ve),fetchers:new Map(C.fetchers)}),Z=!1)}async function je(ae,le,xe,T,D,$,A,L,ee){let re=C.fetchers.get(ae);Ht(ae,kp(ee,re?re.data:void 0),{flushSync:A});let he=new AbortController,Ce=Ff(e.history,xe,he.signal);if($){let Ne=await bo(D,xe,Ce.signal);if(Ne.type==="aborted")return;if(Ne.type==="error"){wn(ae,le,Ne.error,{flushSync:A});return}else if(Ne.matches)D=Ne.matches,T=r0(D,xe);else{wn(ae,le,ro(404,{pathname:xe}),{flushSync:A});return}}W.set(ae,he);let Be=j,ct=(await nt("loader",C,Ce,[T],D,ae))[T.route.id];if(sl(ct)&&(ct=await _O(ct,Ce.signal,!0)||ct),W.get(ae)===he&&W.delete(ae),!Ce.signal.aborted){if(ue.has(ae)){Ht(ae,qu(void 0));return}if(xc(ct))if(K>Be){Ht(ae,qu(void 0));return}else{oe.add(ae),await ke(Ce,ct,!1,{preventScrollReset:L});return}if(Mo(ct)){wn(ae,le,ct.error);return}fn(!sl(ct),"Unhandled fetcher deferred data"),Ht(ae,qu(ct.data))}}async function ke(ae,le,xe,T){let{submission:D,fetcherSubmission:$,preventScrollReset:A,replace:L}=T===void 0?{}:T;le.response.headers.has("X-Remix-Revalidate")&&(Z=!0);let ee=le.response.headers.get("Location");fn(ee,"Expected a Location header on the redirect Response"),ee=iM(ee,new URL(ae.url),u);let re=Y0(C.location,ee,{_isRedirect:!0});if(n){let Ne=!1;if(le.response.headers.has("X-Remix-Reload-Document"))Ne=!0;else if(wO.test(ee)){const rt=e.history.createURL(ee);Ne=rt.origin!==t.location.origin||Mh(rt.pathname,u)==null}if(Ne){L?t.location.replace(ee):t.location.assign(ee);return}}N=null;let he=L===!0||le.response.headers.has("X-Remix-Replace")?kr.Replace:kr.Push,{formMethod:Ce,formAction:Be,formEncType:He}=C.navigation;!D&&!$&&Ce&&Be&&He&&(D=fM(C.navigation));let ct=D||$;if(cae.has(le.response.status)&&ct&&Da(ct.formMethod))await Nt(he,re,{submission:ir({},ct,{formAction:ee}),preventScrollReset:A||M,enableViewTransition:xe?z:void 0});else{let Ne=nS(re,D);await Nt(he,re,{overrideNavigation:Ne,fetcherSubmission:$,preventScrollReset:A||M,enableViewTransition:xe?z:void 0})}}async function nt(ae,le,xe,T,D,$){let A,L={};try{A=await yae(l,ae,le,xe,T,D,$,o,i)}catch(ee){return T.forEach(re=>{L[re.route.id]={type:In.error,error:ee}}),L}for(let[ee,re]of Object.entries(A))if(Cae(re)){let he=re.result;L[ee]={type:In.redirect,response:wae(he,xe,ee,D,u,f.v7_relativeSplatPath)}}else L[ee]=await xae(re);return L}async function mt(ae,le,xe,T,D){let $=ae.matches,A=nt("loader",ae,D,xe,le,null),L=Promise.all(T.map(async he=>{if(he.matches&&he.match&&he.controller){let Be=(await nt("loader",ae,Ff(e.history,he.path,he.controller.signal),[he.match],he.matches,he.key))[he.match.route.id];return{[he.key]:Be}}else return Promise.resolve({[he.key]:{type:In.error,error:ro(404,{pathname:he.path})}})})),ee=await A,re=(await L).reduce((he,Ce)=>Object.assign(he,Ce),{});return await Promise.all([Aae(le,ee,D.signal,$,ae.loaderData),Pae(le,re,T)]),{loaderResults:ee,fetcherResults:re}}function xn(){Z=!0,G.push(..._t()),Q.forEach((ae,le)=>{W.has(le)&&q.add(le),sr(le)})}function Ht(ae,le,xe){xe===void 0&&(xe={}),C.fetchers.set(ae,le),$e({fetchers:new Map(C.fetchers)},{flushSync:(xe&&xe.flushSync)===!0})}function wn(ae,le,xe,T){T===void 0&&(T={});let D=mc(C.matches,le);br(ae),$e({errors:{[D.route.id]:xe},fetchers:new Map(C.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function Ii(ae){return f.v7_fetcherPersist&&(J.set(ae,(J.get(ae)||0)+1),ue.has(ae)&&ue.delete(ae)),C.fetchers.get(ae)||fae}function br(ae){let le=C.fetchers.get(ae);W.has(ae)&&!(le&&le.state==="loading"&&Y.has(ae))&&sr(ae),Q.delete(ae),Y.delete(ae),oe.delete(ae),ue.delete(ae),q.delete(ae),C.fetchers.delete(ae)}function yi(ae){if(f.v7_fetcherPersist){let le=(J.get(ae)||0)-1;le<=0?(J.delete(ae),ue.add(ae)):J.set(ae,le)}else br(ae);$e({fetchers:new Map(C.fetchers)})}function sr(ae){let le=W.get(ae);le&&(le.abort(),W.delete(ae))}function si(ae){for(let le of ae){let xe=Ii(le),T=qu(xe.data);C.fetchers.set(le,T)}}function bi(){let ae=[],le=!1;for(let xe of oe){let T=C.fetchers.get(xe);fn(T,"Expected fetcher: "+xe),T.state==="loading"&&(oe.delete(xe),ae.push(xe),le=!0)}return si(ae),le}function Rr(ae){let le=[];for(let[xe,T]of Y)if(T0}function Xi(ae,le){let xe=C.blockers.get(ae)||Pp;return Se.get(ae)!==le&&Se.set(ae,le),xe}function yo(ae){C.blockers.delete(ae),Se.delete(ae)}function xi(ae,le){let xe=C.blockers.get(ae)||Pp;fn(xe.state==="unblocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="proceeding"||xe.state==="blocked"&&le.state==="unblocked"||xe.state==="proceeding"&&le.state==="unblocked","Invalid blocker state transition: "+xe.state+" -> "+le.state);let T=new Map(C.blockers);T.set(ae,le),$e({blockers:T})}function Dr(ae){let{currentLocation:le,nextLocation:xe,historyAction:T}=ae;if(Se.size===0)return;Se.size>1&&zc(!1,"A router only supports one blocker at a time");let D=Array.from(Se.entries()),[$,A]=D[D.length-1],L=C.blockers.get($);if(!(L&&L.state==="proceeding")&&A({currentLocation:le,nextLocation:xe,historyAction:T}))return $}function Sa(ae){let le=ro(404,{pathname:ae}),xe=s||a,{matches:T,route:D}=lM(xe);return _t(),{notFoundMatches:T,route:D,error:le}}function _t(ae){let le=[];return de.forEach((xe,T)=>{(!ae||ae(T))&&(xe.cancel(),le.push(T),de.delete(T))}),le}function hn(ae,le,xe){if(m=ae,b=le,v=xe||null,!w&&C.navigation===tS){w=!0;let T=ur(C.location,C.matches);T!=null&&$e({restoreScrollPosition:T})}return()=>{m=null,b=null,v=null}}function _n(ae,le){return v&&v(ae,le.map(T=>Uoe(T,C.loaderData)))||ae.key}function qn(ae,le){if(m&&b){let xe=_n(ae,le);m[xe]=b()}}function ur(ae,le){if(m){let xe=_n(ae,le),T=m[xe];if(typeof T=="number")return T}return null}function Xr(ae,le,xe){if(c)if(ae){if(Object.keys(ae[0].params).length>0)return{active:!0,matches:Ky(le,xe,u,!0)}}else return{active:!0,matches:Ky(le,xe,u,!0)||[]};return{active:!1,matches:null}}async function bo(ae,le,xe){if(!c)return{type:"success",matches:ae};let T=ae;for(;;){let D=s==null,$=s||a,A=o;try{await c({path:le,matches:T,patch:(re,he)=>{xe.aborted||rM(re,he,$,A,i)}})}catch(re){return{type:"error",error:re,partialMatches:T}}finally{D&&!xe.aborted&&(a=[...a])}if(xe.aborted)return{type:"aborted"};let L=gc($,le,u);if(L)return{type:"success",matches:L};let ee=Ky($,le,u,!0);if(!ee||T.length===ee.length&&T.every((re,he)=>re.route.id===ee[he].route.id))return{type:"success",matches:null};T=ee}}function Zl(ae){o={},s=k1(ae,i,void 0,o)}function Sf(ae,le){let xe=s==null;rM(ae,le,s||a,o,i),xe&&(a=[...a],$e({}))}return E={get basename(){return u},get future(){return f},get state(){return C},get routes(){return a},get window(){return t},initialize:Ze,subscribe:Le,enableScrollRestoration:hn,navigate:yt,fetch:ye,revalidate:lt,createHref:ae=>e.history.createHref(ae),encodeLocation:ae=>e.history.encodeLocation(ae),getFetcher:Ii,deleteFetcher:yi,dispose:Ae,getBlocker:Xi,deleteBlocker:yo,patchRoutes:Sf,_internalFetchControllers:W,_internalActiveDeferreds:de,_internalSetRoutes:Zl},E}function pae(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function PC(e,t,n,r,i,o,a,s){let u,l;if(a){u=[];for(let f of t)if(u.push(f),f.route.id===a){l=f;break}}else u=t,l=t[t.length-1];let c=xO(i||".",bO(u,o),Mh(e.pathname,n)||e.pathname,s==="path");if(i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&l){let f=SO(c.search);if(l.route.index&&!f)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&f){let h=new URLSearchParams(c.search),p=h.getAll("index");h.delete("index"),p.filter(v=>v).forEach(v=>h.append("index",v));let m=h.toString();c.search=m?"?"+m:""}}return r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:lu([n,c.pathname])),Uc(c)}function JT(e,t,n,r){if(!r||!pae(r))return{path:n};if(r.formMethod&&!Oae(r.formMethod))return{path:n,error:ro(405,{method:r.formMethod})};let i=()=>({path:n,error:ro(400,{type:"invalid-body"})}),o=r.formMethod||"get",a=e?o.toUpperCase():o.toLowerCase(),s=NF(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Da(a))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,m)=>{let[v,b]=m;return""+p+v+"="+b+` +`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Da(a))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:s,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}fn(typeof FormData=="function","FormData is not available in this environment");let u,l;if(r.formData)u=TC(r.formData),l=r.formData;else if(r.body instanceof FormData)u=TC(r.body),l=r.body;else if(r.body instanceof URLSearchParams)u=r.body,l=oM(u);else if(r.body==null)u=new URLSearchParams,l=new FormData;else try{u=new URLSearchParams(r.body),l=oM(u)}catch{return i()}let c={formMethod:a,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Da(c.formMethod))return{path:n,submission:c};let f=Pu(n);return t&&f.search&&SO(f.search)&&u.append("index",""),f.search="?"+u,{path:Uc(f),submission:c}}function eM(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function tM(e,t,n,r,i,o,a,s,u,l,c,f,h,p,m,v){let b=v?Mo(v[1])?v[1].error:v[1].data:void 0,w=e.createURL(t.location),x=e.createURL(i),S=n;o&&t.errors?S=eM(n,Object.keys(t.errors)[0],!0):v&&Mo(v[1])&&(S=eM(n,v[0]));let O=v?v[1].statusCode:void 0,E=a&&O&&O>=400,C=S.filter((M,N)=>{let{route:z}=M;if(z.lazy)return!0;if(z.loader==null)return!1;if(o)return kC(z,t.loaderData,t.errors);if(gae(t.loaderData,t.matches[N],M)||u.some(ne=>ne===M.route.id))return!0;let H=t.matches[N],V=M;return nM(M,ir({currentUrl:w,currentParams:H.params,nextUrl:x,nextParams:V.params},r,{actionResult:b,actionStatus:O,defaultShouldRevalidate:E?!1:s||w.pathname+w.search===x.pathname+x.search||w.search!==x.search||$F(H,V)}))}),k=[];return f.forEach((M,N)=>{if(o||!n.some(Z=>Z.route.id===M.routeId)||c.has(N))return;let z=gc(p,M.path,m);if(!z){k.push({key:N,routeId:M.routeId,path:M.path,matches:null,match:null,controller:null});return}let H=t.fetchers.get(N),V=r0(z,M.path),ne=!1;h.has(N)?ne=!1:l.has(N)?(l.delete(N),ne=!0):H&&H.state!=="idle"&&H.data===void 0?ne=s:ne=nM(V,ir({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:n[n.length-1].params},r,{actionResult:b,actionStatus:O,defaultShouldRevalidate:E?!1:s})),ne&&k.push({key:N,routeId:M.routeId,path:M.path,matches:z,match:V,controller:new AbortController})}),[C,k]}function kC(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function gae(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function $F(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function nM(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function rM(e,t,n,r,i){var o;let a;if(e){let l=r[e];fn(l,"No route found to patch children into: routeId = "+e),l.children||(l.children=[]),a=l.children}else a=n;let s=t.filter(l=>!a.some(c=>IF(l,c))),u=k1(s,i,[e||"_","patch",String(((o=a)==null?void 0:o.length)||"0")],r);a.push(...u)}function IF(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(o=>IF(n,o))}):!1}async function mae(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];fn(i,"No route found in manifest");let o={};for(let a in r){let u=i[a]!==void 0&&a!=="hasErrorBoundary";zc(!u,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!u&&!Boe.has(a)&&(o[a]=r[a])}Object.assign(i,o),Object.assign(i,ir({},t(i),{lazy:void 0}))}async function vae(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,o,a)=>Object.assign(i,{[n[a].route.id]:o}),{})}async function yae(e,t,n,r,i,o,a,s,u,l){let c=o.map(p=>p.route.lazy?mae(p.route,u,s):void 0),f=o.map((p,m)=>{let v=c[m],b=i.some(x=>x.route.id===p.route.id);return ir({},p,{shouldLoad:b,resolve:async x=>(x&&r.method==="GET"&&(p.route.lazy||p.route.loader)&&(b=!0),b?bae(t,r,p,v,x,l):Promise.resolve({type:In.data,result:void 0}))})}),h=await e({matches:f,request:r,params:o[0].params,fetcherKey:a,context:l});try{await Promise.all(c)}catch{}return h}async function bae(e,t,n,r,i,o){let a,s,u=l=>{let c,f=new Promise((m,v)=>c=v);s=()=>c(),t.signal.addEventListener("abort",s);let h=m=>typeof l!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):l({request:t,params:n.params,context:o},...m!==void 0?[m]:[]),p=(async()=>{try{return{type:"data",result:await(i?i(v=>h(v)):h())}}catch(m){return{type:"error",result:m}}})();return Promise.race([p,f])};try{let l=n.route[e];if(r)if(l){let c,[f]=await Promise.all([u(l).catch(h=>{c=h}),r]);if(c!==void 0)throw c;a=f}else if(await r,l=n.route[e],l)a=await u(l);else if(e==="action"){let c=new URL(t.url),f=c.pathname+c.search;throw ro(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:In.data,result:void 0};else if(l)a=await u(l);else{let c=new URL(t.url),f=c.pathname+c.search;throw ro(404,{pathname:f})}fn(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(l){return{type:In.error,result:l}}finally{s&&t.signal.removeEventListener("abort",s)}return a}async function xae(e){let{result:t,type:n}=e;if(LF(t)){let l;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?l=null:l=await t.json():l=await t.text()}catch(c){return{type:In.error,error:c}}return n===In.error?{type:In.error,error:new T1(t.status,t.statusText,l),statusCode:t.status,headers:t.headers}:{type:In.data,data:l,statusCode:t.status,headers:t.headers}}if(n===In.error){if(cM(t)){var r;if(t.data instanceof Error){var i;return{type:In.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new T1(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:In.error,error:t,statusCode:Bx(t)?t.status:void 0}}if(Eae(t)){var o,a;return{type:In.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}if(cM(t)){var s,u;return{type:In.data,data:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:In.data,data:t}}function wae(e,t,n,r,i,o){let a=e.headers.get("Location");if(fn(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!wO.test(a)){let s=r.slice(0,r.findIndex(u=>u.route.id===n)+1);a=PC(new URL(t.url),s,i,!0,a,o),e.headers.set("Location",a)}return e}function iM(e,t,n){if(wO.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Mh(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function Ff(e,t,n,r){let i=e.createURL(NF(t)).toString(),o={signal:n};if(r&&Da(r.formMethod)){let{formMethod:a,formEncType:s}=r;o.method=a.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(r.json)):s==="text/plain"?o.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?o.body=TC(r.formData):o.body=r.formData}return new Request(i,o)}function TC(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function oM(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function _ae(e,t,n,r,i){let o={},a=null,s,u=!1,l={},c=n&&Mo(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let h=f.route.id,p=t[h];if(fn(!xc(p),"Cannot handle redirect results in processLoaderData"),Mo(p)){let m=p.error;c!==void 0&&(m=c,c=void 0),a=a||{};{let v=mc(e,h);a[v.route.id]==null&&(a[v.route.id]=m)}o[h]=void 0,u||(u=!0,s=Bx(p.error)?p.error.status:500),p.headers&&(l[h]=p.headers)}else sl(p)?(r.set(h,p.deferredData),o[h]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!u&&(s=p.statusCode),p.headers&&(l[h]=p.headers)):(o[h]=p.data,p.statusCode&&p.statusCode!==200&&!u&&(s=p.statusCode),p.headers&&(l[h]=p.headers))}),c!==void 0&&n&&(a={[n[0]]:c},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:s||200,loaderHeaders:l}}function aM(e,t,n,r,i,o,a){let{loaderData:s,errors:u}=_ae(t,n,r,a);return i.forEach(l=>{let{key:c,match:f,controller:h}=l,p=o[c];if(fn(p,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(Mo(p)){let m=mc(e.matches,f?.route.id);u&&u[m.route.id]||(u=ir({},u,{[m.route.id]:p.error})),e.fetchers.delete(c)}else if(xc(p))fn(!1,"Unhandled fetcher revalidation redirect");else if(sl(p))fn(!1,"Unhandled fetcher deferred data");else{let m=qu(p.data);e.fetchers.set(c,m)}}),{loaderData:s,errors:u}}function sM(e,t,n,r){let i=ir({},t);for(let o of n){let a=o.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(i[a]=t[a]):e[a]!==void 0&&o.route.loader&&(i[a]=e[a]),r&&r.hasOwnProperty(a))break}return i}function uM(e){return e?Mo(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function mc(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function lM(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ro(e,t){let{pathname:n,routeId:r,method:i,type:o,message:a}=t===void 0?{}:t,s="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?u="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?u="defer() is not supported in actions":o==="invalid-body"&&(u="Unable to encode submission body")):e===403?(s="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",u='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?u="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(u='Invalid request method "'+i.toUpperCase()+'"')),new T1(e||500,s,new Error(u),!0)}function Xv(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(xc(i))return{key:r,result:i}}}function NF(e){let t=typeof e=="string"?Pu(e):e;return Uc(ir({},t,{hash:""}))}function Sae(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Cae(e){return LF(e.result)&&lae.has(e.result.status)}function sl(e){return e.type===In.deferred}function Mo(e){return e.type===In.error}function xc(e){return(e&&e.type)===In.redirect}function cM(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Eae(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function LF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Oae(e){return uae.has(e.toLowerCase())}function Da(e){return aae.has(e.toLowerCase())}async function Aae(e,t,n,r,i){let o=Object.entries(t);for(let a=0;ah?.route.id===s);if(!l)continue;let c=r.find(h=>h.route.id===l.route.id),f=c!=null&&!$F(c,l)&&(i&&i[l.route.id])!==void 0;sl(u)&&f&&await _O(u,n,!1).then(h=>{h&&(t[s]=h)})}}async function Pae(e,t,n){for(let r=0;rl?.route.id===o)&&sl(s)&&(fn(a,"Expected an AbortController for revalidating fetcher deferred result"),await _O(s,a.signal,!0).then(l=>{l&&(t[i]=l)}))}}async function _O(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:In.data,data:e.deferredData.unwrappedData}}catch(i){return{type:In.error,error:i}}return{type:In.data,data:e.deferredData.data}}}function SO(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function r0(e,t){let n=typeof t=="string"?Pu(t).search:t.search;if(e[e.length-1].route.index&&SO(n||""))return e[e.length-1];let r=MF(e);return r[r.length-1]}function fM(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:a}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function nS(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function kae(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function kp(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Tae(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function qu(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Mae(e,t){try{let n=e.sessionStorage.getItem(DF);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function Rae(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(DF,JSON.stringify(n))}catch(r){zc(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.28.1 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function I1(){return I1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),y.useCallback(function(l,c){if(c===void 0&&(c={}),!s.current)return;if(typeof l=="number"){r.go(l);return}let f=TO(l,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:lu([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,a,o,e])}const ese=y.createContext(null);function tse(e){let t=y.useContext(zl).outlet;return t&&y.createElement(ese.Provider,{value:e},t)}function nj(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(pf),{matches:i}=y.useContext(zl),{pathname:o}=bm(),a=JSON.stringify(kO(i,r.v7_relativeSplatPath));return y.useMemo(()=>TO(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function nse(e,t,n,r){ym()||fn(!1);let{navigator:i}=y.useContext(pf),{matches:o}=y.useContext(zl),a=o[o.length-1],s=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let l=bm(),c;c=l;let f=c.pathname||"/",h=f;if(u!=="/"){let v=u.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let p=mc(e,{pathname:h});return sse(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:lu([u,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?u:lu([u,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r)}function rse(){let e=fse(),t=Wx(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 y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,null)}const ise=y.createElement(rse,null);class ose extends y.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?y.createElement(zl.Provider,{value:this.props.routeContext},y.createElement(JF.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ase(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(qx);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(zl.Provider,{value:t},r)}function sse(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let c=a.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);c>=0||fn(!1),a=a.slice(0,Math.min(a.length,c+1))}let u=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,f,h)=>{let p,m=!1,v=null,b=null;n&&(p=s&&f.route.id?s[f.route.id]:void 0,v=f.route.errorElement||ise,u&&(l<0&&h===0?(hse("route-fallback"),m=!0,b=null):l===h&&(m=!0,b=f.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,h+1)),x=()=>{let S;return p?S=v:m?S=b:f.route.Component?S=y.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=c,y.createElement(ase,{match:f,routeContext:{outlet:c,matches:w,isDataRoute:n!=null},children:S})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?y.createElement(ose,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var rj=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(rj||{}),N1=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}(N1||{});function use(e){let t=y.useContext(qx);return t||fn(!1),t}function lse(e){let t=y.useContext(QF);return t||fn(!1),t}function cse(e){let t=y.useContext(zl);return t||fn(!1),t}function ij(e){let t=cse(),n=t.matches[t.matches.length-1];return n.route.id||fn(!1),n.route.id}function fse(){var e;let t=y.useContext(JF),n=lse(N1.UseRouteError),r=ij(N1.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function dse(){let{router:e}=use(rj.UseNavigateStable),t=ij(N1.UseNavigateStable),n=y.useRef(!1);return ej(()=>{n.current=!0}),y.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,I1({fromRouteId:t},o)))},[e,t])}const _M={};function hse(e,t,n){_M[e]||(_M[e]=!0)}const SM={};function pse(e,t){SM[t]||(SM[t]=!0,console.warn(t))}const zf=(e,t,n)=>pse(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function gse(e,t){e?.v7_startTransition===void 0&&zf("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),e?.v7_relativeSplatPath===void 0&&(!t||!t.v7_relativeSplatPath)&&zf("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&zf("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&zf("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&zf("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&zf("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function bYe(e){return tse(e.context)}function mse(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:o,static:a=!1,future:s}=e;ym()&&fn(!1);let u=t.replace(/^\/*/,"/"),l=y.useMemo(()=>({basename:u,navigator:o,static:a,future:I1({v7_relativeSplatPath:!1},s)}),[u,s,o,a]);typeof r=="string"&&(r=ku(r));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:m="default"}=r,v=y.useMemo(()=>{let b=$h(c,u);return b==null?null:{location:{pathname:b,search:f,hash:h,state:p,key:m},navigationType:i}},[u,c,f,h,p,m,i]);return v==null?null:y.createElement(pf.Provider,{value:l},y.createElement($O.Provider,{children:n,value:v}))}new Promise(()=>{});function vse(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function M1(){return M1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),y.useCallback(function(l,c){if(c===void 0&&(c={}),!s.current)return;if(typeof l=="number"){r.go(l);return}let f=xO(l,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:lu([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,a,o,e])}const Iae=y.createContext(null);function Nae(e){let t=y.useContext(Bl).outlet;return t&&y.createElement(Iae.Provider,{value:e},t)}function UF(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(df),{matches:i}=y.useContext(Bl),{pathname:o}=gm(),a=JSON.stringify(bO(i,r.v7_relativeSplatPath));return y.useMemo(()=>xO(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function Lae(e,t,n,r){pm()||fn(!1);let{navigator:i}=y.useContext(df),{matches:o}=y.useContext(Bl),a=o[o.length-1],s=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let l=gm(),c;c=l;let f=c.pathname||"/",h=f;if(u!=="/"){let v=u.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let p=gc(e,{pathname:h});return Uae(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:lu([u,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?u:lu([u,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r)}function Fae(){let e=Kae(),t=Bx(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 y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,null)}const jae=y.createElement(Fae,null);class Bae extends y.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?y.createElement(Bl.Provider,{value:this.props.routeContext},y.createElement(jF.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function zae(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(zx);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Bl.Provider,{value:t},r)}function Uae(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let c=a.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);c>=0||fn(!1),a=a.slice(0,Math.min(a.length,c+1))}let u=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,f,h)=>{let p,m=!1,v=null,b=null;n&&(p=s&&f.route.id?s[f.route.id]:void 0,v=f.route.errorElement||jae,u&&(l<0&&h===0?(Gae("route-fallback"),m=!0,b=null):l===h&&(m=!0,b=f.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,h+1)),x=()=>{let S;return p?S=v:m?S=b:f.route.Component?S=y.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=c,y.createElement(zae,{match:f,routeContext:{outlet:c,matches:w,isDataRoute:n!=null},children:S})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?y.createElement(Bae,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var VF=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(VF||{}),R1=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}(R1||{});function Vae(e){let t=y.useContext(zx);return t||fn(!1),t}function Wae(e){let t=y.useContext(FF);return t||fn(!1),t}function Hae(e){let t=y.useContext(Bl);return t||fn(!1),t}function WF(e){let t=Hae(),n=t.matches[t.matches.length-1];return n.route.id||fn(!1),n.route.id}function Kae(){var e;let t=y.useContext(jF),n=Wae(R1.UseRouteError),r=WF(R1.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function qae(){let{router:e}=Vae(VF.UseNavigateStable),t=WF(R1.UseNavigateStable),n=y.useRef(!1);return BF(()=>{n.current=!0}),y.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,M1({fromRouteId:t},o)))},[e,t])}const dM={};function Gae(e,t,n){dM[e]||(dM[e]=!0)}const hM={};function Yae(e,t){hM[t]||(hM[t]=!0,console.warn(t))}const jf=(e,t,n)=>Yae(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Zae(e,t){e?.v7_startTransition===void 0&&jf("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),e?.v7_relativeSplatPath===void 0&&(!t||!t.v7_relativeSplatPath)&&jf("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&jf("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&jf("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&jf("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&jf("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function FGe(e){return Nae(e.context)}function Xae(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:o,static:a=!1,future:s}=e;pm()&&fn(!1);let u=t.replace(/^\/*/,"/"),l=y.useMemo(()=>({basename:u,navigator:o,static:a,future:M1({v7_relativeSplatPath:!1},s)}),[u,s,o,a]);typeof r=="string"&&(r=Pu(r));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:m="default"}=r,v=y.useMemo(()=>{let b=Mh(c,u);return b==null?null:{location:{pathname:b,search:f,hash:h,state:p,key:m},navigationType:i}},[u,c,f,h,p,m,i]);return v==null?null:y.createElement(df.Provider,{value:l},y.createElement(CO.Provider,{children:n,value:v}))}new Promise(()=>{});function Qae(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.28.1 * * Copyright (c) Remix Software Inc. @@ -65,7 +65,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function J0(){return J0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function bse(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function xse(e,t){return e.button===0&&(!t||t==="_self")&&!bse(e)}function LC(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function wse(e,t){let n=LC(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const _se=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Sse="6";try{window.__reactRouterVersion=Sse}catch{}function xYe(e,t){return Rae({basename:void 0,future:J0({},void 0,{v7_prependBasename:!0}),history:nae({window:void 0}),hydrationData:Cse(),routes:e,mapRouteProperties:vse,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function Cse(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=J0({},t,{errors:Ese(t.errors)})),t}function Ese(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new $1(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let a=new o(i.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const Ose=y.createContext({isTransitioning:!1}),Ase=y.createContext(new Map),Pse="startTransition",CM=F4[Pse],kse="flushSync",EM=tae[kse];function Tse(e){CM?CM(e):e()}function Dp(e){EM?EM(e):e()}class Mse{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function wYe(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=y.useState(n.state),[a,s]=y.useState(),[u,l]=y.useState({isTransitioning:!1}),[c,f]=y.useState(),[h,p]=y.useState(),[m,v]=y.useState(),b=y.useRef(new Map),{v7_startTransition:w}=r||{},x=y.useCallback(M=>{w?Tse(M):M()},[w]),S=y.useCallback((M,N)=>{let{deletedFetchers:q,flushSync:Y,viewTransitionOpts:W}=N;q.forEach(Z=>b.current.delete(Z)),M.fetchers.forEach((Z,R)=>{Z.data!==void 0&&b.current.set(R,Z.data)});let ne=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!W||ne){Y?Dp(()=>o(M)):x(()=>o(M));return}if(Y){Dp(()=>{h&&(c&&c.resolve(),h.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:W.currentLocation,nextLocation:W.nextLocation})});let Z=n.window.document.startViewTransition(()=>{Dp(()=>o(M))});Z.finished.finally(()=>{Dp(()=>{f(void 0),p(void 0),s(void 0),l({isTransitioning:!1})})}),Dp(()=>p(Z));return}h?(c&&c.resolve(),h.skipTransition(),v({state:M,currentLocation:W.currentLocation,nextLocation:W.nextLocation})):(s(M),l({isTransitioning:!0,flushSync:!1,currentLocation:W.currentLocation,nextLocation:W.nextLocation}))},[n.window,h,c,b,x]);y.useLayoutEffect(()=>n.subscribe(S),[n,S]),y.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new Mse)},[u]),y.useEffect(()=>{if(c&&a&&n.window){let M=a,N=c.promise,q=n.window.document.startViewTransition(async()=>{x(()=>o(M)),await N});q.finished.finally(()=>{f(void 0),p(void 0),s(void 0),l({isTransitioning:!1})}),p(q)}},[x,a,c,n.window]),y.useEffect(()=>{c&&a&&i.location.key===a.location.key&&c.resolve()},[c,h,i.location,a]),y.useEffect(()=>{!u.isTransitioning&&m&&(s(m.state),l({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),v(void 0))},[u.isTransitioning,m]),y.useEffect(()=>{},[]);let O=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:M=>n.navigate(M),push:(M,N,q)=>n.navigate(M,{state:N,preventScrollReset:q?.preventScrollReset}),replace:(M,N,q)=>n.navigate(M,{replace:!0,state:N,preventScrollReset:q?.preventScrollReset})}),[n]),E=n.basename||"/",C=y.useMemo(()=>({router:n,navigator:O,static:!1,basename:E}),[n,O,E]),k=y.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return y.useEffect(()=>gse(r,n.future),[r,n.future]),y.createElement(y.Fragment,null,y.createElement(qx.Provider,{value:C},y.createElement(QF.Provider,{value:i},y.createElement(Ase.Provider,{value:b.current},y.createElement(Ose.Provider,{value:u},y.createElement(mse,{basename:E,location:i.location,navigationType:i.historyAction,navigator:O,future:k},i.initialized||n.future.v7_partialHydration?y.createElement(Rse,{routes:n.routes,future:n.future,state:i}):t))))),null)}const Rse=y.memo(Dse);function Dse(e){let{routes:t,future:n,state:r}=e;return nse(t,void 0,r,n)}const $se=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ise=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_Ye=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:u,to:l,preventScrollReset:c,viewTransition:f}=t,h=yse(t,_se),{basename:p}=y.useContext(pf),m,v=!1;if(typeof l=="string"&&Ise.test(l)&&(m=l,$se))try{let S=new URL(window.location.href),O=l.startsWith("//")?new URL(S.protocol+l):new URL(l),E=$h(O.pathname,p);O.origin===S.origin&&E!=null?l=E+O.search+O.hash:v=!0}catch{}let b=Qae(l,{relative:i}),w=Nse(l,{replace:a,state:s,target:u,preventScrollReset:c,relative:i,viewTransition:f});function x(S){r&&r(S),S.defaultPrevented||w(S)}return y.createElement("a",J0({},h,{href:m||b,onClick:v||o?r:x,ref:n,target:u}))});var OM;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(OM||(OM={}));var AM;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(AM||(AM={}));function Nse(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:s}=t===void 0?{}:t,u=tj(),l=bm(),c=nj(e,{relative:a});return y.useCallback(f=>{if(xse(f,n)){f.preventDefault();let h=r!==void 0?r:Hc(l)===Hc(c);u(e,{replace:h,state:i,preventScrollReset:o,relative:a,viewTransition:s})}},[l,u,c,r,i,n,e,o,a,s])}function SYe(e){let t=y.useRef(LC(e)),n=y.useRef(!1),r=bm(),i=y.useMemo(()=>wse(r.search,n.current?null:t.current),[r.search]),o=tj(),a=y.useCallback((s,u)=>{const l=LC(typeof s=="function"?s(i):s);n.current=!0,o("?"+l,u)},[o,i]);return[i,a]}var oj={exports:{}},aj={};/** + */function Z0(){return Z0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function ese(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tse(e,t){return e.button===0&&(!t||t==="_self")&&!ese(e)}function MC(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function nse(e,t){let n=MC(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const rse=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ise="6";try{window.__reactRouterVersion=ise}catch{}function jGe(e,t){return hae({basename:void 0,future:Z0({},void 0,{v7_prependBasename:!0}),history:Loe({window:void 0}),hydrationData:ose(),routes:e,mapRouteProperties:Qae,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function ose(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Z0({},t,{errors:ase(t.errors)})),t}function ase(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new T1(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let a=new o(i.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const sse=y.createContext({isTransitioning:!1}),use=y.createContext(new Map),lse="startTransition",pM=P4[lse],cse="flushSync",gM=Noe[cse];function fse(e){pM?pM(e):e()}function Tp(e){gM?gM(e):e()}class dse{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function BGe(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=y.useState(n.state),[a,s]=y.useState(),[u,l]=y.useState({isTransitioning:!1}),[c,f]=y.useState(),[h,p]=y.useState(),[m,v]=y.useState(),b=y.useRef(new Map),{v7_startTransition:w}=r||{},x=y.useCallback(M=>{w?fse(M):M()},[w]),S=y.useCallback((M,N)=>{let{deletedFetchers:z,flushSync:H,viewTransitionOpts:V}=N;z.forEach(Z=>b.current.delete(Z)),M.fetchers.forEach((Z,G)=>{Z.data!==void 0&&b.current.set(G,Z.data)});let ne=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!V||ne){H?Tp(()=>o(M)):x(()=>o(M));return}if(H){Tp(()=>{h&&(c&&c.resolve(),h.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:V.currentLocation,nextLocation:V.nextLocation})});let Z=n.window.document.startViewTransition(()=>{Tp(()=>o(M))});Z.finished.finally(()=>{Tp(()=>{f(void 0),p(void 0),s(void 0),l({isTransitioning:!1})})}),Tp(()=>p(Z));return}h?(c&&c.resolve(),h.skipTransition(),v({state:M,currentLocation:V.currentLocation,nextLocation:V.nextLocation})):(s(M),l({isTransitioning:!0,flushSync:!1,currentLocation:V.currentLocation,nextLocation:V.nextLocation}))},[n.window,h,c,b,x]);y.useLayoutEffect(()=>n.subscribe(S),[n,S]),y.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new dse)},[u]),y.useEffect(()=>{if(c&&a&&n.window){let M=a,N=c.promise,z=n.window.document.startViewTransition(async()=>{x(()=>o(M)),await N});z.finished.finally(()=>{f(void 0),p(void 0),s(void 0),l({isTransitioning:!1})}),p(z)}},[x,a,c,n.window]),y.useEffect(()=>{c&&a&&i.location.key===a.location.key&&c.resolve()},[c,h,i.location,a]),y.useEffect(()=>{!u.isTransitioning&&m&&(s(m.state),l({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),v(void 0))},[u.isTransitioning,m]),y.useEffect(()=>{},[]);let O=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:M=>n.navigate(M),push:(M,N,z)=>n.navigate(M,{state:N,preventScrollReset:z?.preventScrollReset}),replace:(M,N,z)=>n.navigate(M,{replace:!0,state:N,preventScrollReset:z?.preventScrollReset})}),[n]),E=n.basename||"/",C=y.useMemo(()=>({router:n,navigator:O,static:!1,basename:E}),[n,O,E]),k=y.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return y.useEffect(()=>Zae(r,n.future),[r,n.future]),y.createElement(y.Fragment,null,y.createElement(zx.Provider,{value:C},y.createElement(FF.Provider,{value:i},y.createElement(use.Provider,{value:b.current},y.createElement(sse.Provider,{value:u},y.createElement(Xae,{basename:E,location:i.location,navigationType:i.historyAction,navigator:O,future:k},i.initialized||n.future.v7_partialHydration?y.createElement(hse,{routes:n.routes,future:n.future,state:i}):t))))),null)}const hse=y.memo(pse);function pse(e){let{routes:t,future:n,state:r}=e;return Lae(t,void 0,r,n)}const gse=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mse=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zGe=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:u,to:l,preventScrollReset:c,viewTransition:f}=t,h=Jae(t,rse),{basename:p}=y.useContext(df),m,v=!1;if(typeof l=="string"&&mse.test(l)&&(m=l,gse))try{let S=new URL(window.location.href),O=l.startsWith("//")?new URL(S.protocol+l):new URL(l),E=Mh(O.pathname,p);O.origin===S.origin&&E!=null?l=E+O.search+O.hash:v=!0}catch{}let b=Dae(l,{relative:i}),w=vse(l,{replace:a,state:s,target:u,preventScrollReset:c,relative:i,viewTransition:f});function x(S){r&&r(S),S.defaultPrevented||w(S)}return y.createElement("a",Z0({},h,{href:m||b,onClick:v||o?r:x,ref:n,target:u}))});var mM;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(mM||(mM={}));var vM;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(vM||(vM={}));function vse(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:s}=t===void 0?{}:t,u=zF(),l=gm(),c=UF(e,{relative:a});return y.useCallback(f=>{if(tse(f,n)){f.preventDefault();let h=r!==void 0?r:Uc(l)===Uc(c);u(e,{replace:h,state:i,preventScrollReset:o,relative:a,viewTransition:s})}},[l,u,c,r,i,n,e,o,a,s])}function UGe(e){let t=y.useRef(MC(e)),n=y.useRef(!1),r=gm(),i=y.useMemo(()=>nse(r.search,n.current?null:t.current),[r.search]),o=zF(),a=y.useCallback((s,u)=>{const l=MC(typeof s=="function"?s(i):s);n.current=!0,o("?"+l,u)},[o,i]);return[i,a]}var HF={exports:{}},KF={};/** * @license React * use-sync-external-store-with-selector.production.js * @@ -73,23 +73,23 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var xm=y;function Lse(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Fse=typeof Object.is=="function"?Object.is:Lse,jse=xm.useSyncExternalStore,Bse=xm.useRef,zse=xm.useEffect,Use=xm.useMemo,Hse=xm.useDebugValue;aj.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Bse(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Use(function(){function u(p){if(!l){if(l=!0,c=p,p=r(p),i!==void 0&&a.hasValue){var m=a.value;if(i(m,p))return f=m}return f=p}if(m=f,Fse(c,p))return m;var v=r(p);return i!==void 0&&i(m,v)?(c=p,m):(c=p,f=v)}var l=!1,c,f,h=n===void 0?null:n;return[function(){return u(t())},h===null?void 0:function(){return u(h())}]},[t,n,r,i]);var s=jse(e,o[0],o[1]);return zse(function(){a.hasValue=!0,a.value=s},[s]),Hse(s),s};oj.exports=aj;var Vse=oj.exports;function Wse(e){e()}function qse(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Wse(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var PM={notify(){},get:()=>[]};function Kse(e,t){let n,r=PM,i=0,o=!1;function a(v){c();const b=r.subscribe(v);let w=!1;return()=>{w||(w=!0,b(),f())}}function s(){r.notify()}function u(){m.onStateChange&&m.onStateChange()}function l(){return o}function c(){i++,n||(n=e.subscribe(u),r=qse())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=PM)}function h(){o||(o=!0,c())}function p(){o&&(o=!1,f())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:p,getListeners:()=>r};return m}var Gse=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Yse=Gse(),Zse=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Xse=Zse(),Qse=()=>Yse||Xse?y.useLayoutEffect:y.useEffect,Jse=Qse(),eue=Symbol.for("react-redux-context"),tue=typeof globalThis<"u"?globalThis:{};function nue(){if(!y.createContext)return{};const e=tue[eue]??=new Map;let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var Al=nue();function rue(e){const{children:t,context:n,serverState:r,store:i}=e,o=y.useMemo(()=>{const u=Kse(i);return{store:i,subscription:u,getServerState:r?()=>r:void 0}},[i,r]),a=y.useMemo(()=>i.getState(),[i]);Jse(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,a]);const s=n||Al;return y.createElement(s.Provider,{value:o},t)}var CYe=rue;function IO(e=Al){return function(){return y.useContext(e)}}var sj=IO();function uj(e=Al){const t=e===Al?sj:IO(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var iue=uj();function oue(e=Al){const t=e===Al?iue:uj(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var EYe=oue(),aue=(e,t)=>e===t;function sue(e=Al){const t=e===Al?sj:IO(e),n=(r,i={})=>{const{equalityFn:o=aue}=typeof i=="function"?{equalityFn:i}:i,a=t(),{store:s,subscription:u,getServerState:l}=a;y.useRef(!0);const c=y.useCallback({[r.name](h){return r(h)}}[r.name],[r]),f=Vse.useSyncExternalStoreWithSelector(u.addNestedSub,s.getState,l||s.getState,c,o);return y.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var OYe=sue();function kM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kx(...e){return t=>{let n=!1;const r=e.map(i=>{const o=kM(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(uue);if(o){const a=o.props.children,s=i.map(u=>u===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:u);return L.jsx(FC,{...r,ref:t,children:y.isValidElement(a)?y.cloneElement(a,void 0,s):null})}return L.jsx(FC,{...r,ref:t,children:n})});Pl.displayName="Slot";var FC=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const i=cue(n);return y.cloneElement(n,{...lue(r,n.props),ref:t?Kx(t,i):i})}return y.Children.count(n)>1?y.Children.only(null):null});FC.displayName="SlotClone";var NO=({children:e})=>L.jsx(L.Fragment,{children:e});function uue(e){return y.isValidElement(e)&&e.type===NO}function lue(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function cue(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function lj(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;ttypeof e=="boolean"?`${e}`:e===0?"0":e,MM=dn,AYe=(e,t)=>n=>{var r;if(t?.variants==null)return MM(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(l=>{const c=n?.[l],f=o?.[l];if(c===null)return null;const h=TM(c)||TM(f);return i[l][h]}),s=n&&Object.entries(n).reduce((l,c)=>{let[f,h]=c;return h===void 0||(l[f]=h),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:f,className:h,...p}=c;return Object.entries(p).every(m=>{let[v,b]=m;return Array.isArray(b)?b.includes({...o,...s}[v]):{...o,...s}[v]===b})?[...l,f,h]:l},[]);return MM(e,a,u,n?.class,n?.className)},LO="-",fue=e=>{const t=hue(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(LO);return s[0]===""&&s.length!==1&&s.shift(),cj(s,t)||due(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},cj=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?cj(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(LO);return t.validators.find(({validator:a})=>a(o))?.classGroupId},RM=/^\[(.+)\]$/,due=e=>{if(RM.test(e)){const t=RM.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},hue=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return gue(Object.entries(e.classGroups),n).forEach(([o,a])=>{jC(a,r,o,t)}),r},jC=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:DM(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(pue(i)){jC(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{jC(a,DM(t,o),n,r)})})},DM=(e,t)=>{let n=e;return t.split(LO).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},pue=e=>e.isThemeGetter,gue=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[n,i]}):e,mue=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},fj="!",vue=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=s=>{const u=[];let l=0,c=0,f;for(let b=0;bc?f-c:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}};return n?s=>n({className:s,parseClassName:a}):a},yue=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},bue=e=>({cache:mue(e.cacheSize),parseClassName:vue(e),...fue(e)}),xue=/\s+/,wue=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(xue);let s="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{modifiers:c,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(l);let m=!!p,v=r(m?h.substring(0,p):h);if(!v){if(!m){s=l+(s.length>0?" "+s:s);continue}if(v=r(h),!v){s=l+(s.length>0?" "+s:s);continue}m=!1}const b=yue(c).join(":"),w=f?b+fj:b,x=w+v;if(o.includes(x))continue;o.push(x);const S=i(v,m);for(let O=0;O0?" "+s:s)}return s};function _ue(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(c),e());return n=bue(l),r=n.cache.get,i=n.cache.set,o=s,s(u)}function s(u){const l=r(u);if(l)return l;const c=wue(u,n);return i(u,c),c}return function(){return o(_ue.apply(null,arguments))}}const Qn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},hj=/^\[(?:([a-z-]+):)?(.+)\]$/i,Cue=/^\d+\/\d+$/,Eue=new Set(["px","full","screen"]),Oue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Aue=/\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$/,Pue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Tue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qs=e=>Ad(e)||Eue.has(e)||Cue.test(e),Wu=e=>Ih(e,"length",Fue),Ad=e=>!!e&&!Number.isNaN(Number(e)),uS=e=>Ih(e,"number",Ad),$p=e=>!!e&&Number.isInteger(Number(e)),Mue=e=>e.endsWith("%")&&Ad(e.slice(0,-1)),Xt=e=>hj.test(e),qu=e=>Oue.test(e),Rue=new Set(["length","size","percentage"]),Due=e=>Ih(e,Rue,pj),$ue=e=>Ih(e,"position",pj),Iue=new Set(["image","url"]),Nue=e=>Ih(e,Iue,Bue),Lue=e=>Ih(e,"",jue),Ip=()=>!0,Ih=(e,t,n)=>{const r=hj.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Fue=e=>Aue.test(e)&&!Pue.test(e),pj=()=>!1,jue=e=>kue.test(e),Bue=e=>Tue.test(e),zue=()=>{const e=Qn("colors"),t=Qn("spacing"),n=Qn("blur"),r=Qn("brightness"),i=Qn("borderColor"),o=Qn("borderRadius"),a=Qn("borderSpacing"),s=Qn("borderWidth"),u=Qn("contrast"),l=Qn("grayscale"),c=Qn("hueRotate"),f=Qn("invert"),h=Qn("gap"),p=Qn("gradientColorStops"),m=Qn("gradientColorStopPositions"),v=Qn("inset"),b=Qn("margin"),w=Qn("opacity"),x=Qn("padding"),S=Qn("saturate"),O=Qn("scale"),E=Qn("sepia"),C=Qn("skew"),k=Qn("space"),M=Qn("translate"),N=()=>["auto","contain","none"],q=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",Xt,t],W=()=>[Xt,t],ne=()=>["",qs,Wu],Z=()=>["auto",Ad,Xt],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",Xt],G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[Ad,Xt];return{cacheSize:500,separator:":",theme:{colors:[Ip],spacing:[qs,Wu],blur:["none","",qu,Xt],brightness:oe(),borderColor:[e],borderRadius:["none","","full",qu,Xt],borderSpacing:W(),borderWidth:ne(),contrast:oe(),grayscale:V(),hueRotate:oe(),invert:V(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[Mue,Wu],inset:Y(),margin:Y(),opacity:oe(),padding:W(),saturate:oe(),scale:oe(),sepia:V(),skew:oe(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Xt]}],container:["container"],columns:[{columns:[qu]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"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:[...R(),Xt]}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",$p,Xt]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Xt]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",$p,Xt]}],"grid-cols":[{"grid-cols":[Ip]}],"col-start-end":[{col:["auto",{span:["full",$p,Xt]},Xt]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Ip]}],"row-start-end":[{row:["auto",{span:[$p,Xt]},Xt]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Xt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Xt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"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:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Xt,t]}],"min-w":[{"min-w":[Xt,t,"min","max","fit"]}],"max-w":[{"max-w":[Xt,t,"none","full","min","max","fit","prose",{screen:[qu]},qu]}],h:[{h:[Xt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Xt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Xt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Xt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qu,Wu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",uS]}],"font-family":[{font:[Ip]}],"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",Xt]}],"line-clamp":[{"line-clamp":["none",Ad,uS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qs,Xt]}],"list-image":[{"list-image":["none",Xt]}],"list-style-type":[{list:["none","disc","decimal",Xt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qs,Wu]}],"underline-offset":[{"underline-offset":["auto",qs,Xt]}],"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:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Xt]}],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",Xt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),$ue]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Due]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Nue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"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":[w]}],"border-style":[{border:[...B(),"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":[w]}],"divide-style":[{divide:B()}],"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:["",...B()]}],"outline-offset":[{"outline-offset":[qs,Xt]}],"outline-w":[{outline:[qs,Wu]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[qs,Wu]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qu,Lue]}],"shadow-color":[{shadow:[Ip]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",qu,Xt]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Xt]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",Xt]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Xt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[$p,Xt]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Xt]}],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",Xt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"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",Xt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[qs,Wu,uS]}],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"]}}},PYe=Sue(zue);var gj={exports:{}},Uue="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Hue=Uue,Vue=Hue;function mj(){}function vj(){}vj.resetWarningCache=mj;var Wue=function(){function e(r,i,o,a,s,u){if(u!==Vue){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:vj,resetWarningCache:mj};return n.PropTypes=n,n};gj.exports=Wue();var que=gj.exports;const Mt=En(que);var Kue={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"},Gue=Object.defineProperty,Yue=Object.defineProperties,Zue=Object.getOwnPropertyDescriptors,L1=Object.getOwnPropertySymbols,yj=Object.prototype.hasOwnProperty,bj=Object.prototype.propertyIsEnumerable,$M=(e,t,n)=>t in e?Gue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IM=(e,t)=>{for(var n in t||(t={}))yj.call(t,n)&&$M(e,n,t[n]);if(L1)for(var n of L1(t))bj.call(t,n)&&$M(e,n,t[n]);return e},Xue=(e,t)=>Yue(e,Zue(t)),Que=(e,t)=>{var n={};for(var r in e)yj.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&L1)for(var r of L1(e))t.indexOf(r)<0&&bj.call(e,r)&&(n[r]=e[r]);return n},On=(e,t,n)=>{const r=y.forwardRef((i,o)=>{var a=i,{color:s="currentColor",size:u=24,stroke:l=2,children:c}=a,f=Que(a,["color","size","stroke","children"]);return y.createElement("svg",IM(Xue(IM({ref:o},Kue),{width:u,height:u,stroke:s,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),f),[...n.map(([h,p])=>y.createElement(h,p)),...c||[]])});return r.propTypes={color:Mt.string,size:Mt.oneOfType([Mt.string,Mt.number]),stroke:Mt.oneOfType([Mt.string,Mt.number])},r.displayName=`${t}`,r},kYe=On("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),TYe=On("brand-telegram","IconBrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),MYe=On("building-store","IconBuildingStore",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 7v1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1h-18l2 -4h14l2 4",key:"svg-1"}],["path",{d:"M5 21l0 -10.15",key:"svg-2"}],["path",{d:"M19 21l0 -10.15",key:"svg-3"}],["path",{d:"M9 21v-4a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v4",key:"svg-4"}]]),RYe=On("building","IconBuilding",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M9 8l1 0",key:"svg-1"}],["path",{d:"M9 12l1 0",key:"svg-2"}],["path",{d:"M9 16l1 0",key:"svg-3"}],["path",{d:"M14 8l1 0",key:"svg-4"}],["path",{d:"M14 12l1 0",key:"svg-5"}],["path",{d:"M14 16l1 0",key:"svg-6"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16",key:"svg-7"}]]),DYe=On("cash","IconCash",[["path",{d:"M7 9m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M17 9v-2a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h2",key:"svg-2"}]]),$Ye=On("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),IYe=On("chevrons-left","IconChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]]),NYe=On("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),LYe=On("credit-card","IconCreditCard",[["path",{d:"M3 5m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M7 15l.01 0",key:"svg-2"}],["path",{d:"M11 15l2 0",key:"svg-3"}]]),FYe=On("dashboard","IconDashboard",[["path",{d:"M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M13.45 11.55l2.05 -2.05",key:"svg-1"}],["path",{d:"M6.4 20a9 9 0 1 1 11.2 0z",key:"svg-2"}]]),jYe=On("device-desktop","IconDeviceDesktop",[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10z",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}]]),BYe=On("discount-check","IconDiscountCheck",[["path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),zYe=On("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),UYe=On("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),HYe=On("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),VYe=On("loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]),WYe=On("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),qYe=On("mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]),KYe=On("menu-2","IconMenu2",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]]),GYe=On("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),YYe=On("news","IconNews",[["path",{d:"M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11",key:"svg-0"}],["path",{d:"M8 8l4 0",key:"svg-1"}],["path",{d:"M8 12l4 0",key:"svg-2"}],["path",{d:"M8 16l4 0",key:"svg-3"}]]),ZYe=On("route","IconRoute",[["path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4z",key:"svg-1"}],["path",{d:"M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5",key:"svg-2"}]]),XYe=On("server-bolt","IconServerBolt",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12",key:"svg-1"}],["path",{d:"M7 8v.01",key:"svg-2"}],["path",{d:"M7 16v.01",key:"svg-3"}],["path",{d:"M20 15l-2 3h3l-2 3",key:"svg-4"}]]),QYe=On("server","IconServer",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]]),JYe=On("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),eZe=On("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),tZe=On("ticket","IconTicket",[["path",{d:"M15 5l0 2",key:"svg-0"}],["path",{d:"M15 11l0 2",key:"svg-1"}],["path",{d:"M15 17l0 2",key:"svg-2"}],["path",{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2",key:"svg-3"}]]),nZe=On("user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]]),rZe=On("user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]),iZe=On("users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]),oZe=On("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function fi(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Jue=typeof Symbol=="function"&&Symbol.observable||"@@observable",NM=Jue,lS=()=>Math.random().toString(36).substring(7).split("").join("."),ele={INIT:`@@redux/INIT${lS()}`,REPLACE:`@@redux/REPLACE${lS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lS()}`},F1=ele;function FO(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function xj(e,t,n){if(typeof e!="function")throw new Error(fi(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(fi(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(fi(1));return n(xj)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,u=!1;function l(){a===o&&(a=new Map,o.forEach((b,w)=>{a.set(w,b)}))}function c(){if(u)throw new Error(fi(3));return i}function f(b){if(typeof b!="function")throw new Error(fi(4));if(u)throw new Error(fi(5));let w=!0;l();const x=s++;return a.set(x,b),function(){if(w){if(u)throw new Error(fi(6));w=!1,l(),a.delete(x),o=null}}}function h(b){if(!FO(b))throw new Error(fi(7));if(typeof b.type>"u")throw new Error(fi(8));if(typeof b.type!="string")throw new Error(fi(17));if(u)throw new Error(fi(9));try{u=!0,i=r(i,b)}finally{u=!1}return(o=a).forEach(x=>{x()}),b}function p(b){if(typeof b!="function")throw new Error(fi(10));r=b,h({type:F1.REPLACE})}function m(){const b=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(fi(11));function x(){const O=w;O.next&&O.next(c())}return x(),{unsubscribe:b(x)}},[NM](){return this}}}return h({type:F1.INIT}),{dispatch:h,subscribe:f,getState:c,replaceReducer:p,[NM]:m}}function tle(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:F1.INIT})>"u")throw new Error(fi(12));if(typeof n(void 0,{type:F1.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fi(13))})}function nle(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw s&&s.type,new Error(fi(14));l[f]=m,u=u||m!==p}return u=u||r.length!==Object.keys(a).length,u?l:a}}function j1(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function rle(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(fi(15))};const a={getState:i.getState,dispatch:(u,...l)=>o(u,...l)},s=e.map(u=>u(a));return o=j1(...s)(i.dispatch),{...i,dispatch:o}}}function ile(e){return FO(e)&&"type"in e&&typeof e.type=="string"}var wj=Symbol.for("immer-nothing"),LM=Symbol.for("immer-draftable"),Uo=Symbol.for("immer-state");function Fa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Gd=Object.getPrototypeOf;function Vc(e){return!!e&&!!e[Uo]}function bu(e){return e?_j(e)||Array.isArray(e)||!!e[LM]||!!e.constructor?.[LM]||Yx(e)||Zx(e):!1}var ole=Object.prototype.constructor.toString();function _j(e){if(!e||typeof e!="object")return!1;const t=Gd(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===ole}function B1(e,t){Gx(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Gx(e){const t=e[Uo];return t?t.type_:Array.isArray(e)?1:Yx(e)?2:Zx(e)?3:0}function BC(e,t){return Gx(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Sj(e,t,n){const r=Gx(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function ale(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Yx(e){return e instanceof Map}function Zx(e){return e instanceof Set}function cc(e){return e.copy_||e.base_}function zC(e,t){if(Yx(e))return new Map(e);if(Zx(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&_j(e))return Gd(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Uo];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=sle),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>jO(r,!0))),e}function sle(){Fa(2)}function Xx(e){return Object.isFrozen(e)}var ule={};function Wc(e){const t=ule[e];return t||Fa(0,e),t}var eg;function Cj(){return eg}function lle(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function FM(e,t){t&&(Wc("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function UC(e){HC(e),e.drafts_.forEach(cle),e.drafts_=null}function HC(e){e===eg&&(eg=e.parent_)}function jM(e){return eg=lle(eg,e)}function cle(e){const t=e[Uo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function BM(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Uo].modified_&&(UC(t),Fa(4)),bu(e)&&(e=z1(t,e),t.parent_||U1(t,e)),t.patches_&&Wc("Patches").generateReplacementPatches_(n[Uo].base_,e,t.patches_,t.inversePatches_)):e=z1(t,n,[]),UC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wj?e:void 0}function z1(e,t,n){if(Xx(t))return t;const r=t[Uo];if(!r)return B1(t,(i,o)=>zM(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return U1(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),B1(o,(s,u)=>zM(e,r,i,s,u,n,a)),U1(e,i,!1),n&&e.patches_&&Wc("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function zM(e,t,n,r,i,o,a){if(Vc(i)){const s=o&&t&&t.type_!==3&&!BC(t.assigned_,r)?o.concat(r):void 0,u=z1(e,i,s);if(Sj(n,r,u),Vc(u))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(bu(i)&&!Xx(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;z1(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&U1(e,i)}}function U1(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&jO(t,n)}function fle(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Cj(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=BO;n&&(i=[r],o=tg);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var BO={get(e,t){if(t===Uo)return e;const n=cc(e);if(!BC(n,t))return dle(e,n,t);const r=n[t];return e.finalized_||!bu(r)?r:r===cS(e.base_,t)?(fS(e),e.copy_[t]=WC(r,e)):r},has(e,t){return t in cc(e)},ownKeys(e){return Reflect.ownKeys(cc(e))},set(e,t,n){const r=Ej(cc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=cS(cc(e),t),o=i?.[Uo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(ale(n,i)&&(n!==void 0||BC(e.base_,t)))return!0;fS(e),VC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return cS(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fS(e),VC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=cc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Fa(11)},getPrototypeOf(e){return Gd(e.base_)},setPrototypeOf(){Fa(12)}},tg={};B1(BO,(e,t)=>{tg[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});tg.deleteProperty=function(e,t){return tg.set.call(this,e,t,void 0)};tg.set=function(e,t,n){return BO.set.call(this,e[0],t,n,e[0])};function cS(e,t){const n=e[Uo];return(n?cc(n):e)[t]}function dle(e,t,n){const r=Ej(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function Ej(e,t){if(!(t in e))return;let n=Gd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Gd(n)}}function VC(e){e.modified_||(e.modified_=!0,e.parent_&&VC(e.parent_))}function fS(e){e.copy_||(e.copy_=zC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hle=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(u=o,...l){return a.produce(u,c=>n.call(this,c,...l))}}typeof n!="function"&&Fa(6),r!==void 0&&typeof r!="function"&&Fa(7);let i;if(bu(t)){const o=jM(this),a=WC(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?UC(o):HC(o)}return FM(o,r),BM(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===wj&&(i=void 0),this.autoFreeze_&&jO(i,!0),r){const o=[],a=[];Wc("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Fa(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,u=>t(u,...s));let r,i;return[this.produce(t,n,(a,s)=>{r=a,i=s}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){bu(e)||Fa(8),Vc(e)&&(e=ple(e));const t=jM(this),n=WC(e,void 0);return n[Uo].isManual_=!0,HC(t),n}finishDraft(e,t){const n=e&&e[Uo];(!n||!n.isManual_)&&Fa(9);const{scope_:r}=n;return FM(r,t),BM(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Wc("Patches").applyPatches_;return Vc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function WC(e,t){const n=Yx(e)?Wc("MapSet").proxyMap_(e,t):Zx(e)?Wc("MapSet").proxySet_(e,t):fle(e,t);return(t?t.scope_:Cj()).drafts_.push(n),n}function ple(e){return Vc(e)||Fa(10,e),Oj(e)}function Oj(e){if(!bu(e)||Xx(e))return e;const t=e[Uo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=zC(e,t.scope_.immer_.useStrictShallowCopy_)}else n=zC(e,!0);return B1(n,(r,i)=>{Sj(n,r,Oj(i))}),t&&(t.finalized_=!1),n}var Ho=new hle,Aj=Ho.produce;Ho.produceWithPatches.bind(Ho);Ho.setAutoFreeze.bind(Ho);Ho.setUseStrictShallowCopy.bind(Ho);Ho.applyPatches.bind(Ho);Ho.createDraft.bind(Ho);Ho.finishDraft.bind(Ho);function gle(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function mle(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function vle(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var UM=e=>Array.isArray(e)?e:[e];function yle(e){const t=Array.isArray(e[0])?e[0]:e;return vle(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ble(e,t){const n=[],{length:r}=e;for(let i=0;i{n=ny(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function Sle(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,s,u={},l=i.pop();typeof l=="object"&&(u=l,l=i.pop()),gle(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...n,...u},{memoize:f,memoizeOptions:h=[],argsMemoize:p=Pj,argsMemoizeOptions:m=[],devModeChecks:v={}}=c,b=UM(h),w=UM(m),x=yle(i),S=f(function(){return o++,l.apply(null,arguments)},...b),O=p(function(){a++;const C=ble(x,arguments);return s=S.apply(null,C),s},...w);return Object.assign(O,{resultFunc:l,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var Cle=Sle(Pj),Ele=Object.assign((e,t=Cle)=>{mle(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,s,u)=>(a[n[u]]=s,a),{}))},{withTypes:()=>Ele});function kj(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var Ole=kj(),Ale=kj,Ple=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?j1:j1.apply(null,arguments)},kle=e=>e&&typeof e.match=="function";function _0(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(cu(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>ile(r)&&r.type===e,n}var Tj=class s0 extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,s0.prototype)}static get[Symbol.species](){return s0}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new s0(...t[0].concat(this)):new s0(...t.concat(this))}};function VM(e){return bu(e)?Aj(e,()=>{}):e}function WM(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Tle(e){return typeof e=="boolean"}var Mle=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new Tj;return n&&(Tle(n)?a.push(Ole):a.push(Ale(n.extraArgument))),a},Rle="RTK_autoBatch",qM=e=>t=>{setTimeout(t,e)},Dle=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:qM(10):e.type==="callback"?e.queueNotification:qM(e.timeout),l=()=>{a=!1,o&&(o=!1,s.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const f=()=>i&&c(),h=r.subscribe(f);return s.add(c),()=>{h(),s.delete(c)}},dispatch(c){try{return i=!c?.meta?.[Rle],o=!i,o&&(a||(a=!0,u(l))),r.dispatch(c)}finally{i=!0}}})},$le=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new Tj(e);return r&&i.push(Dle(typeof r=="object"?r:void 0)),i};function aZe(e){const t=Mle(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e;let s;if(typeof n=="function")s=n;else if(FO(n))s=nle(n);else throw new Error(cu(1));let u;typeof r=="function"?u=r(t):u=t();let l=j1;i&&(l=Ple({trace:!1,...typeof i=="object"&&i}));const c=rle(...u),f=$le(c);let h=typeof a=="function"?a(f):f();const p=l(...h);return xj(s,o,p)}function Mj(e){const t={},n=[];let r;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(cu(28));if(s in t)throw new Error(cu(29));return t[s]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function Ile(e){return typeof e=="function"}function Nle(e,t){let[n,r,i]=Mj(t),o;if(Ile(e))o=()=>VM(e());else{const s=VM(e);o=()=>s}function a(s=o(),u){let l=[n[u.type],...r.filter(({matcher:c})=>c(u)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,f)=>{if(f)if(Vc(c)){const p=f(c,u);return p===void 0?c:p}else{if(bu(c))return Aj(c,h=>f(h,u));{const h=f(c,u);if(h===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return c},s)}return a.getInitialState=o,a}var Lle=(e,t)=>kle(e)?e.match(t):e(t);function Fle(...e){return t=>e.some(n=>Lle(n,t))}var jle="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ble=(e=21)=>{let t="",n=e;for(;n--;)t+=jle[Math.random()*64|0];return t},zle=["name","message","stack","code"],dS=class{constructor(e,t){this.payload=e,this.meta=t}_type},KM=class{constructor(e,t){this.payload=e,this.meta=t}_type},Ule=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of zle)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},sZe=(()=>{function e(t,n,r){const i=_0(t+"/fulfilled",(u,l,c,f)=>({payload:u,meta:{...f||{},arg:c,requestId:l,requestStatus:"fulfilled"}})),o=_0(t+"/pending",(u,l,c)=>({payload:void 0,meta:{...c||{},arg:l,requestId:u,requestStatus:"pending"}})),a=_0(t+"/rejected",(u,l,c,f,h)=>({payload:f,error:(r&&r.serializeError||Ule)(u||"Rejected"),meta:{...h||{},arg:c,requestId:l,rejectedWithValue:!!f,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(l,c,f)=>{const h=r?.idGenerator?r.idGenerator(u):Ble(),p=new AbortController;let m,v;function b(x){v=x,p.abort()}const w=async function(){let x;try{let O=r?.condition?.(u,{getState:c,extra:f});if(Vle(O)&&(O=await O),O===!1||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,k)=>{m=()=>{k({name:"AbortError",message:v||"Aborted"})},p.signal.addEventListener("abort",m)});l(o(h,u,r?.getPendingMeta?.({requestId:h,arg:u},{getState:c,extra:f}))),x=await Promise.race([E,Promise.resolve(n(u,{dispatch:l,getState:c,extra:f,requestId:h,signal:p.signal,abort:b,rejectWithValue:(C,k)=>new dS(C,k),fulfillWithValue:(C,k)=>new KM(C,k)})).then(C=>{if(C instanceof dS)throw C;return C instanceof KM?i(C.payload,h,u,C.meta):i(C,h,u)})])}catch(O){x=O instanceof dS?a(null,h,u,O.payload,O.meta):a(O,h,u)}finally{m&&p.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||l(x),x}();return Object.assign(w,{abort:b,requestId:h,arg:u,unwrap(){return w.then(Hle)}})}}return Object.assign(s,{pending:o,rejected:a,fulfilled:i,settled:Fle(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Hle(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Vle(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Wle=Symbol.for("rtk-slice-createasyncthunk");function qle(e,t){return`${e}/${t}`}function Kle({creators:e}={}){const t=e?.asyncThunk?.[Wle];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(cu(11));const a=(typeof r.reducers=="function"?r.reducers(Yle()):r.reducers)||{},s=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(x,S){const O=typeof x=="string"?x:x.type;if(!O)throw new Error(cu(12));if(O in u.sliceCaseReducersByType)throw new Error(cu(13));return u.sliceCaseReducersByType[O]=S,l},addMatcher(x,S){return u.sliceMatchers.push({matcher:x,reducer:S}),l},exposeAction(x,S){return u.actionCreators[x]=S,l},exposeCaseReducer(x,S){return u.sliceCaseReducersByName[x]=S,l}};s.forEach(x=>{const S=a[x],O={reducerName:x,type:qle(i,x),createNotation:typeof r.reducers=="function"};Xle(S)?Jle(O,S,l,t):Zle(O,S,l)});function c(){const[x={},S=[],O=void 0]=typeof r.extraReducers=="function"?Mj(r.extraReducers):[r.extraReducers],E={...x,...u.sliceCaseReducersByType};return Nle(r.initialState,C=>{for(let k in E)C.addCase(k,E[k]);for(let k of u.sliceMatchers)C.addMatcher(k.matcher,k.reducer);for(let k of S)C.addMatcher(k.matcher,k.reducer);O&&C.addDefaultCase(O)})}const f=x=>x,h=new Map;let p;function m(x,S){return p||(p=c()),p(x,S)}function v(){return p||(p=c()),p.getInitialState()}function b(x,S=!1){function O(C){let k=C[x];return typeof k>"u"&&S&&(k=v()),k}function E(C=f){const k=WM(h,S,()=>new WeakMap);return WM(k,C,()=>{const M={};for(const[N,q]of Object.entries(r.selectors??{}))M[N]=Gle(q,C,v,S);return M})}return{reducerPath:x,getSelectors:E,get selectors(){return E(O)},selectSlice:O}}const w={name:i,reducer:m,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...b(o),injectInto(x,{reducerPath:S,...O}={}){const E=S??o;return x.inject({reducerPath:E,reducer:m},O),{...w,...b(E,!0)}}};return w}}function Gle(e,t,n,r){function i(o,...a){let s=t(o);return typeof s>"u"&&r&&(s=n()),e(s,...a)}return i.unwrapped=e,i}var uZe=Kle();function Yle(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Zle({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Qle(r))throw new Error(cu(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?_0(e,a):_0(e))}function Xle(e){return e._reducerDefinitionType==="asyncThunk"}function Qle(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Jle({type:e,reducerName:t},n,r,i){if(!i)throw new Error(cu(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:u,settled:l,options:c}=n,f=i(e,o,c);r.exposeAction(t,f),a&&r.addCase(f.fulfilled,a),s&&r.addCase(f.pending,s),u&&r.addCase(f.rejected,u),l&&r.addMatcher(f.settled,l),r.exposeCaseReducer(t,{fulfilled:a||ry,pending:s||ry,rejected:u||ry,settled:l||ry})}function ry(){}function cu(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function Rj(e,t){return function(){return e.apply(t,arguments)}}const{toString:ece}=Object.prototype,{getPrototypeOf:zO}=Object,Qx=(e=>t=>{const n=ece.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ts=e=>(e=e.toLowerCase(),t=>Qx(t)===e),Jx=e=>t=>typeof t===e,{isArray:Nh}=Array,ng=Jx("undefined");function tce(e){return e!==null&&!ng(e)&&e.constructor!==null&&!ng(e.constructor)&&Lo(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Dj=ts("ArrayBuffer");function nce(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Dj(e.buffer),t}const rce=Jx("string"),Lo=Jx("function"),$j=Jx("number"),ew=e=>e!==null&&typeof e=="object",ice=e=>e===!0||e===!1,Xy=e=>{if(Qx(e)!=="object")return!1;const t=zO(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},oce=ts("Date"),ace=ts("File"),sce=ts("Blob"),uce=ts("FileList"),lce=e=>ew(e)&&Lo(e.pipe),cce=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Lo(e.append)&&((t=Qx(e))==="formdata"||t==="object"&&Lo(e.toString)&&e.toString()==="[object FormData]"))},fce=ts("URLSearchParams"),[dce,hce,pce,gce]=["ReadableStream","Request","Response","Headers"].map(ts),mce=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function wm(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Nh(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const _c=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Nj=e=>!ng(e)&&e!==_c;function qC(){const{caseless:e}=Nj(this)&&this||{},t={},n=(r,i)=>{const o=e&&Ij(t,i)||i;Xy(t[o])&&Xy(r)?t[o]=qC(t[o],r):Xy(r)?t[o]=qC({},r):Nh(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(wm(t,(i,o)=>{n&&Lo(i)?e[o]=Rj(i,n):e[o]=i},{allOwnKeys:r}),e),yce=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),bce=(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)},xce=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&zO(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},wce=(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},_ce=e=>{if(!e)return null;if(Nh(e))return e;let t=e.length;if(!$j(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Sce=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&zO(Uint8Array)),Cce=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Ece=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Oce=ts("HTMLFormElement"),Ace=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),GM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pce=ts("RegExp"),Lj=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};wm(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},kce=e=>{Lj(e,(t,n)=>{if(Lo(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Lo(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+"'")})}})},Tce=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Nh(e)?r(e):r(String(e).split(t)),n},Mce=()=>{},Rce=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,hS="abcdefghijklmnopqrstuvwxyz",YM="0123456789",Fj={DIGIT:YM,ALPHA:hS,ALPHA_DIGIT:hS+hS.toUpperCase()+YM},Dce=(e=16,t=Fj.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function $ce(e){return!!(e&&Lo(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Ice=e=>{const t=new Array(10),n=(r,i)=>{if(ew(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Nh(r)?[]:{};return wm(r,(a,s)=>{const u=n(a,i+1);!ng(u)&&(o[s]=u)}),t[i]=void 0,o}}return r};return n(e,0)},Nce=ts("AsyncFunction"),Lce=e=>e&&(ew(e)||Lo(e))&&Lo(e.then)&&Lo(e.catch),jj=((e,t)=>e?setImmediate:t?((n,r)=>(_c.addEventListener("message",({source:i,data:o})=>{i===_c&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),_c.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Lo(_c.postMessage)),Fce=typeof queueMicrotask<"u"?queueMicrotask.bind(_c):typeof process<"u"&&process.nextTick||jj,_e={isArray:Nh,isArrayBuffer:Dj,isBuffer:tce,isFormData:cce,isArrayBufferView:nce,isString:rce,isNumber:$j,isBoolean:ice,isObject:ew,isPlainObject:Xy,isReadableStream:dce,isRequest:hce,isResponse:pce,isHeaders:gce,isUndefined:ng,isDate:oce,isFile:ace,isBlob:sce,isRegExp:Pce,isFunction:Lo,isStream:lce,isURLSearchParams:fce,isTypedArray:Sce,isFileList:uce,forEach:wm,merge:qC,extend:vce,trim:mce,stripBOM:yce,inherits:bce,toFlatObject:xce,kindOf:Qx,kindOfTest:ts,endsWith:wce,toArray:_ce,forEachEntry:Cce,matchAll:Ece,isHTMLForm:Oce,hasOwnProperty:GM,hasOwnProp:GM,reduceDescriptors:Lj,freezeMethods:kce,toObjectSet:Tce,toCamelCase:Ace,noop:Mce,toFiniteNumber:Rce,findKey:Ij,global:_c,isContextDefined:Nj,ALPHABET:Fj,generateString:Dce,isSpecCompliantForm:$ce,toJSONObject:Ice,isAsyncFn:Nce,isThenable:Lce,setImmediate:jj,asap:Fce};function qt(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)}_e.inherits(qt,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:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const Bj=qt.prototype,zj={};["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=>{zj[e]={value:e}});Object.defineProperties(qt,zj);Object.defineProperty(Bj,"isAxiosError",{value:!0});qt.from=(e,t,n,r,i,o)=>{const a=Object.create(Bj);return _e.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),qt.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const jce=null;function KC(e){return _e.isPlainObject(e)||_e.isArray(e)}function Uj(e){return _e.endsWith(e,"[]")?e.slice(0,-2):e}function ZM(e,t,n){return e?e.concat(t).map(function(i,o){return i=Uj(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Bce(e){return _e.isArray(e)&&!e.some(KC)}const zce=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function tw(e,t,n){if(!_e.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!_e.isUndefined(b[v])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(t);if(!_e.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(_e.isDate(m))return m.toISOString();if(!u&&_e.isBlob(m))throw new qt("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(m)||_e.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,v,b){let w=m;if(m&&!b&&typeof m=="object"){if(_e.endsWith(v,"{}"))v=r?v:v.slice(0,-2),m=JSON.stringify(m);else if(_e.isArray(m)&&Bce(m)||(_e.isFileList(m)||_e.endsWith(v,"[]"))&&(w=_e.toArray(m)))return v=Uj(v),w.forEach(function(S,O){!(_e.isUndefined(S)||S===null)&&t.append(a===!0?ZM([v],O,o):a===null?v:v+"[]",l(S))}),!1}return KC(m)?!0:(t.append(ZM(b,v,o),l(m)),!1)}const f=[],h=Object.assign(zce,{defaultVisitor:c,convertValue:l,isVisitable:KC});function p(m,v){if(!_e.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(m),_e.forEach(m,function(w,x){(!(_e.isUndefined(w)||w===null)&&i.call(t,w,_e.isString(x)?x.trim():x,v,h))===!0&&p(w,v?v.concat(x):[x])}),f.pop()}}if(!_e.isObject(e))throw new TypeError("data must be an object");return p(e),t}function XM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function UO(e,t){this._pairs=[],e&&tw(e,this,t)}const Hj=UO.prototype;Hj.append=function(t,n){this._pairs.push([t,n])};Hj.toString=function(t){const n=t?function(r){return t.call(this,r,XM)}:XM;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Uce(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Vj(e,t,n){if(!t)return e;const r=n&&n.encode||Uce;_e.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=_e.isURLSearchParams(t)?t.toString():new UO(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class QM{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){_e.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Wj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hce=typeof URLSearchParams<"u"?URLSearchParams:UO,Vce=typeof FormData<"u"?FormData:null,Wce=typeof Blob<"u"?Blob:null,qce={isBrowser:!0,classes:{URLSearchParams:Hce,FormData:Vce,Blob:Wce},protocols:["http","https","file","blob","url","data"]},HO=typeof window<"u"&&typeof document<"u",GC=typeof navigator=="object"&&navigator||void 0,Kce=HO&&(!GC||["ReactNative","NativeScript","NS"].indexOf(GC.product)<0),Gce=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Yce=HO&&window.location.href||"http://localhost",Zce=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:HO,hasStandardBrowserEnv:Kce,hasStandardBrowserWebWorkerEnv:Gce,navigator:GC,origin:Yce},Symbol.toStringTag,{value:"Module"})),Mi={...Zce,...qce};function Xce(e,t){return tw(e,new Mi.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Mi.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Qce(e){return _e.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Jce(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&_e.isArray(i)?i.length:a,u?(_e.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!_e.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&_e.isArray(i[a])&&(i[a]=Jce(i[a])),!s)}if(_e.isFormData(e)&&_e.isFunction(e.entries)){const n={};return _e.forEachEntry(e,(r,i)=>{t(Qce(r),i,n,0)}),n}return null}function efe(e,t,n){if(_e.isString(e))try{return(t||JSON.parse)(e),_e.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const _m={transitional:Wj,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=_e.isObject(t);if(o&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return i?JSON.stringify(qj(t)):t;if(_e.isArrayBuffer(t)||_e.isBuffer(t)||_e.isStream(t)||_e.isFile(t)||_e.isBlob(t)||_e.isReadableStream(t))return t;if(_e.isArrayBufferView(t))return t.buffer;if(_e.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Xce(t,this.formSerializer).toString();if((s=_e.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return tw(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),efe(t)):t}],transformResponse:[function(t){const n=this.transitional||_m.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(_e.isResponse(t)||_e.isReadableStream(t))return t;if(t&&_e.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?qt.from(s,qt.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:Mi.classes.FormData,Blob:Mi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],e=>{_m.headers[e]={}});const tfe=_e.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"]),nfe=e=>{const t={};let n,r,i;return e&&e.split(` -`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&tfe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},JM=Symbol("internals");function Np(e){return e&&String(e).trim().toLowerCase()}function Qy(e){return e===!1||e==null?e:_e.isArray(e)?e.map(Qy):String(e)}function rfe(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 ife=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pS(e,t,n,r,i){if(_e.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!_e.isString(t)){if(_e.isString(r))return t.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(t)}}function ofe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function afe(e,t){const n=_e.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class po{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,u,l){const c=Np(u);if(!c)throw new Error("header name must be a non-empty string");const f=_e.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||u]=Qy(s))}const a=(s,u)=>_e.forEach(s,(l,c)=>o(l,c,u));if(_e.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(_e.isString(t)&&(t=t.trim())&&!ife(t))a(nfe(t),n);else if(_e.isHeaders(t))for(const[s,u]of t.entries())o(u,s,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Np(t),t){const r=_e.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return rfe(i);if(_e.isFunction(n))return n.call(this,i,r);if(_e.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Np(t),t){const r=_e.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||pS(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Np(a),a){const s=_e.findKey(r,a);s&&(!n||pS(r,r[s],s,n))&&(delete r[s],i=!0)}}return _e.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||pS(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return _e.forEach(this,(i,o)=>{const a=_e.findKey(r,o);if(a){n[a]=Qy(i),delete n[o];return}const s=t?ofe(o):String(o).trim();s!==o&&delete n[o],n[s]=Qy(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _e.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&_e.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[JM]=this[JM]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Np(a);r[s]||(afe(i,a),r[s]=!0)}return _e.isArray(t)?t.forEach(o):o(t),this}}po.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_e.reduceDescriptors(po.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});_e.freezeMethods(po);function gS(e,t){const n=this||_m,r=t||n,i=po.from(r.headers);let o=r.data;return _e.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Kj(e){return!!(e&&e.__CANCEL__)}function Lh(e,t,n){qt.call(this,e??"canceled",qt.ERR_CANCELED,t,n),this.name="CanceledError"}_e.inherits(Lh,qt,{__CANCEL__:!0});function Gj(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new qt("Request failed with status code "+n.status,[qt.ERR_BAD_REQUEST,qt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function sfe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ufe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[o];a||(a=l),n[i]=u,r[i]=l;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-a{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),f=c-n;f>=r?a(l,c):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},r-f)))},()=>i&&a(i)]}const H1=(e,t,n=3)=>{let r=0;const i=ufe(50,250);return lfe(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,u=a-r,l=i(u),c=a<=s;r=a;const f={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:l||void 0,estimated:l&&s&&c?(s-a)/l:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},eR=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},tR=e=>(...t)=>_e.asap(()=>e(...t)),cfe=Mi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mi.origin),Mi.navigator&&/(msie|trident)/i.test(Mi.navigator.userAgent)):()=>!0,ffe=Mi.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];_e.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&a.push("path="+r),_e.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.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 dfe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function hfe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Yj(e,t){return e&&!dfe(t)?hfe(e,t):t}const nR=e=>e instanceof po?{...e}:e;function qc(e,t){t=t||{};const n={};function r(l,c,f,h){return _e.isPlainObject(l)&&_e.isPlainObject(c)?_e.merge.call({caseless:h},l,c):_e.isPlainObject(c)?_e.merge({},c):_e.isArray(c)?c.slice():c}function i(l,c,f,h){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l,f,h)}else return r(l,c,f,h)}function o(l,c){if(!_e.isUndefined(c))return r(void 0,c)}function a(l,c){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,f){if(f in t)return r(l,c);if(f in e)return r(void 0,l)}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,c,f)=>i(nR(l),nR(c),f,!0)};return _e.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=u[c]||i,h=f(e[c],t[c],c);_e.isUndefined(h)&&f!==s||(n[c]=h)}),n}const Zj=e=>{const t=qc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=po.from(a),t.url=Vj(Yj(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(_e.isFormData(n)){if(Mi.hasStandardBrowserEnv||Mi.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[l,...c]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...c].join("; "))}}if(Mi.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(t)),r||r!==!1&&cfe(t.url))){const l=i&&o&&ffe.read(o);l&&a.set(i,l)}return t},pfe=typeof XMLHttpRequest<"u",gfe=pfe&&function(e){return new Promise(function(n,r){const i=Zj(e);let o=i.data;const a=po.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:l}=i,c,f,h,p,m;function v(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function w(){if(!b)return;const S=po.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),E={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:S,config:e,request:b};Gj(function(k){n(k),v()},function(k){r(k),v()},E),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(r(new qt("Request aborted",qt.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new qt("Network Error",qt.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let O=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Wj;i.timeoutErrorMessage&&(O=i.timeoutErrorMessage),r(new qt(O,E.clarifyTimeoutError?qt.ETIMEDOUT:qt.ECONNABORTED,e,b)),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&_e.forEach(a.toJSON(),function(O,E){b.setRequestHeader(E,O)}),_e.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),s&&s!=="json"&&(b.responseType=i.responseType),l&&([h,m]=H1(l,!0),b.addEventListener("progress",h)),u&&b.upload&&([f,p]=H1(u),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=S=>{b&&(r(!S||S.type?new Lh(null,e,b):S),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=sfe(i.url);if(x&&Mi.protocols.indexOf(x)===-1){r(new qt("Unsupported protocol "+x+":",qt.ERR_BAD_REQUEST,e));return}b.send(o||null)})},mfe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,s();const c=l instanceof Error?l:this.reason;r.abort(c instanceof qt?c:new Lh(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new qt(`timeout ${t} of ms exceeded`,qt.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>_e.asap(s),u}},vfe=function*(e,t){let n=e.byteLength;if(n{const i=yfe(e,t);let o=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:c}=await i.next();if(l){s(),u.close();return}let f=c.byteLength;if(n){let h=o+=f;n(h)}u.enqueue(new Uint8Array(c))}catch(l){throw s(l),l}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},nw=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Xj=nw&&typeof ReadableStream=="function",xfe=nw&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Qj=(e,...t)=>{try{return!!e(...t)}catch{return!1}},wfe=Xj&&Qj(()=>{let e=!1;const t=new Request(Mi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),iR=64*1024,YC=Xj&&Qj(()=>_e.isReadableStream(new Response("").body)),V1={stream:YC&&(e=>e.body)};nw&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!V1[t]&&(V1[t]=_e.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new qt(`Response type '${t}' is not supported`,qt.ERR_NOT_SUPPORT,r)})})})(new Response);const _fe=async e=>{if(e==null)return 0;if(_e.isBlob(e))return e.size;if(_e.isSpecCompliantForm(e))return(await new Request(Mi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(e)||_e.isArrayBuffer(e))return e.byteLength;if(_e.isURLSearchParams(e)&&(e=e+""),_e.isString(e))return(await xfe(e)).byteLength},Sfe=async(e,t)=>{const n=_e.toFiniteNumber(e.getContentLength());return n??_fe(t)},Cfe=nw&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:l,headers:c,withCredentials:f="same-origin",fetchOptions:h}=Zj(e);l=l?(l+"").toLowerCase():"text";let p=mfe([i,o&&o.toAbortSignal()],a),m;const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(u&&wfe&&n!=="get"&&n!=="head"&&(b=await Sfe(c,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(_e.isFormData(r)&&(C=E.headers.get("content-type"))&&c.setContentType(C),E.body){const[k,M]=eR(b,H1(tR(u)));r=rR(E.body,iR,k,M)}}_e.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:w?f:void 0});let x=await fetch(m);const S=YC&&(l==="stream"||l==="response");if(YC&&(s||S&&v)){const E={};["status","statusText","headers"].forEach(N=>{E[N]=x[N]});const C=_e.toFiniteNumber(x.headers.get("content-length")),[k,M]=s&&eR(C,H1(tR(s),!0))||[];x=new Response(rR(x.body,iR,k,()=>{M&&M(),v&&v()}),E)}l=l||"text";let O=await V1[_e.findKey(V1,l)||"text"](x,e);return!S&&v&&v(),await new Promise((E,C)=>{Gj(E,C,{data:O,headers:po.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(w){throw v&&v(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new qt("Network Error",qt.ERR_NETWORK,e,m),{cause:w.cause||w}):qt.from(w,w&&w.code,e,m)}}),ZC={http:jce,xhr:gfe,fetch:Cfe};_e.forEach(ZC,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const oR=e=>`- ${e}`,Efe=e=>_e.isFunction(e)||e===null||e===!1,Jj={getAdapter:e=>{e=_e.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : -`+o.map(oR).join(` -`):" "+oR(o[0]):"as no adapter specified";throw new qt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:ZC};function mS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Lh(null,e)}function aR(e){return mS(e),e.headers=po.from(e.headers),e.data=gS.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Jj.getAdapter(e.adapter||_m.adapter)(e).then(function(r){return mS(e),r.data=gS.call(e,e.transformResponse,r),r.headers=po.from(r.headers),r},function(r){return Kj(r)||(mS(e),r&&r.response&&(r.response.data=gS.call(e,e.transformResponse,r.response),r.response.headers=po.from(r.response.headers))),Promise.reject(r)})}const eB="1.7.9",rw={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rw[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const sR={};rw.transitional=function(t,n,r){function i(o,a){return"[Axios v"+eB+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new qt(i(a," has been removed"+(n?" in "+n:"")),qt.ERR_DEPRECATED);return n&&!sR[a]&&(sR[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};rw.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ofe(e,t,n){if(typeof e!="object")throw new qt("options must be an object",qt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new qt("option "+o+" must be "+u,qt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new qt("Unknown option "+o,qt.ERR_BAD_OPTION)}}const Jy={assertOptions:Ofe,validators:rw},ls=Jy.validators;class Mc{constructor(t){this.defaults=t,this.interceptors={request:new QM,response:new QM}}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 o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=qc(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Jy.assertOptions(r,{silentJSONParsing:ls.transitional(ls.boolean),forcedJSONParsing:ls.transitional(ls.boolean),clarifyTimeoutError:ls.transitional(ls.boolean)},!1),i!=null&&(_e.isFunction(i)?n.paramsSerializer={serialize:i}:Jy.assertOptions(i,{encode:ls.function,serialize:ls.function},!0)),Jy.assertOptions(n,{baseUrl:ls.spelling("baseURL"),withXsrfToken:ls.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&_e.merge(o.common,o[n.method]);o&&_e.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=po.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let c,f=0,h;if(!u){const m=[aR.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),h=m.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new Lh(o,a,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 VO(function(i){t=i}),cancel:t}}}function Afe(e){return function(n){return e.apply(null,n)}}function Pfe(e){return _e.isObject(e)&&e.isAxiosError===!0}const XC={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(XC).forEach(([e,t])=>{XC[t]=e});function tB(e){const t=new Mc(e),n=Rj(Mc.prototype.request,t);return _e.extend(n,Mc.prototype,t,{allOwnKeys:!0}),_e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return tB(qc(e,i))},n}const Kr=tB(_m);Kr.Axios=Mc;Kr.CanceledError=Lh;Kr.CancelToken=VO;Kr.isCancel=Kj;Kr.VERSION=eB;Kr.toFormData=tw;Kr.AxiosError=qt;Kr.Cancel=Kr.CanceledError;Kr.all=function(t){return Promise.all(t)};Kr.spread=Afe;Kr.isAxiosError=Pfe;Kr.mergeConfig=qc;Kr.AxiosHeaders=po;Kr.formToJSON=e=>qj(_e.isHTMLForm(e)?new FormData(e):e);Kr.getAdapter=Jj.getAdapter;Kr.HttpStatusCode=XC;Kr.default=Kr;var kfe=e=>{switch(e){case"success":return Rfe;case"info":return $fe;case"warning":return Dfe;case"error":return Ife;default:return null}},Tfe=Array(12).fill(0),Mfe=({visible:e,className:t})=>z.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},z.createElement("div",{className:"sonner-spinner"},Tfe.map((n,r)=>z.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Rfe=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.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"})),Dfe=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},z.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"})),$fe=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.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"})),Ife=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.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"})),Nfe=z.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"},z.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),z.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Lfe=()=>{let[e,t]=z.useState(document.hidden);return z.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},QC=1,Ffe=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?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:QC++,o=this.toasts.find(s=>s.id===i),a=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...e,id:i,title:n}),{...s,...e,id:i,dismissible:a,title:n}):s):this.addToast({title:n,...r,dismissible:a,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,o,a=r.then(async u=>{if(o=["resolve",u],z.isValidElement(u))i=!1,this.create({id:n,type:"default",message:u});else if(Bfe(u)&&!u.ok){i=!1;let l=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:l,description:c})}else if(t.success!==void 0){i=!1;let l=typeof t.success=="function"?await t.success(u):t.success,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:l,description:c})}}).catch(async u=>{if(o=["reject",u],t.error!==void 0){i=!1;let l=typeof t.error=="function"?await t.error(u):t.error,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:l,description:c})}}).finally(()=>{var u;i&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),s=()=>new Promise((u,l)=>a.then(()=>o[0]==="reject"?l(o[1]):u(o[1])).catch(l));return typeof n!="string"&&typeof n!="number"?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||QC++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},ko=new Ffe,jfe=(e,t)=>{let n=t?.id||QC++;return ko.addToast({title:e,...t,id:n}),n},Bfe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",zfe=jfe,Ufe=()=>ko.toasts,lZe=Object.assign(zfe,{success:ko.success,info:ko.info,warning:ko.warning,error:ko.error,custom:ko.custom,message:ko.message,promise:ko.promise,dismiss:ko.dismiss,loading:ko.loading},{getHistory:Ufe});function Hfe(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))}Hfe(`: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 iy(e){return e.label!==void 0}var Vfe=3,Wfe="32px",uR=4e3,qfe=356,Kfe=14,Gfe=20,Yfe=200;function Zfe(...e){return e.filter(Boolean).join(" ")}var Xfe=e=>{var t,n,r,i,o,a,s,u,l,c,f;let{invert:h,toast:p,unstyled:m,interacting:v,setHeights:b,visibleToasts:w,heights:x,index:S,toasts:O,expanded:E,removeToast:C,defaultRichColors:k,closeButton:M,style:N,cancelButtonStyle:q,actionButtonStyle:Y,className:W="",descriptionClassName:ne="",duration:Z,position:R,gap:B,loadingIcon:U,expandByDefault:F,classNames:V,icons:G,closeButtonAriaLabel:oe="Close toast",pauseWhenPageIsHidden:Q,cn:X}=e,[ue,de]=z.useState(!1),[Se,me]=z.useState(!1),[Ze,Ae]=z.useState(!1),[Le,$e]=z.useState(!1),[be,yt]=z.useState(!1),[lt,Nt]=z.useState(0),[yn,nn]=z.useState(0),ie=z.useRef(p.duration||Z||uR),pe=z.useRef(null),ye=z.useRef(null),Ue=S===0,je=S+1<=w,ke=p.type,nt=p.dismissible!==!1,mt=p.className||"",xn=p.descriptionClassName||"",Wt=z.useMemo(()=>x.findIndex(_t=>_t.toastId===p.id)||0,[x,p.id]),wn=z.useMemo(()=>{var _t;return(_t=p.closeButton)!=null?_t:M},[p.closeButton,M]);z.useMemo(()=>p.duration||Z||uR,[p.duration,Z]);let Ii=z.useRef(0),br=z.useRef(0),yi=z.useRef(0),sr=z.useRef(null),[si,bi]=R.split("-"),Rr=z.useMemo(()=>x.reduce((_t,hn,_n)=>_n>=Wt?_t:_t+hn.height,0),[x,Wt]),Xi=Lfe(),bo=p.invert||h,xi=ke==="loading";br.current=z.useMemo(()=>Wt*B+Rr,[Wt,Rr]),z.useEffect(()=>{de(!0)},[]),z.useEffect(()=>{let _t=ye.current;if(_t){let hn=_t.getBoundingClientRect().height;return nn(hn),b(_n=>[{toastId:p.id,height:hn,position:p.position},..._n]),()=>b(_n=>_n.filter(Kn=>Kn.toastId!==p.id))}},[b,p.id]),z.useLayoutEffect(()=>{if(!ue)return;let _t=ye.current,hn=_t.style.height;_t.style.height="auto";let _n=_t.getBoundingClientRect().height;_t.style.height=hn,nn(_n),b(Kn=>Kn.find(ur=>ur.toastId===p.id)?Kn.map(ur=>ur.toastId===p.id?{...ur,height:_n}:ur):[{toastId:p.id,height:_n,position:p.position},...Kn])},[ue,p.title,p.description,b,p.id]);let Dr=z.useCallback(()=>{me(!0),Nt(br.current),b(_t=>_t.filter(hn=>hn.toastId!==p.id)),setTimeout(()=>{C(p)},Yfe)},[p,C,b,br]);z.useEffect(()=>{if(p.promise&&ke==="loading"||p.duration===1/0||p.type==="loading")return;let _t;return E||v||Q&&Xi?(()=>{if(yi.current{var hn;(hn=p.onAutoClose)==null||hn.call(p,p),Dr()},ie.current)),()=>clearTimeout(_t)},[E,v,p,ke,Q,Xi,Dr]),z.useEffect(()=>{p.delete&&Dr()},[Dr,p.delete]);function Sa(){var _t,hn,_n;return G!=null&&G.loading?z.createElement("div",{className:X(V?.loader,(_t=p?.classNames)==null?void 0:_t.loader,"sonner-loader"),"data-visible":ke==="loading"},G.loading):U?z.createElement("div",{className:X(V?.loader,(hn=p?.classNames)==null?void 0:hn.loader,"sonner-loader"),"data-visible":ke==="loading"},U):z.createElement(Mfe,{className:X(V?.loader,(_n=p?.classNames)==null?void 0:_n.loader),visible:ke==="loading"})}return z.createElement("li",{tabIndex:0,ref:ye,className:X(W,mt,V?.toast,(t=p?.classNames)==null?void 0:t.toast,V?.default,V?.[ke],(n=p?.classNames)==null?void 0:n[ke]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:k,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":ue,"data-promise":!!p.promise,"data-swiped":be,"data-removed":Se,"data-visible":je,"data-y-position":si,"data-x-position":bi,"data-index":S,"data-front":Ue,"data-swiping":Ze,"data-dismissible":nt,"data-type":ke,"data-invert":bo,"data-swipe-out":Le,"data-expanded":!!(E||F&&ue),style:{"--index":S,"--toasts-before":S,"--z-index":O.length-S,"--offset":`${Se?lt:br.current}px`,"--initial-height":F?"auto":`${yn}px`,...N,...p.style},onPointerDown:_t=>{xi||!nt||(pe.current=new Date,Nt(br.current),_t.target.setPointerCapture(_t.pointerId),_t.target.tagName!=="BUTTON"&&(Ae(!0),sr.current={x:_t.clientX,y:_t.clientY}))},onPointerUp:()=>{var _t,hn,_n,Kn;if(Le||!nt)return;sr.current=null;let ur=Number(((_t=ye.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Xr=new Date().getTime()-((hn=pe.current)==null?void 0:hn.getTime()),xo=Math.abs(ur)/Xr;if(Math.abs(ur)>=Gfe||xo>.11){Nt(br.current),(_n=p.onDismiss)==null||_n.call(p,p),Dr(),$e(!0),yt(!1);return}(Kn=ye.current)==null||Kn.style.setProperty("--swipe-amount","0px"),Ae(!1)},onPointerMove:_t=>{var hn,_n;if(!sr.current||!nt)return;let Kn=_t.clientY-sr.current.y,ur=((hn=window.getSelection())==null?void 0:hn.toString().length)>0,Xr=si==="top"?Math.min(0,Kn):Math.max(0,Kn);Math.abs(Xr)>0&&yt(!0),!ur&&((_n=ye.current)==null||_n.style.setProperty("--swipe-amount",`${Xr}px`))}},wn&&!p.jsx?z.createElement("button",{"aria-label":oe,"data-disabled":xi,"data-close-button":!0,onClick:xi||!nt?()=>{}:()=>{var _t;Dr(),(_t=p.onDismiss)==null||_t.call(p,p)},className:X(V?.closeButton,(i=p?.classNames)==null?void 0:i.closeButton)},(o=G?.close)!=null?o:Nfe):null,p.jsx||z.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:z.createElement(z.Fragment,null,ke||p.icon||p.promise?z.createElement("div",{"data-icon":"",className:X(V?.icon,(a=p?.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Sa():null,p.type!=="loading"?p.icon||G?.[ke]||kfe(ke):null):null,z.createElement("div",{"data-content":"",className:X(V?.content,(s=p?.classNames)==null?void 0:s.content)},z.createElement("div",{"data-title":"",className:X(V?.title,(u=p?.classNames)==null?void 0:u.title)},typeof p.title=="function"?p.title():p.title),p.description?z.createElement("div",{"data-description":"",className:X(ne,xn,V?.description,(l=p?.classNames)==null?void 0:l.description)},typeof p.description=="function"?p.description():p.description):null),z.isValidElement(p.cancel)?p.cancel:p.cancel&&iy(p.cancel)?z.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||q,onClick:_t=>{var hn,_n;iy(p.cancel)&&nt&&((_n=(hn=p.cancel).onClick)==null||_n.call(hn,_t),Dr())},className:X(V?.cancelButton,(c=p?.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,z.isValidElement(p.action)?p.action:p.action&&iy(p.action)?z.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||Y,onClick:_t=>{var hn,_n;iy(p.action)&&((_n=(hn=p.action).onClick)==null||_n.call(hn,_t),!_t.defaultPrevented&&Dr())},className:X(V?.actionButton,(f=p?.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function lR(){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}var cZe=y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:u,theme:l="light",richColors:c,duration:f,style:h,visibleToasts:p=Vfe,toastOptions:m,dir:v=lR(),gap:b=Kfe,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:O,cn:E=Zfe}=e,[C,k]=z.useState([]),M=z.useMemo(()=>Array.from(new Set([r].concat(C.filter(Q=>Q.position).map(Q=>Q.position)))),[C,r]),[N,q]=z.useState([]),[Y,W]=z.useState(!1),[ne,Z]=z.useState(!1),[R,B]=z.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=z.useRef(null),F=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),V=z.useRef(null),G=z.useRef(!1),oe=z.useCallback(Q=>{k(X=>{var ue;return(ue=X.find(de=>de.id===Q.id))!=null&&ue.delete||ko.dismiss(Q.id),X.filter(({id:de})=>de!==Q.id)})},[]);return z.useEffect(()=>ko.subscribe(Q=>{if(Q.dismiss){k(X=>X.map(ue=>ue.id===Q.id?{...ue,delete:!0}:ue));return}setTimeout(()=>{Vx.flushSync(()=>{k(X=>{let ue=X.findIndex(de=>de.id===Q.id);return ue!==-1?[...X.slice(0,ue),{...X[ue],...Q},...X.slice(ue+1)]:[Q,...X]})})})}),[]),z.useEffect(()=>{if(l!=="system"){B(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?B("dark"):B("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:X})=>{B(X?"dark":"light")})}catch{Q.addListener(({matches:ue})=>{try{B(ue?"dark":"light")}catch(de){console.error(de)}})}},[l]),z.useEffect(()=>{C.length<=1&&W(!1)},[C]),z.useEffect(()=>{let Q=X=>{var ue,de;i.every(Se=>X[Se]||X.code===Se)&&(W(!0),(ue=U.current)==null||ue.focus()),X.code==="Escape"&&(document.activeElement===U.current||(de=U.current)!=null&&de.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[i]),z.useEffect(()=>{if(U.current)return()=>{V.current&&(V.current.focus({preventScroll:!0}),V.current=null,G.current=!1)}},[U.current]),z.createElement("section",{"aria-label":`${S} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},M.map((Q,X)=>{var ue;let[de,Se]=Q.split("-");return C.length?z.createElement("ol",{key:Q,dir:v==="auto"?lR():v,tabIndex:-1,ref:U,className:s,"data-sonner-toaster":!0,"data-theme":R,"data-y-position":de,"data-lifted":Y&&C.length>1&&!o,"data-x-position":Se,style:{"--front-toast-height":`${((ue=N[0])==null?void 0:ue.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||Wfe,"--width":`${qfe}px`,"--gap":`${b}px`,...h},onBlur:me=>{G.current&&!me.currentTarget.contains(me.relatedTarget)&&(G.current=!1,V.current&&(V.current.focus({preventScroll:!0}),V.current=null))},onFocus:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||G.current||(G.current=!0,V.current=me.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{ne||W(!1)},onPointerDown:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},C.filter(me=>!me.position&&X===0||me.position===Q).map((me,Ze)=>{var Ae,Le;return z.createElement(Xfe,{key:me.id,icons:x,index:Ze,toast:me,defaultRichColors:c,duration:(Ae=m?.duration)!=null?Ae:f,className:m?.className,descriptionClassName:m?.descriptionClassName,invert:n,visibleToasts:p,closeButton:(Le=m?.closeButton)!=null?Le:a,interacting:ne,position:Q,style:m?.style,unstyled:m?.unstyled,classNames:m?.classNames,cancelButtonStyle:m?.cancelButtonStyle,actionButtonStyle:m?.actionButtonStyle,removeToast:oe,toasts:C.filter($e=>$e.position==me.position),heights:N.filter($e=>$e.position==me.position),setHeights:q,expandByDefault:o,gap:b,loadingIcon:w,expanded:Y,pauseWhenPageIsHidden:O,cn:E})})):null}))}),Fh=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(){}},Kc=typeof window>"u"||"Deno"in globalThis;function aa(){}function Qfe(e,t){return typeof e=="function"?e(t):e}function JC(e){return typeof e=="number"&&e>=0&&e!==1/0}function nB(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pd(e,t){return typeof e=="function"?e(t):e}function La(e,t){return typeof e=="function"?e(t):e}function cR(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==WO(a,t.options))return!1}else if(!rg(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||o&&!o(t))}function fR(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Gc(t.options.mutationKey)!==Gc(o))return!1}else if(!rg(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function WO(e,t){return(t?.queryKeyHashFn||Gc)(e)}function Gc(e){return JSON.stringify(e,(t,n)=>eE(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function rg(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!rg(e[n],t[n])):!1}function rB(e,t){if(e===t)return e;const n=dR(e)&&dR(t);if(n||eE(e)&&eE(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,s=n?[]:{};let u=0;for(let l=0;l{setTimeout(t,e)})}function tE(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?rB(e,t):t}function ede(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function tde(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var qO=Symbol();function iB(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===qO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var nde=class extends Fh{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!Kc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},KO=new nde,rde=class extends Fh{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!Kc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},q1=new rde;function nE(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});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 ide(e){return Math.min(1e3*2**e,3e4)}function oB(e){return(e??"online")==="online"?q1.isOnline():!0}var aB=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function vS(e){return e instanceof aB}function sB(e){let t=!1,n=0,r=!1,i;const o=nE(),a=v=>{r||(h(new aB(v)),e.abort?.())},s=()=>{t=!0},u=()=>{t=!1},l=()=>KO.isFocused()&&(e.networkMode==="always"||q1.isOnline())&&e.canRun(),c=()=>oB(e.networkMode)&&e.canRun(),f=v=>{r||(r=!0,e.onSuccess?.(v),i?.(),o.resolve(v))},h=v=>{r||(r=!0,e.onError?.(v),i?.(),o.reject(v))},p=()=>new Promise(v=>{i=b=>{(r||l())&&v(b)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),m=()=>{if(r)return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(w){v=Promise.reject(w)}Promise.resolve(v).then(f).catch(w=>{if(r)return;const x=e.retry??(Kc?0:3),S=e.retryDelay??ide,O=typeof S=="function"?S(n,w):S,E=x===!0||typeof x=="number"&&nl()?void 0:p()).then(()=>{t?h(w):m()})})};return{promise:o,cancel:a,continue:()=>(i?.(),o),cancelRetry:s,continueRetry:u,canStart:c,start:()=>(c()?m():p().then(m),o)}}function ode(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=s=>setTimeout(s,0);const o=s=>{t?e.push(s):i(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(u=>{n(u)})})})};return{batch:s=>{let u;t++;try{u=s()}finally{t--,t||a()}return u},batchCalls:s=>(...u)=>{o(()=>{s(...u)})},schedule:o,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Ur=ode(),uB=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),JC(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Kc?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},ade=class extends uB{#e;#t;#r;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=sde(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=tE(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(aa).catch(aa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>La(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!nB(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(u=>u.options.queryFn);s&&this.setOptions(s.options)}const n=new AbortController,r=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const s=iB(this.options,t),u={queryKey:this.queryKey,meta:this.meta};return r(u),this.#o=!1,this.options.persister?this.options.persister(s,u,this):s(u)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};r(o),this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta});const a=s=>{vS(s)&&s.silent||this.#i({type:"error",error:s}),vS(s)||(this.#r.config.onError?.(s,this),this.#r.config.onSettled?.(this.state.data,s,this)),this.scheduleGc()};return this.#n=sB({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:s=>{if(s===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(s)}catch(u){a(u);return}this.#r.config.onSuccess?.(s,this),this.#r.config.onSettled?.(s,this.state.error,this),this.scheduleGc()},onError:a,onFail:(s,u)=>{this.#i({type:"failed",failureCount:s,error:u})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#n.start()}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...lB(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return vS(r)&&r.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ur.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function lB(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:oB(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function sde(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 ude=class extends Fh{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??WO(r,t);let o=this.get(i);return o||(o=new ade({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>cR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>cR(e,n)):t}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},lde=class extends uB{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||cB(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){this.#r=sB({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(r,i)=>{this.#n({type:"failed",failureCount:r,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const t=this.state.status==="pending",n=!this.#r.canStart();try{if(!t){this.#n({type:"pending",variables:e,isPaused:n}),await this.#t.config.onMutate?.(e,this);const i=await this.options.onMutate?.(e);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:n})}const r=await this.#r.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#n({type:"success",data:r}),r}catch(r){try{throw await this.#t.config.onError?.(r,e,this.state.context,this),await this.options.onError?.(r,e,this.state.context),await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,e,this.state.context),r}finally{this.#n({type:"error",error:r})}}finally{this.#t.runNext(this)}}#n(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ur.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function cB(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cde=class extends Fh{constructor(e={}){super(),this.config=e,this.#e=new Map,this.#t=Date.now()}#e;#t;build(e,t,n){const r=new lde({mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=oy(e),n=this.#e.get(t)??[];n.push(e),this.#e.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=oy(e);if(this.#e.has(t)){const n=this.#e.get(t)?.filter(r=>r!==e);n&&(n.length===0?this.#e.delete(t):this.#e.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#e.get(oy(e))?.find(n=>n.state.status==="pending");return!t||t===e}runNext(e){return this.#e.get(oy(e))?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#e.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(n=>fR(t,n))}findAll(e={}){return this.getAll().filter(t=>fR(e,t))}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ur.batch(()=>Promise.all(e.map(t=>t.continue().catch(aa))))}};function oy(e){return e.options.scope?.id??String(e.mutationId)}function pR(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},u=0;const l=async()=>{let c=!1;const f=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},h=iB(t.options,t.fetchOptions),p=async(m,v,b)=>{if(c)return Promise.reject();if(v==null&&m.pages.length)return Promise.resolve(m);const w={queryKey:t.queryKey,pageParam:v,direction:b?"backward":"forward",meta:t.options.meta};f(w);const x=await h(w),{maxPages:S}=t.options,O=b?tde:ede;return{pages:O(m.pages,x,S),pageParams:O(m.pageParams,v,S)}};if(i&&o.length){const m=i==="backward",v=m?fde:gR,b={pages:o,pageParams:a},w=v(r,b);s=await p(b,w,m)}else{const m=e??o.length;do{const v=u===0?a[0]??r.initialPageParam:gR(r,s);if(u>0&&v==null)break;s=await p(s,v),u++}while(ut.options.persister?.(l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function gR(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 fde(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var fZe=class{#e;#t;#r;#n;#a;#o;#i;#s;constructor(e={}){this.#e=e.queryCache||new ude,this.#t=e.mutationCache||new cde,this.#r=e.defaultOptions||{},this.#n=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=KO.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=q1.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pd(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,a=Qfe(t,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ur.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ur.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e,r={type:"active",...e};return Ur.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ur.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(aa).catch(aa)}invalidateQueries(e,t={}){return Ur.batch(()=>{if(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none")return Promise.resolve();const n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ur.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(aa)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(aa)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Pd(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(aa).catch(aa)}fetchInfiniteQuery(e){return e.behavior=pR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(aa).catch(aa)}ensureInfiniteQueryData(e){return e.behavior=pR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return q1.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(Gc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],n={};return t.forEach(r=>{rg(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(Gc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()];let n={};return t.forEach(r=>{rg(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=WO(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===qO&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},dde=class extends Fh{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#i=nE(),this.options.experimental_prefetchInRender||this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#r=void 0;#n=void 0;#a;#o;#i;#s;#g;#d;#h;#l;#c;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),mR(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return rE(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return rE(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof La(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!W1(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&vR(this.#t,r,this.options,n)&&this.#f(),this.updateResult(t),i&&(this.#t!==r||La(this.options.enabled,this.#t)!==La(n.enabled,this.#t)||Pd(this.options.staleTime,this.#t)!==Pd(n.staleTime,this.#t))&&this.#m();const o=this.#v();i&&(this.#t!==r||La(this.options.enabled,this.#t)!==La(n.enabled,this.#t)||o!==this.#u)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return pde(this,n)&&(this.#n=n,this.#o=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(e,t){const n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(aa)),t}#m(){this.#x();const e=Pd(this.options.staleTime,this.#t);if(Kc||this.#n.isStale||!JC(e))return;const n=nB(this.#n.dataUpdatedAt,e)+1;this.#l=setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#u=e,!(Kc||La(this.options.enabled,this.#t)===!1||!JC(this.#u)||this.#u===0)&&(this.#c=setInterval(()=>{(this.options.refetchIntervalInBackground||KO.isFocused())&&this.#f()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#x(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#w(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#n,o=this.#a,a=this.#o,u=e!==n?e.state:this.#r,{state:l}=e;let c={...l},f=!1,h;if(t._optimisticResults){const k=this.hasListeners(),M=!k&&mR(e,t),N=k&&vR(e,n,t,r);(M||N)&&(c={...c,...lB(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:v}=c;if(t.select&&c.data!==void 0)if(i&&c.data===o?.data&&t.select===this.#g)h=this.#d;else try{this.#g=t.select,h=t.select(c.data),h=tE(i?.data,h,t),this.#d=h,this.#s=null}catch(k){this.#s=k}else h=c.data;if(t.placeholderData!==void 0&&h===void 0&&v==="pending"){let k;if(i?.isPlaceholderData&&t.placeholderData===a?.placeholderData)k=i.data;else if(k=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,t.select&&k!==void 0)try{k=t.select(k),this.#s=null}catch(M){this.#s=M}k!==void 0&&(v="success",h=tE(i?.data,k,t),f=!0)}this.#s&&(p=this.#s,h=this.#d,m=Date.now(),v="error");const b=c.fetchStatus==="fetching",w=v==="pending",x=v==="error",S=w&&b,O=h!==void 0,C={status:v,fetchStatus:c.fetchStatus,isPending:w,isSuccess:v==="success",isError:x,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:x&&!O,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&O,isStale:GO(e,t),refetch:this.refetch,promise:this.#i};if(this.options.experimental_prefetchInRender){const k=q=>{C.status==="error"?q.reject(C.error):C.data!==void 0&&q.resolve(C.data)},M=()=>{const q=this.#i=C.promise=nE();k(q)},N=this.#i;switch(N.status){case"pending":e.queryHash===n.queryHash&&k(N);break;case"fulfilled":(C.status==="error"||C.data!==N.value)&&M();break;case"rejected":(C.status!=="error"||C.error!==N.reason)&&M();break}}return C}updateResult(e){const t=this.#n,n=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#h=this.#t),W1(n,t))return;this.#n=n;const r={},i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.#p.size)return!0;const s=new Set(a??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(u=>{const l=u;return this.#n[l]!==t[l]&&s.has(l)})};e?.listeners!==!1&&i()&&(r.listeners=!0),this.#S({...r,...e})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){Ur.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function hde(e,t){return La(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function mR(e,t){return hde(e,t)||e.state.data!==void 0&&rE(e,t,t.refetchOnMount)}function rE(e,t,n){if(La(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&GO(e,t)}return!1}function vR(e,t,n,r){return(e!==t||La(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&GO(e,n)}function GO(e,t){return La(t.enabled,e)!==!1&&e.isStaleByTime(Pd(t.staleTime,e))}function pde(e,t){return!W1(e.getCurrentResult(),t)}var gde=class extends Fh{#e;#t=void 0;#r;#n;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),W1(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&Gc(n.mutationKey)!==Gc(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#o()}mutate(t,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(t)}#a(){const t=this.#r?.state??cB();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Ur.batch(()=>{if(this.#n&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context;t?.type==="success"?(this.#n.onSuccess?.(t.data,n,r),this.#n.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#n.onError?.(t.error,n,r),this.#n.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#t)})})}},fB=y.createContext(void 0),dB=e=>{const t=y.useContext(fB);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hZe=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),L.jsx(fB.Provider,{value:e,children:t})),hB=y.createContext(!1),mde=()=>y.useContext(hB);hB.Provider;function vde(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var yde=y.createContext(vde()),bde=()=>y.useContext(yde);function pB(e,t){return typeof e=="function"?e(...t):!!e}function iE(){}var xde=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},wde=e=>{y.useEffect(()=>{e.clearReset()},[e])},_de=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&pB(n,[e.error,r]),Sde=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Cde=(e,t)=>e.isLoading&&e.isFetching&&!t,Ede=(e,t)=>e?.suspense&&t.isPending,yR=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ode(e,t,n){const r=dB(),i=mde(),o=bde(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=i?"isRestoring":"optimistic",Sde(a),xde(a,o),wde(o);const s=!r.getQueryCache().get(a.queryHash),[u]=y.useState(()=>new t(r,a)),l=u.getOptimisticResult(a);if(y.useSyncExternalStore(y.useCallback(c=>{const f=i?iE:u.subscribe(Ur.batchCalls(c));return u.updateResult(),f},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),y.useEffect(()=>{u.setOptions(a,{listeners:!1})},[a,u]),Ede(a,l))throw yR(a,u,o);if(_de({result:l,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw l.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!Kc&&Cde(l,i)&&(s?yR(a,u,o):r.getQueryCache().get(a.queryHash)?.promise)?.catch(iE).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?l:u.trackResult(l)}function pZe(e,t){return Ode(e,dde)}function gZe(e,t){const n=dB(),[r]=y.useState(()=>new gde(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(Ur.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=y.useCallback((a,s)=>{r.mutate(a,s).catch(iE)},[r]);if(i.error&&pB(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}const It=e=>typeof e=="string",Lp=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},bR=e=>e==null?"":""+e,Ade=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},Pde=/###/g,xR=e=>e&&e.indexOf("###")>-1?e.replace(Pde,"."):e,wR=e=>!e||It(e),S0=(e,t,n)=>{const r=It(t)?t.split("."):t;let i=0;for(;i{const{obj:r,k:i}=S0(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],a=t.slice(0,t.length-1),s=S0(e,a,Object);for(;s.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=S0(e,a,Object),s?.obj&&typeof s.obj[`${s.k}.${o}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},kde=(e,t,n,r)=>{const{obj:i,k:o}=S0(e,t,Object);i[o]=i[o]||[],i[o].push(n)},K1=(e,t)=>{const{obj:n,k:r}=S0(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Tde=(e,t,n)=>{const r=K1(e,n);return r!==void 0?r:K1(t,n)},gB=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?It(e[r])||e[r]instanceof String||It(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):gB(e[r],t[r],n):e[r]=t[r]);return e},Uf=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Mde={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Rde=e=>It(e)?e.replace(/[&<>"'\/]/g,t=>Mde[t]):e;class Dde{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const $de=[" ",",","?","!",";"],Ide=new Dde(20),Nde=(e,t,n)=>{t=t||"",n=n||"";const r=$de.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=Ide.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(e);if(!o){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o},oE=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o-1&&ue?.replace("_","-"),Lde={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};let Fde=class aE{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Lde,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[s,u]=a;for(let l=0;l{let[s,u]=a;for(let l=0;l1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):It(r)&&o?s.push(...r.split(o)):s.push(r)));const u=K1(this.data,s);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),u||!a||!It(r)?u:oE(this.data?.[t]?.[n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),_R(this.data,s,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(It(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let u=K1(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?gB(u,r,o):u={...u,...r},_R(this.data,s,u),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var mB={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{t=this.processors[o]?.process(t,n,r,i)??t}),t}};const CR={};class Y1 extends iw{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Ade(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ms.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return t==null?!1:this.resolve(t,n)?.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Nde(t,r,i);if(a&&!s){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:It(o)?[o]:o};const l=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),t=l.join(i)}return{key:t,namespaces:It(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),u=s[s.length-1],l=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l?.toLowerCase()==="cimode"){if(c){const O=n.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${O}${a}`,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${O}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:a}const f=this.resolve(t,n);let h=f?.res;const p=f?.usedKey||a,m=f?.exactUsedKey||a,v=Object.prototype.toString.apply(h),b=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!It(h)&&typeof h!="boolean"&&typeof h!="number";if(x&&h&&S&&b.indexOf(v)<0&&!(It(w)&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(f.res=O,f.usedParams=this.getUsedParamsDetails(n),f):O}if(o){const O=Array.isArray(h),E=O?[]:{},C=O?m:p;for(const k in h)if(Object.prototype.hasOwnProperty.call(h,k)){const M=`${C}${o}${k}`;E[k]=this.translate(M,{...n,joinArrays:!1,ns:s}),E[k]===M&&(E[k]=h[k])}h=E}}else if(x&&It(w)&&Array.isArray(h))h=h.join(w),h&&(h=this.extendTranslation(h,t,n,r));else{let O=!1,E=!1;const C=n.count!==void 0&&!It(n.count),k=Y1.hasDefaultValue(n),M=C?this.pluralResolver.getSuffix(l,n.count,n):"",N=n.ordinal&&C?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",q=C&&!n.ordinal&&n.count===0,Y=q&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${M}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(h)&&k&&(O=!0,h=Y),this.isValidLookup(h)||(E=!0,h=a);const ne=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:h,Z=k&&Y!==h&&this.options.updateMissing;if(E||O||Z){if(this.logger.log(Z?"updateKey":"missingKey",l,u,a,Z?Y:h),o){const F=this.resolve(a,{...n,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let R=[];const B=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&B&&B[0])for(let F=0;F{const oe=k&&G!==h?G:ne;this.options.missingKeyHandler?this.options.missingKeyHandler(F,u,V,oe,Z,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(F,u,V,oe,Z,n),this.emit("missingKey",F,u,V,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?R.forEach(F=>{const V=this.pluralResolver.getSuffixes(F,n);q&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(G=>{U([F],a+G,n[`defaultValue${G}`]||Y)})}):U(R,a,Y))}h=this.extendTranslation(h,t,n,f,r),E&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${a}`),(E||O)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${a}`:a,O?h:void 0))}return i?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,i,o){var a=this;if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=It(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const h=t.match(this.interpolator.nestingRegexp);c=h&&h.length}let f=r.replace&&!It(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),l){const h=t.match(this.interpolator.nestingRegexp),p=h&&h.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,a,s;return It(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(u,n),c=l.key;i=c;let f=l.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!It(n.count),p=h&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(It(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(b=>{this.isValidLookup(r)||(s=b,!CR[`${v[0]}-${b}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(CR[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,c,w,b,n);else{let O;h&&(O=this.pluralResolver.getSuffix(w,n.count,n));const E=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(x.push(c+O),n.ordinal&&O.indexOf(C)===0&&x.push(c+O.replace(C,this.options.pluralSeparator)),p&&x.push(c+E)),m){const k=`${c}${this.options.contextSeparator}${n.context}`;x.push(k),h&&(x.push(k+O),n.ordinal&&O.indexOf(C)===0&&x.push(k+O.replace(C,this.options.pluralSeparator)),p&&x.push(k+E))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(o=S,r=this.getResource(w,b,S,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!It(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class ER{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ms.create("languageUtils")}getScriptPartFromCode(t){if(t=G1(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=G1(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(It(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),It(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return It(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):It(t)&&o(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}const OR={zero:0,one:1,two:2,few:3,many:4,other:5},AR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class jde{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ms.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=G1(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),AR;if(!t.match(/-|_/))return AR;const u=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(u,n)}return this.pluralRulesCache[o]=a,a}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>OR[i]-OR[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const PR=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=Tde(e,t,n);return!o&&i&&It(n)&&(o=oE(e,n,r),o===void 0&&(o=oE(t,n,r))),o},yS=e=>e.replace(/\$/g,"$$$$");class Bde{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:a,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:v,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:Rde,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Uf(o):a||"{{",this.suffix=s?Uf(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?Uf(h):p||Uf("$t("),this.nestingSuffix=m?Uf(m):v||Uf(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,a,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=p=>{if(p.indexOf(this.formatSeparator)<0){const w=PR(n,u,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...i,...n,interpolationkey:p}):w}const m=p.split(this.formatSeparator),v=m.shift().trim(),b=m.join(this.formatSeparator).trim();return this.format(PR(n,u,v,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:v})};this.resetRegExp();const c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>yS(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?yS(this.escape(p)):yS(p)}].forEach(p=>{for(s=0;o=p.regex.exec(t);){const m=o[1].trim();if(a=l(m),a===void 0)if(typeof c=="function"){const b=c(t,o,i);a=It(b)?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))a="";else if(f){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else!It(a)&&!this.useRawValueToEscape&&(a=bR(a));const v=p.safeValue(a);if(t=t.replace(o[0],v),f?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,a;const s=(u,l)=>{const c=this.nestingOptionsSeparator;if(u.indexOf(c)<0)return u;const f=u.split(new RegExp(`${c}[ ]*{`));let h=`{${f[1]}`;u=f[0],h=this.interpolate(h,a);const p=h.match(/'/g),m=h.match(/"/g);((p?.length??0)%2===0&&!m||m.length%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),l&&(a={...l,...a})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,v),`${u}${c}${h}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;i=this.nestingRegexp.exec(t);){let u=[];a={...r},a=a.replace&&!It(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=c.shift(),u=c,l=!0}if(o=n(s.call(this,i[1].trim(),a),a),o&&i[0]===t&&!It(o))return o;It(o)||(o=bR(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),l&&(o=u.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const zde=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(a){const[s,...u]=a.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();n[c]||(n[c]=l),l==="false"&&(n[c]=!1),l==="true"&&(n[c]=!0),isNaN(l)||(n[c]=parseInt(l,10))}})}return{formatName:t,formatOptions:n}},Hf=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(G1(r),i),t[a]=s),s(n)}};class Ude{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("formatter"),this.options=t,this.formats={number:Hf((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:Hf((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:Hf((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:Hf((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:Hf((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Hf(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(s=>s.indexOf(")")>-1)){const s=o.findIndex(u=>u.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,s)].join(this.formatSeparator)}return o.reduce((s,u)=>{const{formatName:l,formatOptions:c}=zde(u);if(this.formats[l]){let f=s;try{const h=i?.formatParams?.[i.interpolationkey]||{},p=h.locale||h.lng||i.locale||i.lng||r;f=this.formats[l](s,p,{...c,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${l}`);return s},t)}}const Hde=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Vde extends iw{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ms.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,i.backend,i)}queueLoad(t,n,r,i){const o={},a={},s={},u={};return t.forEach(l=>{let c=!0;n.forEach(f=>{const h=`${l}|${f}`;!r.reload&&this.store.hasResourceBundle(l,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,c=!1,a[h]===void 0&&(a[h]=!0),o[h]===void 0&&(o[h]=!0),u[f]===void 0&&(u[f]=!0)))}),c||(s[l]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const i=t.split("|"),o=i[0],a=i[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(u=>{kde(u.loaded,[o],a),Hde(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const c=u.loaded[l];c.length&&c.forEach(f=>{s[l][f]===void 0&&(s[l][f]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(l&&c&&i{this.read.call(this,t,n,r,i+1,o*2,a)},o);return}a(l,c)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const l=u(t,n);l&&typeof l.then=="function"?l.then(c=>s(null,c)).catch(s):s(null,l)}catch(l){s(l)}return}return u(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();It(t)&&(t=this.languageUtils.toResolveHierarchy(t)),It(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...a,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let c;l.length===5?c=l(t,n,r,i,u):c=l(t,n,r,i),c&&typeof c.then=="function"?c.then(f=>s(null,f)).catch(s):s(null,c)}catch(c){s(c)}else l(t,n,r,i,s,u)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const kR=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),It(e[1])&&(t.defaultValue=e[1]),It(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),TR=e=>(It(e.ns)&&(e.ns=[e.ns]),It(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),It(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),ay=()=>{},Wde=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};let vB=class sE extends iw{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=TR(t),this.services={},this.logger=ms,this.modules={external:[]},Wde(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(It(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=kR();this.options={...i,...this.options,...TR(n)},this.options.interpolation={...i.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ms.init(o(this.modules.logger),this.options):ms.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Ude;const f=new ER(this.options);this.store=new SR(this.options.resources,this.options);const h=this.services;h.logger=ms,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new jde(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=o(c),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new Bde(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Vde(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(p){for(var m=arguments.length,v=new Array(m>1?m-1:0),b=1;b1?m-1:0),b=1;b{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=ay),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const u=Lp(),l=()=>{const c=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),r(f,h)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ay;const i=It(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&o.indexOf(l)<0&&o.push(l)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>a(u)),this.options.preload?.forEach?.(s=>a(s)),this.services.backendConnector.load(o,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const i=Lp();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=ay),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&mB.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=Lp();this.emit("languageChanging",t);const o=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},a=(u,l)=>{l?(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},s=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const l=It(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||o(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector?.cacheUserLanguage?.(l)),this.loadResources(l,c=>{a(c,l)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,r){var i=this;const o=function(a,s){let u;if(typeof s!="object"){for(var l=arguments.length,c=new Array(l>2?l-2:0),f=2;f`${u.keyPrefix}${h}${m}`):p=u.keyPrefix?`${u.keyPrefix}${h}${a}`:a,i.t(p,u)};return It(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){for(var t=arguments.length,n=new Array(t),r=0;r1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(o,t)))}loadNamespaces(t,n){const r=Lp();return this.options.ns?(It(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Lp();It(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new ER(kR());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new sE(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ay;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new sE(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const s=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},Object.keys(u[l]).reduce((c,f)=>(c[f]={...u[l][f]},c),{})),{});o.store=new SR(s,i),o.services.resourceStore=o.store}return o.translator=new Y1(o.services,i),o.translator.on("*",function(s){for(var u=arguments.length,l=new Array(u>1?u-1:0),c=1;c{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);Rc(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},MR={},uE=(e,t,n,r)=>{Rc(n)&&MR[n]||(Rc(n)&&(MR[n]=new Date),qde(e,t,n,r))},yB=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},lE=(e,t,n)=>{e.loadNamespaces(t,yB(e,n))},RR=(e,t,n,r)=>{if(Rc(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return lE(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,yB(e,r))},Kde=(e,t,n={})=>!t.languages||!t.languages.length?(uE(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n?.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),Rc=e=>typeof e=="string",Gde=e=>typeof e=="object"&&e!==null,Yde=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Zde={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Xde=e=>Zde[e],Qde=e=>e.replace(Yde,Xde);let cE={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Qde};const Jde=(e={})=>{cE={...cE,...e}},ehe=()=>cE;let bB;const the=e=>{bB=e},nhe=()=>bB,vZe={type:"3rdParty",init(e){Jde(e.options.react),the(e)}},rhe=y.createContext();class ihe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const ohe=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},xB=(e,t,n,r)=>e.getFixedT(t,n,r),ahe=(e,t,n,r)=>y.useCallback(xB(e,t,n,r),[e,t,n,r]),yZe=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=y.useContext(rhe)||{},o=n||r||nhe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new ihe),!o){uE(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const O=(C,k)=>Rc(k)?k:Gde(k)&&Rc(k.defaultValue)?k.defaultValue:Array.isArray(C)?C[C.length-1]:C,E=[O,{},!1];return E.t=O,E.i18n={},E.ready=!1,E}o.options.react?.wait&&uE(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...ehe(),...o.options.react,...t},{useSuspense:s,keyPrefix:u}=a;let l=e||i||o.options?.defaultNS;l=Rc(l)?[l]:l||["translation"],o.reportNamespaces.addUsedNamespaces?.(l);const c=(o.isInitialized||o.initializedStoreOnce)&&l.every(O=>Kde(O,o,a)),f=ahe(o,t.lng||null,a.nsMode==="fallback"?l:l[0],u),h=()=>f,p=()=>xB(o,t.lng||null,a.nsMode==="fallback"?l:l[0],u),[m,v]=y.useState(h);let b=l.join();t.lng&&(b=`${t.lng}${b}`);const w=ohe(b),x=y.useRef(!0);y.useEffect(()=>{const{bindI18n:O,bindI18nStore:E}=a;x.current=!0,!c&&!s&&(t.lng?RR(o,t.lng,l,()=>{x.current&&v(p)}):lE(o,l,()=>{x.current&&v(p)})),c&&w&&w!==b&&x.current&&v(p);const C=()=>{x.current&&v(p)};return O&&o?.on(O,C),E&&o?.store.on(E,C),()=>{x.current=!1,o&&O?.split(" ").forEach(k=>o.off(k,C)),E&&o&&E.split(" ").forEach(k=>o.store.off(k,C))}},[o,b]),y.useEffect(()=>{x.current&&c&&v(h)},[o,u,c]);const S=[m,o,c];if(S.t=m,S.i18n=o,S.ready=c,c||!c&&!s)return S;throw new Promise(O=>{t.lng?RR(o,t.lng,l,()=>O()):lE(o,l,()=>O())})};function fE(e){"@babel/helpers - typeof";return fE=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},fE(e)}function wB(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":fE(XMLHttpRequest))==="object"}function she(e){return!!e&&typeof e.then=="function"}function uhe(e){return she(e)?e:Promise.resolve(e)}function DR(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 $R(e){for(var t=1;tPromise.resolve().then(()=>vYe),void 0,import.meta.url).then(function(e){fu=e.default}).catch(function(){})}catch{}var dE=function(t,n){if(n&&Yc(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},IR=function(t,n,r,i){var o=function(u){if(!u.ok)return r(u.statusText||"Error",{status:u.status});u.text().then(function(l){r(null,{status:u.status,data:l})}).catch(r)};if(i){var a=i(t,n);if(a instanceof Promise){a.then(o).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(o).catch(r):fu(t,n).then(o).catch(r)},NR=!1,dhe=function(t,n,r,i){t.queryStringParams&&(n=dE(n,t.queryStringParams));var o=$R({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(o["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=$R({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:o},NR?{}:a),u=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{IR(n,s,i,u)}catch(l){if(!a||Object.keys(a).length===0||!l.message||l.message.indexOf("not implemented")<0)return i(l);try{Object.keys(a).forEach(function(c){delete s[c]}),IR(n,s,i,u),NR=!0}catch(c){i(c)}}},hhe=function(t,n,r,i){r&&Yc(r)==="object"&&(r=dE("",r).slice(1)),t.queryStringParams&&(n=dE(n,t.queryStringParams));try{var o=ig?new ig:new Z1("MSXML2.XMLHTTP.3.0");o.open(r?"POST":"GET",n,1),t.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!t.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)o.setRequestHeader(s,a[s]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(u){console&&console.log(u)}},phe=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},fu&&n.indexOf("file:")!==0)return dhe(t,n,r,i);if(wB()||typeof ActiveXObject=="function")return hhe(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Yd(e){"@babel/helpers - typeof";return Yd=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},Yd(e)}function LR(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 bS(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ghe(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return vhe(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=bS(bS(bS({},bhe()),this.options||{}),i),this.allOptions=o,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);Yd(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,o,a){var s=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(n,i)),u=uhe(u),u.then(function(l){if(!l)return a(null,{});var c=s.services.interpolator.interpolate(l,{lng:n.join("+"),ns:i.join("+")});s.loadUrl(c,a,r,o)})}},{key:"loadUrl",value:function(n,r,i,o){var a=this,s=typeof i=="string"?[i]:i,u=typeof o=="string"?[o]:o,l=this.options.parseLoadPayload(s,u);this.options.request(this.options,n,l,function(c,f){if(f&&(f.status>=500&&f.status<600||!f.status))return r("failed loading "+n+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return r("failed loading "+n+"; status code: "+f.status,!1);if(!f&&c&&c.message){var h=c.message.toLowerCase(),p=["failed","fetch","network","load"].find(function(b){return h.indexOf(b)>-1});if(p)return r("failed loading "+n+": "+c.message,!0)}if(c)return r(c,!1);var m,v;try{typeof f.data=="string"?m=a.options.parse(f.data,i,o):m=f.data}catch{v="failed parsing "+n+" to json"}if(v)return r(v,!1);r(null,m)})}},{key:"create",value:function(n,r,i,o,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var u=this.options.parsePayload(r,i,o),l=0,c=[],f=[];n.forEach(function(h){var p=s.options.addPath;typeof s.options.addPath=="function"&&(p=s.options.addPath(h,r));var m=s.services.interpolator.interpolate(p,{lng:h,ns:r});s.options.request(s.options,m,u,function(v,b){l+=1,c.push(v),f.push(b),l===n.length&&typeof a=="function"&&a(c,f)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,o=r.languageUtils,a=r.logger,s=i.language;if(!(s&&s.toLowerCase()==="cimode")){var u=[],l=function(f){var h=o.toResolveHierarchy(f);h.forEach(function(p){u.indexOf(p)<0&&u.push(p)})};l(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return l(c)}),u.forEach(function(c){n.allOptions.ns.forEach(function(f){i.read(c,f,"read",null,null,function(h,p){h&&a.warn("loading namespace ".concat(f," for language ").concat(c," failed"),h),!h&&p&&a.log("loaded namespace ".concat(f," for language ").concat(c),p),i.loaded("".concat(c,"|").concat(f),h,p)})})})}}}])}();xhe.type="backend";const{slice:whe,forEach:_he}=[];function She(e){return _he.call(whe.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const FR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Che=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!FR.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!FR.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},jR={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Che(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a0&&o[a].substring(0,s)===t&&(n=o[a].substring(s+1))}}return n}};let Fp=null;const BR=()=>{if(Fp!==null)return Fp;try{Fp=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Fp=!1}return Fp};var Ahe={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&BR())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&BR()&&window.localStorage.setItem(n,e)}};let jp=null;const zR=()=>{if(jp!==null)return jp;try{jp=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{jp=!1}return jp};var Phe={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&zR())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&zR()&&window.sessionStorage.setItem(n,e)}},khe={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o0?t:void 0}},The={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Mhe={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},Rhe={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let CB=!1;try{document.cookie,CB=!0}catch{}const EB=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];CB||EB.splice(1,1);const Dhe=()=>({order:EB,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class $he{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=She(n,this.options||{},Dhe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Ehe),this.addDetector(Ohe),this.addDetector(Ahe),this.addDetector(Phe),this.addDetector(khe),this.addDetector(The),this.addDetector(Mhe),this.addDetector(Rhe)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}$he.type="languageDetector";var Sm=e=>e.type==="checkbox",Sc=e=>e instanceof Date,zi=e=>e==null;const OB=e=>typeof e=="object";var Or=e=>!zi(e)&&!Array.isArray(e)&&OB(e)&&!Sc(e),AB=e=>Or(e)&&e.target?Sm(e.target)?e.target.checked:e.target.value:e,Ihe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,PB=(e,t)=>e.has(Ihe(t)),Nhe=e=>{const t=e.constructor&&e.constructor.prototype;return Or(t)&&t.hasOwnProperty("isPrototypeOf")},YO=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function no(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(YO&&(e instanceof Blob||r))&&(n||Or(e)))if(t=n?[]:{},!n&&!Nhe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=no(e[i]));else return e;return t}var ow=e=>Array.isArray(e)?e.filter(Boolean):[],Sr=e=>e===void 0,Xe=(e,t,n)=>{if(!t||!Or(e))return n;const r=ow(t.split(/[,[\].]+?/)).reduce((i,o)=>zi(i)?i:i[o],e);return Sr(r)||r===e?Sr(e[t])?n:e[t]:r},sa=e=>typeof e=="boolean",ZO=e=>/^\w*$/.test(e),kB=e=>ow(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Pn=(e,t,n)=>{let r=-1;const i=ZO(t)?[t]:kB(t),o=i.length,a=o-1;for(;++rz.useContext(TB),bZe=e=>{const{children:t,...n}=e;return z.createElement(TB.Provider,{value:n},t)};var MB=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==ja.all&&(t._proxyFormState[a]=!r||ja.all),n&&(n[a]=!0),e[a]}});return i},io=e=>Or(e)&&!Object.keys(e).length,RB=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return io(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!r||ja.all))},C0=e=>Array.isArray(e)?e:[e],DB=(e,t,n)=>!e||!t||e===t||C0(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function QO(e){const t=z.useRef(e);t.current=e,z.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function Lhe(e){const t=XO(),{control:n=t.control,disabled:r,name:i,exact:o}=e,[a,s]=z.useState(n._formState),u=z.useRef(!0),l=z.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=z.useRef(i);return c.current=i,QO({disabled:r,next:f=>u.current&&DB(c.current,f.name,o)&&RB(f,l.current,n._updateFormState)&&s({...n._formState,...f}),subject:n._subjects.state}),z.useEffect(()=>(u.current=!0,l.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),z.useMemo(()=>MB(a,n,l.current,!1),[a,n])}var vs=e=>typeof e=="string",$B=(e,t,n,r,i)=>vs(e)?(r&&t.watch.add(e),Xe(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Xe(n,o))):(r&&(t.watchAll=!0),n);function Fhe(e){const t=XO(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e,s=z.useRef(r);s.current=r,QO({disabled:o,subject:n._subjects.values,next:c=>{DB(s.current,c.name,a)&&l(no($B(s.current,n._names,c.values||n._formValues,!1,i)))}});const[u,l]=z.useState(n._getWatch(r,i));return z.useEffect(()=>n._removeUnmounted()),u}function jhe(e){const t=XO(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,a=PB(i._names.array,n),s=Fhe({control:i,name:n,defaultValue:Xe(i._formValues,n,Xe(i._defaultValues,n,e.defaultValue)),exact:!0}),u=Lhe({control:i,name:n,exact:!0}),l=z.useRef(i.register(n,{...e.rules,value:s,...sa(e.disabled)?{disabled:e.disabled}:{}})),c=z.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Xe(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!Xe(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Xe(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Xe(u.validatingFields,n)},error:{enumerable:!0,get:()=>Xe(u.errors,n)}}),[u,n]),f=z.useMemo(()=>({name:n,value:s,...sa(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:h=>l.current.onChange({target:{value:AB(h),name:n},type:X1.CHANGE}),onBlur:()=>l.current.onBlur({target:{value:Xe(i._formValues,n),name:n},type:X1.BLUR}),ref:h=>{const p=Xe(i._fields,n);p&&h&&(p._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:m=>h.setCustomValidity(m),reportValidity:()=>h.reportValidity()})}}),[n,i._formValues,r,u.disabled,s,i._fields]);return z.useEffect(()=>{const h=i._options.shouldUnregister||o,p=(m,v)=>{const b=Xe(i._fields,m);b&&b._f&&(b._f.mount=v)};if(p(n,!0),h){const m=no(Xe(i._options.defaultValues,n));Pn(i._defaultValues,n,m),Sr(Xe(i._formValues,n))&&Pn(i._formValues,n,m)}return!a&&i.register(n),()=>{(a?h&&!i._state.action:h)?i.unregister(n):p(n,!1)}},[n,i,a,o]),z.useEffect(()=>{i._updateDisabledField({disabled:r,fields:i._fields,name:n})},[r,n,i]),z.useMemo(()=>({field:f,formState:u,fieldState:c}),[f,u,c])}const xZe=e=>e.render(jhe(e));var IB=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},UR=e=>({isOnSubmit:!e||e===ja.onSubmit,isOnBlur:e===ja.onBlur,isOnChange:e===ja.onChange,isOnAll:e===ja.all,isOnTouch:e===ja.onTouched}),HR=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const E0=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Xe(e,i);if(o){const{_f:a,...s}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(E0(s,t))break}else if(Or(s)&&E0(s,t))break}}};var Bhe=(e,t,n)=>{const r=C0(Xe(e,n));return Pn(r,"root",t[n]),Pn(e,n,r),e},JO=e=>e.type==="file",hs=e=>typeof e=="function",Q1=e=>{if(!YO)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},e1=e=>vs(e),eA=e=>e.type==="radio",J1=e=>e instanceof RegExp;const VR={value:!1,isValid:!1},WR={value:!0,isValid:!0};var NB=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Sr(e[0].attributes.value)?Sr(e[0].value)||e[0].value===""?WR:{value:e[0].value,isValid:!0}:WR:VR}return VR};const qR={isValid:!1,value:null};var LB=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,qR):qR;function KR(e,t,n="validate"){if(e1(e)||Array.isArray(e)&&e.every(e1)||sa(e)&&!e)return{type:n,message:e1(e)?e:"",ref:t}}var Vf=e=>Or(e)&&!J1(e)?e:{value:e,message:""},GR=async(e,t,n,r,i,o)=>{const{ref:a,refs:s,required:u,maxLength:l,minLength:c,min:f,max:h,pattern:p,validate:m,name:v,valueAsNumber:b,mount:w}=e._f,x=Xe(n,v);if(!w||t.has(v))return{};const S=s?s[0]:a,O=W=>{i&&S.reportValidity&&(S.setCustomValidity(sa(W)?"":W||""),S.reportValidity())},E={},C=eA(a),k=Sm(a),M=C||k,N=(b||JO(a))&&Sr(a.value)&&Sr(x)||Q1(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,q=IB.bind(null,v,r,E),Y=(W,ne,Z,R=Ks.maxLength,B=Ks.minLength)=>{const U=W?ne:Z;E[v]={type:W?R:B,message:U,ref:a,...q(W?R:B,U)}};if(o?!Array.isArray(x)||!x.length:u&&(!M&&(N||zi(x))||sa(x)&&!x||k&&!NB(s).isValid||C&&!LB(s).isValid)){const{value:W,message:ne}=e1(u)?{value:!!u,message:u}:Vf(u);if(W&&(E[v]={type:Ks.required,message:ne,ref:S,...q(Ks.required,ne)},!r))return O(ne),E}if(!N&&(!zi(f)||!zi(h))){let W,ne;const Z=Vf(h),R=Vf(f);if(!zi(x)&&!isNaN(x)){const B=a.valueAsNumber||x&&+x;zi(Z.value)||(W=B>Z.value),zi(R.value)||(ne=Bnew Date(new Date().toDateString()+" "+G),F=a.type=="time",V=a.type=="week";vs(Z.value)&&x&&(W=F?U(x)>U(Z.value):V?x>Z.value:B>new Date(Z.value)),vs(R.value)&&x&&(ne=F?U(x)+W.value,R=!zi(ne.value)&&x.length<+ne.value;if((Z||R)&&(Y(Z,W.message,ne.message),!r))return O(E[v].message),E}if(p&&!N&&vs(x)){const{value:W,message:ne}=Vf(p);if(J1(W)&&!x.match(W)&&(E[v]={type:Ks.pattern,message:ne,ref:a,...q(Ks.pattern,ne)},!r))return O(ne),E}if(m){if(hs(m)){const W=await m(x,n),ne=KR(W,S);if(ne&&(E[v]={...ne,...q(Ks.validate,ne.message)},!r))return O(ne.message),E}else if(Or(m)){let W={};for(const ne in m){if(!io(W)&&!r)break;const Z=KR(await m[ne](x,n),S,ne);Z&&(W={...Z,...q(ne,Z.message)},O(Z.message),r&&(E[v]=W))}if(!io(W)&&(E[v]={ref:S,...W},!r))return E}}return O(!0),E};function zhe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},hE=e=>zi(e)||!OB(e);function rl(e,t){if(hE(e)||hE(t))return e===t;if(Sc(e)&&Sc(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const a=t[i];if(Sc(o)&&Sc(a)||Or(o)&&Or(a)||Array.isArray(o)&&Array.isArray(a)?!rl(o,a):o!==a)return!1}}return!0}var FB=e=>e.type==="select-multiple",Hhe=e=>eA(e)||Sm(e),wS=e=>Q1(e)&&e.isConnected,jB=e=>{for(const t in e)if(hs(e[t]))return!0;return!1};function eb(e,t={}){const n=Array.isArray(e);if(Or(e)||n)for(const r in e)Array.isArray(e[r])||Or(e[r])&&!jB(e[r])?(t[r]=Array.isArray(e[r])?[]:{},eb(e[r],t[r])):zi(e[r])||(t[r]=!0);return t}function BB(e,t,n){const r=Array.isArray(e);if(Or(e)||r)for(const i in e)Array.isArray(e[i])||Or(e[i])&&!jB(e[i])?Sr(t)||hE(n[i])?n[i]=Array.isArray(e[i])?eb(e[i],[]):{...eb(e[i])}:BB(e[i],zi(t)?{}:t[i],n[i]):n[i]=!rl(e[i],t[i]);return n}var Bp=(e,t)=>BB(e,t,eb(t)),zB=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Sr(e)?e:t?e===""?NaN:e&&+e:n&&vs(e)?new Date(e):r?r(e):e;function _S(e){const t=e.ref;return JO(t)?t.files:eA(t)?LB(e.refs).value:FB(t)?[...t.selectedOptions].map(({value:n})=>n):Sm(t)?NB(e.refs).value:zB(Sr(t.value)?e.ref.value:t.value,e)}var Vhe=(e,t,n,r)=>{const i={};for(const o of e){const a=Xe(t,o);a&&Pn(i,o,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},zp=e=>Sr(e)?e:J1(e)?e.source:Or(e)?J1(e.value)?e.value.source:e.value:e;const YR="AsyncFunction";var Whe=e=>!!e&&!!e.validate&&!!(hs(e.validate)&&e.validate.constructor.name===YR||Or(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===YR)),qhe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function ZR(e,t,n){const r=Xe(e,n);if(r||ZO(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),a=Xe(t,o),s=Xe(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:n}}var Khe=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,Ghe=(e,t)=>!ow(Xe(e,t)).length&&Br(e,t);const Yhe={mode:ja.onSubmit,reValidateMode:ja.onChange,shouldFocusError:!0};function Zhe(e={}){let t={...Yhe,...e},n={submitCount:0,isDirty:!1,isLoading:hs(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Or(t.defaultValues)||Or(t.values)?no(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:no(i),a={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u,l=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:xS(),array:xS(),state:xS()},h=UR(t.mode),p=UR(t.reValidateMode),m=t.criteriaMode===ja.all,v=ie=>pe=>{clearTimeout(l),l=setTimeout(ie,pe)},b=async ie=>{if(!t.disabled&&(c.isValid||ie)){const pe=t.resolver?io((await M()).errors):await q(r,!0);pe!==n.isValid&&f.state.next({isValid:pe})}},w=(ie,pe)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((ie||Array.from(s.mount)).forEach(ye=>{ye&&(pe?Pn(n.validatingFields,ye,pe):Br(n.validatingFields,ye))}),f.state.next({validatingFields:n.validatingFields,isValidating:!io(n.validatingFields)}))},x=(ie,pe=[],ye,Ue,je=!0,ke=!0)=>{if(Ue&&ye&&!t.disabled){if(a.action=!0,ke&&Array.isArray(Xe(r,ie))){const nt=ye(Xe(r,ie),Ue.argA,Ue.argB);je&&Pn(r,ie,nt)}if(ke&&Array.isArray(Xe(n.errors,ie))){const nt=ye(Xe(n.errors,ie),Ue.argA,Ue.argB);je&&Pn(n.errors,ie,nt),Ghe(n.errors,ie)}if(c.touchedFields&&ke&&Array.isArray(Xe(n.touchedFields,ie))){const nt=ye(Xe(n.touchedFields,ie),Ue.argA,Ue.argB);je&&Pn(n.touchedFields,ie,nt)}c.dirtyFields&&(n.dirtyFields=Bp(i,o)),f.state.next({name:ie,isDirty:W(ie,pe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Pn(o,ie,pe)},S=(ie,pe)=>{Pn(n.errors,ie,pe),f.state.next({errors:n.errors})},O=ie=>{n.errors=ie,f.state.next({errors:n.errors,isValid:!1})},E=(ie,pe,ye,Ue)=>{const je=Xe(r,ie);if(je){const ke=Xe(o,ie,Sr(ye)?Xe(i,ie):ye);Sr(ke)||Ue&&Ue.defaultChecked||pe?Pn(o,ie,pe?ke:_S(je._f)):R(ie,ke),a.mount&&b()}},C=(ie,pe,ye,Ue,je)=>{let ke=!1,nt=!1;const mt={name:ie};if(!t.disabled){const xn=!!(Xe(r,ie)&&Xe(r,ie)._f&&Xe(r,ie)._f.disabled);if(!ye||Ue){c.isDirty&&(nt=n.isDirty,n.isDirty=mt.isDirty=W(),ke=nt!==mt.isDirty);const Wt=xn||rl(Xe(i,ie),pe);nt=!!(!xn&&Xe(n.dirtyFields,ie)),Wt||xn?Br(n.dirtyFields,ie):Pn(n.dirtyFields,ie,!0),mt.dirtyFields=n.dirtyFields,ke=ke||c.dirtyFields&&nt!==!Wt}if(ye){const Wt=Xe(n.touchedFields,ie);Wt||(Pn(n.touchedFields,ie,ye),mt.touchedFields=n.touchedFields,ke=ke||c.touchedFields&&Wt!==ye)}ke&&je&&f.state.next(mt)}return ke?mt:{}},k=(ie,pe,ye,Ue)=>{const je=Xe(n.errors,ie),ke=c.isValid&&sa(pe)&&n.isValid!==pe;if(t.delayError&&ye?(u=v(()=>S(ie,ye)),u(t.delayError)):(clearTimeout(l),u=null,ye?Pn(n.errors,ie,ye):Br(n.errors,ie)),(ye?!rl(je,ye):je)||!io(Ue)||ke){const nt={...Ue,...ke&&sa(pe)?{isValid:pe}:{},errors:n.errors,name:ie};n={...n,...nt},f.state.next(nt)}},M=async ie=>{w(ie,!0);const pe=await t.resolver(o,t.context,Vhe(ie||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(ie),pe},N=async ie=>{const{errors:pe}=await M(ie);if(ie)for(const ye of ie){const Ue=Xe(pe,ye);Ue?Pn(n.errors,ye,Ue):Br(n.errors,ye)}else n.errors=pe;return pe},q=async(ie,pe,ye={valid:!0})=>{for(const Ue in ie){const je=ie[Ue];if(je){const{_f:ke,...nt}=je;if(ke){const mt=s.array.has(ke.name),xn=je._f&&Whe(je._f);xn&&c.validatingFields&&w([Ue],!0);const Wt=await GR(je,s.disabled,o,m,t.shouldUseNativeValidation&&!pe,mt);if(xn&&c.validatingFields&&w([Ue]),Wt[ke.name]&&(ye.valid=!1,pe))break;!pe&&(Xe(Wt,ke.name)?mt?Bhe(n.errors,Wt,ke.name):Pn(n.errors,ke.name,Wt[ke.name]):Br(n.errors,ke.name))}!io(nt)&&await q(nt,pe,ye)}}return ye.valid},Y=()=>{for(const ie of s.unMount){const pe=Xe(r,ie);pe&&(pe._f.refs?pe._f.refs.every(ye=>!wS(ye)):!wS(pe._f.ref))&&Se(ie)}s.unMount=new Set},W=(ie,pe)=>!t.disabled&&(ie&&pe&&Pn(o,ie,pe),!rl(oe(),i)),ne=(ie,pe,ye)=>$B(ie,s,{...a.mount?o:Sr(pe)?i:vs(ie)?{[ie]:pe}:pe},ye,pe),Z=ie=>ow(Xe(a.mount?o:i,ie,t.shouldUnregister?Xe(i,ie,[]):[])),R=(ie,pe,ye={})=>{const Ue=Xe(r,ie);let je=pe;if(Ue){const ke=Ue._f;ke&&(!ke.disabled&&Pn(o,ie,zB(pe,ke)),je=Q1(ke.ref)&&zi(pe)?"":pe,FB(ke.ref)?[...ke.ref.options].forEach(nt=>nt.selected=je.includes(nt.value)):ke.refs?Sm(ke.ref)?ke.refs.length>1?ke.refs.forEach(nt=>(!nt.defaultChecked||!nt.disabled)&&(nt.checked=Array.isArray(je)?!!je.find(mt=>mt===nt.value):je===nt.value)):ke.refs[0]&&(ke.refs[0].checked=!!je):ke.refs.forEach(nt=>nt.checked=nt.value===je):JO(ke.ref)?ke.ref.value="":(ke.ref.value=je,ke.ref.type||f.values.next({name:ie,values:{...o}})))}(ye.shouldDirty||ye.shouldTouch)&&C(ie,je,ye.shouldTouch,ye.shouldDirty,!0),ye.shouldValidate&&G(ie)},B=(ie,pe,ye)=>{for(const Ue in pe){const je=pe[Ue],ke=`${ie}.${Ue}`,nt=Xe(r,ke);(s.array.has(ie)||Or(je)||nt&&!nt._f)&&!Sc(je)?B(ke,je,ye):R(ke,je,ye)}},U=(ie,pe,ye={})=>{const Ue=Xe(r,ie),je=s.array.has(ie),ke=no(pe);Pn(o,ie,ke),je?(f.array.next({name:ie,values:{...o}}),(c.isDirty||c.dirtyFields)&&ye.shouldDirty&&f.state.next({name:ie,dirtyFields:Bp(i,o),isDirty:W(ie,ke)})):Ue&&!Ue._f&&!zi(ke)?B(ie,ke,ye):R(ie,ke,ye),HR(ie,s)&&f.state.next({...n}),f.values.next({name:a.mount?ie:void 0,values:{...o}})},F=async ie=>{a.mount=!0;const pe=ie.target;let ye=pe.name,Ue=!0;const je=Xe(r,ye),ke=()=>pe.type?_S(je._f):AB(ie),nt=mt=>{Ue=Number.isNaN(mt)||Sc(mt)&&isNaN(mt.getTime())||rl(mt,Xe(o,ye,mt))};if(je){let mt,xn;const Wt=ke(),wn=ie.type===X1.BLUR||ie.type===X1.FOCUS_OUT,Ii=!qhe(je._f)&&!t.resolver&&!Xe(n.errors,ye)&&!je._f.deps||Khe(wn,Xe(n.touchedFields,ye),n.isSubmitted,p,h),br=HR(ye,s,wn);Pn(o,ye,Wt),wn?(je._f.onBlur&&je._f.onBlur(ie),u&&u(0)):je._f.onChange&&je._f.onChange(ie);const yi=C(ye,Wt,wn,!1),sr=!io(yi)||br;if(!wn&&f.values.next({name:ye,type:ie.type,values:{...o}}),Ii)return c.isValid&&(t.mode==="onBlur"&&wn?b():wn||b()),sr&&f.state.next({name:ye,...br?{}:yi});if(!wn&&br&&f.state.next({...n}),t.resolver){const{errors:si}=await M([ye]);if(nt(Wt),Ue){const bi=ZR(n.errors,r,ye),Rr=ZR(si,r,bi.name||ye);mt=Rr.error,ye=Rr.name,xn=io(si)}}else w([ye],!0),mt=(await GR(je,s.disabled,o,m,t.shouldUseNativeValidation))[ye],w([ye]),nt(Wt),Ue&&(mt?xn=!1:c.isValid&&(xn=await q(r,!0)));Ue&&(je._f.deps&&G(je._f.deps),k(ye,xn,mt,yi))}},V=(ie,pe)=>{if(Xe(n.errors,pe)&&ie.focus)return ie.focus(),1},G=async(ie,pe={})=>{let ye,Ue;const je=C0(ie);if(t.resolver){const ke=await N(Sr(ie)?ie:je);ye=io(ke),Ue=ie?!je.some(nt=>Xe(ke,nt)):ye}else ie?(Ue=(await Promise.all(je.map(async ke=>{const nt=Xe(r,ke);return await q(nt&&nt._f?{[ke]:nt}:nt)}))).every(Boolean),!(!Ue&&!n.isValid)&&b()):Ue=ye=await q(r);return f.state.next({...!vs(ie)||c.isValid&&ye!==n.isValid?{}:{name:ie},...t.resolver||!ie?{isValid:ye}:{},errors:n.errors}),pe.shouldFocus&&!Ue&&E0(r,V,ie?je:s.mount),Ue},oe=ie=>{const pe={...a.mount?o:i};return Sr(ie)?pe:vs(ie)?Xe(pe,ie):ie.map(ye=>Xe(pe,ye))},Q=(ie,pe)=>({invalid:!!Xe((pe||n).errors,ie),isDirty:!!Xe((pe||n).dirtyFields,ie),error:Xe((pe||n).errors,ie),isValidating:!!Xe(n.validatingFields,ie),isTouched:!!Xe((pe||n).touchedFields,ie)}),X=ie=>{ie&&C0(ie).forEach(pe=>Br(n.errors,pe)),f.state.next({errors:ie?n.errors:{}})},ue=(ie,pe,ye)=>{const Ue=(Xe(r,ie,{_f:{}})._f||{}).ref,je=Xe(n.errors,ie)||{},{ref:ke,message:nt,type:mt,...xn}=je;Pn(n.errors,ie,{...xn,...pe,ref:Ue}),f.state.next({name:ie,errors:n.errors,isValid:!1}),ye&&ye.shouldFocus&&Ue&&Ue.focus&&Ue.focus()},de=(ie,pe)=>hs(ie)?f.values.subscribe({next:ye=>ie(ne(void 0,pe),ye)}):ne(ie,pe,!0),Se=(ie,pe={})=>{for(const ye of ie?C0(ie):s.mount)s.mount.delete(ye),s.array.delete(ye),pe.keepValue||(Br(r,ye),Br(o,ye)),!pe.keepError&&Br(n.errors,ye),!pe.keepDirty&&Br(n.dirtyFields,ye),!pe.keepTouched&&Br(n.touchedFields,ye),!pe.keepIsValidating&&Br(n.validatingFields,ye),!t.shouldUnregister&&!pe.keepDefaultValue&&Br(i,ye);f.values.next({values:{...o}}),f.state.next({...n,...pe.keepDirty?{isDirty:W()}:{}}),!pe.keepIsValid&&b()},me=({disabled:ie,name:pe,field:ye,fields:Ue})=>{(sa(ie)&&a.mount||ie||s.disabled.has(pe))&&(ie?s.disabled.add(pe):s.disabled.delete(pe),C(pe,_S(ye?ye._f:Xe(Ue,pe)._f),!1,!1,!0))},Ze=(ie,pe={})=>{let ye=Xe(r,ie);const Ue=sa(pe.disabled)||sa(t.disabled);return Pn(r,ie,{...ye||{},_f:{...ye&&ye._f?ye._f:{ref:{name:ie}},name:ie,mount:!0,...pe}}),s.mount.add(ie),ye?me({field:ye,disabled:sa(pe.disabled)?pe.disabled:t.disabled,name:ie}):E(ie,!0,pe.value),{...Ue?{disabled:pe.disabled||t.disabled}:{},...t.progressive?{required:!!pe.required,min:zp(pe.min),max:zp(pe.max),minLength:zp(pe.minLength),maxLength:zp(pe.maxLength),pattern:zp(pe.pattern)}:{},name:ie,onChange:F,onBlur:F,ref:je=>{if(je){Ze(ie,pe),ye=Xe(r,ie);const ke=Sr(je.value)&&je.querySelectorAll&&je.querySelectorAll("input,select,textarea")[0]||je,nt=Hhe(ke),mt=ye._f.refs||[];if(nt?mt.find(xn=>xn===ke):ke===ye._f.ref)return;Pn(r,ie,{_f:{...ye._f,...nt?{refs:[...mt.filter(wS),ke,...Array.isArray(Xe(i,ie))?[{}]:[]],ref:{type:ke.type,name:ie}}:{ref:ke}}}),E(ie,!1,void 0,ke)}else ye=Xe(r,ie,{}),ye._f&&(ye._f.mount=!1),(t.shouldUnregister||pe.shouldUnregister)&&!(PB(s.array,ie)&&a.action)&&s.unMount.add(ie)}}},Ae=()=>t.shouldFocusError&&E0(r,V,s.mount),Le=ie=>{sa(ie)&&(f.state.next({disabled:ie}),E0(r,(pe,ye)=>{const Ue=Xe(r,ye);Ue&&(pe.disabled=Ue._f.disabled||ie,Array.isArray(Ue._f.refs)&&Ue._f.refs.forEach(je=>{je.disabled=Ue._f.disabled||ie}))},0,!1))},$e=(ie,pe)=>async ye=>{let Ue;ye&&(ye.preventDefault&&ye.preventDefault(),ye.persist&&ye.persist());let je=no(o);if(s.disabled.size)for(const ke of s.disabled)Pn(je,ke,void 0);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:ke,values:nt}=await M();n.errors=ke,je=nt}else await q(r);if(Br(n.errors,"root"),io(n.errors)){f.state.next({errors:{}});try{await ie(je,ye)}catch(ke){Ue=ke}}else pe&&await pe({...n.errors},ye),Ae(),setTimeout(Ae);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:io(n.errors)&&!Ue,submitCount:n.submitCount+1,errors:n.errors}),Ue)throw Ue},be=(ie,pe={})=>{Xe(r,ie)&&(Sr(pe.defaultValue)?U(ie,no(Xe(i,ie))):(U(ie,pe.defaultValue),Pn(i,ie,no(pe.defaultValue))),pe.keepTouched||Br(n.touchedFields,ie),pe.keepDirty||(Br(n.dirtyFields,ie),n.isDirty=pe.defaultValue?W(ie,no(Xe(i,ie))):W()),pe.keepError||(Br(n.errors,ie),c.isValid&&b()),f.state.next({...n}))},yt=(ie,pe={})=>{const ye=ie?no(ie):i,Ue=no(ye),je=io(ie),ke=je?i:Ue;if(pe.keepDefaultValues||(i=ye),!pe.keepValues){if(pe.keepDirtyValues){const nt=new Set([...s.mount,...Object.keys(Bp(i,o))]);for(const mt of Array.from(nt))Xe(n.dirtyFields,mt)?Pn(ke,mt,Xe(o,mt)):U(mt,Xe(ke,mt))}else{if(YO&&Sr(ie))for(const nt of s.mount){const mt=Xe(r,nt);if(mt&&mt._f){const xn=Array.isArray(mt._f.refs)?mt._f.refs[0]:mt._f.ref;if(Q1(xn)){const Wt=xn.closest("form");if(Wt){Wt.reset();break}}}}r={}}o=t.shouldUnregister?pe.keepDefaultValues?no(i):{}:no(ke),f.array.next({values:{...ke}}),f.values.next({values:{...ke}})}s={mount:pe.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!pe.keepIsValid||!!pe.keepDirtyValues,a.watch=!!t.shouldUnregister,f.state.next({submitCount:pe.keepSubmitCount?n.submitCount:0,isDirty:je?!1:pe.keepDirty?n.isDirty:!!(pe.keepDefaultValues&&!rl(ie,i)),isSubmitted:pe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:je?{}:pe.keepDirtyValues?pe.keepDefaultValues&&o?Bp(i,o):n.dirtyFields:pe.keepDefaultValues&&ie?Bp(i,ie):pe.keepDirty?n.dirtyFields:{},touchedFields:pe.keepTouched?n.touchedFields:{},errors:pe.keepErrors?n.errors:{},isSubmitSuccessful:pe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},lt=(ie,pe)=>yt(hs(ie)?ie(o):ie,pe);return{control:{register:Ze,unregister:Se,getFieldState:Q,handleSubmit:$e,setError:ue,_executeSchema:M,_getWatch:ne,_getDirty:W,_updateValid:b,_removeUnmounted:Y,_updateFieldArray:x,_updateDisabledField:me,_getFieldArray:Z,_reset:yt,_resetDefaultValues:()=>hs(t.defaultValues)&&t.defaultValues().then(ie=>{lt(ie,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:ie=>{n={...n,...ie}},_disableForm:Le,_subjects:f,_proxyFormState:c,_setErrors:O,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(ie){a=ie},get _defaultValues(){return i},get _names(){return s},set _names(ie){s=ie},get _formState(){return n},set _formState(ie){n=ie},get _options(){return t},set _options(ie){t={...t,...ie}}},trigger:G,register:Ze,handleSubmit:$e,watch:de,setValue:U,getValues:oe,reset:lt,resetField:be,clearErrors:X,unregister:Se,setError:ue,setFocus:(ie,pe={})=>{const ye=Xe(r,ie),Ue=ye&&ye._f;if(Ue){const je=Ue.refs?Ue.refs[0]:Ue.ref;je.focus&&(je.focus(),pe.shouldSelect&&hs(je.select)&&je.select())}},getFieldState:Q}}function wZe(e={}){const t=z.useRef(void 0),n=z.useRef(void 0),[r,i]=z.useState({isDirty:!1,isValidating:!1,isLoading:hs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:hs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Zhe(e),formState:r});const o=t.current.control;return o._options=e,QO({subject:o._subjects.state,next:a=>{RB(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),z.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),z.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),z.useEffect(()=>{e.values&&!rl(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(a=>({...a}))):o._resetDefaultValues()},[e.values,o]),z.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),z.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),z.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=MB(r,o),t.current}var gn;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(gn||(gn={}));var pE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(pE||(pE={}));const it=gn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),nu=e=>{switch(typeof e){case"undefined":return it.undefined;case"string":return it.string;case"number":return isNaN(e)?it.nan:it.number;case"boolean":return it.boolean;case"function":return it.function;case"bigint":return it.bigint;case"symbol":return it.symbol;case"object":return Array.isArray(e)?it.array:e===null?it.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?it.promise:typeof Map<"u"&&e instanceof Map?it.map:typeof Set<"u"&&e instanceof Set?it.set:typeof Date<"u"&&e instanceof Date?it.date:it.object;default:return it.unknown}},He=gn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Xhe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Fo extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,u=0;for(;un.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Fo.create=e=>new Fo(e);const Zd=(e,t)=>{let n;switch(e.code){case He.invalid_type:e.received===it.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case He.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,gn.jsonStringifyReplacer)}`;break;case He.unrecognized_keys:n=`Unrecognized key(s) in object: ${gn.joinValues(e.keys,", ")}`;break;case He.invalid_union:n="Invalid input";break;case He.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${gn.joinValues(e.options)}`;break;case He.invalid_enum_value:n=`Invalid enum value. Expected ${gn.joinValues(e.options)}, received '${e.received}'`;break;case He.invalid_arguments:n="Invalid function arguments";break;case He.invalid_return_type:n="Invalid function return type";break;case He.invalid_date:n="Invalid date";break;case He.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:gn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case He.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case He.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case He.custom:n="Invalid input";break;case He.invalid_intersection_types:n="Intersection results could not be merged";break;case He.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case He.not_finite:n="Number must be finite";break;default:n=t.defaultError,gn.assertNever(e)}return{message:n}};let UB=Zd;function Qhe(e){UB=e}function tb(){return UB}const nb=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},Jhe=[];function tt(e,t){const n=tb(),r=nb({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Zd?void 0:Zd].filter(i=>!!i)});e.common.issues.push(r)}class $i{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Dt;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return $i.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Dt;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Dt=Object.freeze({status:"aborted"}),vd=e=>({status:"dirty",value:e}),Wi=e=>({status:"valid",value:e}),gE=e=>e.status==="aborted",mE=e=>e.status==="dirty",Zc=e=>e.status==="valid",og=e=>typeof Promise<"u"&&e instanceof Promise;function rb(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function HB(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var dt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(dt||(dt={}));var u0,l0;class ks{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const XR=(e,t)=>{if(Zc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Fo(e.common.issues);return this._error=n,this._error}}};function Kt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{var u,l;const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Jt{get description(){return this._def.description}_getType(t){return nu(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:nu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $i,ctx:{common:t.parent.common,data:t.data,parsedType:nu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(og(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)},o=this._parseSync({data:t,path:i.path,parent:i});return XR(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return Zc(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o?.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Zc(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(og(i)?i:Promise.resolve(i));return XR(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:He.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ya({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Es.create(this,this._def)}nullable(){return Rl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wa.create(this)}promise(){return Qd.create(this,this._def)}or(t){return lg.create([this,t],this._def)}and(t){return cg.create(this,t,this._def)}transform(t){return new Ya({...Kt(this._def),schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new gg({...Kt(this._def),innerType:this,defaultValue:n,typeName:Tt.ZodDefault})}brand(){return new tA({typeName:Tt.ZodBranded,type:this,...Kt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new mg({...Kt(this._def),innerType:this,catchValue:n,typeName:Tt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Cm.create(this,t)}readonly(){return vg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const epe=/^c[^\s-]{8,}$/i,tpe=/^[0-9a-z]+$/,npe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,rpe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ipe=/^[a-z0-9_-]{21}$/i,ope=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ape=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,spe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,upe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let SS;const lpe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,cpe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,fpe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,dpe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,hpe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ppe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,VB="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",gpe=new RegExp(`^${VB}$`);function WB(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function mpe(e){return new RegExp(`^${WB(e)}$`)}function qB(e){let t=`${VB}T${WB(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function vpe(e,t){return!!((t==="v4"||!t)&&lpe.test(e)||(t==="v6"||!t)&&fpe.test(e))}function ype(e,t){if(!ope.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function bpe(e,t){return!!((t==="v4"||!t)&&cpe.test(e)||(t==="v6"||!t)&&dpe.test(e))}class za extends Jt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==it.string){const o=this._getOrReturnCtx(t);return tt(o,{code:He.invalid_type,expected:it.string,received:o.parsedType}),Dt}const r=new $i;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:He.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.lengtht.test(i),{validation:n,code:He.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new za({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...dt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...dt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...dt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...dt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...dt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...dt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...dt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...dt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...dt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...dt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...dt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...dt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...dt.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,local:(r=t?.local)!==null&&r!==void 0?r:!1,...dt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...dt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...dt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...dt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...dt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...dt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...dt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...dt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...dt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...dt.errToObj(n)})}nonempty(t){return this.min(1,dt.errToObj(t))}trim(){return new za({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new za({checks:[],typeName:Tt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Kt(e)})};function xpe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class kl extends Jt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==it.number){const o=this._getOrReturnCtx(t);return tt(o,{code:He.invalid_type,expected:it.number,received:o.parsedType}),Dt}let r;const i=new $i;for(const o of this._def.checks)o.kind==="int"?gn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:He.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:He.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?xpe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),tt(r,{code:He.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:He.not_finite,message:o.message}),i.dirty()):gn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new kl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new kl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:dt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:dt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:dt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:dt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&gn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew kl({checks:[],typeName:Tt.ZodNumber,coerce:e?.coerce||!1,...Kt(e)});class Tl extends Jt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==it.bigint)return this._getInvalidInput(t);let r;const i=new $i;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:He.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:He.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):gn.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return tt(n,{code:He.invalid_type,expected:it.bigint,received:n.parsedType}),Dt}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Tl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Tl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Tl({checks:[],typeName:Tt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Kt(e)})};class ag extends Jt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==it.boolean){const r=this._getOrReturnCtx(t);return tt(r,{code:He.invalid_type,expected:it.boolean,received:r.parsedType}),Dt}return Wi(t.data)}}ag.create=e=>new ag({typeName:Tt.ZodBoolean,coerce:e?.coerce||!1,...Kt(e)});class Xc extends Jt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==it.date){const o=this._getOrReturnCtx(t);return tt(o,{code:He.invalid_type,expected:it.date,received:o.parsedType}),Dt}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return tt(o,{code:He.invalid_date}),Dt}const r=new $i;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:He.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):gn.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Xc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:dt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:dt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Xc({checks:[],coerce:e?.coerce||!1,typeName:Tt.ZodDate,...Kt(e)});class ib extends Jt{_parse(t){if(this._getType(t)!==it.symbol){const r=this._getOrReturnCtx(t);return tt(r,{code:He.invalid_type,expected:it.symbol,received:r.parsedType}),Dt}return Wi(t.data)}}ib.create=e=>new ib({typeName:Tt.ZodSymbol,...Kt(e)});class sg extends Jt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:He.invalid_type,expected:it.undefined,received:r.parsedType}),Dt}return Wi(t.data)}}sg.create=e=>new sg({typeName:Tt.ZodUndefined,...Kt(e)});class ug extends Jt{_parse(t){if(this._getType(t)!==it.null){const r=this._getOrReturnCtx(t);return tt(r,{code:He.invalid_type,expected:it.null,received:r.parsedType}),Dt}return Wi(t.data)}}ug.create=e=>new ug({typeName:Tt.ZodNull,...Kt(e)});class Xd extends Jt{constructor(){super(...arguments),this._any=!0}_parse(t){return Wi(t.data)}}Xd.create=e=>new Xd({typeName:Tt.ZodAny,...Kt(e)});class Dc extends Jt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Wi(t.data)}}Dc.create=e=>new Dc({typeName:Tt.ZodUnknown,...Kt(e)});class xu extends Jt{_parse(t){const n=this._getOrReturnCtx(t);return tt(n,{code:He.invalid_type,expected:it.never,received:n.parsedType}),Dt}}xu.create=e=>new xu({typeName:Tt.ZodNever,...Kt(e)});class ob extends Jt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:He.invalid_type,expected:it.void,received:r.parsedType}),Dt}return Wi(t.data)}}ob.create=e=>new ob({typeName:Tt.ZodVoid,...Kt(e)});class Wa extends Jt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==it.array)return tt(n,{code:He.invalid_type,expected:it.array,received:n.parsedType}),Dt;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.lengthi.maxLength.value&&(tt(n,{code:He.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new ks(n,a,n.path,s)))).then(a=>$i.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new ks(n,a,n.path,s)));return $i.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Wa({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new Wa({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new Wa({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}Wa.create=(e,t)=>new Wa({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...Kt(t)});function nd(e){if(e instanceof cr){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Es.create(nd(r))}return new cr({...e._def,shape:()=>t})}else return e instanceof Wa?new Wa({...e._def,type:nd(e.element)}):e instanceof Es?Es.create(nd(e.unwrap())):e instanceof Rl?Rl.create(nd(e.unwrap())):e instanceof Ts?Ts.create(e.items.map(t=>nd(t))):e}class cr extends Jt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=gn.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==it.object){const l=this._getOrReturnCtx(t);return tt(l,{code:He.invalid_type,expected:it.object,received:l.parsedType}),Dt}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof xu&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||s.push(l);const u=[];for(const l of a){const c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new ks(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof xu){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(tt(i,{code:He.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new ks(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key,h=await c.value;l.push({key:f,value:h,alwaysSet:c.alwaysSet})}return l}).then(l=>$i.mergeObjectSync(r,l)):$i.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return dt.errToObj,new cr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=dt.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new cr({...this._def,unknownKeys:"strip"})}passthrough(){return new cr({...this._def,unknownKeys:"passthrough"})}extend(t){return new cr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new cr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Tt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new cr({...this._def,catchall:t})}pick(t){const n={};return gn.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new cr({...this._def,shape:()=>n})}omit(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new cr({...this._def,shape:()=>n})}deepPartial(){return nd(this)}partial(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new cr({...this._def,shape:()=>n})}required(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Es;)o=o._def.innerType;n[r]=o}}),new cr({...this._def,shape:()=>n})}keyof(){return KB(gn.objectKeys(this.shape))}}cr.create=(e,t)=>new cr({shape:()=>e,unknownKeys:"strip",catchall:xu.create(),typeName:Tt.ZodObject,...Kt(t)});cr.strictCreate=(e,t)=>new cr({shape:()=>e,unknownKeys:"strict",catchall:xu.create(),typeName:Tt.ZodObject,...Kt(t)});cr.lazycreate=(e,t)=>new cr({shape:e,unknownKeys:"strip",catchall:xu.create(),typeName:Tt.ZodObject,...Kt(t)});class lg extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new Fo(s.ctx.common.issues));return tt(n,{code:He.invalid_union,unionErrors:a}),Dt}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new Fo(u));return tt(n,{code:He.invalid_union,unionErrors:s}),Dt}}get options(){return this._def.options}}lg.create=(e,t)=>new lg({options:e,typeName:Tt.ZodUnion,...Kt(t)});const Zs=e=>e instanceof dg?Zs(e.schema):e instanceof Ya?Zs(e.innerType()):e instanceof hg?[e.value]:e instanceof Ml?e.options:e instanceof pg?gn.objectValues(e.enum):e instanceof gg?Zs(e._def.innerType):e instanceof sg?[void 0]:e instanceof ug?[null]:e instanceof Es?[void 0,...Zs(e.unwrap())]:e instanceof Rl?[null,...Zs(e.unwrap())]:e instanceof tA||e instanceof vg?Zs(e.unwrap()):e instanceof mg?Zs(e._def.innerType):[];class aw extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.object)return tt(n,{code:He.invalid_type,expected:it.object,received:n.parsedType}),Dt;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(tt(n,{code:He.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Dt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=Zs(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new aw({typeName:Tt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Kt(r)})}}function vE(e,t){const n=nu(e),r=nu(t);if(e===t)return{valid:!0,data:e};if(n===it.object&&r===it.object){const i=gn.objectKeys(t),o=gn.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=vE(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(n===it.array&&r===it.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(gE(o)||gE(a))return Dt;const s=vE(o.value,a.value);return s.valid?((mE(o)||mE(a))&&n.dirty(),{status:n.value,value:s.data}):(tt(r,{code:He.invalid_intersection_types}),Dt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}cg.create=(e,t,n)=>new cg({left:e,right:t,typeName:Tt.ZodIntersection,...Kt(n)});class Ts extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.array)return tt(r,{code:He.invalid_type,expected:it.array,received:r.parsedType}),Dt;if(r.data.lengththis._def.items.length&&(tt(r,{code:He.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new ks(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>$i.mergeArray(n,a)):$i.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ts({...this._def,rest:t})}}Ts.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ts({items:e,typeName:Tt.ZodTuple,rest:null,...Kt(t)})};class fg extends Jt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.object)return tt(r,{code:He.invalid_type,expected:it.object,received:r.parsedType}),Dt;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new ks(r,s,r.path,s)),value:a._parse(new ks(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?$i.mergeObjectAsync(n,i):$i.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Jt?new fg({keyType:t,valueType:n,typeName:Tt.ZodRecord,...Kt(r)}):new fg({keyType:za.create(),valueType:t,typeName:Tt.ZodRecord,...Kt(n)})}}class ab extends Jt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.map)return tt(r,{code:He.invalid_type,expected:it.map,received:r.parsedType}),Dt;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new ks(r,s,r.path,[l,"key"])),value:o._parse(new ks(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of a){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}ab.create=(e,t,n)=>new ab({valueType:t,keyType:e,typeName:Tt.ZodMap,...Kt(n)});class Qc extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.set)return tt(r,{code:He.invalid_type,expected:it.set,received:r.parsedType}),Dt;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(tt(r,{code:He.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Dt;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>o._parse(new ks(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,n){return new Qc({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Qc({...this._def,maxSize:{value:t,message:dt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Qc.create=(e,t)=>new Qc({valueType:e,minSize:null,maxSize:null,typeName:Tt.ZodSet,...Kt(t)});class kd extends Jt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.function)return tt(n,{code:He.invalid_type,expected:it.function,received:n.parsedType}),Dt;function r(s,u){return nb({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,tb(),Zd].filter(l=>!!l),issueData:{code:He.invalid_arguments,argumentsError:u}})}function i(s,u){return nb({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,tb(),Zd].filter(l=>!!l),issueData:{code:He.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Qd){const s=this;return Wi(async function(...u){const l=new Fo([]),c=await s._def.args.parseAsync(u,o).catch(p=>{throw l.addIssue(r(u,p)),l}),f=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(f,o).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return Wi(function(...u){const l=s._def.args.safeParse(u,o);if(!l.success)throw new Fo([r(u,l.error)]);const c=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(c,o);if(!f.success)throw new Fo([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new kd({...this._def,args:Ts.create(t).rest(Dc.create())})}returns(t){return new kd({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new kd({args:t||Ts.create([]).rest(Dc.create()),returns:n||Dc.create(),typeName:Tt.ZodFunction,...Kt(r)})}}class dg extends Jt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}dg.create=(e,t)=>new dg({getter:e,typeName:Tt.ZodLazy,...Kt(t)});class hg extends Jt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return tt(n,{received:n.data,code:He.invalid_literal,expected:this._def.value}),Dt}return{status:"valid",value:t.data}}get value(){return this._def.value}}hg.create=(e,t)=>new hg({value:e,typeName:Tt.ZodLiteral,...Kt(t)});function KB(e,t){return new Ml({values:e,typeName:Tt.ZodEnum,...Kt(t)})}class Ml extends Jt{constructor(){super(...arguments),u0.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{expected:gn.joinValues(r),received:n.parsedType,code:He.invalid_type}),Dt}if(rb(this,u0)||HB(this,u0,new Set(this._def.values)),!rb(this,u0).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{received:n.data,code:He.invalid_enum_value,options:r}),Dt}return Wi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ml.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ml.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}u0=new WeakMap;Ml.create=KB;class pg extends Jt{constructor(){super(...arguments),l0.set(this,void 0)}_parse(t){const n=gn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==it.string&&r.parsedType!==it.number){const i=gn.objectValues(n);return tt(r,{expected:gn.joinValues(i),received:r.parsedType,code:He.invalid_type}),Dt}if(rb(this,l0)||HB(this,l0,new Set(gn.getValidEnumValues(this._def.values))),!rb(this,l0).has(t.data)){const i=gn.objectValues(n);return tt(r,{received:r.data,code:He.invalid_enum_value,options:i}),Dt}return Wi(t.data)}get enum(){return this._def.values}}l0=new WeakMap;pg.create=(e,t)=>new pg({values:e,typeName:Tt.ZodNativeEnum,...Kt(t)});class Qd extends Jt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.promise&&n.common.async===!1)return tt(n,{code:He.invalid_type,expected:it.promise,received:n.parsedType}),Dt;const r=n.parsedType===it.promise?n.data:Promise.resolve(n.data);return Wi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Qd.create=(e,t)=>new Qd({type:e,typeName:Tt.ZodPromise,...Kt(t)});class Ya extends Jt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{tt(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Dt;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?Dt:u.status==="dirty"||n.value==="dirty"?vd(u.value):u});{if(n.value==="aborted")return Dt;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Dt:s.status==="dirty"||n.value==="dirty"?vd(s.value):s}}if(i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Dt:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Dt:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Zc(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Zc(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);gn.assertNever(i)}}Ya.create=(e,t,n)=>new Ya({schema:e,typeName:Tt.ZodEffects,effect:t,...Kt(n)});Ya.createWithPreprocess=(e,t,n)=>new Ya({schema:t,effect:{type:"preprocess",transform:e},typeName:Tt.ZodEffects,...Kt(n)});class Es extends Jt{_parse(t){return this._getType(t)===it.undefined?Wi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:Tt.ZodOptional,...Kt(t)});class Rl extends Jt{_parse(t){return this._getType(t)===it.null?Wi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rl.create=(e,t)=>new Rl({innerType:e,typeName:Tt.ZodNullable,...Kt(t)});class gg extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===it.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}gg.create=(e,t)=>new gg({innerType:e,typeName:Tt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Kt(t)});class mg extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return og(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Fo(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Fo(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}mg.create=(e,t)=>new mg({innerType:e,typeName:Tt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Kt(t)});class sb extends Jt{_parse(t){if(this._getType(t)!==it.nan){const r=this._getOrReturnCtx(t);return tt(r,{code:He.invalid_type,expected:it.nan,received:r.parsedType}),Dt}return{status:"valid",value:t.data}}}sb.create=e=>new sb({typeName:Tt.ZodNaN,...Kt(e)});const wpe=Symbol("zod_brand");class tA extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Cm extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Dt:o.status==="dirty"?(n.dirty(),vd(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Dt:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new Cm({in:t,out:n,typeName:Tt.ZodPipeline})}}class vg extends Jt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Zc(i)&&(i.value=Object.freeze(i.value)),i);return og(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}vg.create=(e,t)=>new vg({innerType:e,typeName:Tt.ZodReadonly,...Kt(t)});function GB(e,t={},n){return e?Xd.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):Xd.create()}const _pe={object:cr.lazycreate};var Tt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Tt||(Tt={}));const Spe=(e,t={message:`Input not instance of ${e.name}`})=>GB(n=>n instanceof e,t),YB=za.create,ZB=kl.create,Cpe=sb.create,Epe=Tl.create,XB=ag.create,Ope=Xc.create,Ape=ib.create,Ppe=sg.create,kpe=ug.create,Tpe=Xd.create,Mpe=Dc.create,Rpe=xu.create,Dpe=ob.create,$pe=Wa.create,Ipe=cr.create,Npe=cr.strictCreate,Lpe=lg.create,Fpe=aw.create,jpe=cg.create,Bpe=Ts.create,zpe=fg.create,Upe=ab.create,Hpe=Qc.create,Vpe=kd.create,Wpe=dg.create,qpe=hg.create,Kpe=Ml.create,Gpe=pg.create,Ype=Qd.create,QR=Ya.create,Zpe=Es.create,Xpe=Rl.create,Qpe=Ya.createWithPreprocess,Jpe=Cm.create,e0e=()=>YB().optional(),t0e=()=>ZB().optional(),n0e=()=>XB().optional(),r0e={string:e=>za.create({...e,coerce:!0}),number:e=>kl.create({...e,coerce:!0}),boolean:e=>ag.create({...e,coerce:!0}),bigint:e=>Tl.create({...e,coerce:!0}),date:e=>Xc.create({...e,coerce:!0})},i0e=Dt;var _Ze=Object.freeze({__proto__:null,defaultErrorMap:Zd,setErrorMap:Qhe,getErrorMap:tb,makeIssue:nb,EMPTY_PATH:Jhe,addIssueToContext:tt,ParseStatus:$i,INVALID:Dt,DIRTY:vd,OK:Wi,isAborted:gE,isDirty:mE,isValid:Zc,isAsync:og,get util(){return gn},get objectUtil(){return pE},ZodParsedType:it,getParsedType:nu,ZodType:Jt,datetimeRegex:qB,ZodString:za,ZodNumber:kl,ZodBigInt:Tl,ZodBoolean:ag,ZodDate:Xc,ZodSymbol:ib,ZodUndefined:sg,ZodNull:ug,ZodAny:Xd,ZodUnknown:Dc,ZodNever:xu,ZodVoid:ob,ZodArray:Wa,ZodObject:cr,ZodUnion:lg,ZodDiscriminatedUnion:aw,ZodIntersection:cg,ZodTuple:Ts,ZodRecord:fg,ZodMap:ab,ZodSet:Qc,ZodFunction:kd,ZodLazy:dg,ZodLiteral:hg,ZodEnum:Ml,ZodNativeEnum:pg,ZodPromise:Qd,ZodEffects:Ya,ZodTransformer:Ya,ZodOptional:Es,ZodNullable:Rl,ZodDefault:gg,ZodCatch:mg,ZodNaN:sb,BRAND:wpe,ZodBranded:tA,ZodPipeline:Cm,ZodReadonly:vg,custom:GB,Schema:Jt,ZodSchema:Jt,late:_pe,get ZodFirstPartyTypeKind(){return Tt},coerce:r0e,any:Tpe,array:$pe,bigint:Epe,boolean:XB,date:Ope,discriminatedUnion:Fpe,effect:QR,enum:Kpe,function:Vpe,instanceof:Spe,intersection:jpe,lazy:Wpe,literal:qpe,map:Upe,nan:Cpe,nativeEnum:Gpe,never:Rpe,null:kpe,nullable:Xpe,number:ZB,object:Ipe,oboolean:n0e,onumber:t0e,optional:Zpe,ostring:e0e,pipeline:Jpe,preprocess:Qpe,promise:Ype,record:zpe,set:Hpe,strictObject:Npe,string:YB,symbol:Ape,transformer:QR,tuple:Bpe,undefined:Ppe,union:Lpe,unknown:Mpe,void:Dpe,NEVER:i0e,ZodIssueCode:He,quotelessJson:Xhe,ZodError:Fo});const JR=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Xe(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},QB=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?JR(r.ref,n,e):r.refs&&r.refs.forEach(i=>JR(i,n,e))}},o0e=(e,t)=>{t.shouldUseNativeValidation&&QB(e,t);const n={};for(const r in e){const i=Xe(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(a0e(t.names||Object.keys(e),r)){const a=Object.assign({},Xe(n,r));Pn(a,"root",o),Pn(n,r,a)}else Pn(n,r,o)}return n},a0e=(e,t)=>e.some(n=>n.startsWith(t+"."));var s0e=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[a]={message:s.message,type:s.code}}else n[a]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(f){return e.push(f)})}),t){var u=n[a].types,l=u&&u[r.code];n[a]=IB(a,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},SZe=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(a,s){try{var u=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&QB({},o),{errors:{},values:n.raw?r:l}})}catch(l){return s(l)}return u&&u.then?u.then(void 0,s):u}(0,function(a){if(function(s){return Array.isArray(s?.errors)}(a))return{values:{},errors:o0e(s0e(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}},u0e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pt=u0e.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Pl:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),L.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function JB(e,t){e&&Pu.flushSync(()=>e.dispatchEvent(t))}var l0e="Label",ez=y.forwardRef((e,t)=>L.jsx(pt.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ez.displayName=l0e;var CZe=ez,tz={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ao,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",u="hour",l="day",c="week",f="month",h="quarter",p="year",m="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var R=["th","st","nd","rd"],B=Z%100;return"["+Z+(R[(B-20)%10]||R[B]||R[0])+"]"}},S=function(Z,R,B){var U=String(Z);return!U||U.length>=R?Z:""+Array(R+1-U.length).join(B)+Z},O={s:S,z:function(Z){var R=-Z.utcOffset(),B=Math.abs(R),U=Math.floor(B/60),F=B%60;return(R<=0?"+":"-")+S(U,2,"0")+":"+S(F,2,"0")},m:function Z(R,B){if(R.date()1)return Z(G[0])}else{var oe=R.name;C[oe]=R,F=oe}return!U&&F&&(E=F),F||!U&&E},q=function(Z,R){if(M(Z))return Z.clone();var B=typeof R=="object"?R:{};return B.date=Z,B.args=arguments,new W(B)},Y=O;Y.l=N,Y.i=M,Y.w=function(Z,R){return q(Z,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var W=function(){function Z(B){this.$L=N(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[k]=!0}var R=Z.prototype;return R.parse=function(B){this.$d=function(U){var F=U.date,V=U.utc;if(F===null)return new Date(NaN);if(Y.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var G=F.match(b);if(G){var oe=G[2]-1||0,Q=(G[7]||"0").substring(0,3);return V?new Date(Date.UTC(G[1],oe,G[3]||1,G[4]||0,G[5]||0,G[6]||0,Q)):new Date(G[1],oe,G[3]||1,G[4]||0,G[5]||0,G[6]||0,Q)}}return new Date(F)}(B),this.init()},R.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},R.$utils=function(){return Y},R.isValid=function(){return this.$d.toString()!==v},R.isSame=function(B,U){var F=q(B);return this.startOf(U)<=F&&F<=this.endOf(U)},R.isAfter=function(B,U){return q(B){let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var yM={notify(){},get:()=>[]};function Pse(e,t){let n,r=yM,i=0,o=!1;function a(v){c();const b=r.subscribe(v);let w=!1;return()=>{w||(w=!0,b(),f())}}function s(){r.notify()}function u(){m.onStateChange&&m.onStateChange()}function l(){return o}function c(){i++,n||(n=e.subscribe(u),r=Ase())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=yM)}function h(){o||(o=!0,c())}function p(){o&&(o=!1,f())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:p,getListeners:()=>r};return m}var kse=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Tse=kse(),Mse=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Rse=Mse(),Dse=()=>Tse||Rse?y.useLayoutEffect:y.useEffect,$se=Dse(),Ise=Symbol.for("react-redux-context"),Nse=typeof globalThis<"u"?globalThis:{};function Lse(){if(!y.createContext)return{};const e=Nse[Ise]??=new Map;let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var Ol=Lse();function Fse(e){const{children:t,context:n,serverState:r,store:i}=e,o=y.useMemo(()=>{const u=Pse(i);return{store:i,subscription:u,getServerState:r?()=>r:void 0}},[i,r]),a=y.useMemo(()=>i.getState(),[i]);$se(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,a]);const s=n||Ol;return y.createElement(s.Provider,{value:o},t)}var VGe=Fse;function EO(e=Ol){return function(){return y.useContext(e)}}var qF=EO();function GF(e=Ol){const t=e===Ol?qF:EO(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var jse=GF();function Bse(e=Ol){const t=e===Ol?jse:GF(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var WGe=Bse(),zse=(e,t)=>e===t;function Use(e=Ol){const t=e===Ol?qF:EO(e),n=(r,i={})=>{const{equalityFn:o=zse}=typeof i=="function"?{equalityFn:i}:i,a=t(),{store:s,subscription:u,getServerState:l}=a;y.useRef(!0);const c=y.useCallback({[r.name](h){return r(h)}}[r.name],[r]),f=Ese.useSyncExternalStoreWithSelector(u.addNestedSub,s.getState,l||s.getState,c,o);return y.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var HGe=Use();function bM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ux(...e){return t=>{let n=!1;const r=e.map(i=>{const o=bM(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Vse);if(o){const a=o.props.children,s=i.map(u=>u===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:u);return I.jsx(RC,{...r,ref:t,children:y.isValidElement(a)?y.cloneElement(a,void 0,s):null})}return I.jsx(RC,{...r,ref:t,children:n})});Al.displayName="Slot";var RC=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const i=Hse(n);return y.cloneElement(n,{...Wse(r,n.props),ref:t?Ux(t,i):i})}return y.Children.count(n)>1?y.Children.only(null):null});RC.displayName="SlotClone";var OO=({children:e})=>I.jsx(I.Fragment,{children:e});function Vse(e){return y.isValidElement(e)&&e.type===OO}function Wse(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Hse(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function YF(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;ttypeof e=="boolean"?`${e}`:e===0?"0":e,wM=dn,KGe=(e,t)=>n=>{var r;if(t?.variants==null)return wM(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(l=>{const c=n?.[l],f=o?.[l];if(c===null)return null;const h=xM(c)||xM(f);return i[l][h]}),s=n&&Object.entries(n).reduce((l,c)=>{let[f,h]=c;return h===void 0||(l[f]=h),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:f,className:h,...p}=c;return Object.entries(p).every(m=>{let[v,b]=m;return Array.isArray(b)?b.includes({...o,...s}[v]):{...o,...s}[v]===b})?[...l,f,h]:l},[]);return wM(e,a,u,n?.class,n?.className)},AO="-",Kse=e=>{const t=Gse(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(AO);return s[0]===""&&s.length!==1&&s.shift(),ZF(s,t)||qse(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},ZF=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?ZF(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(AO);return t.validators.find(({validator:a})=>a(o))?.classGroupId},_M=/^\[(.+)\]$/,qse=e=>{if(_M.test(e)){const t=_M.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Gse=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Zse(Object.entries(e.classGroups),n).forEach(([o,a])=>{DC(a,r,o,t)}),r},DC=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:SM(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Yse(i)){DC(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{DC(a,SM(t,o),n,r)})})},SM=(e,t)=>{let n=e;return t.split(AO).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Yse=e=>e.isThemeGetter,Zse=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[n,i]}):e,Xse=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},XF="!",Qse=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=s=>{const u=[];let l=0,c=0,f;for(let b=0;bc?f-c:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}};return n?s=>n({className:s,parseClassName:a}):a},Jse=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},eue=e=>({cache:Xse(e.cacheSize),parseClassName:Qse(e),...Kse(e)}),tue=/\s+/,nue=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(tue);let s="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{modifiers:c,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(l);let m=!!p,v=r(m?h.substring(0,p):h);if(!v){if(!m){s=l+(s.length>0?" "+s:s);continue}if(v=r(h),!v){s=l+(s.length>0?" "+s:s);continue}m=!1}const b=Jse(c).join(":"),w=f?b+XF:b,x=w+v;if(o.includes(x))continue;o.push(x);const S=i(v,m);for(let O=0;O0?" "+s:s)}return s};function rue(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(c),e());return n=eue(l),r=n.cache.get,i=n.cache.set,o=s,s(u)}function s(u){const l=r(u);if(l)return l;const c=nue(u,n);return i(u,c),c}return function(){return o(rue.apply(null,arguments))}}const Qn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},JF=/^\[(?:([a-z-]+):)?(.+)\]$/i,oue=/^\d+\/\d+$/,aue=new Set(["px","full","screen"]),sue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uue=/\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$/,lue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,cue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ks=e=>Ed(e)||aue.has(e)||oue.test(e),Wu=e=>Rh(e,"length",bue),Ed=e=>!!e&&!Number.isNaN(Number(e)),rS=e=>Rh(e,"number",Ed),Mp=e=>!!e&&Number.isInteger(Number(e)),due=e=>e.endsWith("%")&&Ed(e.slice(0,-1)),Xt=e=>JF.test(e),Hu=e=>sue.test(e),hue=new Set(["length","size","percentage"]),pue=e=>Rh(e,hue,ej),gue=e=>Rh(e,"position",ej),mue=new Set(["image","url"]),vue=e=>Rh(e,mue,wue),yue=e=>Rh(e,"",xue),Rp=()=>!0,Rh=(e,t,n)=>{const r=JF.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},bue=e=>uue.test(e)&&!lue.test(e),ej=()=>!1,xue=e=>cue.test(e),wue=e=>fue.test(e),_ue=()=>{const e=Qn("colors"),t=Qn("spacing"),n=Qn("blur"),r=Qn("brightness"),i=Qn("borderColor"),o=Qn("borderRadius"),a=Qn("borderSpacing"),s=Qn("borderWidth"),u=Qn("contrast"),l=Qn("grayscale"),c=Qn("hueRotate"),f=Qn("invert"),h=Qn("gap"),p=Qn("gradientColorStops"),m=Qn("gradientColorStopPositions"),v=Qn("inset"),b=Qn("margin"),w=Qn("opacity"),x=Qn("padding"),S=Qn("saturate"),O=Qn("scale"),E=Qn("sepia"),C=Qn("skew"),k=Qn("space"),M=Qn("translate"),N=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",Xt,t],V=()=>[Xt,t],ne=()=>["",Ks,Wu],Z=()=>["auto",Ed,Xt],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",Xt],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[Ed,Xt];return{cacheSize:500,separator:":",theme:{colors:[Rp],spacing:[Ks,Wu],blur:["none","",Hu,Xt],brightness:oe(),borderColor:[e],borderRadius:["none","","full",Hu,Xt],borderSpacing:V(),borderWidth:ne(),contrast:oe(),grayscale:K(),hueRotate:oe(),invert:K(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[due,Wu],inset:H(),margin:H(),opacity:oe(),padding:V(),saturate:oe(),scale:oe(),sepia:K(),skew:oe(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Xt]}],container:["container"],columns:[{columns:[Hu]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"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:[...G(),Xt]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Mp,Xt]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Xt]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",Mp,Xt]}],"grid-cols":[{"grid-cols":[Rp]}],"col-start-end":[{col:["auto",{span:["full",Mp,Xt]},Xt]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Rp]}],"row-start-end":[{row:["auto",{span:[Mp,Xt]},Xt]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Xt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Xt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"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:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Xt,t]}],"min-w":[{"min-w":[Xt,t,"min","max","fit"]}],"max-w":[{"max-w":[Xt,t,"none","full","min","max","fit","prose",{screen:[Hu]},Hu]}],h:[{h:[Xt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Xt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Xt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Xt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Hu,Wu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rS]}],"font-family":[{font:[Rp]}],"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",Xt]}],"line-clamp":[{"line-clamp":["none",Ed,rS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ks,Xt]}],"list-image":[{"list-image":["none",Xt]}],"list-style-type":[{list:["none","disc","decimal",Xt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ks,Wu]}],"underline-offset":[{"underline-offset":["auto",Ks,Xt]}],"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:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Xt]}],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",Xt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),gue]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",pue]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"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":[w]}],"border-style":[{border:[...q(),"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":[w]}],"divide-style":[{divide:q()}],"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:["",...q()]}],"outline-offset":[{"outline-offset":[Ks,Xt]}],"outline-w":[{outline:[Ks,Wu]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Ks,Wu]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Hu,yue]}],"shadow-color":[{shadow:[Rp]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Hu,Xt]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Xt]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",Xt]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Xt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[Mp,Xt]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Xt]}],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",Xt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",Xt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ks,Wu,rS]}],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"]}}},qGe=iue(_ue);var tj={exports:{}},Sue="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Cue=Sue,Eue=Cue;function nj(){}function rj(){}rj.resetWarningCache=nj;var Oue=function(){function e(r,i,o,a,s,u){if(u!==Eue){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:rj,resetWarningCache:nj};return n.PropTypes=n,n};tj.exports=Oue();var Aue=tj.exports;const Mt=Pn(Aue);var Pue={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"},kue=Object.defineProperty,Tue=Object.defineProperties,Mue=Object.getOwnPropertyDescriptors,D1=Object.getOwnPropertySymbols,ij=Object.prototype.hasOwnProperty,oj=Object.prototype.propertyIsEnumerable,CM=(e,t,n)=>t in e?kue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EM=(e,t)=>{for(var n in t||(t={}))ij.call(t,n)&&CM(e,n,t[n]);if(D1)for(var n of D1(t))oj.call(t,n)&&CM(e,n,t[n]);return e},Rue=(e,t)=>Tue(e,Mue(t)),Due=(e,t)=>{var n={};for(var r in e)ij.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&D1)for(var r of D1(e))t.indexOf(r)<0&&oj.call(e,r)&&(n[r]=e[r]);return n},En=(e,t,n)=>{const r=y.forwardRef((i,o)=>{var a=i,{color:s="currentColor",size:u=24,stroke:l=2,children:c}=a,f=Due(a,["color","size","stroke","children"]);return y.createElement("svg",EM(Rue(EM({ref:o},Pue),{width:u,height:u,stroke:s,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),f),[...n.map(([h,p])=>y.createElement(h,p)),...c||[]])});return r.propTypes={color:Mt.string,size:Mt.oneOfType([Mt.string,Mt.number]),stroke:Mt.oneOfType([Mt.string,Mt.number])},r.displayName=`${t}`,r},GGe=En("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),YGe=En("brand-telegram","IconBrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),ZGe=En("building-store","IconBuildingStore",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 7v1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1h-18l2 -4h14l2 4",key:"svg-1"}],["path",{d:"M5 21l0 -10.15",key:"svg-2"}],["path",{d:"M19 21l0 -10.15",key:"svg-3"}],["path",{d:"M9 21v-4a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v4",key:"svg-4"}]]),XGe=En("building","IconBuilding",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M9 8l1 0",key:"svg-1"}],["path",{d:"M9 12l1 0",key:"svg-2"}],["path",{d:"M9 16l1 0",key:"svg-3"}],["path",{d:"M14 8l1 0",key:"svg-4"}],["path",{d:"M14 12l1 0",key:"svg-5"}],["path",{d:"M14 16l1 0",key:"svg-6"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16",key:"svg-7"}]]),QGe=En("cash","IconCash",[["path",{d:"M7 9m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M17 9v-2a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h2",key:"svg-2"}]]),JGe=En("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),eYe=En("chevrons-left","IconChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]]),tYe=En("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),nYe=En("credit-card","IconCreditCard",[["path",{d:"M3 5m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M7 15l.01 0",key:"svg-2"}],["path",{d:"M11 15l2 0",key:"svg-3"}]]),rYe=En("dashboard","IconDashboard",[["path",{d:"M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M13.45 11.55l2.05 -2.05",key:"svg-1"}],["path",{d:"M6.4 20a9 9 0 1 1 11.2 0z",key:"svg-2"}]]),iYe=En("device-desktop","IconDeviceDesktop",[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10z",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}]]),oYe=En("discount-check","IconDiscountCheck",[["path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),aYe=En("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),sYe=En("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),uYe=En("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),lYe=En("loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]),cYe=En("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),fYe=En("mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]),dYe=En("menu-2","IconMenu2",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]]),hYe=En("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),pYe=En("news","IconNews",[["path",{d:"M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11",key:"svg-0"}],["path",{d:"M8 8l4 0",key:"svg-1"}],["path",{d:"M8 12l4 0",key:"svg-2"}],["path",{d:"M8 16l4 0",key:"svg-3"}]]),gYe=En("route","IconRoute",[["path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4z",key:"svg-1"}],["path",{d:"M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5",key:"svg-2"}]]),mYe=En("server-bolt","IconServerBolt",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12",key:"svg-1"}],["path",{d:"M7 8v.01",key:"svg-2"}],["path",{d:"M7 16v.01",key:"svg-3"}],["path",{d:"M20 15l-2 3h3l-2 3",key:"svg-4"}]]),vYe=En("server","IconServer",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]]),yYe=En("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),bYe=En("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),xYe=En("ticket","IconTicket",[["path",{d:"M15 5l0 2",key:"svg-0"}],["path",{d:"M15 11l0 2",key:"svg-1"}],["path",{d:"M15 17l0 2",key:"svg-2"}],["path",{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2",key:"svg-3"}]]),wYe=En("user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]]),_Ye=En("user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]),SYe=En("users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]),CYe=En("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function fi(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $ue=typeof Symbol=="function"&&Symbol.observable||"@@observable",OM=$ue,iS=()=>Math.random().toString(36).substring(7).split("").join("."),Iue={INIT:`@@redux/INIT${iS()}`,REPLACE:`@@redux/REPLACE${iS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${iS()}`},$1=Iue;function PO(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function aj(e,t,n){if(typeof e!="function")throw new Error(fi(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(fi(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(fi(1));return n(aj)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,u=!1;function l(){a===o&&(a=new Map,o.forEach((b,w)=>{a.set(w,b)}))}function c(){if(u)throw new Error(fi(3));return i}function f(b){if(typeof b!="function")throw new Error(fi(4));if(u)throw new Error(fi(5));let w=!0;l();const x=s++;return a.set(x,b),function(){if(w){if(u)throw new Error(fi(6));w=!1,l(),a.delete(x),o=null}}}function h(b){if(!PO(b))throw new Error(fi(7));if(typeof b.type>"u")throw new Error(fi(8));if(typeof b.type!="string")throw new Error(fi(17));if(u)throw new Error(fi(9));try{u=!0,i=r(i,b)}finally{u=!1}return(o=a).forEach(x=>{x()}),b}function p(b){if(typeof b!="function")throw new Error(fi(10));r=b,h({type:$1.REPLACE})}function m(){const b=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(fi(11));function x(){const O=w;O.next&&O.next(c())}return x(),{unsubscribe:b(x)}},[OM](){return this}}}return h({type:$1.INIT}),{dispatch:h,subscribe:f,getState:c,replaceReducer:p,[OM]:m}}function Nue(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:$1.INIT})>"u")throw new Error(fi(12));if(typeof n(void 0,{type:$1.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fi(13))})}function Lue(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw s&&s.type,new Error(fi(14));l[f]=m,u=u||m!==p}return u=u||r.length!==Object.keys(a).length,u?l:a}}function I1(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Fue(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(fi(15))};const a={getState:i.getState,dispatch:(u,...l)=>o(u,...l)},s=e.map(u=>u(a));return o=I1(...s)(i.dispatch),{...i,dispatch:o}}}function jue(e){return PO(e)&&"type"in e&&typeof e.type=="string"}var sj=Symbol.for("immer-nothing"),AM=Symbol.for("immer-draftable"),zo=Symbol.for("immer-state");function Fa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Kd=Object.getPrototypeOf;function Vc(e){return!!e&&!!e[zo]}function yu(e){return e?uj(e)||Array.isArray(e)||!!e[AM]||!!e.constructor?.[AM]||Wx(e)||Hx(e):!1}var Bue=Object.prototype.constructor.toString();function uj(e){if(!e||typeof e!="object")return!1;const t=Kd(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Bue}function N1(e,t){Vx(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Vx(e){const t=e[zo];return t?t.type_:Array.isArray(e)?1:Wx(e)?2:Hx(e)?3:0}function $C(e,t){return Vx(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lj(e,t,n){const r=Vx(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function zue(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Wx(e){return e instanceof Map}function Hx(e){return e instanceof Set}function lc(e){return e.copy_||e.base_}function IC(e,t){if(Wx(e))return new Map(e);if(Hx(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&uj(e))return Kd(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[zo];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=Uue),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>kO(r,!0))),e}function Uue(){Fa(2)}function Kx(e){return Object.isFrozen(e)}var Vue={};function Wc(e){const t=Vue[e];return t||Fa(0,e),t}var X0;function cj(){return X0}function Wue(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function PM(e,t){t&&(Wc("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function NC(e){LC(e),e.drafts_.forEach(Hue),e.drafts_=null}function LC(e){e===X0&&(X0=e.parent_)}function kM(e){return X0=Wue(X0,e)}function Hue(e){const t=e[zo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function TM(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[zo].modified_&&(NC(t),Fa(4)),yu(e)&&(e=L1(t,e),t.parent_||F1(t,e)),t.patches_&&Wc("Patches").generateReplacementPatches_(n[zo].base_,e,t.patches_,t.inversePatches_)):e=L1(t,n,[]),NC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sj?e:void 0}function L1(e,t,n){if(Kx(t))return t;const r=t[zo];if(!r)return N1(t,(i,o)=>MM(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return F1(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),N1(o,(s,u)=>MM(e,r,i,s,u,n,a)),F1(e,i,!1),n&&e.patches_&&Wc("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function MM(e,t,n,r,i,o,a){if(Vc(i)){const s=o&&t&&t.type_!==3&&!$C(t.assigned_,r)?o.concat(r):void 0,u=L1(e,i,s);if(lj(n,r,u),Vc(u))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(yu(i)&&!Kx(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;L1(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&F1(e,i)}}function F1(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&kO(t,n)}function Kue(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:cj(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=TO;n&&(i=[r],o=Q0);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var TO={get(e,t){if(t===zo)return e;const n=lc(e);if(!$C(n,t))return que(e,n,t);const r=n[t];return e.finalized_||!yu(r)?r:r===oS(e.base_,t)?(aS(e),e.copy_[t]=jC(r,e)):r},has(e,t){return t in lc(e)},ownKeys(e){return Reflect.ownKeys(lc(e))},set(e,t,n){const r=fj(lc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=oS(lc(e),t),o=i?.[zo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(zue(n,i)&&(n!==void 0||$C(e.base_,t)))return!0;aS(e),FC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return oS(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,aS(e),FC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=lc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Fa(11)},getPrototypeOf(e){return Kd(e.base_)},setPrototypeOf(){Fa(12)}},Q0={};N1(TO,(e,t)=>{Q0[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Q0.deleteProperty=function(e,t){return Q0.set.call(this,e,t,void 0)};Q0.set=function(e,t,n){return TO.set.call(this,e[0],t,n,e[0])};function oS(e,t){const n=e[zo];return(n?lc(n):e)[t]}function que(e,t,n){const r=fj(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function fj(e,t){if(!(t in e))return;let n=Kd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Kd(n)}}function FC(e){e.modified_||(e.modified_=!0,e.parent_&&FC(e.parent_))}function aS(e){e.copy_||(e.copy_=IC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Gue=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(u=o,...l){return a.produce(u,c=>n.call(this,c,...l))}}typeof n!="function"&&Fa(6),r!==void 0&&typeof r!="function"&&Fa(7);let i;if(yu(t)){const o=kM(this),a=jC(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?NC(o):LC(o)}return PM(o,r),TM(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===sj&&(i=void 0),this.autoFreeze_&&kO(i,!0),r){const o=[],a=[];Wc("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Fa(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,u=>t(u,...s));let r,i;return[this.produce(t,n,(a,s)=>{r=a,i=s}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){yu(e)||Fa(8),Vc(e)&&(e=Yue(e));const t=kM(this),n=jC(e,void 0);return n[zo].isManual_=!0,LC(t),n}finishDraft(e,t){const n=e&&e[zo];(!n||!n.isManual_)&&Fa(9);const{scope_:r}=n;return PM(r,t),TM(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Wc("Patches").applyPatches_;return Vc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function jC(e,t){const n=Wx(e)?Wc("MapSet").proxyMap_(e,t):Hx(e)?Wc("MapSet").proxySet_(e,t):Kue(e,t);return(t?t.scope_:cj()).drafts_.push(n),n}function Yue(e){return Vc(e)||Fa(10,e),dj(e)}function dj(e){if(!yu(e)||Kx(e))return e;const t=e[zo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=IC(e,t.scope_.immer_.useStrictShallowCopy_)}else n=IC(e,!0);return N1(n,(r,i)=>{lj(n,r,dj(i))}),t&&(t.finalized_=!1),n}var Uo=new Gue,hj=Uo.produce;Uo.produceWithPatches.bind(Uo);Uo.setAutoFreeze.bind(Uo);Uo.setUseStrictShallowCopy.bind(Uo);Uo.applyPatches.bind(Uo);Uo.createDraft.bind(Uo);Uo.finishDraft.bind(Uo);function Zue(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Xue(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Que(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var RM=e=>Array.isArray(e)?e:[e];function Jue(e){const t=Array.isArray(e[0])?e[0]:e;return Que(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ele(e,t){const n=[],{length:r}=e;for(let i=0;i{n=Qv(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function ile(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,s,u={},l=i.pop();typeof l=="object"&&(u=l,l=i.pop()),Zue(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...n,...u},{memoize:f,memoizeOptions:h=[],argsMemoize:p=pj,argsMemoizeOptions:m=[],devModeChecks:v={}}=c,b=RM(h),w=RM(m),x=Jue(i),S=f(function(){return o++,l.apply(null,arguments)},...b),O=p(function(){a++;const C=ele(x,arguments);return s=S.apply(null,C),s},...w);return Object.assign(O,{resultFunc:l,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var ole=ile(pj),ale=Object.assign((e,t=ole)=>{Xue(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,s,u)=>(a[n[u]]=s,a),{}))},{withTypes:()=>ale});function gj(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var sle=gj(),ule=gj,lle=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?I1:I1.apply(null,arguments)},cle=e=>e&&typeof e.match=="function";function b0(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(cu(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>jue(r)&&r.type===e,n}var mj=class i0 extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,i0.prototype)}static get[Symbol.species](){return i0}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new i0(...t[0].concat(this)):new i0(...t.concat(this))}};function $M(e){return yu(e)?hj(e,()=>{}):e}function IM(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function fle(e){return typeof e=="boolean"}var dle=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new mj;return n&&(fle(n)?a.push(sle):a.push(ule(n.extraArgument))),a},hle="RTK_autoBatch",NM=e=>t=>{setTimeout(t,e)},ple=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:NM(10):e.type==="callback"?e.queueNotification:NM(e.timeout),l=()=>{a=!1,o&&(o=!1,s.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const f=()=>i&&c(),h=r.subscribe(f);return s.add(c),()=>{h(),s.delete(c)}},dispatch(c){try{return i=!c?.meta?.[hle],o=!i,o&&(a||(a=!0,u(l))),r.dispatch(c)}finally{i=!0}}})},gle=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new mj(e);return r&&i.push(ple(typeof r=="object"?r:void 0)),i};function EYe(e){const t=dle(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e;let s;if(typeof n=="function")s=n;else if(PO(n))s=Lue(n);else throw new Error(cu(1));let u;typeof r=="function"?u=r(t):u=t();let l=I1;i&&(l=lle({trace:!1,...typeof i=="object"&&i}));const c=Fue(...u),f=gle(c);let h=typeof a=="function"?a(f):f();const p=l(...h);return aj(s,o,p)}function vj(e){const t={},n=[];let r;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(cu(28));if(s in t)throw new Error(cu(29));return t[s]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function mle(e){return typeof e=="function"}function vle(e,t){let[n,r,i]=vj(t),o;if(mle(e))o=()=>$M(e());else{const s=$M(e);o=()=>s}function a(s=o(),u){let l=[n[u.type],...r.filter(({matcher:c})=>c(u)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,f)=>{if(f)if(Vc(c)){const p=f(c,u);return p===void 0?c:p}else{if(yu(c))return hj(c,h=>f(h,u));{const h=f(c,u);if(h===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return c},s)}return a.getInitialState=o,a}var yle=(e,t)=>cle(e)?e.match(t):e(t);function ble(...e){return t=>e.some(n=>yle(n,t))}var xle="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",wle=(e=21)=>{let t="",n=e;for(;n--;)t+=xle[Math.random()*64|0];return t},_le=["name","message","stack","code"],sS=class{constructor(e,t){this.payload=e,this.meta=t}_type},LM=class{constructor(e,t){this.payload=e,this.meta=t}_type},Sle=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of _le)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},OYe=(()=>{function e(t,n,r){const i=b0(t+"/fulfilled",(u,l,c,f)=>({payload:u,meta:{...f||{},arg:c,requestId:l,requestStatus:"fulfilled"}})),o=b0(t+"/pending",(u,l,c)=>({payload:void 0,meta:{...c||{},arg:l,requestId:u,requestStatus:"pending"}})),a=b0(t+"/rejected",(u,l,c,f,h)=>({payload:f,error:(r&&r.serializeError||Sle)(u||"Rejected"),meta:{...h||{},arg:c,requestId:l,rejectedWithValue:!!f,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(l,c,f)=>{const h=r?.idGenerator?r.idGenerator(u):wle(),p=new AbortController;let m,v;function b(x){v=x,p.abort()}const w=async function(){let x;try{let O=r?.condition?.(u,{getState:c,extra:f});if(Ele(O)&&(O=await O),O===!1||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,k)=>{m=()=>{k({name:"AbortError",message:v||"Aborted"})},p.signal.addEventListener("abort",m)});l(o(h,u,r?.getPendingMeta?.({requestId:h,arg:u},{getState:c,extra:f}))),x=await Promise.race([E,Promise.resolve(n(u,{dispatch:l,getState:c,extra:f,requestId:h,signal:p.signal,abort:b,rejectWithValue:(C,k)=>new sS(C,k),fulfillWithValue:(C,k)=>new LM(C,k)})).then(C=>{if(C instanceof sS)throw C;return C instanceof LM?i(C.payload,h,u,C.meta):i(C,h,u)})])}catch(O){x=O instanceof sS?a(null,h,u,O.payload,O.meta):a(O,h,u)}finally{m&&p.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||l(x),x}();return Object.assign(w,{abort:b,requestId:h,arg:u,unwrap(){return w.then(Cle)}})}}return Object.assign(s,{pending:o,rejected:a,fulfilled:i,settled:ble(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Cle(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ele(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ole=Symbol.for("rtk-slice-createasyncthunk");function Ale(e,t){return`${e}/${t}`}function Ple({creators:e}={}){const t=e?.asyncThunk?.[Ole];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(cu(11));const a=(typeof r.reducers=="function"?r.reducers(Tle()):r.reducers)||{},s=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(x,S){const O=typeof x=="string"?x:x.type;if(!O)throw new Error(cu(12));if(O in u.sliceCaseReducersByType)throw new Error(cu(13));return u.sliceCaseReducersByType[O]=S,l},addMatcher(x,S){return u.sliceMatchers.push({matcher:x,reducer:S}),l},exposeAction(x,S){return u.actionCreators[x]=S,l},exposeCaseReducer(x,S){return u.sliceCaseReducersByName[x]=S,l}};s.forEach(x=>{const S=a[x],O={reducerName:x,type:Ale(i,x),createNotation:typeof r.reducers=="function"};Rle(S)?$le(O,S,l,t):Mle(O,S,l)});function c(){const[x={},S=[],O=void 0]=typeof r.extraReducers=="function"?vj(r.extraReducers):[r.extraReducers],E={...x,...u.sliceCaseReducersByType};return vle(r.initialState,C=>{for(let k in E)C.addCase(k,E[k]);for(let k of u.sliceMatchers)C.addMatcher(k.matcher,k.reducer);for(let k of S)C.addMatcher(k.matcher,k.reducer);O&&C.addDefaultCase(O)})}const f=x=>x,h=new Map;let p;function m(x,S){return p||(p=c()),p(x,S)}function v(){return p||(p=c()),p.getInitialState()}function b(x,S=!1){function O(C){let k=C[x];return typeof k>"u"&&S&&(k=v()),k}function E(C=f){const k=IM(h,S,()=>new WeakMap);return IM(k,C,()=>{const M={};for(const[N,z]of Object.entries(r.selectors??{}))M[N]=kle(z,C,v,S);return M})}return{reducerPath:x,getSelectors:E,get selectors(){return E(O)},selectSlice:O}}const w={name:i,reducer:m,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...b(o),injectInto(x,{reducerPath:S,...O}={}){const E=S??o;return x.inject({reducerPath:E,reducer:m},O),{...w,...b(E,!0)}}};return w}}function kle(e,t,n,r){function i(o,...a){let s=t(o);return typeof s>"u"&&r&&(s=n()),e(s,...a)}return i.unwrapped=e,i}var AYe=Ple();function Tle(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Mle({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Dle(r))throw new Error(cu(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?b0(e,a):b0(e))}function Rle(e){return e._reducerDefinitionType==="asyncThunk"}function Dle(e){return e._reducerDefinitionType==="reducerWithPrepare"}function $le({type:e,reducerName:t},n,r,i){if(!i)throw new Error(cu(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:u,settled:l,options:c}=n,f=i(e,o,c);r.exposeAction(t,f),a&&r.addCase(f.fulfilled,a),s&&r.addCase(f.pending,s),u&&r.addCase(f.rejected,u),l&&r.addMatcher(f.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Jv,pending:s||Jv,rejected:u||Jv,settled:l||Jv})}function Jv(){}function cu(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function yj(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ile}=Object.prototype,{getPrototypeOf:MO}=Object,qx=(e=>t=>{const n=Ile.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ts=e=>(e=e.toLowerCase(),t=>qx(t)===e),Gx=e=>t=>typeof t===e,{isArray:Dh}=Array,J0=Gx("undefined");function Nle(e){return e!==null&&!J0(e)&&e.constructor!==null&&!J0(e.constructor)&&No(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bj=ts("ArrayBuffer");function Lle(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bj(e.buffer),t}const Fle=Gx("string"),No=Gx("function"),xj=Gx("number"),Yx=e=>e!==null&&typeof e=="object",jle=e=>e===!0||e===!1,qy=e=>{if(qx(e)!=="object")return!1;const t=MO(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ble=ts("Date"),zle=ts("File"),Ule=ts("Blob"),Vle=ts("FileList"),Wle=e=>Yx(e)&&No(e.pipe),Hle=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||No(e.append)&&((t=qx(e))==="formdata"||t==="object"&&No(e.toString)&&e.toString()==="[object FormData]"))},Kle=ts("URLSearchParams"),[qle,Gle,Yle,Zle]=["ReadableStream","Request","Response","Headers"].map(ts),Xle=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vm(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Dh(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const wc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_j=e=>!J0(e)&&e!==wc;function BC(){const{caseless:e}=_j(this)&&this||{},t={},n=(r,i)=>{const o=e&&wj(t,i)||i;qy(t[o])&&qy(r)?t[o]=BC(t[o],r):qy(r)?t[o]=BC({},r):Dh(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(vm(t,(i,o)=>{n&&No(i)?e[o]=yj(i,n):e[o]=i},{allOwnKeys:r}),e),Jle=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ece=(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)},tce=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&MO(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nce=(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},rce=e=>{if(!e)return null;if(Dh(e))return e;let t=e.length;if(!xj(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ice=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&MO(Uint8Array)),oce=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},ace=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sce=ts("HTMLFormElement"),uce=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),FM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),lce=ts("RegExp"),Sj=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};vm(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},cce=e=>{Sj(e,(t,n)=>{if(No(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(No(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+"'")})}})},fce=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Dh(e)?r(e):r(String(e).split(t)),n},dce=()=>{},hce=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,uS="abcdefghijklmnopqrstuvwxyz",jM="0123456789",Cj={DIGIT:jM,ALPHA:uS,ALPHA_DIGIT:uS+uS.toUpperCase()+jM},pce=(e=16,t=Cj.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function gce(e){return!!(e&&No(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const mce=e=>{const t=new Array(10),n=(r,i)=>{if(Yx(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Dh(r)?[]:{};return vm(r,(a,s)=>{const u=n(a,i+1);!J0(u)&&(o[s]=u)}),t[i]=void 0,o}}return r};return n(e,0)},vce=ts("AsyncFunction"),yce=e=>e&&(Yx(e)||No(e))&&No(e.then)&&No(e.catch),Ej=((e,t)=>e?setImmediate:t?((n,r)=>(wc.addEventListener("message",({source:i,data:o})=>{i===wc&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),wc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",No(wc.postMessage)),bce=typeof queueMicrotask<"u"?queueMicrotask.bind(wc):typeof process<"u"&&process.nextTick||Ej,_e={isArray:Dh,isArrayBuffer:bj,isBuffer:Nle,isFormData:Hle,isArrayBufferView:Lle,isString:Fle,isNumber:xj,isBoolean:jle,isObject:Yx,isPlainObject:qy,isReadableStream:qle,isRequest:Gle,isResponse:Yle,isHeaders:Zle,isUndefined:J0,isDate:Ble,isFile:zle,isBlob:Ule,isRegExp:lce,isFunction:No,isStream:Wle,isURLSearchParams:Kle,isTypedArray:ice,isFileList:Vle,forEach:vm,merge:BC,extend:Qle,trim:Xle,stripBOM:Jle,inherits:ece,toFlatObject:tce,kindOf:qx,kindOfTest:ts,endsWith:nce,toArray:rce,forEachEntry:oce,matchAll:ace,isHTMLForm:sce,hasOwnProperty:FM,hasOwnProp:FM,reduceDescriptors:Sj,freezeMethods:cce,toObjectSet:fce,toCamelCase:uce,noop:dce,toFiniteNumber:hce,findKey:wj,global:wc,isContextDefined:_j,ALPHABET:Cj,generateString:pce,isSpecCompliantForm:gce,toJSONObject:mce,isAsyncFn:vce,isThenable:yce,setImmediate:Ej,asap:bce};function Kt(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)}_e.inherits(Kt,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:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const Oj=Kt.prototype,Aj={};["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=>{Aj[e]={value:e}});Object.defineProperties(Kt,Aj);Object.defineProperty(Oj,"isAxiosError",{value:!0});Kt.from=(e,t,n,r,i,o)=>{const a=Object.create(Oj);return _e.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),Kt.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const xce=null;function zC(e){return _e.isPlainObject(e)||_e.isArray(e)}function Pj(e){return _e.endsWith(e,"[]")?e.slice(0,-2):e}function BM(e,t,n){return e?e.concat(t).map(function(i,o){return i=Pj(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function wce(e){return _e.isArray(e)&&!e.some(zC)}const _ce=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function Zx(e,t,n){if(!_e.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!_e.isUndefined(b[v])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(t);if(!_e.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(_e.isDate(m))return m.toISOString();if(!u&&_e.isBlob(m))throw new Kt("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(m)||_e.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,v,b){let w=m;if(m&&!b&&typeof m=="object"){if(_e.endsWith(v,"{}"))v=r?v:v.slice(0,-2),m=JSON.stringify(m);else if(_e.isArray(m)&&wce(m)||(_e.isFileList(m)||_e.endsWith(v,"[]"))&&(w=_e.toArray(m)))return v=Pj(v),w.forEach(function(S,O){!(_e.isUndefined(S)||S===null)&&t.append(a===!0?BM([v],O,o):a===null?v:v+"[]",l(S))}),!1}return zC(m)?!0:(t.append(BM(b,v,o),l(m)),!1)}const f=[],h=Object.assign(_ce,{defaultVisitor:c,convertValue:l,isVisitable:zC});function p(m,v){if(!_e.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(m),_e.forEach(m,function(w,x){(!(_e.isUndefined(w)||w===null)&&i.call(t,w,_e.isString(x)?x.trim():x,v,h))===!0&&p(w,v?v.concat(x):[x])}),f.pop()}}if(!_e.isObject(e))throw new TypeError("data must be an object");return p(e),t}function zM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function RO(e,t){this._pairs=[],e&&Zx(e,this,t)}const kj=RO.prototype;kj.append=function(t,n){this._pairs.push([t,n])};kj.toString=function(t){const n=t?function(r){return t.call(this,r,zM)}:zM;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Sce(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Tj(e,t,n){if(!t)return e;const r=n&&n.encode||Sce;_e.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=_e.isURLSearchParams(t)?t.toString():new RO(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class UM{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){_e.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Mj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Cce=typeof URLSearchParams<"u"?URLSearchParams:RO,Ece=typeof FormData<"u"?FormData:null,Oce=typeof Blob<"u"?Blob:null,Ace={isBrowser:!0,classes:{URLSearchParams:Cce,FormData:Ece,Blob:Oce},protocols:["http","https","file","blob","url","data"]},DO=typeof window<"u"&&typeof document<"u",UC=typeof navigator=="object"&&navigator||void 0,Pce=DO&&(!UC||["ReactNative","NativeScript","NS"].indexOf(UC.product)<0),kce=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Tce=DO&&window.location.href||"http://localhost",Mce=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:DO,hasStandardBrowserEnv:Pce,hasStandardBrowserWebWorkerEnv:kce,navigator:UC,origin:Tce},Symbol.toStringTag,{value:"Module"})),Mi={...Mce,...Ace};function Rce(e,t){return Zx(e,new Mi.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Mi.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Dce(e){return _e.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $ce(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&_e.isArray(i)?i.length:a,u?(_e.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!_e.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&_e.isArray(i[a])&&(i[a]=$ce(i[a])),!s)}if(_e.isFormData(e)&&_e.isFunction(e.entries)){const n={};return _e.forEachEntry(e,(r,i)=>{t(Dce(r),i,n,0)}),n}return null}function Ice(e,t,n){if(_e.isString(e))try{return(t||JSON.parse)(e),_e.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ym={transitional:Mj,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=_e.isObject(t);if(o&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return i?JSON.stringify(Rj(t)):t;if(_e.isArrayBuffer(t)||_e.isBuffer(t)||_e.isStream(t)||_e.isFile(t)||_e.isBlob(t)||_e.isReadableStream(t))return t;if(_e.isArrayBufferView(t))return t.buffer;if(_e.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Rce(t,this.formSerializer).toString();if((s=_e.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Zx(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Ice(t)):t}],transformResponse:[function(t){const n=this.transitional||ym.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(_e.isResponse(t)||_e.isReadableStream(t))return t;if(t&&_e.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Kt.from(s,Kt.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:Mi.classes.FormData,Blob:Mi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],e=>{ym.headers[e]={}});const Nce=_e.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"]),Lce=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&Nce[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},VM=Symbol("internals");function Dp(e){return e&&String(e).trim().toLowerCase()}function Gy(e){return e===!1||e==null?e:_e.isArray(e)?e.map(Gy):String(e)}function Fce(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 jce=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function lS(e,t,n,r,i){if(_e.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!_e.isString(t)){if(_e.isString(r))return t.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(t)}}function Bce(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function zce(e,t){const n=_e.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class ho{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,u,l){const c=Dp(u);if(!c)throw new Error("header name must be a non-empty string");const f=_e.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||u]=Gy(s))}const a=(s,u)=>_e.forEach(s,(l,c)=>o(l,c,u));if(_e.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(_e.isString(t)&&(t=t.trim())&&!jce(t))a(Lce(t),n);else if(_e.isHeaders(t))for(const[s,u]of t.entries())o(u,s,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Dp(t),t){const r=_e.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Fce(i);if(_e.isFunction(n))return n.call(this,i,r);if(_e.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Dp(t),t){const r=_e.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||lS(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Dp(a),a){const s=_e.findKey(r,a);s&&(!n||lS(r,r[s],s,n))&&(delete r[s],i=!0)}}return _e.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||lS(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return _e.forEach(this,(i,o)=>{const a=_e.findKey(r,o);if(a){n[a]=Gy(i),delete n[o];return}const s=t?Bce(o):String(o).trim();s!==o&&delete n[o],n[s]=Gy(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _e.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&_e.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[VM]=this[VM]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Dp(a);r[s]||(zce(i,a),r[s]=!0)}return _e.isArray(t)?t.forEach(o):o(t),this}}ho.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_e.reduceDescriptors(ho.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});_e.freezeMethods(ho);function cS(e,t){const n=this||ym,r=t||n,i=ho.from(r.headers);let o=r.data;return _e.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Dj(e){return!!(e&&e.__CANCEL__)}function $h(e,t,n){Kt.call(this,e??"canceled",Kt.ERR_CANCELED,t,n),this.name="CanceledError"}_e.inherits($h,Kt,{__CANCEL__:!0});function $j(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Kt("Request failed with status code "+n.status,[Kt.ERR_BAD_REQUEST,Kt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Uce(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vce(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[o];a||(a=l),n[i]=u,r[i]=l;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-a{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),f=c-n;f>=r?a(l,c):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},r-f)))},()=>i&&a(i)]}const j1=(e,t,n=3)=>{let r=0;const i=Vce(50,250);return Wce(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,u=a-r,l=i(u),c=a<=s;r=a;const f={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:l||void 0,estimated:l&&s&&c?(s-a)/l:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},WM=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},HM=e=>(...t)=>_e.asap(()=>e(...t)),Hce=Mi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mi.origin),Mi.navigator&&/(msie|trident)/i.test(Mi.navigator.userAgent)):()=>!0,Kce=Mi.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];_e.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&a.push("path="+r),_e.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.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 qce(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gce(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ij(e,t){return e&&!qce(t)?Gce(e,t):t}const KM=e=>e instanceof ho?{...e}:e;function Hc(e,t){t=t||{};const n={};function r(l,c,f,h){return _e.isPlainObject(l)&&_e.isPlainObject(c)?_e.merge.call({caseless:h},l,c):_e.isPlainObject(c)?_e.merge({},c):_e.isArray(c)?c.slice():c}function i(l,c,f,h){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l,f,h)}else return r(l,c,f,h)}function o(l,c){if(!_e.isUndefined(c))return r(void 0,c)}function a(l,c){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,f){if(f in t)return r(l,c);if(f in e)return r(void 0,l)}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,c,f)=>i(KM(l),KM(c),f,!0)};return _e.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=u[c]||i,h=f(e[c],t[c],c);_e.isUndefined(h)&&f!==s||(n[c]=h)}),n}const Nj=e=>{const t=Hc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=ho.from(a),t.url=Tj(Ij(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(_e.isFormData(n)){if(Mi.hasStandardBrowserEnv||Mi.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[l,...c]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...c].join("; "))}}if(Mi.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(t)),r||r!==!1&&Hce(t.url))){const l=i&&o&&Kce.read(o);l&&a.set(i,l)}return t},Yce=typeof XMLHttpRequest<"u",Zce=Yce&&function(e){return new Promise(function(n,r){const i=Nj(e);let o=i.data;const a=ho.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:l}=i,c,f,h,p,m;function v(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function w(){if(!b)return;const S=ho.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),E={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:S,config:e,request:b};$j(function(k){n(k),v()},function(k){r(k),v()},E),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(r(new Kt("Request aborted",Kt.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new Kt("Network Error",Kt.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let O=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Mj;i.timeoutErrorMessage&&(O=i.timeoutErrorMessage),r(new Kt(O,E.clarifyTimeoutError?Kt.ETIMEDOUT:Kt.ECONNABORTED,e,b)),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&_e.forEach(a.toJSON(),function(O,E){b.setRequestHeader(E,O)}),_e.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),s&&s!=="json"&&(b.responseType=i.responseType),l&&([h,m]=j1(l,!0),b.addEventListener("progress",h)),u&&b.upload&&([f,p]=j1(u),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=S=>{b&&(r(!S||S.type?new $h(null,e,b):S),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=Uce(i.url);if(x&&Mi.protocols.indexOf(x)===-1){r(new Kt("Unsupported protocol "+x+":",Kt.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Xce=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,s();const c=l instanceof Error?l:this.reason;r.abort(c instanceof Kt?c:new $h(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new Kt(`timeout ${t} of ms exceeded`,Kt.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>_e.asap(s),u}},Qce=function*(e,t){let n=e.byteLength;if(n{const i=Jce(e,t);let o=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:c}=await i.next();if(l){s(),u.close();return}let f=c.byteLength;if(n){let h=o+=f;n(h)}u.enqueue(new Uint8Array(c))}catch(l){throw s(l),l}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},Xx=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Lj=Xx&&typeof ReadableStream=="function",tfe=Xx&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Fj=(e,...t)=>{try{return!!e(...t)}catch{return!1}},nfe=Lj&&Fj(()=>{let e=!1;const t=new Request(Mi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),GM=64*1024,VC=Lj&&Fj(()=>_e.isReadableStream(new Response("").body)),B1={stream:VC&&(e=>e.body)};Xx&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!B1[t]&&(B1[t]=_e.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Kt(`Response type '${t}' is not supported`,Kt.ERR_NOT_SUPPORT,r)})})})(new Response);const rfe=async e=>{if(e==null)return 0;if(_e.isBlob(e))return e.size;if(_e.isSpecCompliantForm(e))return(await new Request(Mi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(e)||_e.isArrayBuffer(e))return e.byteLength;if(_e.isURLSearchParams(e)&&(e=e+""),_e.isString(e))return(await tfe(e)).byteLength},ife=async(e,t)=>{const n=_e.toFiniteNumber(e.getContentLength());return n??rfe(t)},ofe=Xx&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:l,headers:c,withCredentials:f="same-origin",fetchOptions:h}=Nj(e);l=l?(l+"").toLowerCase():"text";let p=Xce([i,o&&o.toAbortSignal()],a),m;const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(u&&nfe&&n!=="get"&&n!=="head"&&(b=await ife(c,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(_e.isFormData(r)&&(C=E.headers.get("content-type"))&&c.setContentType(C),E.body){const[k,M]=WM(b,j1(HM(u)));r=qM(E.body,GM,k,M)}}_e.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:w?f:void 0});let x=await fetch(m);const S=VC&&(l==="stream"||l==="response");if(VC&&(s||S&&v)){const E={};["status","statusText","headers"].forEach(N=>{E[N]=x[N]});const C=_e.toFiniteNumber(x.headers.get("content-length")),[k,M]=s&&WM(C,j1(HM(s),!0))||[];x=new Response(qM(x.body,GM,k,()=>{M&&M(),v&&v()}),E)}l=l||"text";let O=await B1[_e.findKey(B1,l)||"text"](x,e);return!S&&v&&v(),await new Promise((E,C)=>{$j(E,C,{data:O,headers:ho.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(w){throw v&&v(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Kt("Network Error",Kt.ERR_NETWORK,e,m),{cause:w.cause||w}):Kt.from(w,w&&w.code,e,m)}}),WC={http:xce,xhr:Zce,fetch:ofe};_e.forEach(WC,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const YM=e=>`- ${e}`,afe=e=>_e.isFunction(e)||e===null||e===!1,jj={getAdapter:e=>{e=_e.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : +`+o.map(YM).join(` +`):" "+YM(o[0]):"as no adapter specified";throw new Kt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:WC};function fS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $h(null,e)}function ZM(e){return fS(e),e.headers=ho.from(e.headers),e.data=cS.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),jj.getAdapter(e.adapter||ym.adapter)(e).then(function(r){return fS(e),r.data=cS.call(e,e.transformResponse,r),r.headers=ho.from(r.headers),r},function(r){return Dj(r)||(fS(e),r&&r.response&&(r.response.data=cS.call(e,e.transformResponse,r.response),r.response.headers=ho.from(r.response.headers))),Promise.reject(r)})}const Bj="1.7.9",Qx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Qx[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const XM={};Qx.transitional=function(t,n,r){function i(o,a){return"[Axios v"+Bj+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new Kt(i(a," has been removed"+(n?" in "+n:"")),Kt.ERR_DEPRECATED);return n&&!XM[a]&&(XM[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};Qx.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function sfe(e,t,n){if(typeof e!="object")throw new Kt("options must be an object",Kt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new Kt("option "+o+" must be "+u,Kt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Kt("Unknown option "+o,Kt.ERR_BAD_OPTION)}}const Yy={assertOptions:sfe,validators:Qx},ls=Yy.validators;class Tc{constructor(t){this.defaults=t,this.interceptors={request:new UM,response:new UM}}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 o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hc(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Yy.assertOptions(r,{silentJSONParsing:ls.transitional(ls.boolean),forcedJSONParsing:ls.transitional(ls.boolean),clarifyTimeoutError:ls.transitional(ls.boolean)},!1),i!=null&&(_e.isFunction(i)?n.paramsSerializer={serialize:i}:Yy.assertOptions(i,{encode:ls.function,serialize:ls.function},!0)),Yy.assertOptions(n,{baseUrl:ls.spelling("baseURL"),withXsrfToken:ls.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&_e.merge(o.common,o[n.method]);o&&_e.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=ho.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let c,f=0,h;if(!u){const m=[ZM.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),h=m.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new $h(o,a,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 $O(function(i){t=i}),cancel:t}}}function ufe(e){return function(n){return e.apply(null,n)}}function lfe(e){return _e.isObject(e)&&e.isAxiosError===!0}const HC={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(HC).forEach(([e,t])=>{HC[t]=e});function zj(e){const t=new Tc(e),n=yj(Tc.prototype.request,t);return _e.extend(n,Tc.prototype,t,{allOwnKeys:!0}),_e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return zj(Hc(e,i))},n}const qr=zj(ym);qr.Axios=Tc;qr.CanceledError=$h;qr.CancelToken=$O;qr.isCancel=Dj;qr.VERSION=Bj;qr.toFormData=Zx;qr.AxiosError=Kt;qr.Cancel=qr.CanceledError;qr.all=function(t){return Promise.all(t)};qr.spread=ufe;qr.isAxiosError=lfe;qr.mergeConfig=Hc;qr.AxiosHeaders=ho;qr.formToJSON=e=>Rj(_e.isHTMLForm(e)?new FormData(e):e);qr.getAdapter=jj.getAdapter;qr.HttpStatusCode=HC;qr.default=qr;var cfe=e=>{switch(e){case"success":return hfe;case"info":return gfe;case"warning":return pfe;case"error":return mfe;default:return null}},ffe=Array(12).fill(0),dfe=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},ffe.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),hfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),pfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.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"})),gfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),mfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),vfe=F.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"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),yfe=()=>{let[e,t]=F.useState(document.hidden);return F.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},KC=1,bfe=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?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:KC++,o=this.toasts.find(s=>s.id===i),a=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...e,id:i,title:n}),{...s,...e,id:i,dismissible:a,title:n}):s):this.addToast({title:n,...r,dismissible:a,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,o,a=r.then(async u=>{if(o=["resolve",u],F.isValidElement(u))i=!1,this.create({id:n,type:"default",message:u});else if(wfe(u)&&!u.ok){i=!1;let l=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:l,description:c})}else if(t.success!==void 0){i=!1;let l=typeof t.success=="function"?await t.success(u):t.success,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:l,description:c})}}).catch(async u=>{if(o=["reject",u],t.error!==void 0){i=!1;let l=typeof t.error=="function"?await t.error(u):t.error,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:l,description:c})}}).finally(()=>{var u;i&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),s=()=>new Promise((u,l)=>a.then(()=>o[0]==="reject"?l(o[1]):u(o[1])).catch(l));return typeof n!="string"&&typeof n!="number"?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||KC++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Po=new bfe,xfe=(e,t)=>{let n=t?.id||KC++;return Po.addToast({title:e,...t,id:n}),n},wfe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",_fe=xfe,Sfe=()=>Po.toasts,PYe=Object.assign(_fe,{success:Po.success,info:Po.info,warning:Po.warning,error:Po.error,custom:Po.custom,message:Po.message,promise:Po.promise,dismiss:Po.dismiss,loading:Po.loading},{getHistory:Sfe});function Cfe(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))}Cfe(`: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 ey(e){return e.label!==void 0}var Efe=3,Ofe="32px",QM=4e3,Afe=356,Pfe=14,kfe=20,Tfe=200;function Mfe(...e){return e.filter(Boolean).join(" ")}var Rfe=e=>{var t,n,r,i,o,a,s,u,l,c,f;let{invert:h,toast:p,unstyled:m,interacting:v,setHeights:b,visibleToasts:w,heights:x,index:S,toasts:O,expanded:E,removeToast:C,defaultRichColors:k,closeButton:M,style:N,cancelButtonStyle:z,actionButtonStyle:H,className:V="",descriptionClassName:ne="",duration:Z,position:G,gap:q,loadingIcon:W,expandByDefault:j,classNames:K,icons:Y,closeButtonAriaLabel:oe="Close toast",pauseWhenPageIsHidden:Q,cn:J}=e,[ue,de]=F.useState(!1),[Se,me]=F.useState(!1),[Ze,Ae]=F.useState(!1),[Le,$e]=F.useState(!1),[be,yt]=F.useState(!1),[lt,Nt]=F.useState(0),[yn,nn]=F.useState(0),ie=F.useRef(p.duration||Z||QM),pe=F.useRef(null),ye=F.useRef(null),Ue=S===0,je=S+1<=w,ke=p.type,nt=p.dismissible!==!1,mt=p.className||"",xn=p.descriptionClassName||"",Ht=F.useMemo(()=>x.findIndex(_t=>_t.toastId===p.id)||0,[x,p.id]),wn=F.useMemo(()=>{var _t;return(_t=p.closeButton)!=null?_t:M},[p.closeButton,M]);F.useMemo(()=>p.duration||Z||QM,[p.duration,Z]);let Ii=F.useRef(0),br=F.useRef(0),yi=F.useRef(0),sr=F.useRef(null),[si,bi]=G.split("-"),Rr=F.useMemo(()=>x.reduce((_t,hn,_n)=>_n>=Ht?_t:_t+hn.height,0),[x,Ht]),Xi=yfe(),yo=p.invert||h,xi=ke==="loading";br.current=F.useMemo(()=>Ht*q+Rr,[Ht,Rr]),F.useEffect(()=>{de(!0)},[]),F.useEffect(()=>{let _t=ye.current;if(_t){let hn=_t.getBoundingClientRect().height;return nn(hn),b(_n=>[{toastId:p.id,height:hn,position:p.position},..._n]),()=>b(_n=>_n.filter(qn=>qn.toastId!==p.id))}},[b,p.id]),F.useLayoutEffect(()=>{if(!ue)return;let _t=ye.current,hn=_t.style.height;_t.style.height="auto";let _n=_t.getBoundingClientRect().height;_t.style.height=hn,nn(_n),b(qn=>qn.find(ur=>ur.toastId===p.id)?qn.map(ur=>ur.toastId===p.id?{...ur,height:_n}:ur):[{toastId:p.id,height:_n,position:p.position},...qn])},[ue,p.title,p.description,b,p.id]);let Dr=F.useCallback(()=>{me(!0),Nt(br.current),b(_t=>_t.filter(hn=>hn.toastId!==p.id)),setTimeout(()=>{C(p)},Tfe)},[p,C,b,br]);F.useEffect(()=>{if(p.promise&&ke==="loading"||p.duration===1/0||p.type==="loading")return;let _t;return E||v||Q&&Xi?(()=>{if(yi.current{var hn;(hn=p.onAutoClose)==null||hn.call(p,p),Dr()},ie.current)),()=>clearTimeout(_t)},[E,v,p,ke,Q,Xi,Dr]),F.useEffect(()=>{p.delete&&Dr()},[Dr,p.delete]);function Sa(){var _t,hn,_n;return Y!=null&&Y.loading?F.createElement("div",{className:J(K?.loader,(_t=p?.classNames)==null?void 0:_t.loader,"sonner-loader"),"data-visible":ke==="loading"},Y.loading):W?F.createElement("div",{className:J(K?.loader,(hn=p?.classNames)==null?void 0:hn.loader,"sonner-loader"),"data-visible":ke==="loading"},W):F.createElement(dfe,{className:J(K?.loader,(_n=p?.classNames)==null?void 0:_n.loader),visible:ke==="loading"})}return F.createElement("li",{tabIndex:0,ref:ye,className:J(V,mt,K?.toast,(t=p?.classNames)==null?void 0:t.toast,K?.default,K?.[ke],(n=p?.classNames)==null?void 0:n[ke]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:k,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":ue,"data-promise":!!p.promise,"data-swiped":be,"data-removed":Se,"data-visible":je,"data-y-position":si,"data-x-position":bi,"data-index":S,"data-front":Ue,"data-swiping":Ze,"data-dismissible":nt,"data-type":ke,"data-invert":yo,"data-swipe-out":Le,"data-expanded":!!(E||j&&ue),style:{"--index":S,"--toasts-before":S,"--z-index":O.length-S,"--offset":`${Se?lt:br.current}px`,"--initial-height":j?"auto":`${yn}px`,...N,...p.style},onPointerDown:_t=>{xi||!nt||(pe.current=new Date,Nt(br.current),_t.target.setPointerCapture(_t.pointerId),_t.target.tagName!=="BUTTON"&&(Ae(!0),sr.current={x:_t.clientX,y:_t.clientY}))},onPointerUp:()=>{var _t,hn,_n,qn;if(Le||!nt)return;sr.current=null;let ur=Number(((_t=ye.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Xr=new Date().getTime()-((hn=pe.current)==null?void 0:hn.getTime()),bo=Math.abs(ur)/Xr;if(Math.abs(ur)>=kfe||bo>.11){Nt(br.current),(_n=p.onDismiss)==null||_n.call(p,p),Dr(),$e(!0),yt(!1);return}(qn=ye.current)==null||qn.style.setProperty("--swipe-amount","0px"),Ae(!1)},onPointerMove:_t=>{var hn,_n;if(!sr.current||!nt)return;let qn=_t.clientY-sr.current.y,ur=((hn=window.getSelection())==null?void 0:hn.toString().length)>0,Xr=si==="top"?Math.min(0,qn):Math.max(0,qn);Math.abs(Xr)>0&&yt(!0),!ur&&((_n=ye.current)==null||_n.style.setProperty("--swipe-amount",`${Xr}px`))}},wn&&!p.jsx?F.createElement("button",{"aria-label":oe,"data-disabled":xi,"data-close-button":!0,onClick:xi||!nt?()=>{}:()=>{var _t;Dr(),(_t=p.onDismiss)==null||_t.call(p,p)},className:J(K?.closeButton,(i=p?.classNames)==null?void 0:i.closeButton)},(o=Y?.close)!=null?o:vfe):null,p.jsx||F.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:F.createElement(F.Fragment,null,ke||p.icon||p.promise?F.createElement("div",{"data-icon":"",className:J(K?.icon,(a=p?.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Sa():null,p.type!=="loading"?p.icon||Y?.[ke]||cfe(ke):null):null,F.createElement("div",{"data-content":"",className:J(K?.content,(s=p?.classNames)==null?void 0:s.content)},F.createElement("div",{"data-title":"",className:J(K?.title,(u=p?.classNames)==null?void 0:u.title)},typeof p.title=="function"?p.title():p.title),p.description?F.createElement("div",{"data-description":"",className:J(ne,xn,K?.description,(l=p?.classNames)==null?void 0:l.description)},typeof p.description=="function"?p.description():p.description):null),F.isValidElement(p.cancel)?p.cancel:p.cancel&&ey(p.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||z,onClick:_t=>{var hn,_n;ey(p.cancel)&&nt&&((_n=(hn=p.cancel).onClick)==null||_n.call(hn,_t),Dr())},className:J(K?.cancelButton,(c=p?.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,F.isValidElement(p.action)?p.action:p.action&&ey(p.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||H,onClick:_t=>{var hn,_n;ey(p.action)&&((_n=(hn=p.action).onClick)==null||_n.call(hn,_t),!_t.defaultPrevented&&Dr())},className:J(K?.actionButton,(f=p?.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function JM(){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}var kYe=y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:u,theme:l="light",richColors:c,duration:f,style:h,visibleToasts:p=Efe,toastOptions:m,dir:v=JM(),gap:b=Pfe,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:O,cn:E=Mfe}=e,[C,k]=F.useState([]),M=F.useMemo(()=>Array.from(new Set([r].concat(C.filter(Q=>Q.position).map(Q=>Q.position)))),[C,r]),[N,z]=F.useState([]),[H,V]=F.useState(!1),[ne,Z]=F.useState(!1),[G,q]=F.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=F.useRef(null),j=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=F.useRef(null),Y=F.useRef(!1),oe=F.useCallback(Q=>{k(J=>{var ue;return(ue=J.find(de=>de.id===Q.id))!=null&&ue.delete||Po.dismiss(Q.id),J.filter(({id:de})=>de!==Q.id)})},[]);return F.useEffect(()=>Po.subscribe(Q=>{if(Q.dismiss){k(J=>J.map(ue=>ue.id===Q.id?{...ue,delete:!0}:ue));return}setTimeout(()=>{jx.flushSync(()=>{k(J=>{let ue=J.findIndex(de=>de.id===Q.id);return ue!==-1?[...J.slice(0,ue),{...J[ue],...Q},...J.slice(ue+1)]:[Q,...J]})})})}),[]),F.useEffect(()=>{if(l!=="system"){q(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:J})=>{q(J?"dark":"light")})}catch{Q.addListener(({matches:ue})=>{try{q(ue?"dark":"light")}catch(de){console.error(de)}})}},[l]),F.useEffect(()=>{C.length<=1&&V(!1)},[C]),F.useEffect(()=>{let Q=J=>{var ue,de;i.every(Se=>J[Se]||J.code===Se)&&(V(!0),(ue=W.current)==null||ue.focus()),J.code==="Escape"&&(document.activeElement===W.current||(de=W.current)!=null&&de.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[i]),F.useEffect(()=>{if(W.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,Y.current=!1)}},[W.current]),F.createElement("section",{"aria-label":`${S} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},M.map((Q,J)=>{var ue;let[de,Se]=Q.split("-");return C.length?F.createElement("ol",{key:Q,dir:v==="auto"?JM():v,tabIndex:-1,ref:W,className:s,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":de,"data-lifted":H&&C.length>1&&!o,"data-x-position":Se,style:{"--front-toast-height":`${((ue=N[0])==null?void 0:ue.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||Ofe,"--width":`${Afe}px`,"--gap":`${b}px`,...h},onBlur:me=>{Y.current&&!me.currentTarget.contains(me.relatedTarget)&&(Y.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,K.current=me.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{ne||V(!1)},onPointerDown:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},C.filter(me=>!me.position&&J===0||me.position===Q).map((me,Ze)=>{var Ae,Le;return F.createElement(Rfe,{key:me.id,icons:x,index:Ze,toast:me,defaultRichColors:c,duration:(Ae=m?.duration)!=null?Ae:f,className:m?.className,descriptionClassName:m?.descriptionClassName,invert:n,visibleToasts:p,closeButton:(Le=m?.closeButton)!=null?Le:a,interacting:ne,position:Q,style:m?.style,unstyled:m?.unstyled,classNames:m?.classNames,cancelButtonStyle:m?.cancelButtonStyle,actionButtonStyle:m?.actionButtonStyle,removeToast:oe,toasts:C.filter($e=>$e.position==me.position),heights:N.filter($e=>$e.position==me.position),setHeights:z,expandByDefault:o,gap:b,loadingIcon:w,expanded:H,pauseWhenPageIsHidden:O,cn:E})})):null}))}),Ih=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(){}},Kc=typeof window>"u"||"Deno"in globalThis;function oa(){}function Dfe(e,t){return typeof e=="function"?e(t):e}function qC(e){return typeof e=="number"&&e>=0&&e!==1/0}function Uj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Od(e,t){return typeof e=="function"?e(t):e}function La(e,t){return typeof e=="function"?e(t):e}function eR(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==IO(a,t.options))return!1}else if(!eg(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||o&&!o(t))}function tR(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(qc(t.options.mutationKey)!==qc(o))return!1}else if(!eg(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function IO(e,t){return(t?.queryKeyHashFn||qc)(e)}function qc(e){return JSON.stringify(e,(t,n)=>GC(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function eg(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!eg(e[n],t[n])):!1}function Vj(e,t){if(e===t)return e;const n=nR(e)&&nR(t);if(n||GC(e)&&GC(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,s=n?[]:{};let u=0;for(let l=0;l{setTimeout(t,e)})}function YC(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Vj(e,t):t}function Ife(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Nfe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var NO=Symbol();function Wj(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===NO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Lfe=class extends Ih{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!Kc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},LO=new Lfe,Ffe=class extends Ih{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!Kc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},U1=new Ffe;function ZC(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});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 jfe(e){return Math.min(1e3*2**e,3e4)}function Hj(e){return(e??"online")==="online"?U1.isOnline():!0}var Kj=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function dS(e){return e instanceof Kj}function qj(e){let t=!1,n=0,r=!1,i;const o=ZC(),a=v=>{r||(h(new Kj(v)),e.abort?.())},s=()=>{t=!0},u=()=>{t=!1},l=()=>LO.isFocused()&&(e.networkMode==="always"||U1.isOnline())&&e.canRun(),c=()=>Hj(e.networkMode)&&e.canRun(),f=v=>{r||(r=!0,e.onSuccess?.(v),i?.(),o.resolve(v))},h=v=>{r||(r=!0,e.onError?.(v),i?.(),o.reject(v))},p=()=>new Promise(v=>{i=b=>{(r||l())&&v(b)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),m=()=>{if(r)return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(w){v=Promise.reject(w)}Promise.resolve(v).then(f).catch(w=>{if(r)return;const x=e.retry??(Kc?0:3),S=e.retryDelay??jfe,O=typeof S=="function"?S(n,w):S,E=x===!0||typeof x=="number"&&nl()?void 0:p()).then(()=>{t?h(w):m()})})};return{promise:o,cancel:a,continue:()=>(i?.(),o),cancelRetry:s,continueRetry:u,canStart:c,start:()=>(c()?m():p().then(m),o)}}function Bfe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=s=>setTimeout(s,0);const o=s=>{t?e.push(s):i(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(u=>{n(u)})})})};return{batch:s=>{let u;t++;try{u=s()}finally{t--,t||a()}return u},batchCalls:s=>(...u)=>{o(()=>{s(...u)})},schedule:o,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Ur=Bfe(),Gj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qC(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Kc?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},zfe=class extends Gj{#e;#t;#r;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Ufe(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=YC(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(oa).catch(oa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>La(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===NO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Uj(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(u=>u.options.queryFn);s&&this.setOptions(s.options)}const n=new AbortController,r=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const s=Wj(this.options,t),u={queryKey:this.queryKey,meta:this.meta};return r(u),this.#o=!1,this.options.persister?this.options.persister(s,u,this):s(u)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};r(o),this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta});const a=s=>{dS(s)&&s.silent||this.#i({type:"error",error:s}),dS(s)||(this.#r.config.onError?.(s,this),this.#r.config.onSettled?.(this.state.data,s,this)),this.scheduleGc()};return this.#n=qj({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:s=>{if(s===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(s)}catch(u){a(u);return}this.#r.config.onSuccess?.(s,this),this.#r.config.onSettled?.(s,this.state.error,this),this.scheduleGc()},onError:a,onFail:(s,u)=>{this.#i({type:"failed",failureCount:s,error:u})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#n.start()}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Yj(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return dS(r)&&r.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ur.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Yj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Hj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ufe(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 Vfe=class extends Ih{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??IO(r,t);let o=this.get(i);return o||(o=new zfe({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>eR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>eR(e,n)):t}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Wfe=class extends Gj{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||Zj(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){this.#r=qj({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(r,i)=>{this.#n({type:"failed",failureCount:r,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const t=this.state.status==="pending",n=!this.#r.canStart();try{if(!t){this.#n({type:"pending",variables:e,isPaused:n}),await this.#t.config.onMutate?.(e,this);const i=await this.options.onMutate?.(e);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:n})}const r=await this.#r.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#n({type:"success",data:r}),r}catch(r){try{throw await this.#t.config.onError?.(r,e,this.state.context,this),await this.options.onError?.(r,e,this.state.context),await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,e,this.state.context),r}finally{this.#n({type:"error",error:r})}}finally{this.#t.runNext(this)}}#n(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ur.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Zj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Hfe=class extends Ih{constructor(e={}){super(),this.config=e,this.#e=new Map,this.#t=Date.now()}#e;#t;build(e,t,n){const r=new Wfe({mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=ty(e),n=this.#e.get(t)??[];n.push(e),this.#e.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=ty(e);if(this.#e.has(t)){const n=this.#e.get(t)?.filter(r=>r!==e);n&&(n.length===0?this.#e.delete(t):this.#e.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#e.get(ty(e))?.find(n=>n.state.status==="pending");return!t||t===e}runNext(e){return this.#e.get(ty(e))?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#e.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(n=>tR(t,n))}findAll(e={}){return this.getAll().filter(t=>tR(e,t))}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ur.batch(()=>Promise.all(e.map(t=>t.continue().catch(oa))))}};function ty(e){return e.options.scope?.id??String(e.mutationId)}function iR(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},u=0;const l=async()=>{let c=!1;const f=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},h=Wj(t.options,t.fetchOptions),p=async(m,v,b)=>{if(c)return Promise.reject();if(v==null&&m.pages.length)return Promise.resolve(m);const w={queryKey:t.queryKey,pageParam:v,direction:b?"backward":"forward",meta:t.options.meta};f(w);const x=await h(w),{maxPages:S}=t.options,O=b?Nfe:Ife;return{pages:O(m.pages,x,S),pageParams:O(m.pageParams,v,S)}};if(i&&o.length){const m=i==="backward",v=m?Kfe:oR,b={pages:o,pageParams:a},w=v(r,b);s=await p(b,w,m)}else{const m=e??o.length;do{const v=u===0?a[0]??r.initialPageParam:oR(r,s);if(u>0&&v==null)break;s=await p(s,v),u++}while(ut.options.persister?.(l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function oR(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 Kfe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var TYe=class{#e;#t;#r;#n;#a;#o;#i;#s;constructor(e={}){this.#e=e.queryCache||new Vfe,this.#t=e.mutationCache||new Hfe,this.#r=e.defaultOptions||{},this.#n=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=LO.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=U1.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Od(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,a=Dfe(t,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ur.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ur.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e,r={type:"active",...e};return Ur.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ur.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(oa).catch(oa)}invalidateQueries(e,t={}){return Ur.batch(()=>{if(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none")return Promise.resolve();const n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ur.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(oa)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(oa)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Od(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(oa).catch(oa)}fetchInfiniteQuery(e){return e.behavior=iR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(oa).catch(oa)}ensureInfiniteQueryData(e){return e.behavior=iR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return U1.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(qc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],n={};return t.forEach(r=>{eg(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(qc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()];let n={};return t.forEach(r=>{eg(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=IO(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===NO&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},qfe=class extends Ih{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#i=ZC(),this.options.experimental_prefetchInRender||this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#r=void 0;#n=void 0;#a;#o;#i;#s;#g;#d;#h;#l;#c;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),aR(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return XC(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return XC(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof La(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!z1(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&sR(this.#t,r,this.options,n)&&this.#f(),this.updateResult(t),i&&(this.#t!==r||La(this.options.enabled,this.#t)!==La(n.enabled,this.#t)||Od(this.options.staleTime,this.#t)!==Od(n.staleTime,this.#t))&&this.#m();const o=this.#v();i&&(this.#t!==r||La(this.options.enabled,this.#t)!==La(n.enabled,this.#t)||o!==this.#u)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Yfe(this,n)&&(this.#n=n,this.#o=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(e,t){const n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(oa)),t}#m(){this.#x();const e=Od(this.options.staleTime,this.#t);if(Kc||this.#n.isStale||!qC(e))return;const n=Uj(this.#n.dataUpdatedAt,e)+1;this.#l=setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#u=e,!(Kc||La(this.options.enabled,this.#t)===!1||!qC(this.#u)||this.#u===0)&&(this.#c=setInterval(()=>{(this.options.refetchIntervalInBackground||LO.isFocused())&&this.#f()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#x(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#w(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#n,o=this.#a,a=this.#o,u=e!==n?e.state:this.#r,{state:l}=e;let c={...l},f=!1,h;if(t._optimisticResults){const k=this.hasListeners(),M=!k&&aR(e,t),N=k&&sR(e,n,t,r);(M||N)&&(c={...c,...Yj(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:v}=c;if(t.select&&c.data!==void 0)if(i&&c.data===o?.data&&t.select===this.#g)h=this.#d;else try{this.#g=t.select,h=t.select(c.data),h=YC(i?.data,h,t),this.#d=h,this.#s=null}catch(k){this.#s=k}else h=c.data;if(t.placeholderData!==void 0&&h===void 0&&v==="pending"){let k;if(i?.isPlaceholderData&&t.placeholderData===a?.placeholderData)k=i.data;else if(k=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,t.select&&k!==void 0)try{k=t.select(k),this.#s=null}catch(M){this.#s=M}k!==void 0&&(v="success",h=YC(i?.data,k,t),f=!0)}this.#s&&(p=this.#s,h=this.#d,m=Date.now(),v="error");const b=c.fetchStatus==="fetching",w=v==="pending",x=v==="error",S=w&&b,O=h!==void 0,C={status:v,fetchStatus:c.fetchStatus,isPending:w,isSuccess:v==="success",isError:x,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:x&&!O,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&O,isStale:FO(e,t),refetch:this.refetch,promise:this.#i};if(this.options.experimental_prefetchInRender){const k=z=>{C.status==="error"?z.reject(C.error):C.data!==void 0&&z.resolve(C.data)},M=()=>{const z=this.#i=C.promise=ZC();k(z)},N=this.#i;switch(N.status){case"pending":e.queryHash===n.queryHash&&k(N);break;case"fulfilled":(C.status==="error"||C.data!==N.value)&&M();break;case"rejected":(C.status!=="error"||C.error!==N.reason)&&M();break}}return C}updateResult(e){const t=this.#n,n=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#h=this.#t),z1(n,t))return;this.#n=n;const r={},i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.#p.size)return!0;const s=new Set(a??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(u=>{const l=u;return this.#n[l]!==t[l]&&s.has(l)})};e?.listeners!==!1&&i()&&(r.listeners=!0),this.#S({...r,...e})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){Ur.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Gfe(e,t){return La(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function aR(e,t){return Gfe(e,t)||e.state.data!==void 0&&XC(e,t,t.refetchOnMount)}function XC(e,t,n){if(La(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&FO(e,t)}return!1}function sR(e,t,n,r){return(e!==t||La(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&FO(e,n)}function FO(e,t){return La(t.enabled,e)!==!1&&e.isStaleByTime(Od(t.staleTime,e))}function Yfe(e,t){return!z1(e.getCurrentResult(),t)}var Zfe=class extends Ih{#e;#t=void 0;#r;#n;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),z1(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&qc(n.mutationKey)!==qc(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#o()}mutate(t,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(t)}#a(){const t=this.#r?.state??Zj();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Ur.batch(()=>{if(this.#n&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context;t?.type==="success"?(this.#n.onSuccess?.(t.data,n,r),this.#n.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#n.onError?.(t.error,n,r),this.#n.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#t)})})}},Xj=y.createContext(void 0),Qj=e=>{const t=y.useContext(Xj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},RYe=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),I.jsx(Xj.Provider,{value:e,children:t})),Jj=y.createContext(!1),Xfe=()=>y.useContext(Jj);Jj.Provider;function Qfe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Jfe=y.createContext(Qfe()),ede=()=>y.useContext(Jfe);function eB(e,t){return typeof e=="function"?e(...t):!!e}function QC(){}var tde=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},nde=e=>{y.useEffect(()=>{e.clearReset()},[e])},rde=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&eB(n,[e.error,r]),ide=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},ode=(e,t)=>e.isLoading&&e.isFetching&&!t,ade=(e,t)=>e?.suspense&&t.isPending,uR=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sde(e,t,n){const r=Qj(),i=Xfe(),o=ede(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=i?"isRestoring":"optimistic",ide(a),tde(a,o),nde(o);const s=!r.getQueryCache().get(a.queryHash),[u]=y.useState(()=>new t(r,a)),l=u.getOptimisticResult(a);if(y.useSyncExternalStore(y.useCallback(c=>{const f=i?QC:u.subscribe(Ur.batchCalls(c));return u.updateResult(),f},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),y.useEffect(()=>{u.setOptions(a,{listeners:!1})},[a,u]),ade(a,l))throw uR(a,u,o);if(rde({result:l,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw l.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!Kc&&ode(l,i)&&(s?uR(a,u,o):r.getQueryCache().get(a.queryHash)?.promise)?.catch(QC).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?l:u.trackResult(l)}function DYe(e,t){return sde(e,qfe)}function $Ye(e,t){const n=Qj(),[r]=y.useState(()=>new Zfe(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(Ur.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=y.useCallback((a,s)=>{r.mutate(a,s).catch(QC)},[r]);if(i.error&&eB(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}const It=e=>typeof e=="string",$p=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},lR=e=>e==null?"":""+e,ude=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},lde=/###/g,cR=e=>e&&e.indexOf("###")>-1?e.replace(lde,"."):e,fR=e=>!e||It(e),x0=(e,t,n)=>{const r=It(t)?t.split("."):t;let i=0;for(;i{const{obj:r,k:i}=x0(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],a=t.slice(0,t.length-1),s=x0(e,a,Object);for(;s.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=x0(e,a,Object),s?.obj&&typeof s.obj[`${s.k}.${o}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},cde=(e,t,n,r)=>{const{obj:i,k:o}=x0(e,t,Object);i[o]=i[o]||[],i[o].push(n)},V1=(e,t)=>{const{obj:n,k:r}=x0(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},fde=(e,t,n)=>{const r=V1(e,n);return r!==void 0?r:V1(t,n)},tB=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?It(e[r])||e[r]instanceof String||It(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):tB(e[r],t[r],n):e[r]=t[r]);return e},Bf=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var dde={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const hde=e=>It(e)?e.replace(/[&<>"'\/]/g,t=>dde[t]):e;class pde{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const gde=[" ",",","?","!",";"],mde=new pde(20),vde=(e,t,n)=>{t=t||"",n=n||"";const r=gde.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=mde.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(e);if(!o){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o},JC=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o-1&&ue?.replace("_","-"),yde={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};let bde=class eE{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||yde,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[s,u]=a;for(let l=0;l{let[s,u]=a;for(let l=0;l1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):It(r)&&o?s.push(...r.split(o)):s.push(r)));const u=V1(this.data,s);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),u||!a||!It(r)?u:JC(this.data?.[t]?.[n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),dR(this.data,s,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(It(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let u=V1(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?tB(u,r,o):u={...u,...r},dR(this.data,s,u),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var nB={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{t=this.processors[o]?.process(t,n,r,i)??t}),t}};const pR={};class H1 extends Jx{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ude(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ms.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return t==null?!1:this.resolve(t,n)?.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!vde(t,r,i);if(a&&!s){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:It(o)?[o]:o};const l=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),t=l.join(i)}return{key:t,namespaces:It(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),u=s[s.length-1],l=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l?.toLowerCase()==="cimode"){if(c){const O=n.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${O}${a}`,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${O}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:a}const f=this.resolve(t,n);let h=f?.res;const p=f?.usedKey||a,m=f?.exactUsedKey||a,v=Object.prototype.toString.apply(h),b=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!It(h)&&typeof h!="boolean"&&typeof h!="number";if(x&&h&&S&&b.indexOf(v)<0&&!(It(w)&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(f.res=O,f.usedParams=this.getUsedParamsDetails(n),f):O}if(o){const O=Array.isArray(h),E=O?[]:{},C=O?m:p;for(const k in h)if(Object.prototype.hasOwnProperty.call(h,k)){const M=`${C}${o}${k}`;E[k]=this.translate(M,{...n,joinArrays:!1,ns:s}),E[k]===M&&(E[k]=h[k])}h=E}}else if(x&&It(w)&&Array.isArray(h))h=h.join(w),h&&(h=this.extendTranslation(h,t,n,r));else{let O=!1,E=!1;const C=n.count!==void 0&&!It(n.count),k=H1.hasDefaultValue(n),M=C?this.pluralResolver.getSuffix(l,n.count,n):"",N=n.ordinal&&C?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",z=C&&!n.ordinal&&n.count===0,H=z&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${M}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(h)&&k&&(O=!0,h=H),this.isValidLookup(h)||(E=!0,h=a);const ne=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:h,Z=k&&H!==h&&this.options.updateMissing;if(E||O||Z){if(this.logger.log(Z?"updateKey":"missingKey",l,u,a,Z?H:h),o){const j=this.resolve(a,{...n,keySeparator:!1});j&&j.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let G=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let j=0;j{const oe=k&&Y!==h?Y:ne;this.options.missingKeyHandler?this.options.missingKeyHandler(j,u,K,oe,Z,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(j,u,K,oe,Z,n),this.emit("missingKey",j,u,K,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?G.forEach(j=>{const K=this.pluralResolver.getSuffixes(j,n);z&&n[`defaultValue${this.options.pluralSeparator}zero`]&&K.indexOf(`${this.options.pluralSeparator}zero`)<0&&K.push(`${this.options.pluralSeparator}zero`),K.forEach(Y=>{W([j],a+Y,n[`defaultValue${Y}`]||H)})}):W(G,a,H))}h=this.extendTranslation(h,t,n,f,r),E&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${a}`),(E||O)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${a}`:a,O?h:void 0))}return i?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,i,o){var a=this;if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=It(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const h=t.match(this.interpolator.nestingRegexp);c=h&&h.length}let f=r.replace&&!It(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),l){const h=t.match(this.interpolator.nestingRegexp),p=h&&h.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,a,s;return It(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(u,n),c=l.key;i=c;let f=l.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!It(n.count),p=h&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(It(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(b=>{this.isValidLookup(r)||(s=b,!pR[`${v[0]}-${b}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(pR[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,c,w,b,n);else{let O;h&&(O=this.pluralResolver.getSuffix(w,n.count,n));const E=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(x.push(c+O),n.ordinal&&O.indexOf(C)===0&&x.push(c+O.replace(C,this.options.pluralSeparator)),p&&x.push(c+E)),m){const k=`${c}${this.options.contextSeparator}${n.context}`;x.push(k),h&&(x.push(k+O),n.ordinal&&O.indexOf(C)===0&&x.push(k+O.replace(C,this.options.pluralSeparator)),p&&x.push(k+E))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(o=S,r=this.getResource(w,b,S,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!It(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class gR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ms.create("languageUtils")}getScriptPartFromCode(t){if(t=W1(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=W1(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(It(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),It(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return It(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):It(t)&&o(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}const mR={zero:0,one:1,two:2,few:3,many:4,other:5},vR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class xde{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ms.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=W1(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),vR;if(!t.match(/-|_/))return vR;const u=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(u,n)}return this.pluralRulesCache[o]=a,a}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>mR[i]-mR[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const yR=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=fde(e,t,n);return!o&&i&&It(n)&&(o=JC(e,n,r),o===void 0&&(o=JC(t,n,r))),o},hS=e=>e.replace(/\$/g,"$$$$");class wde{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:a,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:v,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:hde,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Bf(o):a||"{{",this.suffix=s?Bf(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?Bf(h):p||Bf("$t("),this.nestingSuffix=m?Bf(m):v||Bf(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,a,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=p=>{if(p.indexOf(this.formatSeparator)<0){const w=yR(n,u,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...i,...n,interpolationkey:p}):w}const m=p.split(this.formatSeparator),v=m.shift().trim(),b=m.join(this.formatSeparator).trim();return this.format(yR(n,u,v,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:v})};this.resetRegExp();const c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>hS(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?hS(this.escape(p)):hS(p)}].forEach(p=>{for(s=0;o=p.regex.exec(t);){const m=o[1].trim();if(a=l(m),a===void 0)if(typeof c=="function"){const b=c(t,o,i);a=It(b)?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))a="";else if(f){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else!It(a)&&!this.useRawValueToEscape&&(a=lR(a));const v=p.safeValue(a);if(t=t.replace(o[0],v),f?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,a;const s=(u,l)=>{const c=this.nestingOptionsSeparator;if(u.indexOf(c)<0)return u;const f=u.split(new RegExp(`${c}[ ]*{`));let h=`{${f[1]}`;u=f[0],h=this.interpolate(h,a);const p=h.match(/'/g),m=h.match(/"/g);((p?.length??0)%2===0&&!m||m.length%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),l&&(a={...l,...a})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,v),`${u}${c}${h}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;i=this.nestingRegexp.exec(t);){let u=[];a={...r},a=a.replace&&!It(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=c.shift(),u=c,l=!0}if(o=n(s.call(this,i[1].trim(),a),a),o&&i[0]===t&&!It(o))return o;It(o)||(o=lR(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),l&&(o=u.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const _de=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(a){const[s,...u]=a.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();n[c]||(n[c]=l),l==="false"&&(n[c]=!1),l==="true"&&(n[c]=!0),isNaN(l)||(n[c]=parseInt(l,10))}})}return{formatName:t,formatOptions:n}},zf=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(W1(r),i),t[a]=s),s(n)}};class Sde{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("formatter"),this.options=t,this.formats={number:zf((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:zf((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:zf((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:zf((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:zf((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=zf(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(s=>s.indexOf(")")>-1)){const s=o.findIndex(u=>u.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,s)].join(this.formatSeparator)}return o.reduce((s,u)=>{const{formatName:l,formatOptions:c}=_de(u);if(this.formats[l]){let f=s;try{const h=i?.formatParams?.[i.interpolationkey]||{},p=h.locale||h.lng||i.locale||i.lng||r;f=this.formats[l](s,p,{...c,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${l}`);return s},t)}}const Cde=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Ede extends Jx{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ms.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,i.backend,i)}queueLoad(t,n,r,i){const o={},a={},s={},u={};return t.forEach(l=>{let c=!0;n.forEach(f=>{const h=`${l}|${f}`;!r.reload&&this.store.hasResourceBundle(l,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,c=!1,a[h]===void 0&&(a[h]=!0),o[h]===void 0&&(o[h]=!0),u[f]===void 0&&(u[f]=!0)))}),c||(s[l]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const i=t.split("|"),o=i[0],a=i[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(u=>{cde(u.loaded,[o],a),Cde(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const c=u.loaded[l];c.length&&c.forEach(f=>{s[l][f]===void 0&&(s[l][f]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(l&&c&&i{this.read.call(this,t,n,r,i+1,o*2,a)},o);return}a(l,c)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const l=u(t,n);l&&typeof l.then=="function"?l.then(c=>s(null,c)).catch(s):s(null,l)}catch(l){s(l)}return}return u(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();It(t)&&(t=this.languageUtils.toResolveHierarchy(t)),It(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...a,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let c;l.length===5?c=l(t,n,r,i,u):c=l(t,n,r,i),c&&typeof c.then=="function"?c.then(f=>s(null,f)).catch(s):s(null,c)}catch(c){s(c)}else l(t,n,r,i,s,u)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const bR=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),It(e[1])&&(t.defaultValue=e[1]),It(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),xR=e=>(It(e.ns)&&(e.ns=[e.ns]),It(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),It(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),ny=()=>{},Ode=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};let rB=class tE extends Jx{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=xR(t),this.services={},this.logger=ms,this.modules={external:[]},Ode(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(It(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=bR();this.options={...i,...this.options,...xR(n)},this.options.interpolation={...i.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ms.init(o(this.modules.logger),this.options):ms.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Sde;const f=new gR(this.options);this.store=new hR(this.options.resources,this.options);const h=this.services;h.logger=ms,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new xde(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=o(c),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new wde(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Ede(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(p){for(var m=arguments.length,v=new Array(m>1?m-1:0),b=1;b1?m-1:0),b=1;b{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=ny),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const u=$p(),l=()=>{const c=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),r(f,h)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ny;const i=It(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&o.indexOf(l)<0&&o.push(l)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>a(u)),this.options.preload?.forEach?.(s=>a(s)),this.services.backendConnector.load(o,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const i=$p();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=ny),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&nB.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=$p();this.emit("languageChanging",t);const o=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},a=(u,l)=>{l?(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},s=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const l=It(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||o(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector?.cacheUserLanguage?.(l)),this.loadResources(l,c=>{a(c,l)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,r){var i=this;const o=function(a,s){let u;if(typeof s!="object"){for(var l=arguments.length,c=new Array(l>2?l-2:0),f=2;f`${u.keyPrefix}${h}${m}`):p=u.keyPrefix?`${u.keyPrefix}${h}${a}`:a,i.t(p,u)};return It(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){for(var t=arguments.length,n=new Array(t),r=0;r1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(o,t)))}loadNamespaces(t,n){const r=$p();return this.options.ns?(It(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=$p();It(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new gR(bR());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new tE(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ny;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new tE(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const s=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},Object.keys(u[l]).reduce((c,f)=>(c[f]={...u[l][f]},c),{})),{});o.store=new hR(s,i),o.services.resourceStore=o.store}return o.translator=new H1(o.services,i),o.translator.on("*",function(s){for(var u=arguments.length,l=new Array(u>1?u-1:0),c=1;c{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);Mc(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},wR={},nE=(e,t,n,r)=>{Mc(n)&&wR[n]||(Mc(n)&&(wR[n]=new Date),Ade(e,t,n,r))},iB=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},rE=(e,t,n)=>{e.loadNamespaces(t,iB(e,n))},_R=(e,t,n,r)=>{if(Mc(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return rE(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,iB(e,r))},Pde=(e,t,n={})=>!t.languages||!t.languages.length?(nE(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n?.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),Mc=e=>typeof e=="string",kde=e=>typeof e=="object"&&e!==null,Tde=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Mde={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Rde=e=>Mde[e],Dde=e=>e.replace(Tde,Rde);let iE={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Dde};const $de=(e={})=>{iE={...iE,...e}},Ide=()=>iE;let oB;const Nde=e=>{oB=e},Lde=()=>oB,NYe={type:"3rdParty",init(e){$de(e.options.react),Nde(e)}},Fde=y.createContext();class jde{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Bde=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},aB=(e,t,n,r)=>e.getFixedT(t,n,r),zde=(e,t,n,r)=>y.useCallback(aB(e,t,n,r),[e,t,n,r]),LYe=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=y.useContext(Fde)||{},o=n||r||Lde();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new jde),!o){nE(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const O=(C,k)=>Mc(k)?k:kde(k)&&Mc(k.defaultValue)?k.defaultValue:Array.isArray(C)?C[C.length-1]:C,E=[O,{},!1];return E.t=O,E.i18n={},E.ready=!1,E}o.options.react?.wait&&nE(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...Ide(),...o.options.react,...t},{useSuspense:s,keyPrefix:u}=a;let l=e||i||o.options?.defaultNS;l=Mc(l)?[l]:l||["translation"],o.reportNamespaces.addUsedNamespaces?.(l);const c=(o.isInitialized||o.initializedStoreOnce)&&l.every(O=>Pde(O,o,a)),f=zde(o,t.lng||null,a.nsMode==="fallback"?l:l[0],u),h=()=>f,p=()=>aB(o,t.lng||null,a.nsMode==="fallback"?l:l[0],u),[m,v]=y.useState(h);let b=l.join();t.lng&&(b=`${t.lng}${b}`);const w=Bde(b),x=y.useRef(!0);y.useEffect(()=>{const{bindI18n:O,bindI18nStore:E}=a;x.current=!0,!c&&!s&&(t.lng?_R(o,t.lng,l,()=>{x.current&&v(p)}):rE(o,l,()=>{x.current&&v(p)})),c&&w&&w!==b&&x.current&&v(p);const C=()=>{x.current&&v(p)};return O&&o?.on(O,C),E&&o?.store.on(E,C),()=>{x.current=!1,o&&O?.split(" ").forEach(k=>o.off(k,C)),E&&o&&E.split(" ").forEach(k=>o.store.off(k,C))}},[o,b]),y.useEffect(()=>{x.current&&c&&v(h)},[o,u,c]);const S=[m,o,c];if(S.t=m,S.i18n=o,S.ready=c,c||!c&&!s)return S;throw new Promise(O=>{t.lng?_R(o,t.lng,l,()=>O()):rE(o,l,()=>O())})},{slice:Ude,forEach:Vde}=[];function Wde(e){return Vde.call(Ude.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const SR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Hde=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!SR.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!SR.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},CR={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Hde(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a0&&o[a].substring(0,s)===t&&(n=o[a].substring(s+1))}}return n}};let Ip=null;const ER=()=>{if(Ip!==null)return Ip;try{Ip=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ip=!1}return Ip};var Gde={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&ER())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&ER()&&window.localStorage.setItem(n,e)}};let Np=null;const OR=()=>{if(Np!==null)return Np;try{Np=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Np=!1}return Np};var Yde={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&OR())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&OR()&&window.sessionStorage.setItem(n,e)}},Zde={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o0?t:void 0}},Xde={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Qde={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},Jde={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let sB=!1;try{document.cookie,sB=!0}catch{}const uB=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];sB||uB.splice(1,1);const ehe=()=>({order:uB,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class the{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Wde(n,this.options||{},ehe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Kde),this.addDetector(qde),this.addDetector(Gde),this.addDetector(Yde),this.addDetector(Zde),this.addDetector(Xde),this.addDetector(Qde),this.addDetector(Jde)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}the.type="languageDetector";var bm=e=>e.type==="checkbox",_c=e=>e instanceof Date,zi=e=>e==null;const lB=e=>typeof e=="object";var Or=e=>!zi(e)&&!Array.isArray(e)&&lB(e)&&!_c(e),cB=e=>Or(e)&&e.target?bm(e.target)?e.target.checked:e.target.value:e,nhe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,fB=(e,t)=>e.has(nhe(t)),rhe=e=>{const t=e.constructor&&e.constructor.prototype;return Or(t)&&t.hasOwnProperty("isPrototypeOf")},jO=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function no(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(jO&&(e instanceof Blob||r))&&(n||Or(e)))if(t=n?[]:{},!n&&!rhe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=no(e[i]));else return e;return t}var ew=e=>Array.isArray(e)?e.filter(Boolean):[],Sr=e=>e===void 0,Xe=(e,t,n)=>{if(!t||!Or(e))return n;const r=ew(t.split(/[,[\].]+?/)).reduce((i,o)=>zi(i)?i:i[o],e);return Sr(r)||r===e?Sr(e[t])?n:e[t]:r},aa=e=>typeof e=="boolean",BO=e=>/^\w*$/.test(e),dB=e=>ew(e.replace(/["|']|\]/g,"").split(/\.|\[/)),An=(e,t,n)=>{let r=-1;const i=BO(t)?[t]:dB(t),o=i.length,a=o-1;for(;++rF.useContext(hB),FYe=e=>{const{children:t,...n}=e;return F.createElement(hB.Provider,{value:n},t)};var pB=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==ja.all&&(t._proxyFormState[a]=!r||ja.all),n&&(n[a]=!0),e[a]}});return i},io=e=>Or(e)&&!Object.keys(e).length,gB=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return io(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!r||ja.all))},w0=e=>Array.isArray(e)?e:[e],mB=(e,t,n)=>!e||!t||e===t||w0(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function UO(e){const t=F.useRef(e);t.current=e,F.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function ihe(e){const t=zO(),{control:n=t.control,disabled:r,name:i,exact:o}=e,[a,s]=F.useState(n._formState),u=F.useRef(!0),l=F.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=F.useRef(i);return c.current=i,UO({disabled:r,next:f=>u.current&&mB(c.current,f.name,o)&&gB(f,l.current,n._updateFormState)&&s({...n._formState,...f}),subject:n._subjects.state}),F.useEffect(()=>(u.current=!0,l.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),F.useMemo(()=>pB(a,n,l.current,!1),[a,n])}var vs=e=>typeof e=="string",vB=(e,t,n,r,i)=>vs(e)?(r&&t.watch.add(e),Xe(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Xe(n,o))):(r&&(t.watchAll=!0),n);function ohe(e){const t=zO(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e,s=F.useRef(r);s.current=r,UO({disabled:o,subject:n._subjects.values,next:c=>{mB(s.current,c.name,a)&&l(no(vB(s.current,n._names,c.values||n._formValues,!1,i)))}});const[u,l]=F.useState(n._getWatch(r,i));return F.useEffect(()=>n._removeUnmounted()),u}function ahe(e){const t=zO(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,a=fB(i._names.array,n),s=ohe({control:i,name:n,defaultValue:Xe(i._formValues,n,Xe(i._defaultValues,n,e.defaultValue)),exact:!0}),u=ihe({control:i,name:n,exact:!0}),l=F.useRef(i.register(n,{...e.rules,value:s,...aa(e.disabled)?{disabled:e.disabled}:{}})),c=F.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Xe(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!Xe(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Xe(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Xe(u.validatingFields,n)},error:{enumerable:!0,get:()=>Xe(u.errors,n)}}),[u,n]),f=F.useMemo(()=>({name:n,value:s,...aa(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:h=>l.current.onChange({target:{value:cB(h),name:n},type:K1.CHANGE}),onBlur:()=>l.current.onBlur({target:{value:Xe(i._formValues,n),name:n},type:K1.BLUR}),ref:h=>{const p=Xe(i._fields,n);p&&h&&(p._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:m=>h.setCustomValidity(m),reportValidity:()=>h.reportValidity()})}}),[n,i._formValues,r,u.disabled,s,i._fields]);return F.useEffect(()=>{const h=i._options.shouldUnregister||o,p=(m,v)=>{const b=Xe(i._fields,m);b&&b._f&&(b._f.mount=v)};if(p(n,!0),h){const m=no(Xe(i._options.defaultValues,n));An(i._defaultValues,n,m),Sr(Xe(i._formValues,n))&&An(i._formValues,n,m)}return!a&&i.register(n),()=>{(a?h&&!i._state.action:h)?i.unregister(n):p(n,!1)}},[n,i,a,o]),F.useEffect(()=>{i._updateDisabledField({disabled:r,fields:i._fields,name:n})},[r,n,i]),F.useMemo(()=>({field:f,formState:u,fieldState:c}),[f,u,c])}const jYe=e=>e.render(ahe(e));var yB=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},AR=e=>({isOnSubmit:!e||e===ja.onSubmit,isOnBlur:e===ja.onBlur,isOnChange:e===ja.onChange,isOnAll:e===ja.all,isOnTouch:e===ja.onTouched}),PR=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const _0=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Xe(e,i);if(o){const{_f:a,...s}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(_0(s,t))break}else if(Or(s)&&_0(s,t))break}}};var she=(e,t,n)=>{const r=w0(Xe(e,n));return An(r,"root",t[n]),An(e,n,r),e},VO=e=>e.type==="file",hs=e=>typeof e=="function",q1=e=>{if(!jO)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Zy=e=>vs(e),WO=e=>e.type==="radio",G1=e=>e instanceof RegExp;const kR={value:!1,isValid:!1},TR={value:!0,isValid:!0};var bB=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Sr(e[0].attributes.value)?Sr(e[0].value)||e[0].value===""?TR:{value:e[0].value,isValid:!0}:TR:kR}return kR};const MR={isValid:!1,value:null};var xB=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,MR):MR;function RR(e,t,n="validate"){if(Zy(e)||Array.isArray(e)&&e.every(Zy)||aa(e)&&!e)return{type:n,message:Zy(e)?e:"",ref:t}}var Uf=e=>Or(e)&&!G1(e)?e:{value:e,message:""},DR=async(e,t,n,r,i,o)=>{const{ref:a,refs:s,required:u,maxLength:l,minLength:c,min:f,max:h,pattern:p,validate:m,name:v,valueAsNumber:b,mount:w}=e._f,x=Xe(n,v);if(!w||t.has(v))return{};const S=s?s[0]:a,O=V=>{i&&S.reportValidity&&(S.setCustomValidity(aa(V)?"":V||""),S.reportValidity())},E={},C=WO(a),k=bm(a),M=C||k,N=(b||VO(a))&&Sr(a.value)&&Sr(x)||q1(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,z=yB.bind(null,v,r,E),H=(V,ne,Z,G=qs.maxLength,q=qs.minLength)=>{const W=V?ne:Z;E[v]={type:V?G:q,message:W,ref:a,...z(V?G:q,W)}};if(o?!Array.isArray(x)||!x.length:u&&(!M&&(N||zi(x))||aa(x)&&!x||k&&!bB(s).isValid||C&&!xB(s).isValid)){const{value:V,message:ne}=Zy(u)?{value:!!u,message:u}:Uf(u);if(V&&(E[v]={type:qs.required,message:ne,ref:S,...z(qs.required,ne)},!r))return O(ne),E}if(!N&&(!zi(f)||!zi(h))){let V,ne;const Z=Uf(h),G=Uf(f);if(!zi(x)&&!isNaN(x)){const q=a.valueAsNumber||x&&+x;zi(Z.value)||(V=q>Z.value),zi(G.value)||(ne=qnew Date(new Date().toDateString()+" "+Y),j=a.type=="time",K=a.type=="week";vs(Z.value)&&x&&(V=j?W(x)>W(Z.value):K?x>Z.value:q>new Date(Z.value)),vs(G.value)&&x&&(ne=j?W(x)+V.value,G=!zi(ne.value)&&x.length<+ne.value;if((Z||G)&&(H(Z,V.message,ne.message),!r))return O(E[v].message),E}if(p&&!N&&vs(x)){const{value:V,message:ne}=Uf(p);if(G1(V)&&!x.match(V)&&(E[v]={type:qs.pattern,message:ne,ref:a,...z(qs.pattern,ne)},!r))return O(ne),E}if(m){if(hs(m)){const V=await m(x,n),ne=RR(V,S);if(ne&&(E[v]={...ne,...z(qs.validate,ne.message)},!r))return O(ne.message),E}else if(Or(m)){let V={};for(const ne in m){if(!io(V)&&!r)break;const Z=RR(await m[ne](x,n),S,ne);Z&&(V={...Z,...z(ne,Z.message)},O(Z.message),r&&(E[v]=V))}if(!io(V)&&(E[v]={ref:S,...V},!r))return E}}return O(!0),E};function uhe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},oE=e=>zi(e)||!lB(e);function nl(e,t){if(oE(e)||oE(t))return e===t;if(_c(e)&&_c(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const a=t[i];if(_c(o)&&_c(a)||Or(o)&&Or(a)||Array.isArray(o)&&Array.isArray(a)?!nl(o,a):o!==a)return!1}}return!0}var wB=e=>e.type==="select-multiple",che=e=>WO(e)||bm(e),gS=e=>q1(e)&&e.isConnected,_B=e=>{for(const t in e)if(hs(e[t]))return!0;return!1};function Y1(e,t={}){const n=Array.isArray(e);if(Or(e)||n)for(const r in e)Array.isArray(e[r])||Or(e[r])&&!_B(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Y1(e[r],t[r])):zi(e[r])||(t[r]=!0);return t}function SB(e,t,n){const r=Array.isArray(e);if(Or(e)||r)for(const i in e)Array.isArray(e[i])||Or(e[i])&&!_B(e[i])?Sr(t)||oE(n[i])?n[i]=Array.isArray(e[i])?Y1(e[i],[]):{...Y1(e[i])}:SB(e[i],zi(t)?{}:t[i],n[i]):n[i]=!nl(e[i],t[i]);return n}var Lp=(e,t)=>SB(e,t,Y1(t)),CB=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Sr(e)?e:t?e===""?NaN:e&&+e:n&&vs(e)?new Date(e):r?r(e):e;function mS(e){const t=e.ref;return VO(t)?t.files:WO(t)?xB(e.refs).value:wB(t)?[...t.selectedOptions].map(({value:n})=>n):bm(t)?bB(e.refs).value:CB(Sr(t.value)?e.ref.value:t.value,e)}var fhe=(e,t,n,r)=>{const i={};for(const o of e){const a=Xe(t,o);a&&An(i,o,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Fp=e=>Sr(e)?e:G1(e)?e.source:Or(e)?G1(e.value)?e.value.source:e.value:e;const $R="AsyncFunction";var dhe=e=>!!e&&!!e.validate&&!!(hs(e.validate)&&e.validate.constructor.name===$R||Or(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===$R)),hhe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function IR(e,t,n){const r=Xe(e,n);if(r||BO(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),a=Xe(t,o),s=Xe(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:n}}var phe=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,ghe=(e,t)=>!ew(Xe(e,t)).length&&Br(e,t);const mhe={mode:ja.onSubmit,reValidateMode:ja.onChange,shouldFocusError:!0};function vhe(e={}){let t={...mhe,...e},n={submitCount:0,isDirty:!1,isLoading:hs(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Or(t.defaultValues)||Or(t.values)?no(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:no(i),a={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u,l=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:pS(),array:pS(),state:pS()},h=AR(t.mode),p=AR(t.reValidateMode),m=t.criteriaMode===ja.all,v=ie=>pe=>{clearTimeout(l),l=setTimeout(ie,pe)},b=async ie=>{if(!t.disabled&&(c.isValid||ie)){const pe=t.resolver?io((await M()).errors):await z(r,!0);pe!==n.isValid&&f.state.next({isValid:pe})}},w=(ie,pe)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((ie||Array.from(s.mount)).forEach(ye=>{ye&&(pe?An(n.validatingFields,ye,pe):Br(n.validatingFields,ye))}),f.state.next({validatingFields:n.validatingFields,isValidating:!io(n.validatingFields)}))},x=(ie,pe=[],ye,Ue,je=!0,ke=!0)=>{if(Ue&&ye&&!t.disabled){if(a.action=!0,ke&&Array.isArray(Xe(r,ie))){const nt=ye(Xe(r,ie),Ue.argA,Ue.argB);je&&An(r,ie,nt)}if(ke&&Array.isArray(Xe(n.errors,ie))){const nt=ye(Xe(n.errors,ie),Ue.argA,Ue.argB);je&&An(n.errors,ie,nt),ghe(n.errors,ie)}if(c.touchedFields&&ke&&Array.isArray(Xe(n.touchedFields,ie))){const nt=ye(Xe(n.touchedFields,ie),Ue.argA,Ue.argB);je&&An(n.touchedFields,ie,nt)}c.dirtyFields&&(n.dirtyFields=Lp(i,o)),f.state.next({name:ie,isDirty:V(ie,pe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else An(o,ie,pe)},S=(ie,pe)=>{An(n.errors,ie,pe),f.state.next({errors:n.errors})},O=ie=>{n.errors=ie,f.state.next({errors:n.errors,isValid:!1})},E=(ie,pe,ye,Ue)=>{const je=Xe(r,ie);if(je){const ke=Xe(o,ie,Sr(ye)?Xe(i,ie):ye);Sr(ke)||Ue&&Ue.defaultChecked||pe?An(o,ie,pe?ke:mS(je._f)):G(ie,ke),a.mount&&b()}},C=(ie,pe,ye,Ue,je)=>{let ke=!1,nt=!1;const mt={name:ie};if(!t.disabled){const xn=!!(Xe(r,ie)&&Xe(r,ie)._f&&Xe(r,ie)._f.disabled);if(!ye||Ue){c.isDirty&&(nt=n.isDirty,n.isDirty=mt.isDirty=V(),ke=nt!==mt.isDirty);const Ht=xn||nl(Xe(i,ie),pe);nt=!!(!xn&&Xe(n.dirtyFields,ie)),Ht||xn?Br(n.dirtyFields,ie):An(n.dirtyFields,ie,!0),mt.dirtyFields=n.dirtyFields,ke=ke||c.dirtyFields&&nt!==!Ht}if(ye){const Ht=Xe(n.touchedFields,ie);Ht||(An(n.touchedFields,ie,ye),mt.touchedFields=n.touchedFields,ke=ke||c.touchedFields&&Ht!==ye)}ke&&je&&f.state.next(mt)}return ke?mt:{}},k=(ie,pe,ye,Ue)=>{const je=Xe(n.errors,ie),ke=c.isValid&&aa(pe)&&n.isValid!==pe;if(t.delayError&&ye?(u=v(()=>S(ie,ye)),u(t.delayError)):(clearTimeout(l),u=null,ye?An(n.errors,ie,ye):Br(n.errors,ie)),(ye?!nl(je,ye):je)||!io(Ue)||ke){const nt={...Ue,...ke&&aa(pe)?{isValid:pe}:{},errors:n.errors,name:ie};n={...n,...nt},f.state.next(nt)}},M=async ie=>{w(ie,!0);const pe=await t.resolver(o,t.context,fhe(ie||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(ie),pe},N=async ie=>{const{errors:pe}=await M(ie);if(ie)for(const ye of ie){const Ue=Xe(pe,ye);Ue?An(n.errors,ye,Ue):Br(n.errors,ye)}else n.errors=pe;return pe},z=async(ie,pe,ye={valid:!0})=>{for(const Ue in ie){const je=ie[Ue];if(je){const{_f:ke,...nt}=je;if(ke){const mt=s.array.has(ke.name),xn=je._f&&dhe(je._f);xn&&c.validatingFields&&w([Ue],!0);const Ht=await DR(je,s.disabled,o,m,t.shouldUseNativeValidation&&!pe,mt);if(xn&&c.validatingFields&&w([Ue]),Ht[ke.name]&&(ye.valid=!1,pe))break;!pe&&(Xe(Ht,ke.name)?mt?she(n.errors,Ht,ke.name):An(n.errors,ke.name,Ht[ke.name]):Br(n.errors,ke.name))}!io(nt)&&await z(nt,pe,ye)}}return ye.valid},H=()=>{for(const ie of s.unMount){const pe=Xe(r,ie);pe&&(pe._f.refs?pe._f.refs.every(ye=>!gS(ye)):!gS(pe._f.ref))&&Se(ie)}s.unMount=new Set},V=(ie,pe)=>!t.disabled&&(ie&&pe&&An(o,ie,pe),!nl(oe(),i)),ne=(ie,pe,ye)=>vB(ie,s,{...a.mount?o:Sr(pe)?i:vs(ie)?{[ie]:pe}:pe},ye,pe),Z=ie=>ew(Xe(a.mount?o:i,ie,t.shouldUnregister?Xe(i,ie,[]):[])),G=(ie,pe,ye={})=>{const Ue=Xe(r,ie);let je=pe;if(Ue){const ke=Ue._f;ke&&(!ke.disabled&&An(o,ie,CB(pe,ke)),je=q1(ke.ref)&&zi(pe)?"":pe,wB(ke.ref)?[...ke.ref.options].forEach(nt=>nt.selected=je.includes(nt.value)):ke.refs?bm(ke.ref)?ke.refs.length>1?ke.refs.forEach(nt=>(!nt.defaultChecked||!nt.disabled)&&(nt.checked=Array.isArray(je)?!!je.find(mt=>mt===nt.value):je===nt.value)):ke.refs[0]&&(ke.refs[0].checked=!!je):ke.refs.forEach(nt=>nt.checked=nt.value===je):VO(ke.ref)?ke.ref.value="":(ke.ref.value=je,ke.ref.type||f.values.next({name:ie,values:{...o}})))}(ye.shouldDirty||ye.shouldTouch)&&C(ie,je,ye.shouldTouch,ye.shouldDirty,!0),ye.shouldValidate&&Y(ie)},q=(ie,pe,ye)=>{for(const Ue in pe){const je=pe[Ue],ke=`${ie}.${Ue}`,nt=Xe(r,ke);(s.array.has(ie)||Or(je)||nt&&!nt._f)&&!_c(je)?q(ke,je,ye):G(ke,je,ye)}},W=(ie,pe,ye={})=>{const Ue=Xe(r,ie),je=s.array.has(ie),ke=no(pe);An(o,ie,ke),je?(f.array.next({name:ie,values:{...o}}),(c.isDirty||c.dirtyFields)&&ye.shouldDirty&&f.state.next({name:ie,dirtyFields:Lp(i,o),isDirty:V(ie,ke)})):Ue&&!Ue._f&&!zi(ke)?q(ie,ke,ye):G(ie,ke,ye),PR(ie,s)&&f.state.next({...n}),f.values.next({name:a.mount?ie:void 0,values:{...o}})},j=async ie=>{a.mount=!0;const pe=ie.target;let ye=pe.name,Ue=!0;const je=Xe(r,ye),ke=()=>pe.type?mS(je._f):cB(ie),nt=mt=>{Ue=Number.isNaN(mt)||_c(mt)&&isNaN(mt.getTime())||nl(mt,Xe(o,ye,mt))};if(je){let mt,xn;const Ht=ke(),wn=ie.type===K1.BLUR||ie.type===K1.FOCUS_OUT,Ii=!hhe(je._f)&&!t.resolver&&!Xe(n.errors,ye)&&!je._f.deps||phe(wn,Xe(n.touchedFields,ye),n.isSubmitted,p,h),br=PR(ye,s,wn);An(o,ye,Ht),wn?(je._f.onBlur&&je._f.onBlur(ie),u&&u(0)):je._f.onChange&&je._f.onChange(ie);const yi=C(ye,Ht,wn,!1),sr=!io(yi)||br;if(!wn&&f.values.next({name:ye,type:ie.type,values:{...o}}),Ii)return c.isValid&&(t.mode==="onBlur"&&wn?b():wn||b()),sr&&f.state.next({name:ye,...br?{}:yi});if(!wn&&br&&f.state.next({...n}),t.resolver){const{errors:si}=await M([ye]);if(nt(Ht),Ue){const bi=IR(n.errors,r,ye),Rr=IR(si,r,bi.name||ye);mt=Rr.error,ye=Rr.name,xn=io(si)}}else w([ye],!0),mt=(await DR(je,s.disabled,o,m,t.shouldUseNativeValidation))[ye],w([ye]),nt(Ht),Ue&&(mt?xn=!1:c.isValid&&(xn=await z(r,!0)));Ue&&(je._f.deps&&Y(je._f.deps),k(ye,xn,mt,yi))}},K=(ie,pe)=>{if(Xe(n.errors,pe)&&ie.focus)return ie.focus(),1},Y=async(ie,pe={})=>{let ye,Ue;const je=w0(ie);if(t.resolver){const ke=await N(Sr(ie)?ie:je);ye=io(ke),Ue=ie?!je.some(nt=>Xe(ke,nt)):ye}else ie?(Ue=(await Promise.all(je.map(async ke=>{const nt=Xe(r,ke);return await z(nt&&nt._f?{[ke]:nt}:nt)}))).every(Boolean),!(!Ue&&!n.isValid)&&b()):Ue=ye=await z(r);return f.state.next({...!vs(ie)||c.isValid&&ye!==n.isValid?{}:{name:ie},...t.resolver||!ie?{isValid:ye}:{},errors:n.errors}),pe.shouldFocus&&!Ue&&_0(r,K,ie?je:s.mount),Ue},oe=ie=>{const pe={...a.mount?o:i};return Sr(ie)?pe:vs(ie)?Xe(pe,ie):ie.map(ye=>Xe(pe,ye))},Q=(ie,pe)=>({invalid:!!Xe((pe||n).errors,ie),isDirty:!!Xe((pe||n).dirtyFields,ie),error:Xe((pe||n).errors,ie),isValidating:!!Xe(n.validatingFields,ie),isTouched:!!Xe((pe||n).touchedFields,ie)}),J=ie=>{ie&&w0(ie).forEach(pe=>Br(n.errors,pe)),f.state.next({errors:ie?n.errors:{}})},ue=(ie,pe,ye)=>{const Ue=(Xe(r,ie,{_f:{}})._f||{}).ref,je=Xe(n.errors,ie)||{},{ref:ke,message:nt,type:mt,...xn}=je;An(n.errors,ie,{...xn,...pe,ref:Ue}),f.state.next({name:ie,errors:n.errors,isValid:!1}),ye&&ye.shouldFocus&&Ue&&Ue.focus&&Ue.focus()},de=(ie,pe)=>hs(ie)?f.values.subscribe({next:ye=>ie(ne(void 0,pe),ye)}):ne(ie,pe,!0),Se=(ie,pe={})=>{for(const ye of ie?w0(ie):s.mount)s.mount.delete(ye),s.array.delete(ye),pe.keepValue||(Br(r,ye),Br(o,ye)),!pe.keepError&&Br(n.errors,ye),!pe.keepDirty&&Br(n.dirtyFields,ye),!pe.keepTouched&&Br(n.touchedFields,ye),!pe.keepIsValidating&&Br(n.validatingFields,ye),!t.shouldUnregister&&!pe.keepDefaultValue&&Br(i,ye);f.values.next({values:{...o}}),f.state.next({...n,...pe.keepDirty?{isDirty:V()}:{}}),!pe.keepIsValid&&b()},me=({disabled:ie,name:pe,field:ye,fields:Ue})=>{(aa(ie)&&a.mount||ie||s.disabled.has(pe))&&(ie?s.disabled.add(pe):s.disabled.delete(pe),C(pe,mS(ye?ye._f:Xe(Ue,pe)._f),!1,!1,!0))},Ze=(ie,pe={})=>{let ye=Xe(r,ie);const Ue=aa(pe.disabled)||aa(t.disabled);return An(r,ie,{...ye||{},_f:{...ye&&ye._f?ye._f:{ref:{name:ie}},name:ie,mount:!0,...pe}}),s.mount.add(ie),ye?me({field:ye,disabled:aa(pe.disabled)?pe.disabled:t.disabled,name:ie}):E(ie,!0,pe.value),{...Ue?{disabled:pe.disabled||t.disabled}:{},...t.progressive?{required:!!pe.required,min:Fp(pe.min),max:Fp(pe.max),minLength:Fp(pe.minLength),maxLength:Fp(pe.maxLength),pattern:Fp(pe.pattern)}:{},name:ie,onChange:j,onBlur:j,ref:je=>{if(je){Ze(ie,pe),ye=Xe(r,ie);const ke=Sr(je.value)&&je.querySelectorAll&&je.querySelectorAll("input,select,textarea")[0]||je,nt=che(ke),mt=ye._f.refs||[];if(nt?mt.find(xn=>xn===ke):ke===ye._f.ref)return;An(r,ie,{_f:{...ye._f,...nt?{refs:[...mt.filter(gS),ke,...Array.isArray(Xe(i,ie))?[{}]:[]],ref:{type:ke.type,name:ie}}:{ref:ke}}}),E(ie,!1,void 0,ke)}else ye=Xe(r,ie,{}),ye._f&&(ye._f.mount=!1),(t.shouldUnregister||pe.shouldUnregister)&&!(fB(s.array,ie)&&a.action)&&s.unMount.add(ie)}}},Ae=()=>t.shouldFocusError&&_0(r,K,s.mount),Le=ie=>{aa(ie)&&(f.state.next({disabled:ie}),_0(r,(pe,ye)=>{const Ue=Xe(r,ye);Ue&&(pe.disabled=Ue._f.disabled||ie,Array.isArray(Ue._f.refs)&&Ue._f.refs.forEach(je=>{je.disabled=Ue._f.disabled||ie}))},0,!1))},$e=(ie,pe)=>async ye=>{let Ue;ye&&(ye.preventDefault&&ye.preventDefault(),ye.persist&&ye.persist());let je=no(o);if(s.disabled.size)for(const ke of s.disabled)An(je,ke,void 0);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:ke,values:nt}=await M();n.errors=ke,je=nt}else await z(r);if(Br(n.errors,"root"),io(n.errors)){f.state.next({errors:{}});try{await ie(je,ye)}catch(ke){Ue=ke}}else pe&&await pe({...n.errors},ye),Ae(),setTimeout(Ae);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:io(n.errors)&&!Ue,submitCount:n.submitCount+1,errors:n.errors}),Ue)throw Ue},be=(ie,pe={})=>{Xe(r,ie)&&(Sr(pe.defaultValue)?W(ie,no(Xe(i,ie))):(W(ie,pe.defaultValue),An(i,ie,no(pe.defaultValue))),pe.keepTouched||Br(n.touchedFields,ie),pe.keepDirty||(Br(n.dirtyFields,ie),n.isDirty=pe.defaultValue?V(ie,no(Xe(i,ie))):V()),pe.keepError||(Br(n.errors,ie),c.isValid&&b()),f.state.next({...n}))},yt=(ie,pe={})=>{const ye=ie?no(ie):i,Ue=no(ye),je=io(ie),ke=je?i:Ue;if(pe.keepDefaultValues||(i=ye),!pe.keepValues){if(pe.keepDirtyValues){const nt=new Set([...s.mount,...Object.keys(Lp(i,o))]);for(const mt of Array.from(nt))Xe(n.dirtyFields,mt)?An(ke,mt,Xe(o,mt)):W(mt,Xe(ke,mt))}else{if(jO&&Sr(ie))for(const nt of s.mount){const mt=Xe(r,nt);if(mt&&mt._f){const xn=Array.isArray(mt._f.refs)?mt._f.refs[0]:mt._f.ref;if(q1(xn)){const Ht=xn.closest("form");if(Ht){Ht.reset();break}}}}r={}}o=t.shouldUnregister?pe.keepDefaultValues?no(i):{}:no(ke),f.array.next({values:{...ke}}),f.values.next({values:{...ke}})}s={mount:pe.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!pe.keepIsValid||!!pe.keepDirtyValues,a.watch=!!t.shouldUnregister,f.state.next({submitCount:pe.keepSubmitCount?n.submitCount:0,isDirty:je?!1:pe.keepDirty?n.isDirty:!!(pe.keepDefaultValues&&!nl(ie,i)),isSubmitted:pe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:je?{}:pe.keepDirtyValues?pe.keepDefaultValues&&o?Lp(i,o):n.dirtyFields:pe.keepDefaultValues&&ie?Lp(i,ie):pe.keepDirty?n.dirtyFields:{},touchedFields:pe.keepTouched?n.touchedFields:{},errors:pe.keepErrors?n.errors:{},isSubmitSuccessful:pe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},lt=(ie,pe)=>yt(hs(ie)?ie(o):ie,pe);return{control:{register:Ze,unregister:Se,getFieldState:Q,handleSubmit:$e,setError:ue,_executeSchema:M,_getWatch:ne,_getDirty:V,_updateValid:b,_removeUnmounted:H,_updateFieldArray:x,_updateDisabledField:me,_getFieldArray:Z,_reset:yt,_resetDefaultValues:()=>hs(t.defaultValues)&&t.defaultValues().then(ie=>{lt(ie,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:ie=>{n={...n,...ie}},_disableForm:Le,_subjects:f,_proxyFormState:c,_setErrors:O,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(ie){a=ie},get _defaultValues(){return i},get _names(){return s},set _names(ie){s=ie},get _formState(){return n},set _formState(ie){n=ie},get _options(){return t},set _options(ie){t={...t,...ie}}},trigger:Y,register:Ze,handleSubmit:$e,watch:de,setValue:W,getValues:oe,reset:lt,resetField:be,clearErrors:J,unregister:Se,setError:ue,setFocus:(ie,pe={})=>{const ye=Xe(r,ie),Ue=ye&&ye._f;if(Ue){const je=Ue.refs?Ue.refs[0]:Ue.ref;je.focus&&(je.focus(),pe.shouldSelect&&hs(je.select)&&je.select())}},getFieldState:Q}}function BYe(e={}){const t=F.useRef(void 0),n=F.useRef(void 0),[r,i]=F.useState({isDirty:!1,isValidating:!1,isLoading:hs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:hs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...vhe(e),formState:r});const o=t.current.control;return o._options=e,UO({subject:o._subjects.state,next:a=>{gB(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),F.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),F.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),F.useEffect(()=>{e.values&&!nl(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(a=>({...a}))):o._resetDefaultValues()},[e.values,o]),F.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),F.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),F.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=pB(r,o),t.current}var gn;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(gn||(gn={}));var aE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(aE||(aE={}));const it=gn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),nu=e=>{switch(typeof e){case"undefined":return it.undefined;case"string":return it.string;case"number":return isNaN(e)?it.nan:it.number;case"boolean":return it.boolean;case"function":return it.function;case"bigint":return it.bigint;case"symbol":return it.symbol;case"object":return Array.isArray(e)?it.array:e===null?it.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?it.promise:typeof Map<"u"&&e instanceof Map?it.map:typeof Set<"u"&&e instanceof Set?it.set:typeof Date<"u"&&e instanceof Date?it.date:it.object;default:return it.unknown}},Ve=gn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),yhe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Lo extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,u=0;for(;un.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Lo.create=e=>new Lo(e);const qd=(e,t)=>{let n;switch(e.code){case Ve.invalid_type:e.received===it.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ve.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,gn.jsonStringifyReplacer)}`;break;case Ve.unrecognized_keys:n=`Unrecognized key(s) in object: ${gn.joinValues(e.keys,", ")}`;break;case Ve.invalid_union:n="Invalid input";break;case Ve.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${gn.joinValues(e.options)}`;break;case Ve.invalid_enum_value:n=`Invalid enum value. Expected ${gn.joinValues(e.options)}, received '${e.received}'`;break;case Ve.invalid_arguments:n="Invalid function arguments";break;case Ve.invalid_return_type:n="Invalid function return type";break;case Ve.invalid_date:n="Invalid date";break;case Ve.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:gn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ve.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ve.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ve.custom:n="Invalid input";break;case Ve.invalid_intersection_types:n="Intersection results could not be merged";break;case Ve.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ve.not_finite:n="Number must be finite";break;default:n=t.defaultError,gn.assertNever(e)}return{message:n}};let EB=qd;function bhe(e){EB=e}function Z1(){return EB}const X1=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},xhe=[];function tt(e,t){const n=Z1(),r=X1({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===qd?void 0:qd].filter(i=>!!i)});e.common.issues.push(r)}class $i{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Dt;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return $i.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Dt;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Dt=Object.freeze({status:"aborted"}),gd=e=>({status:"dirty",value:e}),Hi=e=>({status:"valid",value:e}),sE=e=>e.status==="aborted",uE=e=>e.status==="dirty",Gc=e=>e.status==="valid",tg=e=>typeof Promise<"u"&&e instanceof Promise;function Q1(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function OB(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var dt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(dt||(dt={}));var o0,a0;class ks{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const NR=(e,t)=>{if(Gc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Lo(e.common.issues);return this._error=n,this._error}}};function qt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{var u,l;const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Jt{get description(){return this._def.description}_getType(t){return nu(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:nu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $i,ctx:{common:t.parent.common,data:t.data,parsedType:nu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tg(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)},o=this._parseSync({data:t,path:i.path,parent:i});return NR(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return Gc(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o?.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Gc(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(tg(i)?i:Promise.resolve(i));return NR(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:Ve.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ya({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Es.create(this,this._def)}nullable(){return Ml.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ha.create(this)}promise(){return Yd.create(this,this._def)}or(t){return og.create([this,t],this._def)}and(t){return ag.create(this,t,this._def)}transform(t){return new Ya({...qt(this._def),schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new fg({...qt(this._def),innerType:this,defaultValue:n,typeName:Tt.ZodDefault})}brand(){return new HO({typeName:Tt.ZodBranded,type:this,...qt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new dg({...qt(this._def),innerType:this,catchValue:n,typeName:Tt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return xm.create(this,t)}readonly(){return hg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const whe=/^c[^\s-]{8,}$/i,_he=/^[0-9a-z]+$/,She=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Che=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ehe=/^[a-z0-9_-]{21}$/i,Ohe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ahe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Phe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,khe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let vS;const The=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Mhe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Rhe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Dhe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$he=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ihe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,AB="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Nhe=new RegExp(`^${AB}$`);function PB(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Lhe(e){return new RegExp(`^${PB(e)}$`)}function kB(e){let t=`${AB}T${PB(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Fhe(e,t){return!!((t==="v4"||!t)&&The.test(e)||(t==="v6"||!t)&&Rhe.test(e))}function jhe(e,t){if(!Ohe.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Bhe(e,t){return!!((t==="v4"||!t)&&Mhe.test(e)||(t==="v6"||!t)&&Dhe.test(e))}class za extends Jt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==it.string){const o=this._getOrReturnCtx(t);return tt(o,{code:Ve.invalid_type,expected:it.string,received:o.parsedType}),Dt}const r=new $i;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:Ve.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.lengtht.test(i),{validation:n,code:Ve.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new za({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...dt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...dt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...dt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...dt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...dt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...dt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...dt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...dt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...dt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...dt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...dt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...dt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...dt.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,local:(r=t?.local)!==null&&r!==void 0?r:!1,...dt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...dt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...dt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...dt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...dt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...dt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...dt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...dt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...dt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...dt.errToObj(n)})}nonempty(t){return this.min(1,dt.errToObj(t))}trim(){return new za({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new za({checks:[],typeName:Tt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};function zhe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Pl extends Jt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==it.number){const o=this._getOrReturnCtx(t);return tt(o,{code:Ve.invalid_type,expected:it.number,received:o.parsedType}),Dt}let r;const i=new $i;for(const o of this._def.checks)o.kind==="int"?gn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?zhe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.not_finite,message:o.message}),i.dirty()):gn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Pl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Pl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:dt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:dt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:dt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:dt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&gn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Pl({checks:[],typeName:Tt.ZodNumber,coerce:e?.coerce||!1,...qt(e)});class kl extends Jt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==it.bigint)return this._getInvalidInput(t);let r;const i=new $i;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):gn.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return tt(n,{code:Ve.invalid_type,expected:it.bigint,received:n.parsedType}),Dt}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new kl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new kl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new kl({checks:[],typeName:Tt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};class ng extends Jt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==it.boolean){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.boolean,received:r.parsedType}),Dt}return Hi(t.data)}}ng.create=e=>new ng({typeName:Tt.ZodBoolean,coerce:e?.coerce||!1,...qt(e)});class Yc extends Jt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==it.date){const o=this._getOrReturnCtx(t);return tt(o,{code:Ve.invalid_type,expected:it.date,received:o.parsedType}),Dt}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return tt(o,{code:Ve.invalid_date}),Dt}const r=new $i;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:Ve.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):gn.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Yc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:dt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:dt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Yc({checks:[],coerce:e?.coerce||!1,typeName:Tt.ZodDate,...qt(e)});class J1 extends Jt{_parse(t){if(this._getType(t)!==it.symbol){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.symbol,received:r.parsedType}),Dt}return Hi(t.data)}}J1.create=e=>new J1({typeName:Tt.ZodSymbol,...qt(e)});class rg extends Jt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.undefined,received:r.parsedType}),Dt}return Hi(t.data)}}rg.create=e=>new rg({typeName:Tt.ZodUndefined,...qt(e)});class ig extends Jt{_parse(t){if(this._getType(t)!==it.null){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.null,received:r.parsedType}),Dt}return Hi(t.data)}}ig.create=e=>new ig({typeName:Tt.ZodNull,...qt(e)});class Gd extends Jt{constructor(){super(...arguments),this._any=!0}_parse(t){return Hi(t.data)}}Gd.create=e=>new Gd({typeName:Tt.ZodAny,...qt(e)});class Rc extends Jt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hi(t.data)}}Rc.create=e=>new Rc({typeName:Tt.ZodUnknown,...qt(e)});class bu extends Jt{_parse(t){const n=this._getOrReturnCtx(t);return tt(n,{code:Ve.invalid_type,expected:it.never,received:n.parsedType}),Dt}}bu.create=e=>new bu({typeName:Tt.ZodNever,...qt(e)});class eb extends Jt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.void,received:r.parsedType}),Dt}return Hi(t.data)}}eb.create=e=>new eb({typeName:Tt.ZodVoid,...qt(e)});class Ha extends Jt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==it.array)return tt(n,{code:Ve.invalid_type,expected:it.array,received:n.parsedType}),Dt;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.lengthi.maxLength.value&&(tt(n,{code:Ve.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new ks(n,a,n.path,s)))).then(a=>$i.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new ks(n,a,n.path,s)));return $i.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Ha({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new Ha({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new Ha({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}Ha.create=(e,t)=>new Ha({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...qt(t)});function ed(e){if(e instanceof cr){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Es.create(ed(r))}return new cr({...e._def,shape:()=>t})}else return e instanceof Ha?new Ha({...e._def,type:ed(e.element)}):e instanceof Es?Es.create(ed(e.unwrap())):e instanceof Ml?Ml.create(ed(e.unwrap())):e instanceof Ts?Ts.create(e.items.map(t=>ed(t))):e}class cr extends Jt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=gn.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==it.object){const l=this._getOrReturnCtx(t);return tt(l,{code:Ve.invalid_type,expected:it.object,received:l.parsedType}),Dt}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof bu&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||s.push(l);const u=[];for(const l of a){const c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new ks(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof bu){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(tt(i,{code:Ve.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new ks(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key,h=await c.value;l.push({key:f,value:h,alwaysSet:c.alwaysSet})}return l}).then(l=>$i.mergeObjectSync(r,l)):$i.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return dt.errToObj,new cr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=dt.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new cr({...this._def,unknownKeys:"strip"})}passthrough(){return new cr({...this._def,unknownKeys:"passthrough"})}extend(t){return new cr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new cr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Tt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new cr({...this._def,catchall:t})}pick(t){const n={};return gn.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new cr({...this._def,shape:()=>n})}omit(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new cr({...this._def,shape:()=>n})}deepPartial(){return ed(this)}partial(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new cr({...this._def,shape:()=>n})}required(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Es;)o=o._def.innerType;n[r]=o}}),new cr({...this._def,shape:()=>n})}keyof(){return TB(gn.objectKeys(this.shape))}}cr.create=(e,t)=>new cr({shape:()=>e,unknownKeys:"strip",catchall:bu.create(),typeName:Tt.ZodObject,...qt(t)});cr.strictCreate=(e,t)=>new cr({shape:()=>e,unknownKeys:"strict",catchall:bu.create(),typeName:Tt.ZodObject,...qt(t)});cr.lazycreate=(e,t)=>new cr({shape:e,unknownKeys:"strip",catchall:bu.create(),typeName:Tt.ZodObject,...qt(t)});class og extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new Lo(s.ctx.common.issues));return tt(n,{code:Ve.invalid_union,unionErrors:a}),Dt}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new Lo(u));return tt(n,{code:Ve.invalid_union,unionErrors:s}),Dt}}get options(){return this._def.options}}og.create=(e,t)=>new og({options:e,typeName:Tt.ZodUnion,...qt(t)});const Zs=e=>e instanceof ug?Zs(e.schema):e instanceof Ya?Zs(e.innerType()):e instanceof lg?[e.value]:e instanceof Tl?e.options:e instanceof cg?gn.objectValues(e.enum):e instanceof fg?Zs(e._def.innerType):e instanceof rg?[void 0]:e instanceof ig?[null]:e instanceof Es?[void 0,...Zs(e.unwrap())]:e instanceof Ml?[null,...Zs(e.unwrap())]:e instanceof HO||e instanceof hg?Zs(e.unwrap()):e instanceof dg?Zs(e._def.innerType):[];class tw extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.object)return tt(n,{code:Ve.invalid_type,expected:it.object,received:n.parsedType}),Dt;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(tt(n,{code:Ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Dt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=Zs(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new tw({typeName:Tt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...qt(r)})}}function lE(e,t){const n=nu(e),r=nu(t);if(e===t)return{valid:!0,data:e};if(n===it.object&&r===it.object){const i=gn.objectKeys(t),o=gn.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=lE(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(n===it.array&&r===it.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(sE(o)||sE(a))return Dt;const s=lE(o.value,a.value);return s.valid?((uE(o)||uE(a))&&n.dirty(),{status:n.value,value:s.data}):(tt(r,{code:Ve.invalid_intersection_types}),Dt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ag.create=(e,t,n)=>new ag({left:e,right:t,typeName:Tt.ZodIntersection,...qt(n)});class Ts extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.array)return tt(r,{code:Ve.invalid_type,expected:it.array,received:r.parsedType}),Dt;if(r.data.lengththis._def.items.length&&(tt(r,{code:Ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new ks(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>$i.mergeArray(n,a)):$i.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ts({...this._def,rest:t})}}Ts.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ts({items:e,typeName:Tt.ZodTuple,rest:null,...qt(t)})};class sg extends Jt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.object)return tt(r,{code:Ve.invalid_type,expected:it.object,received:r.parsedType}),Dt;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new ks(r,s,r.path,s)),value:a._parse(new ks(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?$i.mergeObjectAsync(n,i):$i.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Jt?new sg({keyType:t,valueType:n,typeName:Tt.ZodRecord,...qt(r)}):new sg({keyType:za.create(),valueType:t,typeName:Tt.ZodRecord,...qt(n)})}}class tb extends Jt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.map)return tt(r,{code:Ve.invalid_type,expected:it.map,received:r.parsedType}),Dt;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new ks(r,s,r.path,[l,"key"])),value:o._parse(new ks(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of a){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}tb.create=(e,t,n)=>new tb({valueType:t,keyType:e,typeName:Tt.ZodMap,...qt(n)});class Zc extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.set)return tt(r,{code:Ve.invalid_type,expected:it.set,received:r.parsedType}),Dt;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(tt(r,{code:Ve.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Dt;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>o._parse(new ks(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,n){return new Zc({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Zc({...this._def,maxSize:{value:t,message:dt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Zc.create=(e,t)=>new Zc({valueType:e,minSize:null,maxSize:null,typeName:Tt.ZodSet,...qt(t)});class Ad extends Jt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.function)return tt(n,{code:Ve.invalid_type,expected:it.function,received:n.parsedType}),Dt;function r(s,u){return X1({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Z1(),qd].filter(l=>!!l),issueData:{code:Ve.invalid_arguments,argumentsError:u}})}function i(s,u){return X1({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Z1(),qd].filter(l=>!!l),issueData:{code:Ve.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Yd){const s=this;return Hi(async function(...u){const l=new Lo([]),c=await s._def.args.parseAsync(u,o).catch(p=>{throw l.addIssue(r(u,p)),l}),f=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(f,o).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return Hi(function(...u){const l=s._def.args.safeParse(u,o);if(!l.success)throw new Lo([r(u,l.error)]);const c=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(c,o);if(!f.success)throw new Lo([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ad({...this._def,args:Ts.create(t).rest(Rc.create())})}returns(t){return new Ad({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ad({args:t||Ts.create([]).rest(Rc.create()),returns:n||Rc.create(),typeName:Tt.ZodFunction,...qt(r)})}}class ug extends Jt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ug.create=(e,t)=>new ug({getter:e,typeName:Tt.ZodLazy,...qt(t)});class lg extends Jt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return tt(n,{received:n.data,code:Ve.invalid_literal,expected:this._def.value}),Dt}return{status:"valid",value:t.data}}get value(){return this._def.value}}lg.create=(e,t)=>new lg({value:e,typeName:Tt.ZodLiteral,...qt(t)});function TB(e,t){return new Tl({values:e,typeName:Tt.ZodEnum,...qt(t)})}class Tl extends Jt{constructor(){super(...arguments),o0.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{expected:gn.joinValues(r),received:n.parsedType,code:Ve.invalid_type}),Dt}if(Q1(this,o0)||OB(this,o0,new Set(this._def.values)),!Q1(this,o0).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{received:n.data,code:Ve.invalid_enum_value,options:r}),Dt}return Hi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Tl.create(t,{...this._def,...n})}exclude(t,n=this._def){return Tl.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}o0=new WeakMap;Tl.create=TB;class cg extends Jt{constructor(){super(...arguments),a0.set(this,void 0)}_parse(t){const n=gn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==it.string&&r.parsedType!==it.number){const i=gn.objectValues(n);return tt(r,{expected:gn.joinValues(i),received:r.parsedType,code:Ve.invalid_type}),Dt}if(Q1(this,a0)||OB(this,a0,new Set(gn.getValidEnumValues(this._def.values))),!Q1(this,a0).has(t.data)){const i=gn.objectValues(n);return tt(r,{received:r.data,code:Ve.invalid_enum_value,options:i}),Dt}return Hi(t.data)}get enum(){return this._def.values}}a0=new WeakMap;cg.create=(e,t)=>new cg({values:e,typeName:Tt.ZodNativeEnum,...qt(t)});class Yd extends Jt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.promise&&n.common.async===!1)return tt(n,{code:Ve.invalid_type,expected:it.promise,received:n.parsedType}),Dt;const r=n.parsedType===it.promise?n.data:Promise.resolve(n.data);return Hi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Yd.create=(e,t)=>new Yd({type:e,typeName:Tt.ZodPromise,...qt(t)});class Ya extends Jt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{tt(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Dt;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?Dt:u.status==="dirty"||n.value==="dirty"?gd(u.value):u});{if(n.value==="aborted")return Dt;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Dt:s.status==="dirty"||n.value==="dirty"?gd(s.value):s}}if(i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Dt:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Dt:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Gc(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Gc(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);gn.assertNever(i)}}Ya.create=(e,t,n)=>new Ya({schema:e,typeName:Tt.ZodEffects,effect:t,...qt(n)});Ya.createWithPreprocess=(e,t,n)=>new Ya({schema:t,effect:{type:"preprocess",transform:e},typeName:Tt.ZodEffects,...qt(n)});class Es extends Jt{_parse(t){return this._getType(t)===it.undefined?Hi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:Tt.ZodOptional,...qt(t)});class Ml extends Jt{_parse(t){return this._getType(t)===it.null?Hi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ml.create=(e,t)=>new Ml({innerType:e,typeName:Tt.ZodNullable,...qt(t)});class fg extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===it.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}fg.create=(e,t)=>new fg({innerType:e,typeName:Tt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qt(t)});class dg extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return tg(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Lo(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Lo(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}dg.create=(e,t)=>new dg({innerType:e,typeName:Tt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qt(t)});class nb extends Jt{_parse(t){if(this._getType(t)!==it.nan){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.nan,received:r.parsedType}),Dt}return{status:"valid",value:t.data}}}nb.create=e=>new nb({typeName:Tt.ZodNaN,...qt(e)});const Uhe=Symbol("zod_brand");class HO extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class xm extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Dt:o.status==="dirty"?(n.dirty(),gd(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Dt:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new xm({in:t,out:n,typeName:Tt.ZodPipeline})}}class hg extends Jt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Gc(i)&&(i.value=Object.freeze(i.value)),i);return tg(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}hg.create=(e,t)=>new hg({innerType:e,typeName:Tt.ZodReadonly,...qt(t)});function MB(e,t={},n){return e?Gd.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):Gd.create()}const Vhe={object:cr.lazycreate};var Tt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Tt||(Tt={}));const Whe=(e,t={message:`Input not instance of ${e.name}`})=>MB(n=>n instanceof e,t),RB=za.create,DB=Pl.create,Hhe=nb.create,Khe=kl.create,$B=ng.create,qhe=Yc.create,Ghe=J1.create,Yhe=rg.create,Zhe=ig.create,Xhe=Gd.create,Qhe=Rc.create,Jhe=bu.create,epe=eb.create,tpe=Ha.create,npe=cr.create,rpe=cr.strictCreate,ipe=og.create,ope=tw.create,ape=ag.create,spe=Ts.create,upe=sg.create,lpe=tb.create,cpe=Zc.create,fpe=Ad.create,dpe=ug.create,hpe=lg.create,ppe=Tl.create,gpe=cg.create,mpe=Yd.create,LR=Ya.create,vpe=Es.create,ype=Ml.create,bpe=Ya.createWithPreprocess,xpe=xm.create,wpe=()=>RB().optional(),_pe=()=>DB().optional(),Spe=()=>$B().optional(),Cpe={string:e=>za.create({...e,coerce:!0}),number:e=>Pl.create({...e,coerce:!0}),boolean:e=>ng.create({...e,coerce:!0}),bigint:e=>kl.create({...e,coerce:!0}),date:e=>Yc.create({...e,coerce:!0})},Epe=Dt;var zYe=Object.freeze({__proto__:null,defaultErrorMap:qd,setErrorMap:bhe,getErrorMap:Z1,makeIssue:X1,EMPTY_PATH:xhe,addIssueToContext:tt,ParseStatus:$i,INVALID:Dt,DIRTY:gd,OK:Hi,isAborted:sE,isDirty:uE,isValid:Gc,isAsync:tg,get util(){return gn},get objectUtil(){return aE},ZodParsedType:it,getParsedType:nu,ZodType:Jt,datetimeRegex:kB,ZodString:za,ZodNumber:Pl,ZodBigInt:kl,ZodBoolean:ng,ZodDate:Yc,ZodSymbol:J1,ZodUndefined:rg,ZodNull:ig,ZodAny:Gd,ZodUnknown:Rc,ZodNever:bu,ZodVoid:eb,ZodArray:Ha,ZodObject:cr,ZodUnion:og,ZodDiscriminatedUnion:tw,ZodIntersection:ag,ZodTuple:Ts,ZodRecord:sg,ZodMap:tb,ZodSet:Zc,ZodFunction:Ad,ZodLazy:ug,ZodLiteral:lg,ZodEnum:Tl,ZodNativeEnum:cg,ZodPromise:Yd,ZodEffects:Ya,ZodTransformer:Ya,ZodOptional:Es,ZodNullable:Ml,ZodDefault:fg,ZodCatch:dg,ZodNaN:nb,BRAND:Uhe,ZodBranded:HO,ZodPipeline:xm,ZodReadonly:hg,custom:MB,Schema:Jt,ZodSchema:Jt,late:Vhe,get ZodFirstPartyTypeKind(){return Tt},coerce:Cpe,any:Xhe,array:tpe,bigint:Khe,boolean:$B,date:qhe,discriminatedUnion:ope,effect:LR,enum:ppe,function:fpe,instanceof:Whe,intersection:ape,lazy:dpe,literal:hpe,map:lpe,nan:Hhe,nativeEnum:gpe,never:Jhe,null:Zhe,nullable:ype,number:DB,object:npe,oboolean:Spe,onumber:_pe,optional:vpe,ostring:wpe,pipeline:xpe,preprocess:bpe,promise:mpe,record:upe,set:cpe,strictObject:rpe,string:RB,symbol:Ghe,transformer:LR,tuple:spe,undefined:Yhe,union:ipe,unknown:Qhe,void:epe,NEVER:Epe,ZodIssueCode:Ve,quotelessJson:yhe,ZodError:Lo});const FR=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Xe(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},IB=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?FR(r.ref,n,e):r.refs&&r.refs.forEach(i=>FR(i,n,e))}},Ope=(e,t)=>{t.shouldUseNativeValidation&&IB(e,t);const n={};for(const r in e){const i=Xe(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(Ape(t.names||Object.keys(e),r)){const a=Object.assign({},Xe(n,r));An(a,"root",o),An(n,r,a)}else An(n,r,o)}return n},Ape=(e,t)=>e.some(n=>n.startsWith(t+"."));var Ppe=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[a]={message:s.message,type:s.code}}else n[a]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(f){return e.push(f)})}),t){var u=n[a].types,l=u&&u[r.code];n[a]=yB(a,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},UYe=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(a,s){try{var u=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&IB({},o),{errors:{},values:n.raw?r:l}})}catch(l){return s(l)}return u&&u.then?u.then(void 0,s):u}(0,function(a){if(function(s){return Array.isArray(s?.errors)}(a))return{values:{},errors:Ope(Ppe(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}},kpe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pt=kpe.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Al:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function NB(e,t){e&&Au.flushSync(()=>e.dispatchEvent(t))}var Tpe="Label",LB=y.forwardRef((e,t)=>I.jsx(pt.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));LB.displayName=Tpe;var VYe=LB,FB={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(la,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",u="hour",l="day",c="week",f="month",h="quarter",p="year",m="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var G=["th","st","nd","rd"],q=Z%100;return"["+Z+(G[(q-20)%10]||G[q]||G[0])+"]"}},S=function(Z,G,q){var W=String(Z);return!W||W.length>=G?Z:""+Array(G+1-W.length).join(q)+Z},O={s:S,z:function(Z){var G=-Z.utcOffset(),q=Math.abs(G),W=Math.floor(q/60),j=q%60;return(G<=0?"+":"-")+S(W,2,"0")+":"+S(j,2,"0")},m:function Z(G,q){if(G.date()1)return Z(Y[0])}else{var oe=G.name;C[oe]=G,j=oe}return!W&&j&&(E=j),j||!W&&E},z=function(Z,G){if(M(Z))return Z.clone();var q=typeof G=="object"?G:{};return q.date=Z,q.args=arguments,new V(q)},H=O;H.l=N,H.i=M,H.w=function(Z,G){return z(Z,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var V=function(){function Z(q){this.$L=N(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[k]=!0}var G=Z.prototype;return G.parse=function(q){this.$d=function(W){var j=W.date,K=W.utc;if(j===null)return new Date(NaN);if(H.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var Y=j.match(b);if(Y){var oe=Y[2]-1||0,Q=(Y[7]||"0").substring(0,3);return K?new Date(Date.UTC(Y[1],oe,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Q)):new Date(Y[1],oe,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Q)}}return new Date(j)}(q),this.init()},G.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},G.$utils=function(){return H},G.isValid=function(){return this.$d.toString()!==v},G.isSame=function(q,W){var j=z(q);return this.startOf(W)<=j&&j<=this.endOf(W)},G.isAfter=function(q,W){return z(q)1&&arguments[1]!==void 0?arguments[1]:{container:document.body},de="";return typeof X=="string"?de=x(X,ue):X instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(X?.type)?de=x(X.value,ue):(de=p()(X),m("copy")),de},O=S;function E(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(ue){return typeof ue}:E=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},E(Q)}var C=function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=X.action,de=ue===void 0?"copy":ue,Se=X.container,me=X.target,Ze=X.text;if(de!=="copy"&&de!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(me!==void 0)if(me&&E(me)==="object"&&me.nodeType===1){if(de==="copy"&&me.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(de==="cut"&&(me.hasAttribute("readonly")||me.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Ze)return O(Ze,{container:Se});if(me)return de==="cut"?b(me):O(me,{container:Se})},k=C;function M(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(ue){return typeof ue}:M=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},M(Q)}function N(Q,X){if(!(Q instanceof X))throw new TypeError("Cannot call a class as a function")}function q(Q,X){for(var ue=0;ue"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function F(Q){return F=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},F(Q)}function V(Q,X){var ue="data-clipboard-".concat(Q);if(X.hasAttribute(ue))return X.getAttribute(ue)}var G=function(Q){W(ue,Q);var X=Z(ue);function ue(de,Se){var me;return N(this,ue),me=X.call(this),me.resolveOptions(Se),me.listenClick(de),me}return Y(ue,[{key:"resolveOptions",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Se.action=="function"?Se.action:this.defaultAction,this.target=typeof Se.target=="function"?Se.target:this.defaultTarget,this.text=typeof Se.text=="function"?Se.text:this.defaultText,this.container=M(Se.container)==="object"?Se.container:document.body}},{key:"listenClick",value:function(Se){var me=this;this.listener=f()(Se,"click",function(Ze){return me.onClick(Ze)})}},{key:"onClick",value:function(Se){var me=Se.delegateTarget||Se.currentTarget,Ze=this.action(me)||"copy",Ae=k({action:Ze,container:this.container,target:this.target(me),text:this.text(me)});this.emit(Ae?"success":"error",{action:Ze,text:Ae,trigger:me,clearSelection:function(){me&&me.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Se){return V("action",Se)}},{key:"defaultTarget",value:function(Se){var me=V("target",Se);if(me)return document.querySelector(me)}},{key:"defaultText",value:function(Se){return V("text",Se)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Se){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return O(Se,me)}},{key:"cut",value:function(Se){return b(Se)}},{key:"isSupported",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],me=typeof Se=="string"?[Se]:Se,Ze=!!document.queryCommandSupported;return me.forEach(function(Ae){Ze=Ze&&!!document.queryCommandSupported(Ae)}),Ze}}]),ue}(l()),oe=G},828:function(o){var a=9;if(typeof Element<"u"&&!Element.prototype.matches){var s=Element.prototype;s.matches=s.matchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.webkitMatchesSelector}function u(l,c){for(;l&&l.nodeType!==a;){if(typeof l.matches=="function"&&l.matches(c))return l;l=l.parentNode}}o.exports=u},438:function(o,a,s){var u=s(828);function l(h,p,m,v,b){var w=f.apply(this,arguments);return h.addEventListener(m,w,b),{destroy:function(){h.removeEventListener(m,w,b)}}}function c(h,p,m,v,b){return typeof h.addEventListener=="function"?l.apply(null,arguments):typeof m=="function"?l.bind(null,document).apply(null,arguments):(typeof h=="string"&&(h=document.querySelectorAll(h)),Array.prototype.map.call(h,function(w){return l(w,p,m,v,b)}))}function f(h,p,m,v){return function(b){b.delegateTarget=u(b.target,p),b.delegateTarget&&v.call(h,b)}}o.exports=c},879:function(o,a){a.node=function(s){return s!==void 0&&s instanceof HTMLElement&&s.nodeType===1},a.nodeList=function(s){var u=Object.prototype.toString.call(s);return s!==void 0&&(u==="[object NodeList]"||u==="[object HTMLCollection]")&&"length"in s&&(s.length===0||a.node(s[0]))},a.string=function(s){return typeof s=="string"||s instanceof String},a.fn=function(s){var u=Object.prototype.toString.call(s);return u==="[object Function]"}},370:function(o,a,s){var u=s(879),l=s(438);function c(m,v,b){if(!m&&!v&&!b)throw new Error("Missing required arguments");if(!u.string(v))throw new TypeError("Second argument must be a String");if(!u.fn(b))throw new TypeError("Third argument must be a Function");if(u.node(m))return f(m,v,b);if(u.nodeList(m))return h(m,v,b);if(u.string(m))return p(m,v,b);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(m,v,b){return m.addEventListener(v,b),{destroy:function(){m.removeEventListener(v,b)}}}function h(m,v,b){return Array.prototype.forEach.call(m,function(w){w.addEventListener(v,b)}),{destroy:function(){Array.prototype.forEach.call(m,function(w){w.removeEventListener(v,b)})}}}function p(m,v,b){return l(document.body,m,v,b)}o.exports=c},817:function(o){function a(s){var u;if(s.nodeName==="SELECT")s.focus(),u=s.value;else if(s.nodeName==="INPUT"||s.nodeName==="TEXTAREA"){var l=s.hasAttribute("readonly");l||s.setAttribute("readonly",""),s.select(),s.setSelectionRange(0,s.value.length),l||s.removeAttribute("readonly"),u=s.value}else{s.hasAttribute("contenteditable")&&s.focus();var c=window.getSelection(),f=document.createRange();f.selectNodeContents(s),c.removeAllRanges(),c.addRange(f),u=c.toString()}return u}o.exports=a},279:function(o){function a(){}a.prototype={on:function(s,u,l){var c=this.e||(this.e={});return(c[s]||(c[s]=[])).push({fn:u,ctx:l}),this},once:function(s,u,l){var c=this;function f(){c.off(s,f),u.apply(l,arguments)}return f._=u,this.on(s,f,l)},emit:function(s){var u=[].slice.call(arguments,1),l=((this.e||(this.e={}))[s]||[]).slice(),c=0,f=l.length;for(c;c{const{children:a,...s}=o,u=y.useMemo(()=>s,Object.values(s));return L.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function i(o){const a=y.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function vi(e,t=[]){let n=[];function r(o,a){const s=y.createContext(a),u=n.length;n=[...n,a];const l=f=>{const{scope:h,children:p,...m}=f,v=h?.[e]?.[u]||s,b=y.useMemo(()=>m,Object.values(m));return L.jsx(v.Provider,{value:b,children:p})};l.displayName=o+"Provider";function c(f,h){const p=h?.[e]?.[u]||s,m=y.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(s){const u=s?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,h0e(i,...t)]}function h0e(...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(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var p0e=globalThis?.document?y.useLayoutEffect:()=>{},g0e=F4.useId||(()=>{}),m0e=0;function jo(e){const[t,n]=y.useState(g0e());return p0e(()=>{e||n(r=>r??String(m0e++))},[e]),e||(t?`radix-${t}`:"")}function Hr(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Za({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=v0e({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Hr(n),u=y.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function v0e({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=Hr(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function y0e(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function b0e(e,t=globalThis?.document){const n=y0e(e);y.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 x0e="DismissableLayer",yE="dismissableLayer.update",w0e="dismissableLayer.pointerDownOutside",_0e="dismissableLayer.focusOutside",eD,rz=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jh=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=y.useContext(rz),[c,f]=y.useState(null),h=c?.ownerDocument??globalThis?.document,[,p]=y.useState({}),m=Gt(t,k=>f(k)),v=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),x=c?v.indexOf(c):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,O=x>=w,E=E0e(k=>{const M=k.target,N=[...l.branches].some(q=>q.contains(M));!O||N||(i?.(k),a?.(k),k.defaultPrevented||s?.())},h),C=O0e(k=>{const M=k.target;[...l.branches].some(q=>q.contains(M))||(o?.(k),a?.(k),k.defaultPrevented||s?.())},h);return b0e(k=>{x===l.layers.size-1&&(r?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},h),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(eD=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),tD(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=eD)}},[c,h,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),tD())},[c,l]),y.useEffect(()=>{const k=()=>p({});return document.addEventListener(yE,k),()=>document.removeEventListener(yE,k)},[]),L.jsx(pt.div,{...u,ref:m,style:{pointerEvents:S?O?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,E.onPointerDownCapture)})});jh.displayName=x0e;var S0e="DismissableLayerBranch",C0e=y.forwardRef((e,t)=>{const n=y.useContext(rz),r=y.useRef(null),i=Gt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),L.jsx(pt.div,{...e,ref:i})});C0e.displayName=S0e;function E0e(e,t=globalThis?.document){const n=Hr(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){iz(w0e,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function O0e(e,t=globalThis?.document){const n=Hr(e),r=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!r.current&&iz(_0e,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function tD(){const e=new CustomEvent(yE);document.dispatchEvent(e)}function iz(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?JB(i,o):i.dispatchEvent(o)}var CS="focusScope.autoFocusOnMount",ES="focusScope.autoFocusOnUnmount",nD={bubbles:!1,cancelable:!0},A0e="FocusScope",Em=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=y.useState(null),l=Hr(i),c=Hr(o),f=y.useRef(null),h=Gt(t,v=>u(v)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let v=function(S){if(p.paused||!s)return;const O=S.target;s.contains(O)?f.current=O:Yu(f.current,{select:!0})},b=function(S){if(p.paused||!s)return;const O=S.relatedTarget;O!==null&&(s.contains(O)||Yu(f.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Yu(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const x=new MutationObserver(w);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),x.disconnect()}}},[r,s,p.paused]),y.useEffect(()=>{if(s){iD.add(p);const v=document.activeElement;if(!s.contains(v)){const w=new CustomEvent(CS,nD);s.addEventListener(CS,l),s.dispatchEvent(w),w.defaultPrevented||(P0e(D0e(oz(s)),{select:!0}),document.activeElement===v&&Yu(s))}return()=>{s.removeEventListener(CS,l),setTimeout(()=>{const w=new CustomEvent(ES,nD);s.addEventListener(ES,c),s.dispatchEvent(w),w.defaultPrevented||Yu(v??document.body,{select:!0}),s.removeEventListener(ES,c),iD.remove(p)},0)}}},[s,l,c,p]);const m=y.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const x=v.currentTarget,[S,O]=k0e(x);S&&O?!v.shiftKey&&w===O?(v.preventDefault(),n&&Yu(S,{select:!0})):v.shiftKey&&w===S&&(v.preventDefault(),n&&Yu(O,{select:!0})):w===x&&v.preventDefault()}},[n,r,p.paused]);return L.jsx(pt.div,{tabIndex:-1,...a,ref:h,onKeyDown:m})});Em.displayName=A0e;function P0e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Yu(r,{select:t}),document.activeElement!==n)return}function k0e(e){const t=oz(e),n=rD(t,e),r=rD(t.reverse(),e);return[n,r]}function oz(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 rD(e,t){for(const n of e)if(!T0e(n,{upTo:t}))return n}function T0e(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 M0e(e){return e instanceof HTMLInputElement&&"select"in e}function Yu(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&M0e(e)&&t&&e.select()}}var iD=R0e();function R0e(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=oD(e,t),e.unshift(t)},remove(t){e=oD(e,t),e[0]?.resume()}}}function oD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function D0e(e){return e.filter(t=>t.tagName!=="A")}var ii=globalThis?.document?y.useLayoutEffect:()=>{},$0e="Portal",Bh=y.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=y.useState(!1);ii(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?Vx.createPortal(L.jsx(pt.div,{...r,ref:t}),a):null});Bh.displayName=$0e;function I0e(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Gr=e=>{const{present:t,children:n}=e,r=N0e(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Gt(r.ref,L0e(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};Gr.displayName="Presence";function N0e(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[s,u]=I0e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=sy(r.current);o.current=s==="mounted"?l:"none"},[s]),ii(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,p=sy(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),ii(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=p=>{const v=sy(r.current).includes(p.animationName);if(p.target===t&&v&&(u("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=p=>{p.target===t&&(o.current=sy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function sy(e){return e?.animationName||"none"}function L0e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var OS=0;function sw(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??aD()),document.body.insertAdjacentElement("beforeend",e[1]??aD()),OS++,()=>{OS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),OS--}},[])}function aD(){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 Ri=function(){return Ri=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return X0e;var t=Q0e(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])}},ege=Z0e(),Td="data-scroll-locked",tge=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(F0e,` { + */(function(e,t){(function(r,i){e.exports=i()})(la,function(){return function(){var n={686:function(o,a,s){s.d(a,{default:function(){return oe}});var u=s(279),l=s.n(u),c=s(370),f=s.n(c),h=s(817),p=s.n(h);function m(Q){try{return document.execCommand(Q)}catch{return!1}}var v=function(J){var ue=p()(J);return m("cut"),ue},b=v;function w(Q){var J=document.documentElement.getAttribute("dir")==="rtl",ue=document.createElement("textarea");ue.style.fontSize="12pt",ue.style.border="0",ue.style.padding="0",ue.style.margin="0",ue.style.position="absolute",ue.style[J?"right":"left"]="-9999px";var de=window.pageYOffset||document.documentElement.scrollTop;return ue.style.top="".concat(de,"px"),ue.setAttribute("readonly",""),ue.value=Q,ue}var x=function(J,ue){var de=w(J);ue.container.appendChild(de);var Se=p()(de);return m("copy"),de.remove(),Se},S=function(J){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},de="";return typeof J=="string"?de=x(J,ue):J instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(J?.type)?de=x(J.value,ue):(de=p()(J),m("copy")),de},O=S;function E(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(ue){return typeof ue}:E=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},E(Q)}var C=function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=J.action,de=ue===void 0?"copy":ue,Se=J.container,me=J.target,Ze=J.text;if(de!=="copy"&&de!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(me!==void 0)if(me&&E(me)==="object"&&me.nodeType===1){if(de==="copy"&&me.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(de==="cut"&&(me.hasAttribute("readonly")||me.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Ze)return O(Ze,{container:Se});if(me)return de==="cut"?b(me):O(me,{container:Se})},k=C;function M(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(ue){return typeof ue}:M=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},M(Q)}function N(Q,J){if(!(Q instanceof J))throw new TypeError("Cannot call a class as a function")}function z(Q,J){for(var ue=0;ue"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function j(Q){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},j(Q)}function K(Q,J){var ue="data-clipboard-".concat(Q);if(J.hasAttribute(ue))return J.getAttribute(ue)}var Y=function(Q){V(ue,Q);var J=Z(ue);function ue(de,Se){var me;return N(this,ue),me=J.call(this),me.resolveOptions(Se),me.listenClick(de),me}return H(ue,[{key:"resolveOptions",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Se.action=="function"?Se.action:this.defaultAction,this.target=typeof Se.target=="function"?Se.target:this.defaultTarget,this.text=typeof Se.text=="function"?Se.text:this.defaultText,this.container=M(Se.container)==="object"?Se.container:document.body}},{key:"listenClick",value:function(Se){var me=this;this.listener=f()(Se,"click",function(Ze){return me.onClick(Ze)})}},{key:"onClick",value:function(Se){var me=Se.delegateTarget||Se.currentTarget,Ze=this.action(me)||"copy",Ae=k({action:Ze,container:this.container,target:this.target(me),text:this.text(me)});this.emit(Ae?"success":"error",{action:Ze,text:Ae,trigger:me,clearSelection:function(){me&&me.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Se){return K("action",Se)}},{key:"defaultTarget",value:function(Se){var me=K("target",Se);if(me)return document.querySelector(me)}},{key:"defaultText",value:function(Se){return K("text",Se)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Se){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return O(Se,me)}},{key:"cut",value:function(Se){return b(Se)}},{key:"isSupported",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],me=typeof Se=="string"?[Se]:Se,Ze=!!document.queryCommandSupported;return me.forEach(function(Ae){Ze=Ze&&!!document.queryCommandSupported(Ae)}),Ze}}]),ue}(l()),oe=Y},828:function(o){var a=9;if(typeof Element<"u"&&!Element.prototype.matches){var s=Element.prototype;s.matches=s.matchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.webkitMatchesSelector}function u(l,c){for(;l&&l.nodeType!==a;){if(typeof l.matches=="function"&&l.matches(c))return l;l=l.parentNode}}o.exports=u},438:function(o,a,s){var u=s(828);function l(h,p,m,v,b){var w=f.apply(this,arguments);return h.addEventListener(m,w,b),{destroy:function(){h.removeEventListener(m,w,b)}}}function c(h,p,m,v,b){return typeof h.addEventListener=="function"?l.apply(null,arguments):typeof m=="function"?l.bind(null,document).apply(null,arguments):(typeof h=="string"&&(h=document.querySelectorAll(h)),Array.prototype.map.call(h,function(w){return l(w,p,m,v,b)}))}function f(h,p,m,v){return function(b){b.delegateTarget=u(b.target,p),b.delegateTarget&&v.call(h,b)}}o.exports=c},879:function(o,a){a.node=function(s){return s!==void 0&&s instanceof HTMLElement&&s.nodeType===1},a.nodeList=function(s){var u=Object.prototype.toString.call(s);return s!==void 0&&(u==="[object NodeList]"||u==="[object HTMLCollection]")&&"length"in s&&(s.length===0||a.node(s[0]))},a.string=function(s){return typeof s=="string"||s instanceof String},a.fn=function(s){var u=Object.prototype.toString.call(s);return u==="[object Function]"}},370:function(o,a,s){var u=s(879),l=s(438);function c(m,v,b){if(!m&&!v&&!b)throw new Error("Missing required arguments");if(!u.string(v))throw new TypeError("Second argument must be a String");if(!u.fn(b))throw new TypeError("Third argument must be a Function");if(u.node(m))return f(m,v,b);if(u.nodeList(m))return h(m,v,b);if(u.string(m))return p(m,v,b);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(m,v,b){return m.addEventListener(v,b),{destroy:function(){m.removeEventListener(v,b)}}}function h(m,v,b){return Array.prototype.forEach.call(m,function(w){w.addEventListener(v,b)}),{destroy:function(){Array.prototype.forEach.call(m,function(w){w.removeEventListener(v,b)})}}}function p(m,v,b){return l(document.body,m,v,b)}o.exports=c},817:function(o){function a(s){var u;if(s.nodeName==="SELECT")s.focus(),u=s.value;else if(s.nodeName==="INPUT"||s.nodeName==="TEXTAREA"){var l=s.hasAttribute("readonly");l||s.setAttribute("readonly",""),s.select(),s.setSelectionRange(0,s.value.length),l||s.removeAttribute("readonly"),u=s.value}else{s.hasAttribute("contenteditable")&&s.focus();var c=window.getSelection(),f=document.createRange();f.selectNodeContents(s),c.removeAllRanges(),c.addRange(f),u=c.toString()}return u}o.exports=a},279:function(o){function a(){}a.prototype={on:function(s,u,l){var c=this.e||(this.e={});return(c[s]||(c[s]=[])).push({fn:u,ctx:l}),this},once:function(s,u,l){var c=this;function f(){c.off(s,f),u.apply(l,arguments)}return f._=u,this.on(s,f,l)},emit:function(s){var u=[].slice.call(arguments,1),l=((this.e||(this.e={}))[s]||[]).slice(),c=0,f=l.length;for(c;c{const{children:a,...s}=o,u=y.useMemo(()=>s,Object.values(s));return I.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function i(o){const a=y.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function vi(e,t=[]){let n=[];function r(o,a){const s=y.createContext(a),u=n.length;n=[...n,a];const l=f=>{const{scope:h,children:p,...m}=f,v=h?.[e]?.[u]||s,b=y.useMemo(()=>m,Object.values(m));return I.jsx(v.Provider,{value:b,children:p})};l.displayName=o+"Provider";function c(f,h){const p=h?.[e]?.[u]||s,m=y.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(s){const u=s?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,$pe(i,...t)]}function $pe(...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(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ipe=globalThis?.document?y.useLayoutEffect:()=>{},Npe=P4.useId||(()=>{}),Lpe=0;function Fo(e){const[t,n]=y.useState(Npe());return Ipe(()=>{e||n(r=>r??String(Lpe++))},[e]),e||(t?`radix-${t}`:"")}function Vr(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Za({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Fpe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Vr(n),u=y.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function Fpe({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=Vr(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function jpe(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Bpe(e,t=globalThis?.document){const n=jpe(e);y.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 zpe="DismissableLayer",cE="dismissableLayer.update",Upe="dismissableLayer.pointerDownOutside",Vpe="dismissableLayer.focusOutside",jR,BB=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nh=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=y.useContext(BB),[c,f]=y.useState(null),h=c?.ownerDocument??globalThis?.document,[,p]=y.useState({}),m=Gt(t,k=>f(k)),v=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),x=c?v.indexOf(c):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,O=x>=w,E=Kpe(k=>{const M=k.target,N=[...l.branches].some(z=>z.contains(M));!O||N||(i?.(k),a?.(k),k.defaultPrevented||s?.())},h),C=qpe(k=>{const M=k.target;[...l.branches].some(z=>z.contains(M))||(o?.(k),a?.(k),k.defaultPrevented||s?.())},h);return Bpe(k=>{x===l.layers.size-1&&(r?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},h),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(jR=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),BR(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=jR)}},[c,h,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),BR())},[c,l]),y.useEffect(()=>{const k=()=>p({});return document.addEventListener(cE,k),()=>document.removeEventListener(cE,k)},[]),I.jsx(pt.div,{...u,ref:m,style:{pointerEvents:S?O?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,E.onPointerDownCapture)})});Nh.displayName=zpe;var Wpe="DismissableLayerBranch",Hpe=y.forwardRef((e,t)=>{const n=y.useContext(BB),r=y.useRef(null),i=Gt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),I.jsx(pt.div,{...e,ref:i})});Hpe.displayName=Wpe;function Kpe(e,t=globalThis?.document){const n=Vr(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){zB(Upe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function qpe(e,t=globalThis?.document){const n=Vr(e),r=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!r.current&&zB(Vpe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function BR(){const e=new CustomEvent(cE);document.dispatchEvent(e)}function zB(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?NB(i,o):i.dispatchEvent(o)}var yS="focusScope.autoFocusOnMount",bS="focusScope.autoFocusOnUnmount",zR={bubbles:!1,cancelable:!0},Gpe="FocusScope",wm=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=y.useState(null),l=Vr(i),c=Vr(o),f=y.useRef(null),h=Gt(t,v=>u(v)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let v=function(S){if(p.paused||!s)return;const O=S.target;s.contains(O)?f.current=O:Gu(f.current,{select:!0})},b=function(S){if(p.paused||!s)return;const O=S.relatedTarget;O!==null&&(s.contains(O)||Gu(f.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Gu(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const x=new MutationObserver(w);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),x.disconnect()}}},[r,s,p.paused]),y.useEffect(()=>{if(s){VR.add(p);const v=document.activeElement;if(!s.contains(v)){const w=new CustomEvent(yS,zR);s.addEventListener(yS,l),s.dispatchEvent(w),w.defaultPrevented||(Ype(e0e(UB(s)),{select:!0}),document.activeElement===v&&Gu(s))}return()=>{s.removeEventListener(yS,l),setTimeout(()=>{const w=new CustomEvent(bS,zR);s.addEventListener(bS,c),s.dispatchEvent(w),w.defaultPrevented||Gu(v??document.body,{select:!0}),s.removeEventListener(bS,c),VR.remove(p)},0)}}},[s,l,c,p]);const m=y.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const x=v.currentTarget,[S,O]=Zpe(x);S&&O?!v.shiftKey&&w===O?(v.preventDefault(),n&&Gu(S,{select:!0})):v.shiftKey&&w===S&&(v.preventDefault(),n&&Gu(O,{select:!0})):w===x&&v.preventDefault()}},[n,r,p.paused]);return I.jsx(pt.div,{tabIndex:-1,...a,ref:h,onKeyDown:m})});wm.displayName=Gpe;function Ype(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gu(r,{select:t}),document.activeElement!==n)return}function Zpe(e){const t=UB(e),n=UR(t,e),r=UR(t.reverse(),e);return[n,r]}function UB(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 UR(e,t){for(const n of e)if(!Xpe(n,{upTo:t}))return n}function Xpe(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 Qpe(e){return e instanceof HTMLInputElement&&"select"in e}function Gu(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qpe(e)&&t&&e.select()}}var VR=Jpe();function Jpe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=WR(e,t),e.unshift(t)},remove(t){e=WR(e,t),e[0]?.resume()}}}function WR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function e0e(e){return e.filter(t=>t.tagName!=="A")}var ii=globalThis?.document?y.useLayoutEffect:()=>{},t0e="Portal",Lh=y.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=y.useState(!1);ii(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?jx.createPortal(I.jsx(pt.div,{...r,ref:t}),a):null});Lh.displayName=t0e;function n0e(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Gr=e=>{const{present:t,children:n}=e,r=r0e(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Gt(r.ref,i0e(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};Gr.displayName="Presence";function r0e(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[s,u]=n0e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=ry(r.current);o.current=s==="mounted"?l:"none"},[s]),ii(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,p=ry(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),ii(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=p=>{const v=ry(r.current).includes(p.animationName);if(p.target===t&&v&&(u("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=p=>{p.target===t&&(o.current=ry(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function ry(e){return e?.animationName||"none"}function i0e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xS=0;function nw(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??HR()),document.body.insertAdjacentElement("beforeend",e[1]??HR()),xS++,()=>{xS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xS--}},[])}function HR(){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 Ri=function(){return Ri=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return y0e;var t=b0e(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])}},w0e=v0e(),Pd="data-scroll-locked",_0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(o0e,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; } - body[`).concat(Td,`] { + body[`).concat(Pd,`] { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` @@ -102,38 +102,38 @@ Error generating stack: `+o.message+` `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` } - .`).concat(t1,` { + .`).concat(Xy,` { right: `).concat(s,"px ").concat(r,`; } - .`).concat(n1,` { + .`).concat(Qy,` { margin-right: `).concat(s,"px ").concat(r,`; } - .`).concat(t1," .").concat(t1,` { + .`).concat(Xy," .").concat(Xy,` { right: 0 `).concat(r,`; } - .`).concat(n1," .").concat(n1,` { + .`).concat(Qy," .").concat(Qy,` { margin-right: 0 `).concat(r,`; } - body[`).concat(Td,`] { - `).concat(j0e,": ").concat(s,`px; + body[`).concat(Pd,`] { + `).concat(a0e,": ").concat(s,`px; } -`)},uD=function(){var e=parseInt(document.body.getAttribute(Td)||"0",10);return isFinite(e)?e:0},nge=function(){y.useEffect(function(){return document.body.setAttribute(Td,(uD()+1).toString()),function(){var e=uD()-1;e<=0?document.body.removeAttribute(Td):document.body.setAttribute(Td,e.toString())}},[])},rge=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;nge();var o=y.useMemo(function(){return J0e(i)},[i]);return y.createElement(ege,{styles:tge(o,!t,i,n?"":"!important")})};function ige(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fz();return t&&e.setAttribute("nonce",t),e}function oge(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function age(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var sge=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ige())&&(oge(t,n),age(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},uge=function(){var e=sge();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rA=function(){var e=uge(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},bE=!1;if(typeof window<"u")try{var uy=Object.defineProperty({},"passive",{get:function(){return bE=!0,!0}});window.addEventListener("test",uy,uy),window.removeEventListener("test",uy,uy)}catch{bE=!1}var Wf=bE?{passive:!1}:!1,lge=function(e){return e.tagName==="TEXTAREA"},dz=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lge(e)&&n[t]==="visible")},cge=function(e){return dz(e,"overflowY")},fge=function(e){return dz(e,"overflowX")},lD=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=hz(e,r);if(i){var o=pz(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},dge=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},hge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},hz=function(e,t){return e==="v"?cge(t):fge(t)},pz=function(e,t){return e==="v"?dge(t):hge(t)},pge=function(e,t){return e==="h"&&t==="rtl"?-1:1},gge=function(e,t,n,r,i){var o=pge(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,c=a>0,f=0,h=0;do{var p=pz(e,s),m=p[0],v=p[1],b=p[2],w=v-b-o*m;(m||w)&&hz(e,s)&&(f+=w,h+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(h)<1||!i))&&(l=!0),l},ly=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},cD=function(e){return[e.deltaX,e.deltaY]},fD=function(e){return e&&"current"in e?e.current:e},mge=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vge=function(e){return` +`)},qR=function(){var e=parseInt(document.body.getAttribute(Pd)||"0",10);return isFinite(e)?e:0},S0e=function(){y.useEffect(function(){return document.body.setAttribute(Pd,(qR()+1).toString()),function(){var e=qR()-1;e<=0?document.body.removeAttribute(Pd):document.body.setAttribute(Pd,e.toString())}},[])},C0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;S0e();var o=y.useMemo(function(){return x0e(i)},[i]);return y.createElement(w0e,{styles:_0e(o,!t,i,n?"":"!important")})};function E0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=GB();return t&&e.setAttribute("nonce",t),e}function O0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function A0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var P0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=E0e())&&(O0e(t,n),A0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},k0e=function(){var e=P0e();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},qO=function(){var e=k0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},fE=!1;if(typeof window<"u")try{var iy=Object.defineProperty({},"passive",{get:function(){return fE=!0,!0}});window.addEventListener("test",iy,iy),window.removeEventListener("test",iy,iy)}catch{fE=!1}var Vf=fE?{passive:!1}:!1,T0e=function(e){return e.tagName==="TEXTAREA"},YB=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!T0e(e)&&n[t]==="visible")},M0e=function(e){return YB(e,"overflowY")},R0e=function(e){return YB(e,"overflowX")},GR=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=ZB(e,r);if(i){var o=XB(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},D0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ZB=function(e,t){return e==="v"?M0e(t):R0e(t)},XB=function(e,t){return e==="v"?D0e(t):$0e(t)},I0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},N0e=function(e,t,n,r,i){var o=I0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,c=a>0,f=0,h=0;do{var p=XB(e,s),m=p[0],v=p[1],b=p[2],w=v-b-o*m;(m||w)&&ZB(e,s)&&(f+=w,h+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(h)<1||!i))&&(l=!0),l},oy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},YR=function(e){return[e.deltaX,e.deltaY]},ZR=function(e){return e&&"current"in e?e.current:e},L0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},F0e=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},yge=0,qf=[];function bge(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(yge++)[0],o=y.useState(rA)[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=az([e.lockRef.current],(e.shards||[]).map(fD),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=y.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var w=ly(v),x=n.current,S="deltaX"in v?v.deltaX:x[0]-w[0],O="deltaY"in v?v.deltaY:x[1]-w[1],E,C=v.target,k=Math.abs(S)>Math.abs(O)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var M=lD(k,C);if(!M)return!0;if(M?E=k:(E=k==="v"?"h":"v",M=lD(k,C)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||O)&&(r.current=E),!E)return!0;var N=r.current||E;return gge(N,b,v,N==="h"?S:O,!0)},[]),u=y.useCallback(function(v){var b=v;if(!(!qf.length||qf[qf.length-1]!==o)){var w="deltaY"in b?cD(b):ly(b),x=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&mge(E.delta,w)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(fD).filter(Boolean).filter(function(E){return E.contains(b.target)}),O=S.length>0?s(b,S[0]):!a.current.noIsolation;O&&b.cancelable&&b.preventDefault()}}},[]),l=y.useCallback(function(v,b,w,x){var S={name:v,delta:b,target:w,should:x,shadowParent:xge(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(O){return O!==S})},1)},[]),c=y.useCallback(function(v){n.current=ly(v),r.current=void 0},[]),f=y.useCallback(function(v){l(v.type,cD(v),v.target,s(v,e.lockRef.current))},[]),h=y.useCallback(function(v){l(v.type,ly(v),v.target,s(v,e.lockRef.current))},[]);y.useEffect(function(){return qf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Wf),document.addEventListener("touchmove",u,Wf),document.addEventListener("touchstart",c,Wf),function(){qf=qf.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,Wf),document.removeEventListener("touchmove",u,Wf),document.removeEventListener("touchstart",c,Wf)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:vge(i)}):null,p?y.createElement(rge,{gapMode:e.gapMode}):null)}function xge(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wge=lz(cz,bge);var Om=y.forwardRef(function(e,t){return y.createElement(uw,Ri({},e,{ref:t,sideCar:wge}))});Om.classNames=uw.classNames;var _ge=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Kf=new WeakMap,cy=new WeakMap,fy={},TS=0,gz=function(e){return e&&(e.host||gz(e.parentNode))},Sge=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=gz(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})},Cge=function(e,t,n,r){var i=Sge(t,Array.isArray(e)?e:[e]);fy[n]||(fy[n]=new WeakMap);var o=fy[n],a=[],s=new Set,u=new Set(i),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};i.forEach(l);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))c(h);else try{var p=h.getAttribute(r),m=p!==null&&p!=="false",v=(Kf.get(h)||0)+1,b=(o.get(h)||0)+1;Kf.set(h,v),o.set(h,b),a.push(h),v===1&&m&&cy.set(h,!0),b===1&&h.setAttribute(n,"true"),m||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return c(t),s.clear(),TS++,function(){a.forEach(function(f){var h=Kf.get(f)-1,p=o.get(f)-1;Kf.set(f,h),o.set(f,p),h||(cy.has(f)||f.removeAttribute(r),cy.delete(f)),p||f.removeAttribute(n)}),TS--,TS||(Kf=new WeakMap,Kf=new WeakMap,cy=new WeakMap,fy={})}},Am=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=_ge(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Cge(r,i,n,"aria-hidden")):function(){return null}},iA="Dialog",[mz,vz]=vi(iA),[Ege,ns]=mz(iA),yz=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=y.useRef(null),u=y.useRef(null),[l=!1,c]=Za({prop:r,defaultProp:i,onChange:o});return L.jsx(Ege,{scope:t,triggerRef:s,contentRef:u,contentId:jo(),titleId:jo(),descriptionId:jo(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(f=>!f),[c]),modal:a,children:n})};yz.displayName=iA;var bz="DialogTrigger",xz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(bz,n),o=Gt(t,i.triggerRef);return L.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":sA(i.open),...r,ref:o,onClick:Ye(e.onClick,i.onOpenToggle)})});xz.displayName=bz;var oA="DialogPortal",[Oge,wz]=mz(oA,{forceMount:void 0}),_z=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=ns(oA,t);return L.jsx(Oge,{scope:t,forceMount:n,children:y.Children.map(r,a=>L.jsx(Gr,{present:n||o.open,children:L.jsx(Bh,{asChild:!0,container:i,children:a})}))})};_z.displayName=oA;var ub="DialogOverlay",Sz=y.forwardRef((e,t)=>{const n=wz(ub,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ns(ub,e.__scopeDialog);return o.modal?L.jsx(Gr,{present:r||o.open,children:L.jsx(Age,{...i,ref:t})}):null});Sz.displayName=ub;var Age=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(ub,n);return L.jsx(Om,{as:Pl,allowPinchZoom:!0,shards:[i.contentRef],children:L.jsx(pt.div,{"data-state":sA(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Jc="DialogContent",Cz=y.forwardRef((e,t)=>{const n=wz(Jc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ns(Jc,e.__scopeDialog);return L.jsx(Gr,{present:r||o.open,children:o.modal?L.jsx(Pge,{...i,ref:t}):L.jsx(kge,{...i,ref:t})})});Cz.displayName=Jc;var Pge=y.forwardRef((e,t)=>{const n=ns(Jc,e.__scopeDialog),r=y.useRef(null),i=Gt(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Am(o)},[]),L.jsx(Ez,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault())})}),kge=y.forwardRef((e,t)=>{const n=ns(Jc,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return L.jsx(Ez,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),Ez=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=ns(Jc,n),u=y.useRef(null),l=Gt(t,u);return sw(),L.jsxs(L.Fragment,{children:[L.jsx(Em,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:L.jsx(jh,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":sA(s.open),...a,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),L.jsxs(L.Fragment,{children:[L.jsx(Mge,{titleId:s.titleId}),L.jsx(Dge,{contentRef:u,descriptionId:s.descriptionId})]})]})}),aA="DialogTitle",Oz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(aA,n);return L.jsx(pt.h2,{id:i.titleId,...r,ref:t})});Oz.displayName=aA;var Az="DialogDescription",Pz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(Az,n);return L.jsx(pt.p,{id:i.descriptionId,...r,ref:t})});Pz.displayName=Az;var kz="DialogClose",Tz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(kz,n);return L.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});Tz.displayName=kz;function sA(e){return e?"open":"closed"}var Mz="DialogTitleWarning",[Tge,Rz]=d0e(Mz,{contentName:Jc,titleName:aA,docsSlug:"dialog"}),Mge=({titleId:e})=>{const t=Rz(Mz),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. +`)},j0e=0,Wf=[];function B0e(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(j0e++)[0],o=y.useState(qO)[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=VB([e.lockRef.current],(e.shards||[]).map(ZR),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=y.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var w=oy(v),x=n.current,S="deltaX"in v?v.deltaX:x[0]-w[0],O="deltaY"in v?v.deltaY:x[1]-w[1],E,C=v.target,k=Math.abs(S)>Math.abs(O)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var M=GR(k,C);if(!M)return!0;if(M?E=k:(E=k==="v"?"h":"v",M=GR(k,C)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||O)&&(r.current=E),!E)return!0;var N=r.current||E;return N0e(N,b,v,N==="h"?S:O,!0)},[]),u=y.useCallback(function(v){var b=v;if(!(!Wf.length||Wf[Wf.length-1]!==o)){var w="deltaY"in b?YR(b):oy(b),x=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&L0e(E.delta,w)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(ZR).filter(Boolean).filter(function(E){return E.contains(b.target)}),O=S.length>0?s(b,S[0]):!a.current.noIsolation;O&&b.cancelable&&b.preventDefault()}}},[]),l=y.useCallback(function(v,b,w,x){var S={name:v,delta:b,target:w,should:x,shadowParent:z0e(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(O){return O!==S})},1)},[]),c=y.useCallback(function(v){n.current=oy(v),r.current=void 0},[]),f=y.useCallback(function(v){l(v.type,YR(v),v.target,s(v,e.lockRef.current))},[]),h=y.useCallback(function(v){l(v.type,oy(v),v.target,s(v,e.lockRef.current))},[]);y.useEffect(function(){return Wf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Vf),document.addEventListener("touchmove",u,Vf),document.addEventListener("touchstart",c,Vf),function(){Wf=Wf.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,Vf),document.removeEventListener("touchmove",u,Vf),document.removeEventListener("touchstart",c,Vf)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:F0e(i)}):null,p?y.createElement(C0e,{gapMode:e.gapMode}):null)}function z0e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const U0e=KB(qB,B0e);var _m=y.forwardRef(function(e,t){return y.createElement(rw,Ri({},e,{ref:t,sideCar:U0e}))});_m.classNames=rw.classNames;var V0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Hf=new WeakMap,ay=new WeakMap,sy={},CS=0,QB=function(e){return e&&(e.host||QB(e.parentNode))},W0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=QB(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})},H0e=function(e,t,n,r){var i=W0e(t,Array.isArray(e)?e:[e]);sy[n]||(sy[n]=new WeakMap);var o=sy[n],a=[],s=new Set,u=new Set(i),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};i.forEach(l);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))c(h);else try{var p=h.getAttribute(r),m=p!==null&&p!=="false",v=(Hf.get(h)||0)+1,b=(o.get(h)||0)+1;Hf.set(h,v),o.set(h,b),a.push(h),v===1&&m&&ay.set(h,!0),b===1&&h.setAttribute(n,"true"),m||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return c(t),s.clear(),CS++,function(){a.forEach(function(f){var h=Hf.get(f)-1,p=o.get(f)-1;Hf.set(f,h),o.set(f,p),h||(ay.has(f)||f.removeAttribute(r),ay.delete(f)),p||f.removeAttribute(n)}),CS--,CS||(Hf=new WeakMap,Hf=new WeakMap,ay=new WeakMap,sy={})}},Sm=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=V0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),H0e(r,i,n,"aria-hidden")):function(){return null}},GO="Dialog",[JB,ez]=vi(GO),[K0e,ns]=JB(GO),tz=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=y.useRef(null),u=y.useRef(null),[l=!1,c]=Za({prop:r,defaultProp:i,onChange:o});return I.jsx(K0e,{scope:t,triggerRef:s,contentRef:u,contentId:Fo(),titleId:Fo(),descriptionId:Fo(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(f=>!f),[c]),modal:a,children:n})};tz.displayName=GO;var nz="DialogTrigger",rz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(nz,n),o=Gt(t,i.triggerRef);return I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":XO(i.open),...r,ref:o,onClick:Ye(e.onClick,i.onOpenToggle)})});rz.displayName=nz;var YO="DialogPortal",[q0e,iz]=JB(YO,{forceMount:void 0}),oz=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=ns(YO,t);return I.jsx(q0e,{scope:t,forceMount:n,children:y.Children.map(r,a=>I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:a})}))})};oz.displayName=YO;var rb="DialogOverlay",az=y.forwardRef((e,t)=>{const n=iz(rb,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ns(rb,e.__scopeDialog);return o.modal?I.jsx(Gr,{present:r||o.open,children:I.jsx(G0e,{...i,ref:t})}):null});az.displayName=rb;var G0e=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(rb,n);return I.jsx(_m,{as:Al,allowPinchZoom:!0,shards:[i.contentRef],children:I.jsx(pt.div,{"data-state":XO(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Xc="DialogContent",sz=y.forwardRef((e,t)=>{const n=iz(Xc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ns(Xc,e.__scopeDialog);return I.jsx(Gr,{present:r||o.open,children:o.modal?I.jsx(Y0e,{...i,ref:t}):I.jsx(Z0e,{...i,ref:t})})});sz.displayName=Xc;var Y0e=y.forwardRef((e,t)=>{const n=ns(Xc,e.__scopeDialog),r=y.useRef(null),i=Gt(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Sm(o)},[]),I.jsx(uz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault())})}),Z0e=y.forwardRef((e,t)=>{const n=ns(Xc,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(uz,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),uz=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=ns(Xc,n),u=y.useRef(null),l=Gt(t,u);return nw(),I.jsxs(I.Fragment,{children:[I.jsx(wm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(Nh,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":XO(s.open),...a,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),I.jsxs(I.Fragment,{children:[I.jsx(Q0e,{titleId:s.titleId}),I.jsx(ege,{contentRef:u,descriptionId:s.descriptionId})]})]})}),ZO="DialogTitle",lz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(ZO,n);return I.jsx(pt.h2,{id:i.titleId,...r,ref:t})});lz.displayName=ZO;var cz="DialogDescription",fz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(cz,n);return I.jsx(pt.p,{id:i.descriptionId,...r,ref:t})});fz.displayName=cz;var dz="DialogClose",hz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(dz,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});hz.displayName=dz;function XO(e){return e?"open":"closed"}var pz="DialogTitleWarning",[X0e,gz]=Dpe(pz,{contentName:Xc,titleName:ZO,docsSlug:"dialog"}),Q0e=({titleId:e})=>{const t=gz(pz),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 y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Rge="DialogDescriptionWarning",Dge=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Rz(Rge).contentName}}.`;return y.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},$ge=yz,Ige=xz,Nge=_z,Lge=Sz,Fge=Cz,jge=Oz,Bge=Pz,Dz=Tz;function Yr(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var zge=["color"],AZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,zge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Uge=["color"],PZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Uge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Hge=["color"],kZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Hge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Vge=["color"],TZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Vge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Wge=["color"],MZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Wge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),qge=["color"],RZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,qge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Kge=["color"],DZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Kge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49991C0.877075 3.84222 3.84222 0.877075 7.49991 0.877075C11.1576 0.877075 14.1227 3.84222 14.1227 7.49991C14.1227 11.1576 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1576 0.877075 7.49991ZM7.49991 1.82708C4.36689 1.82708 1.82708 4.36689 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49991C13.1727 4.36689 10.6329 1.82708 7.49991 1.82708Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Gge=["color"],$Ze=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Gge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Yge=["color"],IZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Yge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Zge=["color"],NZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Zge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),Xge=["color"],LZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Xge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Qge=["color"],FZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Qge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Jge=["color"],jZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Jge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),eme=["color"],BZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,eme);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),tme=["color"],zZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,tme);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),nme=["color"],UZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,nme);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),rme=["color"],HZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,rme);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ime=["color"],VZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,ime);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ome=["color"],WZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,ome);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L11.858 2.25806C12.1021 2.01398 12.4978 2.01398 12.7419 2.25806C12.986 2.50214 12.986 2.89786 12.7419 3.14194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13362 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.99998 4.5C7.99998 4.22386 7.77612 4 7.49998 4C7.22383 4 6.99998 4.22386 6.99998 4.5V9.5C6.99998 9.77614 7.22383 10 7.49998 10C7.77612 10 7.99998 9.77614 7.99998 9.5V4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),uA="Collapsible",[ame,qZe]=vi(uA),[sme,lA]=ame(uA),$z=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[u=!1,l]=Za({prop:r,defaultProp:i,onChange:a});return L.jsx(sme,{scope:n,disabled:o,contentId:jo(),open:u,onOpenToggle:y.useCallback(()=>l(c=>!c),[l]),children:L.jsx(pt.div,{"data-state":fA(u),"data-disabled":o?"":void 0,...s,ref:t})})});$z.displayName=uA;var Iz="CollapsibleTrigger",ume=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=lA(Iz,n);return L.jsx(pt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":fA(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ye(e.onClick,i.onOpenToggle)})});ume.displayName=Iz;var cA="CollapsibleContent",lme=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=lA(cA,e.__scopeCollapsible);return L.jsx(Gr,{present:n||i.open,children:({present:o})=>L.jsx(cme,{...r,ref:t,present:o})})});lme.displayName=cA;var cme=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=lA(cA,n),[s,u]=y.useState(r),l=y.useRef(null),c=Gt(t,l),f=y.useRef(0),h=f.current,p=y.useRef(0),m=p.current,v=a.open||s,b=y.useRef(v),w=y.useRef(void 0);return y.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),ii(()=>{const x=l.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const S=x.getBoundingClientRect();f.current=S.height,p.current=S.width,b.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),u(r)}},[a.open,r]),L.jsx(pt.div,{"data-state":fA(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...o,ref:c,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:v&&i})});function fA(e){return e?"open":"closed"}var KZe=$z;function dA(e){const t=e+"CollectionProvider",[n,r]=vi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:m,children:v}=p,b=z.useRef(null),w=z.useRef(new Map).current;return L.jsx(i,{scope:m,itemMap:w,collectionRef:b,children:v})};a.displayName=t;const s=e+"CollectionSlot",u=z.forwardRef((p,m)=>{const{scope:v,children:b}=p,w=o(s,v),x=Gt(m,w.collectionRef);return L.jsx(Pl,{ref:x,children:b})});u.displayName=s;const l=e+"CollectionItemSlot",c="data-radix-collection-item",f=z.forwardRef((p,m)=>{const{scope:v,children:b,...w}=p,x=z.useRef(null),S=Gt(m,x),O=o(l,v);return z.useEffect(()=>(O.itemMap.set(x,{ref:x,...w}),()=>void O.itemMap.delete(x))),L.jsx(Pl,{[c]:"",ref:S,children:b})});f.displayName=l;function h(p){const m=o(e+"CollectionConsumer",p);return z.useCallback(()=>{const b=m.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((O,E)=>w.indexOf(O.ref.current)-w.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:u,ItemSlot:f},h,r]}var fme=y.createContext(void 0);function Pm(e){const t=y.useContext(fme);return e||t||"ltr"}const dme=["top","right","bottom","left"],Dl=Math.min,Do=Math.max,lb=Math.round,dy=Math.floor,$l=e=>({x:e,y:e}),hme={left:"right",right:"left",bottom:"top",top:"bottom"},pme={start:"end",end:"start"};function xE(e,t,n){return Do(e,Dl(t,n))}function wu(e,t){return typeof e=="function"?e(t):e}function _u(e){return e.split("-")[0]}function zh(e){return e.split("-")[1]}function hA(e){return e==="x"?"y":"x"}function pA(e){return e==="y"?"height":"width"}function Uh(e){return["top","bottom"].includes(_u(e))?"y":"x"}function gA(e){return hA(Uh(e))}function gme(e,t,n){n===void 0&&(n=!1);const r=zh(e),i=gA(e),o=pA(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=cb(a)),[a,cb(a)]}function mme(e){const t=cb(e);return[wE(e),t,wE(t)]}function wE(e){return e.replace(/start|end/g,t=>pme[t])}function vme(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function yme(e,t,n,r){const i=zh(e);let o=vme(_u(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(wE)))),o}function cb(e){return e.replace(/left|right|bottom|top/g,t=>hme[t])}function bme(e){return{top:0,right:0,bottom:0,left:0,...e}}function Nz(e){return typeof e!="number"?bme(e):{top:e,right:e,bottom:e,left:e}}function fb(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function dD(e,t,n){let{reference:r,floating:i}=e;const o=Uh(t),a=gA(t),s=pA(a),u=_u(t),l=o==="y",c=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(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,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(zh(t)){case"start":p[a]-=h*(n&&l?-1:1);break;case"end":p[a]+=h*(n&&l?-1:1);break}return p}const xme=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=dD(l,r,u),h=r,p={},m=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=wu(e,t)||{};if(l==null)return{};const f=Nz(c),h={x:n,y:r},p=gA(i),m=pA(p),v=await a.getDimensions(l),b=p==="y",w=b?"top":"left",x=b?"bottom":"right",S=b?"clientHeight":"clientWidth",O=o.reference[m]+o.reference[p]-h[p]-o.floating[m],E=h[p]-o.reference[p],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let k=C?C[S]:0;(!k||!await(a.isElement==null?void 0:a.isElement(C)))&&(k=s.floating[S]||o.floating[m]);const M=O/2-E/2,N=k/2-v[m]/2-1,q=Dl(f[w],N),Y=Dl(f[x],N),W=q,ne=k-v[m]-Y,Z=k/2-v[m]/2+M,R=xE(W,Z,ne),B=!u.arrow&&zh(i)!=null&&Z!==R&&o.reference[m]/2-(ZW<=0)){var N,q;const W=(((N=o.flip)==null?void 0:N.index)||0)+1,ne=E[W];if(ne)return{data:{index:W,overflows:M},reset:{placement:ne}};let Z=(q=M.filter(R=>R.overflows[0]<=0).sort((R,B)=>R.overflows[1]-B.overflows[1])[0])==null?void 0:q.placement;if(!Z)switch(p){case"bestFit":{var Y;const R=(Y=M.map(B=>[B.placement,B.overflows.filter(U=>U>0).reduce((U,F)=>U+F,0)]).sort((B,U)=>B[1]-U[1])[0])==null?void 0:Y[0];R&&(Z=R);break}case"initialPlacement":Z=s;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function hD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pD(e){return dme.some(t=>e[t]>=0)}const Sme=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=wu(e,t);switch(r){case"referenceHidden":{const o=await yg(t,{...i,elementContext:"reference"}),a=hD(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:pD(a)}}}case"escaped":{const o=await yg(t,{...i,altBoundary:!0}),a=hD(o,n.floating);return{data:{escapedOffsets:a,escaped:pD(a)}}}default:return{}}}}};async function Cme(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=_u(n),s=zh(n),u=Uh(n)==="y",l=["left","top"].includes(a)?-1:1,c=o&&u?-1:1,f=wu(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),u?{x:p*c,y:h*l}:{x:h*l,y:p*c}}const Eme=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,u=await Cme(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:a}}}}},Ome=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:w,y:x}=b;return{x:w,y:x}}},...u}=wu(e,t),l={x:n,y:r},c=await yg(t,u),f=Uh(_u(i)),h=hA(f);let p=l[h],m=l[f];if(o){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",x=p+c[b],S=p-c[w];p=xE(x,p,S)}if(a){const b=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=m+c[b],S=m-c[w];m=xE(x,m,S)}const v=s.fn({...t,[h]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r}}}}},Ame=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=wu(e,t),c={x:n,y:r},f=Uh(i),h=hA(f);let p=c[h],m=c[f];const v=wu(s,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const S=h==="y"?"height":"width",O=o.reference[h]-o.floating[S]+b.mainAxis,E=o.reference[h]+o.reference[S]-b.mainAxis;pE&&(p=E)}if(l){var w,x;const S=h==="y"?"width":"height",O=["top","left"].includes(_u(i)),E=o.reference[f]-o.floating[S]+(O&&((w=a.offset)==null?void 0:w[f])||0)+(O?0:b.crossAxis),C=o.reference[f]+o.reference[S]+(O?0:((x=a.offset)==null?void 0:x[f])||0)-(O?b.crossAxis:0);mC&&(m=C)}return{[h]:p,[f]:m}}}},Pme=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=wu(e,t),u=await yg(t,s),l=_u(n),c=zh(n),f=Uh(n)==="y",{width:h,height:p}=r.floating;let m,v;l==="top"||l==="bottom"?(m=l,v=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=l,m=c==="end"?"top":"bottom");const b=p-u[m],w=h-u[v],x=!t.middlewareData.shift;let S=b,O=w;if(f){const C=h-u.left-u.right;O=c||x?Dl(w,C):C}else{const C=p-u.top-u.bottom;S=c||x?Dl(b,C):C}if(x&&!c){const C=Do(u.left,0),k=Do(u.right,0),M=Do(u.top,0),N=Do(u.bottom,0);f?O=h-2*(C!==0||k!==0?C+k:Do(u.left,u.right)):S=p-2*(M!==0||N!==0?M+N:Do(u.top,u.bottom))}await a({...t,availableWidth:O,availableHeight:S});const E=await i.getDimensions(o.floating);return h!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}};function Il(e){return Lz(e)?(e.nodeName||"").toLowerCase():"#document"}function Bo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Tu(e){var t;return(t=(Lz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lz(e){return e instanceof Node||e instanceof Bo(e).Node}function Su(e){return e instanceof Element||e instanceof Bo(e).Element}function Ms(e){return e instanceof HTMLElement||e instanceof Bo(e).HTMLElement}function gD(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bo(e).ShadowRoot}function km(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=va(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function kme(e){return["table","td","th"].includes(Il(e))}function mA(e){const t=vA(),n=va(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 Tme(e){let t=Jd(e);for(;Ms(t)&&!lw(t);){if(mA(t))return t;t=Jd(t)}return null}function vA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function lw(e){return["html","body","#document"].includes(Il(e))}function va(e){return Bo(e).getComputedStyle(e)}function cw(e){return Su(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Jd(e){if(Il(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gD(e)&&e.host||Tu(e);return gD(t)?t.host:t}function Fz(e){const t=Jd(e);return lw(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ms(t)&&km(t)?t:Fz(t)}function bg(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Fz(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Bo(i);return o?t.concat(a,a.visualViewport||[],km(i)?i:[],a.frameElement&&n?bg(a.frameElement):[]):t.concat(i,bg(i,[],n))}function jz(e){const t=va(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ms(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=lb(n)!==o||lb(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function yA(e){return Su(e)?e:e.contextElement}function Md(e){const t=yA(e);if(!Ms(t))return $l(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=jz(t);let a=(o?lb(n.width):n.width)/r,s=(o?lb(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Mme=$l(0);function Bz(e){const t=Bo(e);return!vA()||!t.visualViewport?Mme:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Rme(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bo(e)?!1:t}function ef(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=yA(e);let a=$l(1);t&&(r?Su(r)&&(a=Md(r)):a=Md(e));const s=Rme(o,n,r)?Bz(o):$l(0);let u=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){const h=Bo(o),p=r&&Su(r)?Bo(r):r;let m=h,v=m.frameElement;for(;v&&r&&p!==m;){const b=Md(v),w=v.getBoundingClientRect(),x=va(v),S=w.left+(v.clientLeft+parseFloat(x.paddingLeft))*b.x,O=w.top+(v.clientTop+parseFloat(x.paddingTop))*b.y;u*=b.x,l*=b.y,c*=b.x,f*=b.y,u+=S,l+=O,m=Bo(v),v=m.frameElement}}return fb({width:c,height:f,x:u,y:l})}const Dme=[":popover-open",":modal"];function zz(e){return Dme.some(t=>{try{return e.matches(t)}catch{return!1}})}function $me(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Tu(r),s=t?zz(t.floating):!1;if(r===a||s&&o)return n;let u={scrollLeft:0,scrollTop:0},l=$l(1);const c=$l(0),f=Ms(r);if((f||!f&&!o)&&((Il(r)!=="body"||km(a))&&(u=cw(r)),Ms(r))){const h=ef(r);l=Md(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function Ime(e){return Array.from(e.getClientRects())}function Uz(e){return ef(Tu(e)).left+cw(e).scrollLeft}function Nme(e){const t=Tu(e),n=cw(e),r=e.ownerDocument.body,i=Do(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Do(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Uz(e);const s=-n.scrollTop;return va(r).direction==="rtl"&&(a+=Do(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function Lme(e,t){const n=Bo(e),r=Tu(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;const l=vA();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s,y:u}}function Fme(e,t){const n=ef(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ms(e)?Md(e):$l(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,u=i*o.x,l=r*o.y;return{width:a,height:s,x:u,y:l}}function mD(e,t,n){let r;if(t==="viewport")r=Lme(e,n);else if(t==="document")r=Nme(Tu(e));else if(Su(t))r=Fme(t,n);else{const i=Bz(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return fb(r)}function Hz(e,t){const n=Jd(e);return n===t||!Su(n)||lw(n)?!1:va(n).position==="fixed"||Hz(n,t)}function jme(e,t){const n=t.get(e);if(n)return n;let r=bg(e,[],!1).filter(s=>Su(s)&&Il(s)!=="body"),i=null;const o=va(e).position==="fixed";let a=o?Jd(e):e;for(;Su(a)&&!lw(a);){const s=va(a),u=mA(a);!u&&s.position==="fixed"&&(i=null),(o?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||km(a)&&!u&&Hz(e,a))?r=r.filter(c=>c!==a):i=s,a=Jd(a)}return t.set(e,r),r}function Bme(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?jme(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((l,c)=>{const f=mD(t,c,i);return l.top=Do(f.top,l.top),l.right=Dl(f.right,l.right),l.bottom=Dl(f.bottom,l.bottom),l.left=Do(f.left,l.left),l},mD(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function zme(e){const{width:t,height:n}=jz(e);return{width:t,height:n}}function Ume(e,t,n){const r=Ms(t),i=Tu(t),o=n==="fixed",a=ef(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const u=$l(0);if(r||!r&&!o)if((Il(t)!=="body"||km(i))&&(s=cw(t)),r){const f=ef(t,!0,o,t);u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}else i&&(u.x=Uz(i));const l=a.left+s.scrollLeft-u.x,c=a.top+s.scrollTop-u.y;return{x:l,y:c,width:a.width,height:a.height}}function vD(e,t){return!Ms(e)||va(e).position==="fixed"?null:t?t(e):e.offsetParent}function Vz(e,t){const n=Bo(e);if(!Ms(e)||zz(e))return n;let r=vD(e,t);for(;r&&kme(r)&&va(r).position==="static";)r=vD(r,t);return r&&(Il(r)==="html"||Il(r)==="body"&&va(r).position==="static"&&!mA(r))?n:r||Tme(e)||n}const Hme=async function(e){const t=this.getOffsetParent||Vz,n=this.getDimensions;return{reference:Ume(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function Vme(e){return va(e).direction==="rtl"}const Wme={convertOffsetParentRelativeRectToViewportRelativeRect:$me,getDocumentElement:Tu,getClippingRect:Bme,getOffsetParent:Vz,getElementRects:Hme,getClientRects:Ime,getDimensions:zme,getScale:Md,isElement:Su,isRTL:Vme};function qme(e,t){let n=null,r;const i=Tu(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),o();const{left:l,top:c,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const p=dy(c),m=dy(i.clientWidth-(l+f)),v=dy(i.clientHeight-(c+h)),b=dy(l),x={rootMargin:-p+"px "+-m+"px "+-v+"px "+-b+"px",threshold:Do(0,Dl(1,u))||1};let S=!0;function O(E){const C=E[0].intersectionRatio;if(C!==u){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(O,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,x)}n.observe(e)}return a(!0),o}function Kme(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=yA(e),c=i||o?[...l?bg(l):[],...bg(t)]:[];c.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const f=l&&s?qme(l,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(w=>{let[x]=w;x&&x.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let m,v=u?ef(e):null;u&&b();function b(){const w=ef(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),f?.(),(w=p)==null||w.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const Gme=Ome,Yme=_me,Zme=Pme,Xme=Sme,yD=wme,Qme=Ame,Jme=(e,t,n)=>{const r=new Map,i={platform:Wme,...n},o={...i.platform,_c:r};return xme(e,t,{...i,platform:o})},eve=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?yD({element:r.current,padding:i}).fn(n):{}:r?yD({element:r,padding:i}).fn(n):{}}}};var r1=typeof document<"u"?y.useLayoutEffect:y.useEffect;function db(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(!db(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 o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!db(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Wz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bD(e,t){const n=Wz(e);return Math.round(t*n)/n}function xD(e){const t=y.useRef(e);return r1(()=>{t.current=e}),t}function tve(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=y.useState(r);db(h,r)||p(r);const[m,v]=y.useState(null),[b,w]=y.useState(null),x=y.useCallback(U=>{U!==C.current&&(C.current=U,v(U))},[]),S=y.useCallback(U=>{U!==k.current&&(k.current=U,w(U))},[]),O=o||m,E=a||b,C=y.useRef(null),k=y.useRef(null),M=y.useRef(c),N=u!=null,q=xD(u),Y=xD(i),W=y.useCallback(()=>{if(!C.current||!k.current)return;const U={placement:t,strategy:n,middleware:h};Y.current&&(U.platform=Y.current),Jme(C.current,k.current,U).then(F=>{const V={...F,isPositioned:!0};ne.current&&!db(M.current,V)&&(M.current=V,Pu.flushSync(()=>{f(V)}))})},[h,t,n,Y]);r1(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[l]);const ne=y.useRef(!1);r1(()=>(ne.current=!0,()=>{ne.current=!1}),[]),r1(()=>{if(O&&(C.current=O),E&&(k.current=E),O&&E){if(q.current)return q.current(O,E,W);W()}},[O,E,W,q,N]);const Z=y.useMemo(()=>({reference:C,floating:k,setReference:x,setFloating:S}),[x,S]),R=y.useMemo(()=>({reference:O,floating:E}),[O,E]),B=y.useMemo(()=>{const U={position:n,left:0,top:0};if(!R.floating)return U;const F=bD(R.floating,c.x),V=bD(R.floating,c.y);return s?{...U,transform:"translate("+F+"px, "+V+"px)",...Wz(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:V}},[n,s,R.floating,c.x,c.y]);return y.useMemo(()=>({...c,update:W,refs:Z,elements:R,floatingStyles:B}),[c,W,Z,R,B])}var nve="Arrow",qz=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return L.jsx(pt.svg,{...o,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"})})});qz.displayName=nve;var rve=qz;function bA(e){const[t,n]=y.useState(void 0);return ii(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const u=o.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var xA="Popper",[Kz,Ul]=vi(xA),[ive,Gz]=Kz(xA),Yz=e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null);return L.jsx(ive,{scope:t,anchor:r,onAnchorChange:i,children:n})};Yz.displayName=xA;var Zz="PopperAnchor",Xz=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Gz(Zz,n),a=y.useRef(null),s=Gt(t,a);return y.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:L.jsx(pt.div,{...i,ref:s})});Xz.displayName=Zz;var wA="PopperContent",[ove,ave]=Kz(wA),Qz=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...v}=e,b=Gz(wA,n),[w,x]=y.useState(null),S=Gt(t,me=>x(me)),[O,E]=y.useState(null),C=bA(O),k=C?.width??0,M=C?.height??0,N=r+(o!=="center"?"-"+o:""),q=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},Y=Array.isArray(l)?l:[l],W=Y.length>0,ne={padding:q,boundary:Y.filter(uve),altBoundary:W},{refs:Z,floatingStyles:R,placement:B,isPositioned:U,middlewareData:F}=tve({strategy:"fixed",placement:N,whileElementsMounted:(...me)=>Kme(...me,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[Eme({mainAxis:i+M,alignmentAxis:a}),u&&Gme({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Qme():void 0,...ne}),u&&Yme({...ne}),Zme({...ne,apply:({elements:me,rects:Ze,availableWidth:Ae,availableHeight:Le})=>{const{width:$e,height:be}=Ze.reference,yt=me.floating.style;yt.setProperty("--radix-popper-available-width",`${Ae}px`),yt.setProperty("--radix-popper-available-height",`${Le}px`),yt.setProperty("--radix-popper-anchor-width",`${$e}px`),yt.setProperty("--radix-popper-anchor-height",`${be}px`)}}),O&&eve({element:O,padding:s}),lve({arrowWidth:k,arrowHeight:M}),h&&Xme({strategy:"referenceHidden",...ne})]}),[V,G]=tU(B),oe=Hr(m);ii(()=>{U&&oe?.()},[U,oe]);const Q=F.arrow?.x,X=F.arrow?.y,ue=F.arrow?.centerOffset!==0,[de,Se]=y.useState();return ii(()=>{w&&Se(window.getComputedStyle(w).zIndex)},[w]),L.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:U?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:L.jsx(ove,{scope:n,placedSide:V,onArrowChange:E,arrowX:Q,arrowY:X,shouldHideArrow:ue,children:L.jsx(pt.div,{"data-side":V,"data-align":G,...v,ref:S,style:{...v.style,animation:U?void 0:"none"}})})})});Qz.displayName=wA;var Jz="PopperArrow",sve={top:"bottom",right:"left",bottom:"top",left:"right"},eU=y.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=ave(Jz,r),a=sve[o.placedSide];return L.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:L.jsx(rve,{...i,ref:n,style:{...i.style,display:"block"}})})});eU.displayName=Jz;function uve(e){return e!==null}var lve=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=tU(n),f={start:"0%",center:"50%",end:"100%"}[c],h=(i.arrow?.x??0)+s/2,p=(i.arrow?.y??0)+u/2;let m="",v="";return l==="bottom"?(m=a?f:`${h}px`,v=`${-u}px`):l==="top"?(m=a?f:`${h}px`,v=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,v=a?f:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,v=a?f:`${p}px`),{data:{x:m,y:v}}}});function tU(e){const[t,n="center"]=e.split("-");return[t,n]}var fw=Yz,Tm=Xz,dw=Qz,hw=eU,MS="rovingFocusGroup.onEntryFocus",cve={bubbles:!1,cancelable:!0},pw="RovingFocusGroup",[_E,nU,fve]=dA(pw),[dve,gw]=vi(pw,[fve]),[hve,pve]=dve(pw),rU=y.forwardRef((e,t)=>L.jsx(_E.Provider,{scope:e.__scopeRovingFocusGroup,children:L.jsx(_E.Slot,{scope:e.__scopeRovingFocusGroup,children:L.jsx(gve,{...e,ref:t})})}));rU.displayName=pw;var gve=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...f}=e,h=y.useRef(null),p=Gt(t,h),m=Pm(o),[v=null,b]=Za({prop:a,defaultProp:s,onChange:u}),[w,x]=y.useState(!1),S=Hr(l),O=nU(n),E=y.useRef(!1),[C,k]=y.useState(0);return y.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(MS,S),()=>M.removeEventListener(MS,S)},[S]),L.jsx(hve,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:v,onItemFocus:y.useCallback(M=>b(M),[b]),onItemShiftTab:y.useCallback(()=>x(!0),[]),onFocusableItemAdd:y.useCallback(()=>k(M=>M+1),[]),onFocusableItemRemove:y.useCallback(()=>k(M=>M-1),[]),children:L.jsx(pt.div,{tabIndex:w||C===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Ye(e.onMouseDown,()=>{E.current=!0}),onFocus:Ye(e.onFocus,M=>{const N=!E.current;if(M.target===M.currentTarget&&N&&!w){const q=new CustomEvent(MS,cve);if(M.currentTarget.dispatchEvent(q),!q.defaultPrevented){const Y=O().filter(B=>B.focusable),W=Y.find(B=>B.active),ne=Y.find(B=>B.id===v),R=[W,ne,...Y].filter(Boolean).map(B=>B.ref.current);aU(R,c)}}E.current=!1}),onBlur:Ye(e.onBlur,()=>x(!1))})})}),iU="RovingFocusGroupItem",oU=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,s=jo(),u=o||s,l=pve(iU,n),c=l.currentTabStopId===u,f=nU(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=l;return y.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),L.jsx(_E.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:L.jsx(pt.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Ye(e.onMouseDown,m=>{r?l.onItemFocus(u):m.preventDefault()}),onFocus:Ye(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Ye(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=yve(m,l.orientation,l.dir);if(v!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let w=f().filter(x=>x.focusable).map(x=>x.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const x=w.indexOf(m.currentTarget);w=l.loop?bve(w,x+1):w.slice(x+1)}setTimeout(()=>aU(w))}})})})});oU.displayName=iU;var mve={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vve(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yve(e,t,n){const r=vve(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return mve[r]}function aU(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function bve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var sU=rU,uU=oU,SE=["Enter"," "],xve=["ArrowDown","PageUp","Home"],lU=["ArrowUp","PageDown","End"],wve=[...xve,...lU],_ve={ltr:[...SE,"ArrowRight"],rtl:[...SE,"ArrowLeft"]},Sve={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Mm="Menu",[xg,Cve,Eve]=dA(Mm),[gf,cU]=vi(Mm,[Eve,Ul,gw]),mw=Ul(),fU=gw(),[Ove,mf]=gf(Mm),[Ave,Rm]=gf(Mm),dU=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=mw(t),[u,l]=y.useState(null),c=y.useRef(!1),f=Hr(o),h=Pm(i);return y.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),L.jsx(fw,{...s,children:L.jsx(Ove,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:l,children:L.jsx(Ave,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})};dU.displayName=Mm;var Pve="MenuAnchor",_A=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=mw(n);return L.jsx(Tm,{...i,...r,ref:t})});_A.displayName=Pve;var SA="MenuPortal",[kve,hU]=gf(SA,{forceMount:void 0}),pU=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=mf(SA,t);return L.jsx(kve,{scope:t,forceMount:n,children:L.jsx(Gr,{present:n||o.open,children:L.jsx(Bh,{asChild:!0,container:i,children:r})})})};pU.displayName=SA;var ha="MenuContent",[Tve,CA]=gf(ha),gU=y.forwardRef((e,t)=>{const n=hU(ha,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=mf(ha,e.__scopeMenu),a=Rm(ha,e.__scopeMenu);return L.jsx(xg.Provider,{scope:e.__scopeMenu,children:L.jsx(Gr,{present:r||o.open,children:L.jsx(xg.Slot,{scope:e.__scopeMenu,children:a.modal?L.jsx(Mve,{...i,ref:t}):L.jsx(Rve,{...i,ref:t})})})})}),Mve=y.forwardRef((e,t)=>{const n=mf(ha,e.__scopeMenu),r=y.useRef(null),i=Gt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return Am(o)},[]),L.jsx(EA,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Rve=y.forwardRef((e,t)=>{const n=mf(ha,e.__scopeMenu);return L.jsx(EA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),EA=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:m,...v}=e,b=mf(ha,n),w=Rm(ha,n),x=mw(n),S=fU(n),O=Cve(n),[E,C]=y.useState(null),k=y.useRef(null),M=Gt(t,k,b.onContentChange),N=y.useRef(0),q=y.useRef(""),Y=y.useRef(0),W=y.useRef(null),ne=y.useRef("right"),Z=y.useRef(0),R=m?Om:y.Fragment,B=m?{as:Pl,allowPinchZoom:!0}:void 0,U=V=>{const G=q.current+V,oe=O().filter(me=>!me.disabled),Q=document.activeElement,X=oe.find(me=>me.ref.current===Q)?.textValue,ue=oe.map(me=>me.textValue),de=Vve(ue,G,X),Se=oe.find(me=>me.textValue===de)?.ref.current;(function me(Ze){q.current=Ze,window.clearTimeout(N.current),Ze!==""&&(N.current=window.setTimeout(()=>me(""),1e3))})(G),Se&&setTimeout(()=>Se.focus())};y.useEffect(()=>()=>window.clearTimeout(N.current),[]),sw();const F=y.useCallback(V=>ne.current===W.current?.side&&qve(V,W.current?.area),[]);return L.jsx(Tve,{scope:n,searchRef:q,onItemEnter:y.useCallback(V=>{F(V)&&V.preventDefault()},[F]),onItemLeave:y.useCallback(V=>{F(V)||(k.current?.focus(),C(null))},[F]),onTriggerLeave:y.useCallback(V=>{F(V)&&V.preventDefault()},[F]),pointerGraceTimerRef:Y,onPointerGraceIntentChange:y.useCallback(V=>{W.current=V},[]),children:L.jsx(R,{...B,children:L.jsx(Em,{asChild:!0,trapped:i,onMountAutoFocus:Ye(o,V=>{V.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:L.jsx(jh,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,onDismiss:p,children:L.jsx(sU,{asChild:!0,...S,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:Ye(u,V=>{w.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:L.jsx(dw,{role:"menu","aria-orientation":"vertical","data-state":MU(b.open),"data-radix-menu-content":"",dir:w.dir,...x,...v,ref:M,style:{outline:"none",...v.style},onKeyDown:Ye(v.onKeyDown,V=>{const oe=V.target.closest("[data-radix-menu-content]")===V.currentTarget,Q=V.ctrlKey||V.altKey||V.metaKey,X=V.key.length===1;oe&&(V.key==="Tab"&&V.preventDefault(),!Q&&X&&U(V.key));const ue=k.current;if(V.target!==ue||!wve.includes(V.key))return;V.preventDefault();const Se=O().filter(me=>!me.disabled).map(me=>me.ref.current);lU.includes(V.key)&&Se.reverse(),Uve(Se)}),onBlur:Ye(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(N.current),q.current="")}),onPointerMove:Ye(e.onPointerMove,wg(V=>{const G=V.target,oe=Z.current!==V.clientX;if(V.currentTarget.contains(G)&&oe){const Q=V.clientX>Z.current?"right":"left";ne.current=Q,Z.current=V.clientX}}))})})})})})})});gU.displayName=ha;var Dve="MenuGroup",OA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return L.jsx(pt.div,{role:"group",...r,ref:t})});OA.displayName=Dve;var $ve="MenuLabel",mU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return L.jsx(pt.div,{...r,ref:t})});mU.displayName=$ve;var hb="MenuItem",wD="menu.itemSelect",vw=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=y.useRef(null),a=Rm(hb,e.__scopeMenu),s=CA(hb,e.__scopeMenu),u=Gt(t,o),l=y.useRef(!1),c=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(wD,{bubbles:!0,cancelable:!0});f.addEventListener(wD,p=>r?.(p),{once:!0}),JB(f,h),h.defaultPrevented?l.current=!1:a.onClose()}};return L.jsx(vU,{...i,ref:u,disabled:n,onClick:Ye(e.onClick,c),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:Ye(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:Ye(e.onKeyDown,f=>{const h=s.searchRef.current!=="";n||h&&f.key===" "||SE.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});vw.displayName=hb;var vU=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=CA(hb,n),s=fU(n),u=y.useRef(null),l=Gt(t,u),[c,f]=y.useState(!1),[h,p]=y.useState("");return y.useEffect(()=>{const m=u.current;m&&p((m.textContent??"").trim())},[o.children]),L.jsx(xg.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:L.jsx(uU,{asChild:!0,...s,focusable:!r,children:L.jsx(pt.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:Ye(e.onPointerMove,wg(m=>{r?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ye(e.onPointerLeave,wg(m=>a.onItemLeave(m))),onFocus:Ye(e.onFocus,()=>f(!0)),onBlur:Ye(e.onBlur,()=>f(!1))})})})}),Ive="MenuCheckboxItem",yU=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return L.jsx(SU,{scope:e.__scopeMenu,checked:n,children:L.jsx(vw,{role:"menuitemcheckbox","aria-checked":pb(n)?"mixed":n,...i,ref:t,"data-state":PA(n),onSelect:Ye(i.onSelect,()=>r?.(pb(n)?!0:!n),{checkForDefaultPrevented:!1})})})});yU.displayName=Ive;var bU="MenuRadioGroup",[Nve,Lve]=gf(bU,{value:void 0,onValueChange:()=>{}}),xU=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Hr(r);return L.jsx(Nve,{scope:e.__scopeMenu,value:n,onValueChange:o,children:L.jsx(OA,{...i,ref:t})})});xU.displayName=bU;var wU="MenuRadioItem",_U=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=Lve(wU,e.__scopeMenu),o=n===i.value;return L.jsx(SU,{scope:e.__scopeMenu,checked:o,children:L.jsx(vw,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":PA(o),onSelect:Ye(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});_U.displayName=wU;var AA="MenuItemIndicator",[SU,Fve]=gf(AA,{checked:!1}),CU=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=Fve(AA,n);return L.jsx(Gr,{present:r||pb(o.checked)||o.checked===!0,children:L.jsx(pt.span,{...i,ref:t,"data-state":PA(o.checked)})})});CU.displayName=AA;var jve="MenuSeparator",EU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return L.jsx(pt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});EU.displayName=jve;var Bve="MenuArrow",OU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=mw(n);return L.jsx(hw,{...i,...r,ref:t})});OU.displayName=Bve;var zve="MenuSub",[GZe,AU]=gf(zve),c0="MenuSubTrigger",PU=y.forwardRef((e,t)=>{const n=mf(c0,e.__scopeMenu),r=Rm(c0,e.__scopeMenu),i=AU(c0,e.__scopeMenu),o=CA(c0,e.__scopeMenu),a=y.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=o,l={__scopeMenu:e.__scopeMenu},c=y.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return y.useEffect(()=>c,[c]),y.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),u(null)}},[s,u]),L.jsx(_A,{asChild:!0,...l,children:L.jsx(vU,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":MU(n.open),...e,ref:Kx(t,i.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ye(e.onPointerMove,wg(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Ye(e.onPointerLeave,wg(f=>{c();const h=n.content?.getBoundingClientRect();if(h){const p=n.content?.dataset.side,m=p==="right",v=m?-5:5,b=h[m?"left":"right"],w=h[m?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:b,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:b,y:h.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ye(e.onKeyDown,f=>{const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||_ve[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});PU.displayName=c0;var kU="MenuSubContent",TU=y.forwardRef((e,t)=>{const n=hU(ha,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=mf(ha,e.__scopeMenu),a=Rm(ha,e.__scopeMenu),s=AU(kU,e.__scopeMenu),u=y.useRef(null),l=Gt(t,u);return L.jsx(xg.Provider,{scope:e.__scopeMenu,children:L.jsx(Gr,{present:r||o.open,children:L.jsx(xg.Slot,{scope:e.__scopeMenu,children:L.jsx(EA,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{a.isUsingKeyboardRef.current&&u.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Ye(e.onFocusOutside,c=>{c.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ye(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Ye(e.onKeyDown,c=>{const f=c.currentTarget.contains(c.target),h=Sve[a.dir].includes(c.key);f&&h&&(o.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});TU.displayName=kU;function MU(e){return e?"open":"closed"}function pb(e){return e==="indeterminate"}function PA(e){return pb(e)?"indeterminate":e?"checked":"unchecked"}function Uve(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Hve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Vve(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Hve(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function Wve(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function qve(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Wve(n,t)}function wg(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Kve=dU,Gve=_A,Yve=pU,Zve=gU,Xve=OA,Qve=mU,Jve=vw,eye=yU,tye=xU,nye=_U,rye=CU,iye=EU,oye=OU,aye=PU,sye=TU,kA="DropdownMenu",[uye,YZe]=vi(kA,[cU]),Zi=cU(),[lye,RU]=uye(kA),DU=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,u=Zi(t),l=y.useRef(null),[c=!1,f]=Za({prop:i,defaultProp:o,onChange:a});return L.jsx(lye,{scope:t,triggerId:jo(),triggerRef:l,contentId:jo(),open:c,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(h=>!h),[f]),modal:s,children:L.jsx(Kve,{...u,open:c,onOpenChange:f,dir:r,modal:s,children:n})})};DU.displayName=kA;var $U="DropdownMenuTrigger",IU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=RU($U,n),a=Zi(n);return L.jsx(Gve,{asChild:!0,...a,children:L.jsx(pt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Kx(t,o.triggerRef),onPointerDown:Ye(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:Ye(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});IU.displayName=$U;var cye="DropdownMenuPortal",NU=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Zi(t);return L.jsx(Yve,{...r,...n})};NU.displayName=cye;var LU="DropdownMenuContent",FU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=RU(LU,n),o=Zi(n),a=y.useRef(!1);return L.jsx(Zve,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Ye(e.onCloseAutoFocus,s=>{a.current||i.triggerRef.current?.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:Ye(e.onInteractOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,c=u.button===2||l;(!i.modal||c)&&(a.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)"}})});FU.displayName=LU;var fye="DropdownMenuGroup",jU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return L.jsx(Xve,{...i,...r,ref:t})});jU.displayName=fye;var dye="DropdownMenuLabel",BU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return L.jsx(Qve,{...i,...r,ref:t})});BU.displayName=dye;var hye="DropdownMenuItem",zU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return L.jsx(Jve,{...i,...r,ref:t})});zU.displayName=hye;var pye="DropdownMenuCheckboxItem",UU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return L.jsx(eye,{...i,...r,ref:t})});UU.displayName=pye;var gye="DropdownMenuRadioGroup",mye=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return L.jsx(tye,{...i,...r,ref:t})});mye.displayName=gye;var vye="DropdownMenuRadioItem",HU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return L.jsx(nye,{...i,...r,ref:t})});HU.displayName=vye;var yye="DropdownMenuItemIndicator",VU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return L.jsx(rye,{...i,...r,ref:t})});VU.displayName=yye;var bye="DropdownMenuSeparator",WU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return L.jsx(iye,{...i,...r,ref:t})});WU.displayName=bye;var xye="DropdownMenuArrow",wye=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return L.jsx(oye,{...i,...r,ref:t})});wye.displayName=xye;var _ye="DropdownMenuSubTrigger",qU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return L.jsx(aye,{...i,...r,ref:t})});qU.displayName=_ye;var Sye="DropdownMenuSubContent",KU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return L.jsx(sye,{...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)"}})});KU.displayName=Sye;var ZZe=DU,XZe=IU,QZe=NU,JZe=FU,eXe=jU,tXe=BU,nXe=zU,rXe=UU,iXe=HU,oXe=VU,aXe=WU,sXe=qU,uXe=KU,Cye="VisuallyHidden",TA=y.forwardRef((e,t)=>L.jsx(pt.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}}));TA.displayName=Cye;var Eye=TA,[yw,lXe]=vi("Tooltip",[Ul]),bw=Ul(),GU="TooltipProvider",Oye=700,CE="tooltip.open",[Aye,MA]=yw(GU),YU=e=>{const{__scopeTooltip:t,delayDuration:n=Oye,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,s]=y.useState(!0),u=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),L.jsx(Aye,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),s(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:y.useCallback(c=>{u.current=c},[]),disableHoverableContent:i,children:o})};YU.displayName=GU;var xw="Tooltip",[Pye,Dm]=yw(xw),ZU=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,u=MA(xw,e.__scopeTooltip),l=bw(t),[c,f]=y.useState(null),h=jo(),p=y.useRef(0),m=a??u.disableHoverableContent,v=s??u.delayDuration,b=y.useRef(!1),[w=!1,x]=Za({prop:r,defaultProp:i,onChange:k=>{k?(u.onOpen(),document.dispatchEvent(new CustomEvent(CE))):u.onClose(),o?.(k)}}),S=y.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),O=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,x(!0)},[x]),E=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),C=y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,x(!0),p.current=0},v)},[v,x]);return y.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),L.jsx(fw,{...l,children:L.jsx(Pye,{scope:t,contentId:h,open:w,stateAttribute:S,trigger:c,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{u.isOpenDelayed?C():O()},[u.isOpenDelayed,C,O]),onTriggerLeave:y.useCallback(()=>{m?E():(window.clearTimeout(p.current),p.current=0)},[E,m]),onOpen:O,onClose:E,disableHoverableContent:m,children:n})})};ZU.displayName=xw;var EE="TooltipTrigger",XU=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Dm(EE,n),o=MA(EE,n),a=bw(n),s=y.useRef(null),u=Gt(t,s,i.onTriggerChange),l=y.useRef(!1),c=y.useRef(!1),f=y.useCallback(()=>l.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),L.jsx(Tm,{asChild:!0,...a,children:L.jsx(pt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Ye(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ye(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Ye(e.onBlur,i.onClose),onClick:Ye(e.onClick,i.onClose)})})});XU.displayName=EE;var RA="TooltipPortal",[kye,Tye]=yw(RA,{forceMount:void 0}),QU=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Dm(RA,t);return L.jsx(kye,{scope:t,forceMount:n,children:L.jsx(Gr,{present:n||o.open,children:L.jsx(Bh,{asChild:!0,container:i,children:r})})})};QU.displayName=RA;var eh="TooltipContent",JU=y.forwardRef((e,t)=>{const n=Tye(eh,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=Dm(eh,e.__scopeTooltip);return L.jsx(Gr,{present:r||a.open,children:a.disableHoverableContent?L.jsx(eH,{side:i,...o,ref:t}):L.jsx(Mye,{side:i,...o,ref:t})})}),Mye=y.forwardRef((e,t)=>{const n=Dm(eh,e.__scopeTooltip),r=MA(eh,e.__scopeTooltip),i=y.useRef(null),o=Gt(t,i),[a,s]=y.useState(null),{trigger:u,onClose:l}=n,c=i.current,{onPointerInTransitChange:f}=r,h=y.useCallback(()=>{s(null),f(!1)},[f]),p=y.useCallback((m,v)=>{const b=m.currentTarget,w={x:m.clientX,y:m.clientY},x=Iye(w,b.getBoundingClientRect()),S=Nye(w,x),O=Lye(v.getBoundingClientRect()),E=jye([...S,...O]);s(E),f(!0)},[f]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(u&&c){const m=b=>p(b,c),v=b=>p(b,u);return u.addEventListener("pointerleave",m),c.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",v)}}},[u,c,p,h]),y.useEffect(()=>{if(a){const m=v=>{const b=v.target,w={x:v.clientX,y:v.clientY},x=u?.contains(b)||c?.contains(b),S=!Fye(w,a);x?h():S&&(h(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[u,c,a,l,h]),L.jsx(eH,{...e,ref:o})}),[Rye,Dye]=yw(xw,{isInside:!1}),eH=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,u=Dm(eh,n),l=bw(n),{onClose:c}=u;return y.useEffect(()=>(document.addEventListener(CE,c),()=>document.removeEventListener(CE,c)),[c]),y.useEffect(()=>{if(u.trigger){const f=h=>{h.target?.contains(u.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,c]),L.jsx(jh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:L.jsxs(dw,{"data-state":u.stateAttribute,...l,...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(NO,{children:r}),L.jsx(Rye,{scope:n,isInside:!0,children:L.jsx(Eye,{id:u.contentId,role:"tooltip",children:i||r})})]})})});JU.displayName=eh;var tH="TooltipArrow",$ye=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=bw(n);return Dye(tH,n).isInside?null:L.jsx(hw,{...i,...r,ref:t})});$ye.displayName=tH;function Iye(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Nye(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 Lye(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 Fye(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function jye(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),Bye(t)}function Bye(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.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 o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.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 cXe=YU,fXe=ZU,dXe=XU,hXe=QU,pXe=JU,_D=1,zye=.9,Uye=.8,Hye=.17,RS=.1,DS=.999,Vye=.9999,Wye=.99,qye=/[\\\/_+.#"@\[\(\{&]/,Kye=/[\\\/_+.#"@\[\(\{&]/g,Gye=/[\s-]/,nH=/[\s-]/g;function OE(e,t,n,r,i,o,a){if(o===t.length)return i===e.length?_D:Wye;var s=`${i},${o}`;if(a[s]!==void 0)return a[s];for(var u=r.charAt(o),l=n.indexOf(u,i),c=0,f,h,p,m;l>=0;)f=OE(e,t,n,r,l+1,o+1,a),f>c&&(l===i?f*=_D:qye.test(e.charAt(l-1))?(f*=Uye,p=e.slice(i,l-1).match(Kye),p&&i>0&&(f*=Math.pow(DS,p.length))):Gye.test(e.charAt(l-1))?(f*=zye,m=e.slice(i,l-1).match(nH),m&&i>0&&(f*=Math.pow(DS,m.length))):(f*=Hye,i>0&&(f*=Math.pow(DS,l-i))),e.charAt(l)!==t.charAt(o)&&(f*=Vye)),(ff&&(f=h*RS)),f>c&&(c=f),l=n.indexOf(u,l+1);return a[s]=c,c}function SD(e){return e.toLowerCase().replace(nH," ")}function Yye(e,t){return OE(e,t,SD(e),SD(t),0,0,{})}function qi(){return qi=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>Zye(n,t))}function $m(...e){return y.useCallback(rH(...e),e)}function Xye(e,t=[]){let n=[];function r(o,a){const s=y.createContext(a),u=n.length;n=[...n,a];function l(f){const{scope:h,children:p,...m}=f,v=h?.[e][u]||s,b=y.useMemo(()=>m,Object.values(m));return y.createElement(v.Provider,{value:b},p)}function c(f,h){const p=h?.[e][u]||s,m=y.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(s){const u=s?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,Qye(i,...t)]}function Qye(...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(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const Jye=globalThis?.document?y.useLayoutEffect:()=>{},e1e=F4.useId||(()=>{});let t1e=0;function $S(e){const[t,n]=y.useState(e1e());return Jye(()=>{e||n(r=>r??String(t1e++))},[e]),e||(t?`radix-${t}`:"")}function iH(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function n1e({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=r1e({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=iH(n),u=y.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function r1e({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=iH(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const DA=y.forwardRef((e,t)=>{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(o1e);if(o){const a=o.props.children,s=i.map(u=>u===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:u);return y.createElement(AE,qi({},r,{ref:t}),y.isValidElement(a)?y.cloneElement(a,void 0,s):null)}return y.createElement(AE,qi({},r,{ref:t}),n)});DA.displayName="Slot";const AE=y.forwardRef((e,t)=>{const{children:n,...r}=e;return y.isValidElement(n)?y.cloneElement(n,{...a1e(r,n.props),ref:rH(t,n.ref)}):y.Children.count(n)>1?y.Children.only(null):null});AE.displayName="SlotClone";const i1e=({children:e})=>y.createElement(y.Fragment,null,e);function o1e(e){return y.isValidElement(e)&&e.type===i1e}function a1e(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?n[r]=(...s)=>{o?.(...s),i?.(...s)}:r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const s1e=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],ww=s1e.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?DA:t;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(s,qi({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function u1e(e,t){e&&Pu.flushSync(()=>e.dispatchEvent(t))}function $A(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function l1e(e){const t=$A(e);y.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const PE="dismissableLayer.update",c1e="dismissableLayer.pointerDownOutside",f1e="dismissableLayer.focusOutside";let CD;const d1e=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),h1e=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=y.useContext(d1e),[c,f]=y.useState(null),[,h]=y.useState({}),p=$m(t,C=>f(C)),m=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),w=c?m.indexOf(c):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,O=p1e(C=>{const k=C.target,M=[...l.branches].some(N=>N.contains(k));!S||M||(i?.(C),a?.(C),C.defaultPrevented||s?.())}),E=g1e(C=>{const k=C.target;[...l.branches].some(N=>N.contains(k))||(o?.(C),a?.(C),C.defaultPrevented||s?.())});return l1e(C=>{w===l.layers.size-1&&(r?.(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))}),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(CD=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),ED(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=CD)}},[c,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),ED())},[c,l]),y.useEffect(()=>{const C=()=>h({});return document.addEventListener(PE,C),()=>document.removeEventListener(PE,C)},[]),y.createElement(ww.div,qi({},u,{ref:p,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Rd(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Rd(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Rd(e.onPointerDownCapture,O.onPointerDownCapture)}))});function p1e(e){const t=$A(e),n=y.useRef(!1),r=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let u=function(){oH(c1e,t,s,{discrete:!0})};const s={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=u,document.addEventListener("click",r.current,{once:!0})):u()}n.current=!1},o=window.setTimeout(()=>{document.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),document.removeEventListener("pointerdown",i),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function g1e(e){const t=$A(e),n=y.useRef(!1);return y.useEffect(()=>{const r=i=>{i.target&&!n.current&&oH(f1e,t,{originalEvent:i},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ED(){const e=new CustomEvent(PE);document.dispatchEvent(e)}function oH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?u1e(i,o):i.dispatchEvent(o)}function OD(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const IS="focusScope.autoFocusOnMount",NS="focusScope.autoFocusOnUnmount",AD={bubbles:!1,cancelable:!0},m1e=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=y.useState(null),l=OD(i),c=OD(o),f=y.useRef(null),h=$m(t,v=>u(v)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let v=function(w){if(p.paused||!s)return;const x=w.target;s.contains(x)?f.current=x:fc(f.current,{select:!0})},b=function(w){p.paused||!s||s.contains(w.relatedTarget)||fc(f.current,{select:!0})};return document.addEventListener("focusin",v),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b)}}},[r,s,p.paused]),y.useEffect(()=>{if(s){kD.add(p);const v=document.activeElement;if(!s.contains(v)){const w=new CustomEvent(IS,AD);s.addEventListener(IS,l),s.dispatchEvent(w),w.defaultPrevented||(v1e(_1e(aH(s)),{select:!0}),document.activeElement===v&&fc(s))}return()=>{s.removeEventListener(IS,l),setTimeout(()=>{const w=new CustomEvent(NS,AD);s.addEventListener(NS,c),s.dispatchEvent(w),w.defaultPrevented||fc(v??document.body,{select:!0}),s.removeEventListener(NS,c),kD.remove(p)},0)}}},[s,l,c,p]);const m=y.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const x=v.currentTarget,[S,O]=y1e(x);S&&O?!v.shiftKey&&w===O?(v.preventDefault(),n&&fc(S,{select:!0})):v.shiftKey&&w===S&&(v.preventDefault(),n&&fc(O,{select:!0})):w===x&&v.preventDefault()}},[n,r,p.paused]);return y.createElement(ww.div,qi({tabIndex:-1},a,{ref:h,onKeyDown:m}))});function v1e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(fc(r,{select:t}),document.activeElement!==n)return}function y1e(e){const t=aH(e),n=PD(t,e),r=PD(t.reverse(),e);return[n,r]}function aH(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 PD(e,t){for(const n of e)if(!b1e(n,{upTo:t}))return n}function b1e(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 x1e(e){return e instanceof HTMLInputElement&&"select"in e}function fc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&x1e(e)&&t&&e.select()}}const kD=w1e();function w1e(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=TD(e,t),e.unshift(t)},remove(t){var n;e=TD(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function TD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _1e(e){return e.filter(t=>t.tagName!=="A")}const S1e=y.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?Vx.createPortal(y.createElement(ww.div,qi({},i,{ref:t})),r):null}),MD=globalThis?.document?y.useLayoutEffect:()=>{};function C1e(e,t){return y.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const _w=e=>{const{present:t,children:n}=e,r=E1e(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=$m(r.ref,i.ref);return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};_w.displayName="Presence";function E1e(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[s,u]=C1e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=hy(r.current);o.current=s==="mounted"?l:"none"},[s]),MD(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,p=hy(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),MD(()=>{if(t){const l=f=>{const p=hy(r.current).includes(f.animationName);f.target===t&&p&&Pu.flushSync(()=>u("ANIMATION_END"))},c=f=>{f.target===t&&(o.current=hy(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function hy(e){return e?.animationName||"none"}let LS=0;function O1e(){y.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:RD()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:RD()),LS++,()=>{LS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),LS--}},[])}function RD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var i1="right-scroll-bar-position",o1="width-before-scroll-bar",A1e="with-scroll-bars-hidden",P1e="--removed-body-scroll-bar-size";function FS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function k1e(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var T1e=typeof window<"u"?y.useLayoutEffect:y.useEffect,DD=new WeakMap;function M1e(e,t){var n=k1e(null,function(r){return e.forEach(function(i){return FS(i,r)})});return T1e(function(){var r=DD.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||FS(s,null)}),o.forEach(function(s){i.has(s)||FS(s,a)})}DD.set(n,e)},[e]),n}var sH=sz(),jS=function(){},Sw=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:jS,onWheelCapture:jS,onTouchMoveCapture:jS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=nA(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,O=M1e([n,t]),E=Ri(Ri({},x),i);return y.createElement(y.Fragment,null,c&&y.createElement(S,{sideCar:sH,removeScrollBar:l,shards:f,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),a?y.cloneElement(y.Children.only(s),Ri(Ri({},E),{ref:O})):y.createElement(w,Ri({},E,{className:u,ref:O}),s))});Sw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Sw.classNames={fullWidth:o1,zeroRight:i1};var R1e={left:0,top:0,right:0,gap:0},BS=function(e){return parseInt(e||"",10)||0},D1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[BS(n),BS(r),BS(i)]},$1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return R1e;var t=D1e(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])}},I1e=rA(),Dd="data-scroll-locked",N1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(A1e,` { +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},J0e="DialogDescriptionWarning",ege=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gz(J0e).contentName}}.`;return y.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},tge=tz,nge=rz,rge=oz,ige=az,oge=sz,age=lz,sge=fz,mz=hz;function Yr(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var uge=["color"],KYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,uge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),lge=["color"],qYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,lge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),cge=["color"],GYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,cge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),fge=["color"],YYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,fge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),dge=["color"],ZYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,dge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),hge=["color"],XYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,hge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),pge=["color"],QYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,pge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49991C0.877075 3.84222 3.84222 0.877075 7.49991 0.877075C11.1576 0.877075 14.1227 3.84222 14.1227 7.49991C14.1227 11.1576 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1576 0.877075 7.49991ZM7.49991 1.82708C4.36689 1.82708 1.82708 4.36689 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49991C13.1727 4.36689 10.6329 1.82708 7.49991 1.82708Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),gge=["color"],JYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,gge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),mge=["color"],eZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,mge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),vge=["color"],tZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,vge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),yge=["color"],nZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,yge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bge=["color"],rZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,bge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),xge=["color"],iZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,xge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),wge=["color"],oZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,wge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),_ge=["color"],aZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,_ge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Sge=["color"],sZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Sge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Cge=["color"],uZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Cge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ege=["color"],lZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Ege);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Oge=["color"],cZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Oge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L11.858 2.25806C12.1021 2.01398 12.4978 2.01398 12.7419 2.25806C12.986 2.50214 12.986 2.89786 12.7419 3.14194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13362 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.99998 4.5C7.99998 4.22386 7.77612 4 7.49998 4C7.22383 4 6.99998 4.22386 6.99998 4.5V9.5C6.99998 9.77614 7.22383 10 7.49998 10C7.77612 10 7.99998 9.77614 7.99998 9.5V4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),QO="Collapsible",[Age,fZe]=vi(QO),[Pge,JO]=Age(QO),vz=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[u=!1,l]=Za({prop:r,defaultProp:i,onChange:a});return I.jsx(Pge,{scope:n,disabled:o,contentId:Fo(),open:u,onOpenToggle:y.useCallback(()=>l(c=>!c),[l]),children:I.jsx(pt.div,{"data-state":tA(u),"data-disabled":o?"":void 0,...s,ref:t})})});vz.displayName=QO;var yz="CollapsibleTrigger",kge=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=JO(yz,n);return I.jsx(pt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":tA(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ye(e.onClick,i.onOpenToggle)})});kge.displayName=yz;var eA="CollapsibleContent",Tge=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=JO(eA,e.__scopeCollapsible);return I.jsx(Gr,{present:n||i.open,children:({present:o})=>I.jsx(Mge,{...r,ref:t,present:o})})});Tge.displayName=eA;var Mge=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=JO(eA,n),[s,u]=y.useState(r),l=y.useRef(null),c=Gt(t,l),f=y.useRef(0),h=f.current,p=y.useRef(0),m=p.current,v=a.open||s,b=y.useRef(v),w=y.useRef(void 0);return y.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),ii(()=>{const x=l.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const S=x.getBoundingClientRect();f.current=S.height,p.current=S.width,b.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),u(r)}},[a.open,r]),I.jsx(pt.div,{"data-state":tA(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...o,ref:c,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:v&&i})});function tA(e){return e?"open":"closed"}var dZe=vz;function nA(e){const t=e+"CollectionProvider",[n,r]=vi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:m,children:v}=p,b=F.useRef(null),w=F.useRef(new Map).current;return I.jsx(i,{scope:m,itemMap:w,collectionRef:b,children:v})};a.displayName=t;const s=e+"CollectionSlot",u=F.forwardRef((p,m)=>{const{scope:v,children:b}=p,w=o(s,v),x=Gt(m,w.collectionRef);return I.jsx(Al,{ref:x,children:b})});u.displayName=s;const l=e+"CollectionItemSlot",c="data-radix-collection-item",f=F.forwardRef((p,m)=>{const{scope:v,children:b,...w}=p,x=F.useRef(null),S=Gt(m,x),O=o(l,v);return F.useEffect(()=>(O.itemMap.set(x,{ref:x,...w}),()=>void O.itemMap.delete(x))),I.jsx(Al,{[c]:"",ref:S,children:b})});f.displayName=l;function h(p){const m=o(e+"CollectionConsumer",p);return F.useCallback(()=>{const b=m.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((O,E)=>w.indexOf(O.ref.current)-w.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:u,ItemSlot:f},h,r]}var Rge=y.createContext(void 0);function Cm(e){const t=y.useContext(Rge);return e||t||"ltr"}const Dge=["top","right","bottom","left"],Rl=Math.min,Ro=Math.max,ib=Math.round,uy=Math.floor,Dl=e=>({x:e,y:e}),$ge={left:"right",right:"left",bottom:"top",top:"bottom"},Ige={start:"end",end:"start"};function dE(e,t,n){return Ro(e,Rl(t,n))}function xu(e,t){return typeof e=="function"?e(t):e}function wu(e){return e.split("-")[0]}function Fh(e){return e.split("-")[1]}function rA(e){return e==="x"?"y":"x"}function iA(e){return e==="y"?"height":"width"}function jh(e){return["top","bottom"].includes(wu(e))?"y":"x"}function oA(e){return rA(jh(e))}function Nge(e,t,n){n===void 0&&(n=!1);const r=Fh(e),i=oA(e),o=iA(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ob(a)),[a,ob(a)]}function Lge(e){const t=ob(e);return[hE(e),t,hE(t)]}function hE(e){return e.replace(/start|end/g,t=>Ige[t])}function Fge(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function jge(e,t,n,r){const i=Fh(e);let o=Fge(wu(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(hE)))),o}function ob(e){return e.replace(/left|right|bottom|top/g,t=>$ge[t])}function Bge(e){return{top:0,right:0,bottom:0,left:0,...e}}function bz(e){return typeof e!="number"?Bge(e):{top:e,right:e,bottom:e,left:e}}function ab(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function XR(e,t,n){let{reference:r,floating:i}=e;const o=jh(t),a=oA(t),s=iA(a),u=wu(t),l=o==="y",c=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(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,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(Fh(t)){case"start":p[a]-=h*(n&&l?-1:1);break;case"end":p[a]+=h*(n&&l?-1:1);break}return p}const zge=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=XR(l,r,u),h=r,p={},m=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=xu(e,t)||{};if(l==null)return{};const f=bz(c),h={x:n,y:r},p=oA(i),m=iA(p),v=await a.getDimensions(l),b=p==="y",w=b?"top":"left",x=b?"bottom":"right",S=b?"clientHeight":"clientWidth",O=o.reference[m]+o.reference[p]-h[p]-o.floating[m],E=h[p]-o.reference[p],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let k=C?C[S]:0;(!k||!await(a.isElement==null?void 0:a.isElement(C)))&&(k=s.floating[S]||o.floating[m]);const M=O/2-E/2,N=k/2-v[m]/2-1,z=Rl(f[w],N),H=Rl(f[x],N),V=z,ne=k-v[m]-H,Z=k/2-v[m]/2+M,G=dE(V,Z,ne),q=!u.arrow&&Fh(i)!=null&&Z!==G&&o.reference[m]/2-(ZV<=0)){var N,z;const V=(((N=o.flip)==null?void 0:N.index)||0)+1,ne=E[V];if(ne)return{data:{index:V,overflows:M},reset:{placement:ne}};let Z=(z=M.filter(G=>G.overflows[0]<=0).sort((G,q)=>G.overflows[1]-q.overflows[1])[0])==null?void 0:z.placement;if(!Z)switch(p){case"bestFit":{var H;const G=(H=M.map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,j)=>W+j,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:H[0];G&&(Z=G);break}case"initialPlacement":Z=s;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function QR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JR(e){return Dge.some(t=>e[t]>=0)}const Wge=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=xu(e,t);switch(r){case"referenceHidden":{const o=await pg(t,{...i,elementContext:"reference"}),a=QR(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:JR(a)}}}case"escaped":{const o=await pg(t,{...i,altBoundary:!0}),a=QR(o,n.floating);return{data:{escapedOffsets:a,escaped:JR(a)}}}default:return{}}}}};async function Hge(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=wu(n),s=Fh(n),u=jh(n)==="y",l=["left","top"].includes(a)?-1:1,c=o&&u?-1:1,f=xu(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),u?{x:p*c,y:h*l}:{x:h*l,y:p*c}}const Kge=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,u=await Hge(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:a}}}}},qge=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:w,y:x}=b;return{x:w,y:x}}},...u}=xu(e,t),l={x:n,y:r},c=await pg(t,u),f=jh(wu(i)),h=rA(f);let p=l[h],m=l[f];if(o){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",x=p+c[b],S=p-c[w];p=dE(x,p,S)}if(a){const b=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=m+c[b],S=m-c[w];m=dE(x,m,S)}const v=s.fn({...t,[h]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r}}}}},Gge=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=xu(e,t),c={x:n,y:r},f=jh(i),h=rA(f);let p=c[h],m=c[f];const v=xu(s,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const S=h==="y"?"height":"width",O=o.reference[h]-o.floating[S]+b.mainAxis,E=o.reference[h]+o.reference[S]-b.mainAxis;pE&&(p=E)}if(l){var w,x;const S=h==="y"?"width":"height",O=["top","left"].includes(wu(i)),E=o.reference[f]-o.floating[S]+(O&&((w=a.offset)==null?void 0:w[f])||0)+(O?0:b.crossAxis),C=o.reference[f]+o.reference[S]+(O?0:((x=a.offset)==null?void 0:x[f])||0)-(O?b.crossAxis:0);mC&&(m=C)}return{[h]:p,[f]:m}}}},Yge=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=xu(e,t),u=await pg(t,s),l=wu(n),c=Fh(n),f=jh(n)==="y",{width:h,height:p}=r.floating;let m,v;l==="top"||l==="bottom"?(m=l,v=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=l,m=c==="end"?"top":"bottom");const b=p-u[m],w=h-u[v],x=!t.middlewareData.shift;let S=b,O=w;if(f){const C=h-u.left-u.right;O=c||x?Rl(w,C):C}else{const C=p-u.top-u.bottom;S=c||x?Rl(b,C):C}if(x&&!c){const C=Ro(u.left,0),k=Ro(u.right,0),M=Ro(u.top,0),N=Ro(u.bottom,0);f?O=h-2*(C!==0||k!==0?C+k:Ro(u.left,u.right)):S=p-2*(M!==0||N!==0?M+N:Ro(u.top,u.bottom))}await a({...t,availableWidth:O,availableHeight:S});const E=await i.getDimensions(o.floating);return h!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}};function $l(e){return xz(e)?(e.nodeName||"").toLowerCase():"#document"}function jo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ku(e){var t;return(t=(xz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xz(e){return e instanceof Node||e instanceof jo(e).Node}function _u(e){return e instanceof Element||e instanceof jo(e).Element}function Ms(e){return e instanceof HTMLElement||e instanceof jo(e).HTMLElement}function eD(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jo(e).ShadowRoot}function Em(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=va(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Zge(e){return["table","td","th"].includes($l(e))}function aA(e){const t=sA(),n=va(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 Xge(e){let t=Zd(e);for(;Ms(t)&&!iw(t);){if(aA(t))return t;t=Zd(t)}return null}function sA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function iw(e){return["html","body","#document"].includes($l(e))}function va(e){return jo(e).getComputedStyle(e)}function ow(e){return _u(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Zd(e){if($l(e)==="html")return e;const t=e.assignedSlot||e.parentNode||eD(e)&&e.host||ku(e);return eD(t)?t.host:t}function wz(e){const t=Zd(e);return iw(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ms(t)&&Em(t)?t:wz(t)}function gg(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=wz(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=jo(i);return o?t.concat(a,a.visualViewport||[],Em(i)?i:[],a.frameElement&&n?gg(a.frameElement):[]):t.concat(i,gg(i,[],n))}function _z(e){const t=va(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ms(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=ib(n)!==o||ib(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function uA(e){return _u(e)?e:e.contextElement}function kd(e){const t=uA(e);if(!Ms(t))return Dl(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=_z(t);let a=(o?ib(n.width):n.width)/r,s=(o?ib(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Qge=Dl(0);function Sz(e){const t=jo(e);return!sA()||!t.visualViewport?Qge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jge(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jo(e)?!1:t}function Qc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=uA(e);let a=Dl(1);t&&(r?_u(r)&&(a=kd(r)):a=kd(e));const s=Jge(o,n,r)?Sz(o):Dl(0);let u=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){const h=jo(o),p=r&&_u(r)?jo(r):r;let m=h,v=m.frameElement;for(;v&&r&&p!==m;){const b=kd(v),w=v.getBoundingClientRect(),x=va(v),S=w.left+(v.clientLeft+parseFloat(x.paddingLeft))*b.x,O=w.top+(v.clientTop+parseFloat(x.paddingTop))*b.y;u*=b.x,l*=b.y,c*=b.x,f*=b.y,u+=S,l+=O,m=jo(v),v=m.frameElement}}return ab({width:c,height:f,x:u,y:l})}const eme=[":popover-open",":modal"];function Cz(e){return eme.some(t=>{try{return e.matches(t)}catch{return!1}})}function tme(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=ku(r),s=t?Cz(t.floating):!1;if(r===a||s&&o)return n;let u={scrollLeft:0,scrollTop:0},l=Dl(1);const c=Dl(0),f=Ms(r);if((f||!f&&!o)&&(($l(r)!=="body"||Em(a))&&(u=ow(r)),Ms(r))){const h=Qc(r);l=kd(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function nme(e){return Array.from(e.getClientRects())}function Ez(e){return Qc(ku(e)).left+ow(e).scrollLeft}function rme(e){const t=ku(e),n=ow(e),r=e.ownerDocument.body,i=Ro(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ro(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ez(e);const s=-n.scrollTop;return va(r).direction==="rtl"&&(a+=Ro(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function ime(e,t){const n=jo(e),r=ku(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;const l=sA();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s,y:u}}function ome(e,t){const n=Qc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ms(e)?kd(e):Dl(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,u=i*o.x,l=r*o.y;return{width:a,height:s,x:u,y:l}}function tD(e,t,n){let r;if(t==="viewport")r=ime(e,n);else if(t==="document")r=rme(ku(e));else if(_u(t))r=ome(t,n);else{const i=Sz(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return ab(r)}function Oz(e,t){const n=Zd(e);return n===t||!_u(n)||iw(n)?!1:va(n).position==="fixed"||Oz(n,t)}function ame(e,t){const n=t.get(e);if(n)return n;let r=gg(e,[],!1).filter(s=>_u(s)&&$l(s)!=="body"),i=null;const o=va(e).position==="fixed";let a=o?Zd(e):e;for(;_u(a)&&!iw(a);){const s=va(a),u=aA(a);!u&&s.position==="fixed"&&(i=null),(o?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Em(a)&&!u&&Oz(e,a))?r=r.filter(c=>c!==a):i=s,a=Zd(a)}return t.set(e,r),r}function sme(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?ame(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((l,c)=>{const f=tD(t,c,i);return l.top=Ro(f.top,l.top),l.right=Rl(f.right,l.right),l.bottom=Rl(f.bottom,l.bottom),l.left=Ro(f.left,l.left),l},tD(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function ume(e){const{width:t,height:n}=_z(e);return{width:t,height:n}}function lme(e,t,n){const r=Ms(t),i=ku(t),o=n==="fixed",a=Qc(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const u=Dl(0);if(r||!r&&!o)if(($l(t)!=="body"||Em(i))&&(s=ow(t)),r){const f=Qc(t,!0,o,t);u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}else i&&(u.x=Ez(i));const l=a.left+s.scrollLeft-u.x,c=a.top+s.scrollTop-u.y;return{x:l,y:c,width:a.width,height:a.height}}function nD(e,t){return!Ms(e)||va(e).position==="fixed"?null:t?t(e):e.offsetParent}function Az(e,t){const n=jo(e);if(!Ms(e)||Cz(e))return n;let r=nD(e,t);for(;r&&Zge(r)&&va(r).position==="static";)r=nD(r,t);return r&&($l(r)==="html"||$l(r)==="body"&&va(r).position==="static"&&!aA(r))?n:r||Xge(e)||n}const cme=async function(e){const t=this.getOffsetParent||Az,n=this.getDimensions;return{reference:lme(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function fme(e){return va(e).direction==="rtl"}const dme={convertOffsetParentRelativeRectToViewportRelativeRect:tme,getDocumentElement:ku,getClippingRect:sme,getOffsetParent:Az,getElementRects:cme,getClientRects:nme,getDimensions:ume,getScale:kd,isElement:_u,isRTL:fme};function hme(e,t){let n=null,r;const i=ku(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),o();const{left:l,top:c,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const p=uy(c),m=uy(i.clientWidth-(l+f)),v=uy(i.clientHeight-(c+h)),b=uy(l),x={rootMargin:-p+"px "+-m+"px "+-v+"px "+-b+"px",threshold:Ro(0,Rl(1,u))||1};let S=!0;function O(E){const C=E[0].intersectionRatio;if(C!==u){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(O,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,x)}n.observe(e)}return a(!0),o}function pme(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=uA(e),c=i||o?[...l?gg(l):[],...gg(t)]:[];c.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const f=l&&s?hme(l,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(w=>{let[x]=w;x&&x.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let m,v=u?Qc(e):null;u&&b();function b(){const w=Qc(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),f?.(),(w=p)==null||w.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const gme=qge,mme=Vge,vme=Yge,yme=Wge,rD=Uge,bme=Gge,xme=(e,t,n)=>{const r=new Map,i={platform:dme,...n},o={...i.platform,_c:r};return zge(e,t,{...i,platform:o})},wme=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?rD({element:r.current,padding:i}).fn(n):{}:r?rD({element:r,padding:i}).fn(n):{}}}};var Jy=typeof document<"u"?y.useLayoutEffect:y.useEffect;function sb(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(!sb(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 o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!sb(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Pz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iD(e,t){const n=Pz(e);return Math.round(t*n)/n}function oD(e){const t=y.useRef(e);return Jy(()=>{t.current=e}),t}function _me(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=y.useState(r);sb(h,r)||p(r);const[m,v]=y.useState(null),[b,w]=y.useState(null),x=y.useCallback(W=>{W!==C.current&&(C.current=W,v(W))},[]),S=y.useCallback(W=>{W!==k.current&&(k.current=W,w(W))},[]),O=o||m,E=a||b,C=y.useRef(null),k=y.useRef(null),M=y.useRef(c),N=u!=null,z=oD(u),H=oD(i),V=y.useCallback(()=>{if(!C.current||!k.current)return;const W={placement:t,strategy:n,middleware:h};H.current&&(W.platform=H.current),xme(C.current,k.current,W).then(j=>{const K={...j,isPositioned:!0};ne.current&&!sb(M.current,K)&&(M.current=K,Au.flushSync(()=>{f(K)}))})},[h,t,n,H]);Jy(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[l]);const ne=y.useRef(!1);Jy(()=>(ne.current=!0,()=>{ne.current=!1}),[]),Jy(()=>{if(O&&(C.current=O),E&&(k.current=E),O&&E){if(z.current)return z.current(O,E,V);V()}},[O,E,V,z,N]);const Z=y.useMemo(()=>({reference:C,floating:k,setReference:x,setFloating:S}),[x,S]),G=y.useMemo(()=>({reference:O,floating:E}),[O,E]),q=y.useMemo(()=>{const W={position:n,left:0,top:0};if(!G.floating)return W;const j=iD(G.floating,c.x),K=iD(G.floating,c.y);return s?{...W,transform:"translate("+j+"px, "+K+"px)",...Pz(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:K}},[n,s,G.floating,c.x,c.y]);return y.useMemo(()=>({...c,update:V,refs:Z,elements:G,floatingStyles:q}),[c,V,Z,G,q])}var Sme="Arrow",kz=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return I.jsx(pt.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:I.jsx("polygon",{points:"0,0 30,0 15,10"})})});kz.displayName=Sme;var Cme=kz;function lA(e){const[t,n]=y.useState(void 0);return ii(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const u=o.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var cA="Popper",[Tz,zl]=vi(cA),[Eme,Mz]=Tz(cA),Rz=e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null);return I.jsx(Eme,{scope:t,anchor:r,onAnchorChange:i,children:n})};Rz.displayName=cA;var Dz="PopperAnchor",$z=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Mz(Dz,n),a=y.useRef(null),s=Gt(t,a);return y.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:I.jsx(pt.div,{...i,ref:s})});$z.displayName=Dz;var fA="PopperContent",[Ome,Ame]=Tz(fA),Iz=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...v}=e,b=Mz(fA,n),[w,x]=y.useState(null),S=Gt(t,me=>x(me)),[O,E]=y.useState(null),C=lA(O),k=C?.width??0,M=C?.height??0,N=r+(o!=="center"?"-"+o:""),z=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},H=Array.isArray(l)?l:[l],V=H.length>0,ne={padding:z,boundary:H.filter(kme),altBoundary:V},{refs:Z,floatingStyles:G,placement:q,isPositioned:W,middlewareData:j}=_me({strategy:"fixed",placement:N,whileElementsMounted:(...me)=>pme(...me,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[Kge({mainAxis:i+M,alignmentAxis:a}),u&&gme({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?bme():void 0,...ne}),u&&mme({...ne}),vme({...ne,apply:({elements:me,rects:Ze,availableWidth:Ae,availableHeight:Le})=>{const{width:$e,height:be}=Ze.reference,yt=me.floating.style;yt.setProperty("--radix-popper-available-width",`${Ae}px`),yt.setProperty("--radix-popper-available-height",`${Le}px`),yt.setProperty("--radix-popper-anchor-width",`${$e}px`),yt.setProperty("--radix-popper-anchor-height",`${be}px`)}}),O&&wme({element:O,padding:s}),Tme({arrowWidth:k,arrowHeight:M}),h&&yme({strategy:"referenceHidden",...ne})]}),[K,Y]=Fz(q),oe=Vr(m);ii(()=>{W&&oe?.()},[W,oe]);const Q=j.arrow?.x,J=j.arrow?.y,ue=j.arrow?.centerOffset!==0,[de,Se]=y.useState();return ii(()=>{w&&Se(window.getComputedStyle(w).zIndex)},[w]),I.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:W?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:I.jsx(Ome,{scope:n,placedSide:K,onArrowChange:E,arrowX:Q,arrowY:J,shouldHideArrow:ue,children:I.jsx(pt.div,{"data-side":K,"data-align":Y,...v,ref:S,style:{...v.style,animation:W?void 0:"none"}})})})});Iz.displayName=fA;var Nz="PopperArrow",Pme={top:"bottom",right:"left",bottom:"top",left:"right"},Lz=y.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Ame(Nz,r),a=Pme[o.placedSide];return I.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:I.jsx(Cme,{...i,ref:n,style:{...i.style,display:"block"}})})});Lz.displayName=Nz;function kme(e){return e!==null}var Tme=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=Fz(n),f={start:"0%",center:"50%",end:"100%"}[c],h=(i.arrow?.x??0)+s/2,p=(i.arrow?.y??0)+u/2;let m="",v="";return l==="bottom"?(m=a?f:`${h}px`,v=`${-u}px`):l==="top"?(m=a?f:`${h}px`,v=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,v=a?f:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,v=a?f:`${p}px`),{data:{x:m,y:v}}}});function Fz(e){const[t,n="center"]=e.split("-");return[t,n]}var aw=Rz,Om=$z,sw=Iz,uw=Lz,ES="rovingFocusGroup.onEntryFocus",Mme={bubbles:!1,cancelable:!0},lw="RovingFocusGroup",[pE,jz,Rme]=nA(lw),[Dme,cw]=vi(lw,[Rme]),[$me,Ime]=Dme(lw),Bz=y.forwardRef((e,t)=>I.jsx(pE.Provider,{scope:e.__scopeRovingFocusGroup,children:I.jsx(pE.Slot,{scope:e.__scopeRovingFocusGroup,children:I.jsx(Nme,{...e,ref:t})})}));Bz.displayName=lw;var Nme=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...f}=e,h=y.useRef(null),p=Gt(t,h),m=Cm(o),[v=null,b]=Za({prop:a,defaultProp:s,onChange:u}),[w,x]=y.useState(!1),S=Vr(l),O=jz(n),E=y.useRef(!1),[C,k]=y.useState(0);return y.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(ES,S),()=>M.removeEventListener(ES,S)},[S]),I.jsx($me,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:v,onItemFocus:y.useCallback(M=>b(M),[b]),onItemShiftTab:y.useCallback(()=>x(!0),[]),onFocusableItemAdd:y.useCallback(()=>k(M=>M+1),[]),onFocusableItemRemove:y.useCallback(()=>k(M=>M-1),[]),children:I.jsx(pt.div,{tabIndex:w||C===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Ye(e.onMouseDown,()=>{E.current=!0}),onFocus:Ye(e.onFocus,M=>{const N=!E.current;if(M.target===M.currentTarget&&N&&!w){const z=new CustomEvent(ES,Mme);if(M.currentTarget.dispatchEvent(z),!z.defaultPrevented){const H=O().filter(q=>q.focusable),V=H.find(q=>q.active),ne=H.find(q=>q.id===v),G=[V,ne,...H].filter(Boolean).map(q=>q.ref.current);Vz(G,c)}}E.current=!1}),onBlur:Ye(e.onBlur,()=>x(!1))})})}),zz="RovingFocusGroupItem",Uz=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,s=Fo(),u=o||s,l=Ime(zz,n),c=l.currentTabStopId===u,f=jz(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=l;return y.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),I.jsx(pE.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:I.jsx(pt.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Ye(e.onMouseDown,m=>{r?l.onItemFocus(u):m.preventDefault()}),onFocus:Ye(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Ye(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=jme(m,l.orientation,l.dir);if(v!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let w=f().filter(x=>x.focusable).map(x=>x.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const x=w.indexOf(m.currentTarget);w=l.loop?Bme(w,x+1):w.slice(x+1)}setTimeout(()=>Vz(w))}})})})});Uz.displayName=zz;var Lme={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Fme(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function jme(e,t,n){const r=Fme(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Lme[r]}function Vz(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Bme(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Wz=Bz,Hz=Uz,gE=["Enter"," "],zme=["ArrowDown","PageUp","Home"],Kz=["ArrowUp","PageDown","End"],Ume=[...zme,...Kz],Vme={ltr:[...gE,"ArrowRight"],rtl:[...gE,"ArrowLeft"]},Wme={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Am="Menu",[mg,Hme,Kme]=nA(Am),[hf,qz]=vi(Am,[Kme,zl,cw]),fw=zl(),Gz=cw(),[qme,pf]=hf(Am),[Gme,Pm]=hf(Am),Yz=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=fw(t),[u,l]=y.useState(null),c=y.useRef(!1),f=Vr(o),h=Cm(i);return y.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),I.jsx(aw,{...s,children:I.jsx(qme,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:l,children:I.jsx(Gme,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})};Yz.displayName=Am;var Yme="MenuAnchor",dA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=fw(n);return I.jsx(Om,{...i,...r,ref:t})});dA.displayName=Yme;var hA="MenuPortal",[Zme,Zz]=hf(hA,{forceMount:void 0}),Xz=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=pf(hA,t);return I.jsx(Zme,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};Xz.displayName=hA;var ha="MenuContent",[Xme,pA]=hf(ha),Qz=y.forwardRef((e,t)=>{const n=Zz(ha,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=pf(ha,e.__scopeMenu),a=Pm(ha,e.__scopeMenu);return I.jsx(mg.Provider,{scope:e.__scopeMenu,children:I.jsx(Gr,{present:r||o.open,children:I.jsx(mg.Slot,{scope:e.__scopeMenu,children:a.modal?I.jsx(Qme,{...i,ref:t}):I.jsx(Jme,{...i,ref:t})})})})}),Qme=y.forwardRef((e,t)=>{const n=pf(ha,e.__scopeMenu),r=y.useRef(null),i=Gt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return Sm(o)},[]),I.jsx(gA,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Jme=y.forwardRef((e,t)=>{const n=pf(ha,e.__scopeMenu);return I.jsx(gA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),gA=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:m,...v}=e,b=pf(ha,n),w=Pm(ha,n),x=fw(n),S=Gz(n),O=Hme(n),[E,C]=y.useState(null),k=y.useRef(null),M=Gt(t,k,b.onContentChange),N=y.useRef(0),z=y.useRef(""),H=y.useRef(0),V=y.useRef(null),ne=y.useRef("right"),Z=y.useRef(0),G=m?_m:y.Fragment,q=m?{as:Al,allowPinchZoom:!0}:void 0,W=K=>{const Y=z.current+K,oe=O().filter(me=>!me.disabled),Q=document.activeElement,J=oe.find(me=>me.ref.current===Q)?.textValue,ue=oe.map(me=>me.textValue),de=fve(ue,Y,J),Se=oe.find(me=>me.textValue===de)?.ref.current;(function me(Ze){z.current=Ze,window.clearTimeout(N.current),Ze!==""&&(N.current=window.setTimeout(()=>me(""),1e3))})(Y),Se&&setTimeout(()=>Se.focus())};y.useEffect(()=>()=>window.clearTimeout(N.current),[]),nw();const j=y.useCallback(K=>ne.current===V.current?.side&&hve(K,V.current?.area),[]);return I.jsx(Xme,{scope:n,searchRef:z,onItemEnter:y.useCallback(K=>{j(K)&&K.preventDefault()},[j]),onItemLeave:y.useCallback(K=>{j(K)||(k.current?.focus(),C(null))},[j]),onTriggerLeave:y.useCallback(K=>{j(K)&&K.preventDefault()},[j]),pointerGraceTimerRef:H,onPointerGraceIntentChange:y.useCallback(K=>{V.current=K},[]),children:I.jsx(G,{...q,children:I.jsx(wm,{asChild:!0,trapped:i,onMountAutoFocus:Ye(o,K=>{K.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,onDismiss:p,children:I.jsx(Wz,{asChild:!0,...S,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:Ye(u,K=>{w.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:I.jsx(sw,{role:"menu","aria-orientation":"vertical","data-state":pU(b.open),"data-radix-menu-content":"",dir:w.dir,...x,...v,ref:M,style:{outline:"none",...v.style},onKeyDown:Ye(v.onKeyDown,K=>{const oe=K.target.closest("[data-radix-menu-content]")===K.currentTarget,Q=K.ctrlKey||K.altKey||K.metaKey,J=K.key.length===1;oe&&(K.key==="Tab"&&K.preventDefault(),!Q&&J&&W(K.key));const ue=k.current;if(K.target!==ue||!Ume.includes(K.key))return;K.preventDefault();const Se=O().filter(me=>!me.disabled).map(me=>me.ref.current);Kz.includes(K.key)&&Se.reverse(),lve(Se)}),onBlur:Ye(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(N.current),z.current="")}),onPointerMove:Ye(e.onPointerMove,vg(K=>{const Y=K.target,oe=Z.current!==K.clientX;if(K.currentTarget.contains(Y)&&oe){const Q=K.clientX>Z.current?"right":"left";ne.current=Q,Z.current=K.clientX}}))})})})})})})});Qz.displayName=ha;var eve="MenuGroup",mA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"group",...r,ref:t})});mA.displayName=eve;var tve="MenuLabel",Jz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{...r,ref:t})});Jz.displayName=tve;var ub="MenuItem",aD="menu.itemSelect",dw=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=y.useRef(null),a=Pm(ub,e.__scopeMenu),s=pA(ub,e.__scopeMenu),u=Gt(t,o),l=y.useRef(!1),c=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(aD,{bubbles:!0,cancelable:!0});f.addEventListener(aD,p=>r?.(p),{once:!0}),NB(f,h),h.defaultPrevented?l.current=!1:a.onClose()}};return I.jsx(eU,{...i,ref:u,disabled:n,onClick:Ye(e.onClick,c),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:Ye(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:Ye(e.onKeyDown,f=>{const h=s.searchRef.current!=="";n||h&&f.key===" "||gE.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});dw.displayName=ub;var eU=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=pA(ub,n),s=Gz(n),u=y.useRef(null),l=Gt(t,u),[c,f]=y.useState(!1),[h,p]=y.useState("");return y.useEffect(()=>{const m=u.current;m&&p((m.textContent??"").trim())},[o.children]),I.jsx(mg.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:I.jsx(Hz,{asChild:!0,...s,focusable:!r,children:I.jsx(pt.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:Ye(e.onPointerMove,vg(m=>{r?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ye(e.onPointerLeave,vg(m=>a.onItemLeave(m))),onFocus:Ye(e.onFocus,()=>f(!0)),onBlur:Ye(e.onBlur,()=>f(!1))})})})}),nve="MenuCheckboxItem",tU=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return I.jsx(aU,{scope:e.__scopeMenu,checked:n,children:I.jsx(dw,{role:"menuitemcheckbox","aria-checked":lb(n)?"mixed":n,...i,ref:t,"data-state":yA(n),onSelect:Ye(i.onSelect,()=>r?.(lb(n)?!0:!n),{checkForDefaultPrevented:!1})})})});tU.displayName=nve;var nU="MenuRadioGroup",[rve,ive]=hf(nU,{value:void 0,onValueChange:()=>{}}),rU=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Vr(r);return I.jsx(rve,{scope:e.__scopeMenu,value:n,onValueChange:o,children:I.jsx(mA,{...i,ref:t})})});rU.displayName=nU;var iU="MenuRadioItem",oU=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=ive(iU,e.__scopeMenu),o=n===i.value;return I.jsx(aU,{scope:e.__scopeMenu,checked:o,children:I.jsx(dw,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":yA(o),onSelect:Ye(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});oU.displayName=iU;var vA="MenuItemIndicator",[aU,ove]=hf(vA,{checked:!1}),sU=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=ove(vA,n);return I.jsx(Gr,{present:r||lb(o.checked)||o.checked===!0,children:I.jsx(pt.span,{...i,ref:t,"data-state":yA(o.checked)})})});sU.displayName=vA;var ave="MenuSeparator",uU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});uU.displayName=ave;var sve="MenuArrow",lU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=fw(n);return I.jsx(uw,{...i,...r,ref:t})});lU.displayName=sve;var uve="MenuSub",[hZe,cU]=hf(uve),s0="MenuSubTrigger",fU=y.forwardRef((e,t)=>{const n=pf(s0,e.__scopeMenu),r=Pm(s0,e.__scopeMenu),i=cU(s0,e.__scopeMenu),o=pA(s0,e.__scopeMenu),a=y.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=o,l={__scopeMenu:e.__scopeMenu},c=y.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return y.useEffect(()=>c,[c]),y.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),u(null)}},[s,u]),I.jsx(dA,{asChild:!0,...l,children:I.jsx(eU,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":pU(n.open),...e,ref:Ux(t,i.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ye(e.onPointerMove,vg(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Ye(e.onPointerLeave,vg(f=>{c();const h=n.content?.getBoundingClientRect();if(h){const p=n.content?.dataset.side,m=p==="right",v=m?-5:5,b=h[m?"left":"right"],w=h[m?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:b,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:b,y:h.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ye(e.onKeyDown,f=>{const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||Vme[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});fU.displayName=s0;var dU="MenuSubContent",hU=y.forwardRef((e,t)=>{const n=Zz(ha,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=pf(ha,e.__scopeMenu),a=Pm(ha,e.__scopeMenu),s=cU(dU,e.__scopeMenu),u=y.useRef(null),l=Gt(t,u);return I.jsx(mg.Provider,{scope:e.__scopeMenu,children:I.jsx(Gr,{present:r||o.open,children:I.jsx(mg.Slot,{scope:e.__scopeMenu,children:I.jsx(gA,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{a.isUsingKeyboardRef.current&&u.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Ye(e.onFocusOutside,c=>{c.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ye(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Ye(e.onKeyDown,c=>{const f=c.currentTarget.contains(c.target),h=Wme[a.dir].includes(c.key);f&&h&&(o.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});hU.displayName=dU;function pU(e){return e?"open":"closed"}function lb(e){return e==="indeterminate"}function yA(e){return lb(e)?"indeterminate":e?"checked":"unchecked"}function lve(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function cve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function fve(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=cve(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function dve(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function hve(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return dve(n,t)}function vg(e){return t=>t.pointerType==="mouse"?e(t):void 0}var pve=Yz,gve=dA,mve=Xz,vve=Qz,yve=mA,bve=Jz,xve=dw,wve=tU,_ve=rU,Sve=oU,Cve=sU,Eve=uU,Ove=lU,Ave=fU,Pve=hU,bA="DropdownMenu",[kve,pZe]=vi(bA,[qz]),Zi=qz(),[Tve,gU]=kve(bA),mU=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,u=Zi(t),l=y.useRef(null),[c=!1,f]=Za({prop:i,defaultProp:o,onChange:a});return I.jsx(Tve,{scope:t,triggerId:Fo(),triggerRef:l,contentId:Fo(),open:c,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(h=>!h),[f]),modal:s,children:I.jsx(pve,{...u,open:c,onOpenChange:f,dir:r,modal:s,children:n})})};mU.displayName=bA;var vU="DropdownMenuTrigger",yU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=gU(vU,n),a=Zi(n);return I.jsx(gve,{asChild:!0,...a,children:I.jsx(pt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Ux(t,o.triggerRef),onPointerDown:Ye(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:Ye(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});yU.displayName=vU;var Mve="DropdownMenuPortal",bU=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Zi(t);return I.jsx(mve,{...r,...n})};bU.displayName=Mve;var xU="DropdownMenuContent",wU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=gU(xU,n),o=Zi(n),a=y.useRef(!1);return I.jsx(vve,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Ye(e.onCloseAutoFocus,s=>{a.current||i.triggerRef.current?.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:Ye(e.onInteractOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,c=u.button===2||l;(!i.modal||c)&&(a.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)"}})});wU.displayName=xU;var Rve="DropdownMenuGroup",_U=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(yve,{...i,...r,ref:t})});_U.displayName=Rve;var Dve="DropdownMenuLabel",SU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(bve,{...i,...r,ref:t})});SU.displayName=Dve;var $ve="DropdownMenuItem",CU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(xve,{...i,...r,ref:t})});CU.displayName=$ve;var Ive="DropdownMenuCheckboxItem",EU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(wve,{...i,...r,ref:t})});EU.displayName=Ive;var Nve="DropdownMenuRadioGroup",Lve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(_ve,{...i,...r,ref:t})});Lve.displayName=Nve;var Fve="DropdownMenuRadioItem",OU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Sve,{...i,...r,ref:t})});OU.displayName=Fve;var jve="DropdownMenuItemIndicator",AU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Cve,{...i,...r,ref:t})});AU.displayName=jve;var Bve="DropdownMenuSeparator",PU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Eve,{...i,...r,ref:t})});PU.displayName=Bve;var zve="DropdownMenuArrow",Uve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Ove,{...i,...r,ref:t})});Uve.displayName=zve;var Vve="DropdownMenuSubTrigger",kU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Ave,{...i,...r,ref:t})});kU.displayName=Vve;var Wve="DropdownMenuSubContent",TU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Pve,{...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)"}})});TU.displayName=Wve;var gZe=mU,mZe=yU,vZe=bU,yZe=wU,bZe=_U,xZe=SU,wZe=CU,_Ze=EU,SZe=OU,CZe=AU,EZe=PU,OZe=kU,AZe=TU,Hve="VisuallyHidden",xA=y.forwardRef((e,t)=>I.jsx(pt.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}}));xA.displayName=Hve;var Kve=xA,[hw,PZe]=vi("Tooltip",[zl]),pw=zl(),MU="TooltipProvider",qve=700,mE="tooltip.open",[Gve,wA]=hw(MU),RU=e=>{const{__scopeTooltip:t,delayDuration:n=qve,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,s]=y.useState(!0),u=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),I.jsx(Gve,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),s(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:y.useCallback(c=>{u.current=c},[]),disableHoverableContent:i,children:o})};RU.displayName=MU;var gw="Tooltip",[Yve,km]=hw(gw),DU=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,u=wA(gw,e.__scopeTooltip),l=pw(t),[c,f]=y.useState(null),h=Fo(),p=y.useRef(0),m=a??u.disableHoverableContent,v=s??u.delayDuration,b=y.useRef(!1),[w=!1,x]=Za({prop:r,defaultProp:i,onChange:k=>{k?(u.onOpen(),document.dispatchEvent(new CustomEvent(mE))):u.onClose(),o?.(k)}}),S=y.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),O=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,x(!0)},[x]),E=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),C=y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,x(!0),p.current=0},v)},[v,x]);return y.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),I.jsx(aw,{...l,children:I.jsx(Yve,{scope:t,contentId:h,open:w,stateAttribute:S,trigger:c,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{u.isOpenDelayed?C():O()},[u.isOpenDelayed,C,O]),onTriggerLeave:y.useCallback(()=>{m?E():(window.clearTimeout(p.current),p.current=0)},[E,m]),onOpen:O,onClose:E,disableHoverableContent:m,children:n})})};DU.displayName=gw;var vE="TooltipTrigger",$U=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=km(vE,n),o=wA(vE,n),a=pw(n),s=y.useRef(null),u=Gt(t,s,i.onTriggerChange),l=y.useRef(!1),c=y.useRef(!1),f=y.useCallback(()=>l.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),I.jsx(Om,{asChild:!0,...a,children:I.jsx(pt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Ye(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ye(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Ye(e.onBlur,i.onClose),onClick:Ye(e.onClick,i.onClose)})})});$U.displayName=vE;var _A="TooltipPortal",[Zve,Xve]=hw(_A,{forceMount:void 0}),IU=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=km(_A,t);return I.jsx(Zve,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};IU.displayName=_A;var Xd="TooltipContent",NU=y.forwardRef((e,t)=>{const n=Xve(Xd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=km(Xd,e.__scopeTooltip);return I.jsx(Gr,{present:r||a.open,children:a.disableHoverableContent?I.jsx(LU,{side:i,...o,ref:t}):I.jsx(Qve,{side:i,...o,ref:t})})}),Qve=y.forwardRef((e,t)=>{const n=km(Xd,e.__scopeTooltip),r=wA(Xd,e.__scopeTooltip),i=y.useRef(null),o=Gt(t,i),[a,s]=y.useState(null),{trigger:u,onClose:l}=n,c=i.current,{onPointerInTransitChange:f}=r,h=y.useCallback(()=>{s(null),f(!1)},[f]),p=y.useCallback((m,v)=>{const b=m.currentTarget,w={x:m.clientX,y:m.clientY},x=nye(w,b.getBoundingClientRect()),S=rye(w,x),O=iye(v.getBoundingClientRect()),E=aye([...S,...O]);s(E),f(!0)},[f]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(u&&c){const m=b=>p(b,c),v=b=>p(b,u);return u.addEventListener("pointerleave",m),c.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",v)}}},[u,c,p,h]),y.useEffect(()=>{if(a){const m=v=>{const b=v.target,w={x:v.clientX,y:v.clientY},x=u?.contains(b)||c?.contains(b),S=!oye(w,a);x?h():S&&(h(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[u,c,a,l,h]),I.jsx(LU,{...e,ref:o})}),[Jve,eye]=hw(gw,{isInside:!1}),LU=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,u=km(Xd,n),l=pw(n),{onClose:c}=u;return y.useEffect(()=>(document.addEventListener(mE,c),()=>document.removeEventListener(mE,c)),[c]),y.useEffect(()=>{if(u.trigger){const f=h=>{h.target?.contains(u.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,c]),I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:I.jsxs(sw,{"data-state":u.stateAttribute,...l,...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:[I.jsx(OO,{children:r}),I.jsx(Jve,{scope:n,isInside:!0,children:I.jsx(Kve,{id:u.contentId,role:"tooltip",children:i||r})})]})})});NU.displayName=Xd;var FU="TooltipArrow",tye=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=pw(n);return eye(FU,n).isInside?null:I.jsx(uw,{...i,...r,ref:t})});tye.displayName=FU;function nye(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function rye(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 iye(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 oye(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function aye(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),sye(t)}function sye(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.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 o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.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 kZe=RU,TZe=DU,MZe=$U,RZe=IU,DZe=NU,sD=1,uye=.9,lye=.8,cye=.17,OS=.1,AS=.999,fye=.9999,dye=.99,hye=/[\\\/_+.#"@\[\(\{&]/,pye=/[\\\/_+.#"@\[\(\{&]/g,gye=/[\s-]/,jU=/[\s-]/g;function yE(e,t,n,r,i,o,a){if(o===t.length)return i===e.length?sD:dye;var s=`${i},${o}`;if(a[s]!==void 0)return a[s];for(var u=r.charAt(o),l=n.indexOf(u,i),c=0,f,h,p,m;l>=0;)f=yE(e,t,n,r,l+1,o+1,a),f>c&&(l===i?f*=sD:hye.test(e.charAt(l-1))?(f*=lye,p=e.slice(i,l-1).match(pye),p&&i>0&&(f*=Math.pow(AS,p.length))):gye.test(e.charAt(l-1))?(f*=uye,m=e.slice(i,l-1).match(jU),m&&i>0&&(f*=Math.pow(AS,m.length))):(f*=cye,i>0&&(f*=Math.pow(AS,l-i))),e.charAt(l)!==t.charAt(o)&&(f*=fye)),(ff&&(f=h*OS)),f>c&&(c=f),l=n.indexOf(u,l+1);return a[s]=c,c}function uD(e){return e.toLowerCase().replace(jU," ")}function mye(e,t){return yE(e,t,uD(e),uD(t),0,0,{})}function Ki(){return Ki=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>vye(n,t))}function Tm(...e){return y.useCallback(BU(...e),e)}function yye(e,t=[]){let n=[];function r(o,a){const s=y.createContext(a),u=n.length;n=[...n,a];function l(f){const{scope:h,children:p,...m}=f,v=h?.[e][u]||s,b=y.useMemo(()=>m,Object.values(m));return y.createElement(v.Provider,{value:b},p)}function c(f,h){const p=h?.[e][u]||s,m=y.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(s){const u=s?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,bye(i,...t)]}function bye(...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(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const xye=globalThis?.document?y.useLayoutEffect:()=>{},wye=P4.useId||(()=>{});let _ye=0;function PS(e){const[t,n]=y.useState(wye());return xye(()=>{e||n(r=>r??String(_ye++))},[e]),e||(t?`radix-${t}`:"")}function zU(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Sye({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Cye({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=zU(n),u=y.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function Cye({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=zU(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const SA=y.forwardRef((e,t)=>{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Oye);if(o){const a=o.props.children,s=i.map(u=>u===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:u);return y.createElement(bE,Ki({},r,{ref:t}),y.isValidElement(a)?y.cloneElement(a,void 0,s):null)}return y.createElement(bE,Ki({},r,{ref:t}),n)});SA.displayName="Slot";const bE=y.forwardRef((e,t)=>{const{children:n,...r}=e;return y.isValidElement(n)?y.cloneElement(n,{...Aye(r,n.props),ref:BU(t,n.ref)}):y.Children.count(n)>1?y.Children.only(null):null});bE.displayName="SlotClone";const Eye=({children:e})=>y.createElement(y.Fragment,null,e);function Oye(e){return y.isValidElement(e)&&e.type===Eye}function Aye(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?n[r]=(...s)=>{o?.(...s),i?.(...s)}:r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Pye=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],mw=Pye.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?SA:t;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(s,Ki({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function kye(e,t){e&&Au.flushSync(()=>e.dispatchEvent(t))}function CA(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Tye(e){const t=CA(e);y.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const xE="dismissableLayer.update",Mye="dismissableLayer.pointerDownOutside",Rye="dismissableLayer.focusOutside";let lD;const Dye=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$ye=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=y.useContext(Dye),[c,f]=y.useState(null),[,h]=y.useState({}),p=Tm(t,C=>f(C)),m=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),w=c?m.indexOf(c):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,O=Iye(C=>{const k=C.target,M=[...l.branches].some(N=>N.contains(k));!S||M||(i?.(C),a?.(C),C.defaultPrevented||s?.())}),E=Nye(C=>{const k=C.target;[...l.branches].some(N=>N.contains(k))||(o?.(C),a?.(C),C.defaultPrevented||s?.())});return Tye(C=>{w===l.layers.size-1&&(r?.(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))}),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(lD=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),cD(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=lD)}},[c,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),cD())},[c,l]),y.useEffect(()=>{const C=()=>h({});return document.addEventListener(xE,C),()=>document.removeEventListener(xE,C)},[]),y.createElement(mw.div,Ki({},u,{ref:p,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Td(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Td(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Td(e.onPointerDownCapture,O.onPointerDownCapture)}))});function Iye(e){const t=CA(e),n=y.useRef(!1),r=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let u=function(){UU(Mye,t,s,{discrete:!0})};const s={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=u,document.addEventListener("click",r.current,{once:!0})):u()}n.current=!1},o=window.setTimeout(()=>{document.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),document.removeEventListener("pointerdown",i),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function Nye(e){const t=CA(e),n=y.useRef(!1);return y.useEffect(()=>{const r=i=>{i.target&&!n.current&&UU(Rye,t,{originalEvent:i},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function cD(){const e=new CustomEvent(xE);document.dispatchEvent(e)}function UU(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?kye(i,o):i.dispatchEvent(o)}function fD(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const kS="focusScope.autoFocusOnMount",TS="focusScope.autoFocusOnUnmount",dD={bubbles:!1,cancelable:!0},Lye=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=y.useState(null),l=fD(i),c=fD(o),f=y.useRef(null),h=Tm(t,v=>u(v)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let v=function(w){if(p.paused||!s)return;const x=w.target;s.contains(x)?f.current=x:cc(f.current,{select:!0})},b=function(w){p.paused||!s||s.contains(w.relatedTarget)||cc(f.current,{select:!0})};return document.addEventListener("focusin",v),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b)}}},[r,s,p.paused]),y.useEffect(()=>{if(s){pD.add(p);const v=document.activeElement;if(!s.contains(v)){const w=new CustomEvent(kS,dD);s.addEventListener(kS,l),s.dispatchEvent(w),w.defaultPrevented||(Fye(Vye(VU(s)),{select:!0}),document.activeElement===v&&cc(s))}return()=>{s.removeEventListener(kS,l),setTimeout(()=>{const w=new CustomEvent(TS,dD);s.addEventListener(TS,c),s.dispatchEvent(w),w.defaultPrevented||cc(v??document.body,{select:!0}),s.removeEventListener(TS,c),pD.remove(p)},0)}}},[s,l,c,p]);const m=y.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const x=v.currentTarget,[S,O]=jye(x);S&&O?!v.shiftKey&&w===O?(v.preventDefault(),n&&cc(S,{select:!0})):v.shiftKey&&w===S&&(v.preventDefault(),n&&cc(O,{select:!0})):w===x&&v.preventDefault()}},[n,r,p.paused]);return y.createElement(mw.div,Ki({tabIndex:-1},a,{ref:h,onKeyDown:m}))});function Fye(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cc(r,{select:t}),document.activeElement!==n)return}function jye(e){const t=VU(e),n=hD(t,e),r=hD(t.reverse(),e);return[n,r]}function VU(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 hD(e,t){for(const n of e)if(!Bye(n,{upTo:t}))return n}function Bye(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 zye(e){return e instanceof HTMLInputElement&&"select"in e}function cc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zye(e)&&t&&e.select()}}const pD=Uye();function Uye(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=gD(e,t),e.unshift(t)},remove(t){var n;e=gD(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function gD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Vye(e){return e.filter(t=>t.tagName!=="A")}const Wye=y.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?jx.createPortal(y.createElement(mw.div,Ki({},i,{ref:t})),r):null}),mD=globalThis?.document?y.useLayoutEffect:()=>{};function Hye(e,t){return y.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const vw=e=>{const{present:t,children:n}=e,r=Kye(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Tm(r.ref,i.ref);return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};vw.displayName="Presence";function Kye(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Hye(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=ly(r.current);o.current=s==="mounted"?l:"none"},[s]),mD(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,p=ly(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),mD(()=>{if(t){const l=f=>{const p=ly(r.current).includes(f.animationName);f.target===t&&p&&Au.flushSync(()=>u("ANIMATION_END"))},c=f=>{f.target===t&&(o.current=ly(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function ly(e){return e?.animationName||"none"}let MS=0;function qye(){y.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:vD()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:vD()),MS++,()=>{MS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),MS--}},[])}function vD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var e1="right-scroll-bar-position",t1="width-before-scroll-bar",Gye="with-scroll-bars-hidden",Yye="--removed-body-scroll-bar-size";function RS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zye(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Xye=typeof window<"u"?y.useLayoutEffect:y.useEffect,yD=new WeakMap;function Qye(e,t){var n=Zye(null,function(r){return e.forEach(function(i){return RS(i,r)})});return Xye(function(){var r=yD.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||RS(s,null)}),o.forEach(function(s){i.has(s)||RS(s,a)})}yD.set(n,e)},[e]),n}var WU=WB(),DS=function(){},yw=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:DS,onWheelCapture:DS,onTouchMoveCapture:DS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=KO(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,O=Qye([n,t]),E=Ri(Ri({},x),i);return y.createElement(y.Fragment,null,c&&y.createElement(S,{sideCar:WU,removeScrollBar:l,shards:f,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),a?y.cloneElement(y.Children.only(s),Ri(Ri({},E),{ref:O})):y.createElement(w,Ri({},E,{className:u,ref:O}),s))});yw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yw.classNames={fullWidth:t1,zeroRight:e1};var Jye={left:0,top:0,right:0,gap:0},$S=function(e){return parseInt(e||"",10)||0},e1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[$S(n),$S(r),$S(i)]},t1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Jye;var t=e1e(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])}},n1e=qO(),Md="data-scroll-locked",r1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(Gye,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; } - body[`).concat(Dd,`] { + body[`).concat(Md,`] { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` @@ -146,249 +146,249 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` } - .`).concat(i1,` { + .`).concat(e1,` { right: `).concat(s,"px ").concat(r,`; } - .`).concat(o1,` { + .`).concat(t1,` { margin-right: `).concat(s,"px ").concat(r,`; } - .`).concat(i1," .").concat(i1,` { + .`).concat(e1," .").concat(e1,` { right: 0 `).concat(r,`; } - .`).concat(o1," .").concat(o1,` { + .`).concat(t1," .").concat(t1,` { margin-right: 0 `).concat(r,`; } - body[`).concat(Dd,`] { - `).concat(P1e,": ").concat(s,`px; + body[`).concat(Md,`] { + `).concat(Yye,": ").concat(s,`px; } -`)},$D=function(){var e=parseInt(document.body.getAttribute(Dd)||"0",10);return isFinite(e)?e:0},L1e=function(){y.useEffect(function(){return document.body.setAttribute(Dd,($D()+1).toString()),function(){var e=$D()-1;e<=0?document.body.removeAttribute(Dd):document.body.setAttribute(Dd,e.toString())}},[])},F1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;L1e();var o=y.useMemo(function(){return $1e(i)},[i]);return y.createElement(I1e,{styles:N1e(o,!t,i,n?"":"!important")})},kE=!1;if(typeof window<"u")try{var py=Object.defineProperty({},"passive",{get:function(){return kE=!0,!0}});window.addEventListener("test",py,py),window.removeEventListener("test",py,py)}catch{kE=!1}var Gf=kE?{passive:!1}:!1,j1e=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},B1e=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},ID=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=uH(e,n);if(r){var i=lH(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},z1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},U1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},uH=function(e,t){return e==="v"?j1e(t):B1e(t)},lH=function(e,t){return e==="v"?z1e(t):U1e(t)},H1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},V1e=function(e,t,n,r,i){var o=H1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,c=a>0,f=0,h=0;do{var p=lH(e,s),m=p[0],v=p[1],b=p[2],w=v-b-o*m;(m||w)&&uH(e,s)&&(f+=w,h+=m),s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(f===0||!i)||!c&&(h===0||!i))&&(l=!0),l},gy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ND=function(e){return[e.deltaX,e.deltaY]},LD=function(e){return e&&"current"in e?e.current:e},W1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},q1e=function(e){return` +`)},bD=function(){var e=parseInt(document.body.getAttribute(Md)||"0",10);return isFinite(e)?e:0},i1e=function(){y.useEffect(function(){return document.body.setAttribute(Md,(bD()+1).toString()),function(){var e=bD()-1;e<=0?document.body.removeAttribute(Md):document.body.setAttribute(Md,e.toString())}},[])},o1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;i1e();var o=y.useMemo(function(){return t1e(i)},[i]);return y.createElement(n1e,{styles:r1e(o,!t,i,n?"":"!important")})},wE=!1;if(typeof window<"u")try{var cy=Object.defineProperty({},"passive",{get:function(){return wE=!0,!0}});window.addEventListener("test",cy,cy),window.removeEventListener("test",cy,cy)}catch{wE=!1}var Kf=wE?{passive:!1}:!1,a1e=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},s1e=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},xD=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=HU(e,n);if(r){var i=KU(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},u1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},l1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},HU=function(e,t){return e==="v"?a1e(t):s1e(t)},KU=function(e,t){return e==="v"?u1e(t):l1e(t)},c1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},f1e=function(e,t,n,r,i){var o=c1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,c=a>0,f=0,h=0;do{var p=KU(e,s),m=p[0],v=p[1],b=p[2],w=v-b-o*m;(m||w)&&HU(e,s)&&(f+=w,h+=m),s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(f===0||!i)||!c&&(h===0||!i))&&(l=!0),l},fy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wD=function(e){return[e.deltaX,e.deltaY]},_D=function(e){return e&&"current"in e?e.current:e},d1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},h1e=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},K1e=0,Yf=[];function G1e(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(K1e++)[0],o=y.useState(function(){return rA()})[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=az([e.lockRef.current],(e.shards||[]).map(LD),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=y.useCallback(function(v,b){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var w=gy(v),x=n.current,S="deltaX"in v?v.deltaX:x[0]-w[0],O="deltaY"in v?v.deltaY:x[1]-w[1],E,C=v.target,k=Math.abs(S)>Math.abs(O)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var M=ID(k,C);if(!M)return!0;if(M?E=k:(E=k==="v"?"h":"v",M=ID(k,C)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||O)&&(r.current=E),!E)return!0;var N=r.current||E;return V1e(N,b,v,N==="h"?S:O,!0)},[]),u=y.useCallback(function(v){var b=v;if(!(!Yf.length||Yf[Yf.length-1]!==o)){var w="deltaY"in b?ND(b):gy(b),x=t.current.filter(function(E){return E.name===b.type&&E.target===b.target&&W1e(E.delta,w)})[0];if(x&&x.should){b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(LD).filter(Boolean).filter(function(E){return E.contains(b.target)}),O=S.length>0?s(b,S[0]):!a.current.noIsolation;O&&b.preventDefault()}}},[]),l=y.useCallback(function(v,b,w,x){var S={name:v,delta:b,target:w,should:x};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(O){return O!==S})},1)},[]),c=y.useCallback(function(v){n.current=gy(v),r.current=void 0},[]),f=y.useCallback(function(v){l(v.type,ND(v),v.target,s(v,e.lockRef.current))},[]),h=y.useCallback(function(v){l(v.type,gy(v),v.target,s(v,e.lockRef.current))},[]);y.useEffect(function(){return Yf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Gf),document.addEventListener("touchmove",u,Gf),document.addEventListener("touchstart",c,Gf),function(){Yf=Yf.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,Gf),document.removeEventListener("touchmove",u,Gf),document.removeEventListener("touchstart",c,Gf)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:q1e(i)}):null,p?y.createElement(F1e,{gapMode:"margin"}):null)}const Y1e=lz(sH,G1e);var cH=y.forwardRef(function(e,t){return y.createElement(Sw,Ri({},e,{ref:t,sideCar:Y1e}))});cH.classNames=Sw.classNames;const fH="Dialog",[dH,gXe]=Xye(fH),[Z1e,vf]=dH(fH),X1e=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=y.useRef(null),u=y.useRef(null),[l=!1,c]=n1e({prop:r,defaultProp:i,onChange:o});return y.createElement(Z1e,{scope:t,triggerRef:s,contentRef:u,contentId:$S(),titleId:$S(),descriptionId:$S(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(f=>!f),[c]),modal:a},n)},hH="DialogPortal",[Q1e,pH]=dH(hH,{forceMount:void 0}),J1e=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=vf(hH,t);return y.createElement(Q1e,{scope:t,forceMount:n},y.Children.map(r,a=>y.createElement(_w,{present:n||o.open},y.createElement(S1e,{asChild:!0,container:i},a))))},TE="DialogOverlay",ebe=y.forwardRef((e,t)=>{const n=pH(TE,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=vf(TE,e.__scopeDialog);return o.modal?y.createElement(_w,{present:r||o.open},y.createElement(tbe,qi({},i,{ref:t}))):null}),tbe=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=vf(TE,n);return y.createElement(cH,{as:DA,allowPinchZoom:!0,shards:[i.contentRef]},y.createElement(ww.div,qi({"data-state":mH(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),_g="DialogContent",nbe=y.forwardRef((e,t)=>{const n=pH(_g,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=vf(_g,e.__scopeDialog);return y.createElement(_w,{present:r||o.open},o.modal?y.createElement(rbe,qi({},i,{ref:t})):y.createElement(ibe,qi({},i,{ref:t})))}),rbe=y.forwardRef((e,t)=>{const n=vf(_g,e.__scopeDialog),r=y.useRef(null),i=$m(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Am(o)},[]),y.createElement(gH,qi({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Rd(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Rd(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Rd(e.onFocusOutside,o=>o.preventDefault())}))}),ibe=y.forwardRef((e,t)=>{const n=vf(_g,e.__scopeDialog),r=y.useRef(!1);return y.createElement(gH,qi({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0);const s=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&i.preventDefault()}}))}),gH=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=vf(_g,n),u=y.useRef(null),l=$m(t,u);return O1e(),y.createElement(y.Fragment,null,y.createElement(m1e,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},y.createElement(h1e,qi({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":mH(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function mH(e){return e?"open":"closed"}const obe=X1e,abe=J1e,sbe=ebe,ube=nbe;var lbe='[cmdk-list-sizer=""]',Up='[cmdk-group=""]',zS='[cmdk-group-items=""]',cbe='[cmdk-group-heading=""]',IA='[cmdk-item=""]',FD=`${IA}:not([aria-disabled="true"])`,ME="cmdk-item-select",Qs="data-value",fbe=(e,t)=>Yye(e,t),vH=y.createContext(void 0),Im=()=>y.useContext(vH),yH=y.createContext(void 0),NA=()=>y.useContext(yH),bH=y.createContext(void 0),xH=y.forwardRef((e,t)=>{let n=y.useRef(null),r=rd(()=>{var G,oe,Q;return{search:"",value:(Q=(oe=e.value)!=null?oe:(G=e.defaultValue)==null?void 0:G.toLowerCase())!=null?Q:"",filtered:{count:0,items:new Map,groups:new Set}}}),i=rd(()=>new Set),o=rd(()=>new Map),a=rd(()=>new Map),s=rd(()=>new Set),u=wH(e),{label:l,children:c,value:f,onValueChange:h,filter:p,shouldFilter:m,vimBindings:v=!0,...b}=e,w=y.useId(),x=y.useId(),S=y.useId(),O=_be();Hh(()=>{if(f!==void 0){let G=f.trim().toLowerCase();r.current.value=G,O(6,Y),E.emit()}},[f]);let E=y.useMemo(()=>({subscribe:G=>(s.current.add(G),()=>s.current.delete(G)),snapshot:()=>r.current,setState:(G,oe,Q)=>{var X,ue,de;if(!Object.is(r.current[G],oe)){if(r.current[G]=oe,G==="search")q(),M(),O(1,N);else if(G==="value")if(((X=u.current)==null?void 0:X.value)!==void 0){let Se=oe??"";(de=(ue=u.current).onValueChange)==null||de.call(ue,Se);return}else Q||O(5,Y);E.emit()}},emit:()=>{s.current.forEach(G=>G())}}),[]),C=y.useMemo(()=>({value:(G,oe)=>{oe!==a.current.get(G)&&(a.current.set(G,oe),r.current.filtered.items.set(G,k(oe)),O(2,()=>{M(),E.emit()}))},item:(G,oe)=>(i.current.add(G),oe&&(o.current.has(oe)?o.current.get(oe).add(G):o.current.set(oe,new Set([G]))),O(3,()=>{q(),M(),r.current.value||N(),E.emit()}),()=>{a.current.delete(G),i.current.delete(G),r.current.filtered.items.delete(G);let Q=W();O(4,()=>{q(),Q?.getAttribute("id")===G&&N(),E.emit()})}),group:G=>(o.current.has(G)||o.current.set(G,new Set),()=>{a.current.delete(G),o.current.delete(G)}),filter:()=>u.current.shouldFilter,label:l||e["aria-label"],commandRef:n,listId:w,inputId:S,labelId:x}),[]);function k(G){var oe,Q;let X=(Q=(oe=u.current)==null?void 0:oe.filter)!=null?Q:fbe;return G?X(G,r.current.search):0}function M(){if(!n.current||!r.current.search||u.current.shouldFilter===!1)return;let G=r.current.filtered.items,oe=[];r.current.filtered.groups.forEach(X=>{let ue=o.current.get(X),de=0;ue.forEach(Se=>{let me=G.get(Se);de=Math.max(me,de)}),oe.push([X,de])});let Q=n.current.querySelector(lbe);ne().sort((X,ue)=>{var de,Se;let me=X.getAttribute(Qs),Ze=ue.getAttribute(Qs);return((de=G.get(Ze))!=null?de:0)-((Se=G.get(me))!=null?Se:0)}).forEach(X=>{let ue=X.closest(zS);ue?ue.appendChild(X.parentElement===ue?X:X.closest(`${zS} > *`)):Q.appendChild(X.parentElement===Q?X:X.closest(`${zS} > *`))}),oe.sort((X,ue)=>ue[1]-X[1]).forEach(X=>{let ue=n.current.querySelector(`${Up}[${Qs}="${X[0]}"]`);ue?.parentElement.appendChild(ue)})}function N(){let G=ne().find(Q=>!Q.ariaDisabled),oe=G?.getAttribute(Qs);E.setState("value",oe||void 0)}function q(){if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let G=0;for(let oe of i.current){let Q=a.current.get(oe),X=k(Q);r.current.filtered.items.set(oe,X),X>0&&G++}for(let[oe,Q]of o.current)for(let X of Q)if(r.current.filtered.items.get(X)>0){r.current.filtered.groups.add(oe);break}r.current.filtered.count=G}function Y(){var G,oe,Q;let X=W();X&&(((G=X.parentElement)==null?void 0:G.firstChild)===X&&((Q=(oe=X.closest(Up))==null?void 0:oe.querySelector(cbe))==null||Q.scrollIntoView({block:"nearest"})),X.scrollIntoView({block:"nearest"}))}function W(){var G;return(G=n.current)==null?void 0:G.querySelector(`${IA}[aria-selected="true"]`)}function ne(){return Array.from(n.current.querySelectorAll(FD))}function Z(G){let oe=ne()[G];oe&&E.setState("value",oe.getAttribute(Qs))}function R(G){var oe;let Q=W(),X=ne(),ue=X.findIndex(Se=>Se===Q),de=X[ue+G];(oe=u.current)!=null&&oe.loop&&(de=ue+G<0?X[X.length-1]:ue+G===X.length?X[0]:X[ue+G]),de&&E.setState("value",de.getAttribute(Qs))}function B(G){let oe=W(),Q=oe?.closest(Up),X;for(;Q&&!X;)Q=G>0?xbe(Q,Up):wbe(Q,Up),X=Q?.querySelector(FD);X?E.setState("value",X.getAttribute(Qs)):R(G)}let U=()=>Z(ne().length-1),F=G=>{G.preventDefault(),G.metaKey?U():G.altKey?B(1):R(1)},V=G=>{G.preventDefault(),G.metaKey?Z(0):G.altKey?B(-1):R(-1)};return y.createElement("div",{ref:Nm([n,t]),...b,"cmdk-root":"",onKeyDown:G=>{var oe;if((oe=b.onKeyDown)==null||oe.call(b,G),!G.defaultPrevented)switch(G.key){case"n":case"j":{v&&G.ctrlKey&&F(G);break}case"ArrowDown":{F(G);break}case"p":case"k":{v&&G.ctrlKey&&V(G);break}case"ArrowUp":{V(G);break}case"Home":{G.preventDefault(),Z(0);break}case"End":{G.preventDefault(),U();break}case"Enter":if(!G.nativeEvent.isComposing){G.preventDefault();let Q=W();if(Q){let X=new Event(ME);Q.dispatchEvent(X)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:Sbe},l),y.createElement(yH.Provider,{value:E},y.createElement(vH.Provider,{value:C},c)))}),dbe=y.forwardRef((e,t)=>{var n,r;let i=y.useId(),o=y.useRef(null),a=y.useContext(bH),s=Im(),u=wH(e),l=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;Hh(()=>s.item(i,a?.id),[]);let c=_H(i,o,[e.value,e.children,o]),f=NA(),h=tf(E=>E.value&&E.value===c.current),p=tf(E=>l||s.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);y.useEffect(()=>{let E=o.current;if(!(!E||e.disabled))return E.addEventListener(ME,m),()=>E.removeEventListener(ME,m)},[p,e.onSelect,e.disabled]);function m(){var E,C;v(),(C=(E=u.current).onSelect)==null||C.call(E,c.current)}function v(){f.setState("value",c.current,!0)}if(!p)return null;let{disabled:b,value:w,onSelect:x,forceMount:S,...O}=e;return y.createElement("div",{ref:Nm([o,t]),...O,id:i,"cmdk-item":"",role:"option","aria-disabled":b||void 0,"aria-selected":h||void 0,"data-disabled":b||void 0,"data-selected":h||void 0,onPointerMove:b?void 0:v,onClick:b?void 0:m},e.children)}),hbe=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=y.useId(),s=y.useRef(null),u=y.useRef(null),l=y.useId(),c=Im(),f=tf(m=>i||c.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);Hh(()=>c.group(a),[]),_H(a,s,[e.value,e.heading,u]);let h=y.useMemo(()=>({id:a,forceMount:i}),[i]),p=y.createElement(bH.Provider,{value:h},r);return y.createElement("div",{ref:Nm([s,t]),...o,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&y.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},p))}),pbe=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=y.useRef(null),o=tf(a=>!a.search);return!n&&!o?null:y.createElement("div",{ref:Nm([i,t]),...r,"cmdk-separator":"",role:"separator"})}),gbe=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=NA(),a=tf(c=>c.search),s=tf(c=>c.value),u=Im(),l=y.useMemo(()=>{var c;let f=(c=u.commandRef.current)==null?void 0:c.querySelector(`${IA}[${Qs}="${s}"]`);return f?.getAttribute("id")},[s,u.commandRef]);return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||o.setState("search",c.target.value),n?.(c.target.value)}})}),mbe=y.forwardRef((e,t)=>{let{children:n,...r}=e,i=y.useRef(null),o=y.useRef(null),a=Im();return y.useEffect(()=>{if(o.current&&i.current){let s=o.current,u=i.current,l,c=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let f=s.offsetHeight;u.style.setProperty("--cmdk-list-height",f.toFixed(1)+"px")})});return c.observe(s),()=>{cancelAnimationFrame(l),c.unobserve(s)}}},[]),y.createElement("div",{ref:Nm([i,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},y.createElement("div",{ref:o,"cmdk-list-sizer":""},n))}),vbe=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...s}=e;return y.createElement(obe,{open:n,onOpenChange:r},y.createElement(abe,{container:a},y.createElement(sbe,{"cmdk-overlay":"",className:i}),y.createElement(ube,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(xH,{ref:t,...s}))))}),ybe=y.forwardRef((e,t)=>{let n=y.useRef(!0),r=tf(i=>i.filtered.count===0);return y.useEffect(()=>{n.current=!1},[]),n.current||!r?null:y.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),bbe=y.forwardRef((e,t)=>{let{progress:n,children:r,...i}=e;return y.createElement("div",{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},y.createElement("div",{"aria-hidden":!0},r))}),mXe=Object.assign(xH,{List:mbe,Item:dbe,Input:gbe,Group:hbe,Separator:pbe,Dialog:vbe,Empty:ybe,Loading:bbe});function xbe(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function wbe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function wH(e){let t=y.useRef(e);return Hh(()=>{t.current=e}),t}var Hh=typeof window>"u"?y.useEffect:y.useLayoutEffect;function rd(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function Nm(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function tf(e){let t=NA(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function _H(e,t,n){let r=y.useRef(),i=Im();return Hh(()=>{var o;let a=(()=>{var s;for(let u of n){if(typeof u=="string")return u.trim().toLowerCase();if(typeof u=="object"&&"current"in u)return u.current?(s=u.current.textContent)==null?void 0:s.trim().toLowerCase():r.current}})();i.value(e,a),(o=t.current)==null||o.setAttribute(Qs,a),r.current=a}),r}var _be=()=>{let[e,t]=y.useState(),n=rd(()=>new Map);return Hh(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}},Sbe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};/** +`)},p1e=0,qf=[];function g1e(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(p1e++)[0],o=y.useState(function(){return qO()})[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=VB([e.lockRef.current],(e.shards||[]).map(_D),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=y.useCallback(function(v,b){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var w=fy(v),x=n.current,S="deltaX"in v?v.deltaX:x[0]-w[0],O="deltaY"in v?v.deltaY:x[1]-w[1],E,C=v.target,k=Math.abs(S)>Math.abs(O)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var M=xD(k,C);if(!M)return!0;if(M?E=k:(E=k==="v"?"h":"v",M=xD(k,C)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||O)&&(r.current=E),!E)return!0;var N=r.current||E;return f1e(N,b,v,N==="h"?S:O,!0)},[]),u=y.useCallback(function(v){var b=v;if(!(!qf.length||qf[qf.length-1]!==o)){var w="deltaY"in b?wD(b):fy(b),x=t.current.filter(function(E){return E.name===b.type&&E.target===b.target&&d1e(E.delta,w)})[0];if(x&&x.should){b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(_D).filter(Boolean).filter(function(E){return E.contains(b.target)}),O=S.length>0?s(b,S[0]):!a.current.noIsolation;O&&b.preventDefault()}}},[]),l=y.useCallback(function(v,b,w,x){var S={name:v,delta:b,target:w,should:x};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(O){return O!==S})},1)},[]),c=y.useCallback(function(v){n.current=fy(v),r.current=void 0},[]),f=y.useCallback(function(v){l(v.type,wD(v),v.target,s(v,e.lockRef.current))},[]),h=y.useCallback(function(v){l(v.type,fy(v),v.target,s(v,e.lockRef.current))},[]);y.useEffect(function(){return qf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Kf),document.addEventListener("touchmove",u,Kf),document.addEventListener("touchstart",c,Kf),function(){qf=qf.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,Kf),document.removeEventListener("touchmove",u,Kf),document.removeEventListener("touchstart",c,Kf)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:h1e(i)}):null,p?y.createElement(o1e,{gapMode:"margin"}):null)}const m1e=KB(WU,g1e);var qU=y.forwardRef(function(e,t){return y.createElement(yw,Ri({},e,{ref:t,sideCar:m1e}))});qU.classNames=yw.classNames;const GU="Dialog",[YU,$Ze]=yye(GU),[v1e,gf]=YU(GU),y1e=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=y.useRef(null),u=y.useRef(null),[l=!1,c]=Sye({prop:r,defaultProp:i,onChange:o});return y.createElement(v1e,{scope:t,triggerRef:s,contentRef:u,contentId:PS(),titleId:PS(),descriptionId:PS(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(f=>!f),[c]),modal:a},n)},ZU="DialogPortal",[b1e,XU]=YU(ZU,{forceMount:void 0}),x1e=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=gf(ZU,t);return y.createElement(b1e,{scope:t,forceMount:n},y.Children.map(r,a=>y.createElement(vw,{present:n||o.open},y.createElement(Wye,{asChild:!0,container:i},a))))},_E="DialogOverlay",w1e=y.forwardRef((e,t)=>{const n=XU(_E,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=gf(_E,e.__scopeDialog);return o.modal?y.createElement(vw,{present:r||o.open},y.createElement(_1e,Ki({},i,{ref:t}))):null}),_1e=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gf(_E,n);return y.createElement(qU,{as:SA,allowPinchZoom:!0,shards:[i.contentRef]},y.createElement(mw.div,Ki({"data-state":JU(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),yg="DialogContent",S1e=y.forwardRef((e,t)=>{const n=XU(yg,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=gf(yg,e.__scopeDialog);return y.createElement(vw,{present:r||o.open},o.modal?y.createElement(C1e,Ki({},i,{ref:t})):y.createElement(E1e,Ki({},i,{ref:t})))}),C1e=y.forwardRef((e,t)=>{const n=gf(yg,e.__scopeDialog),r=y.useRef(null),i=Tm(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Sm(o)},[]),y.createElement(QU,Ki({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Td(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Td(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Td(e.onFocusOutside,o=>o.preventDefault())}))}),E1e=y.forwardRef((e,t)=>{const n=gf(yg,e.__scopeDialog),r=y.useRef(!1);return y.createElement(QU,Ki({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0);const s=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&i.preventDefault()}}))}),QU=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=gf(yg,n),u=y.useRef(null),l=Tm(t,u);return qye(),y.createElement(y.Fragment,null,y.createElement(Lye,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},y.createElement($ye,Ki({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":JU(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function JU(e){return e?"open":"closed"}const O1e=y1e,A1e=x1e,P1e=w1e,k1e=S1e;var T1e='[cmdk-list-sizer=""]',jp='[cmdk-group=""]',IS='[cmdk-group-items=""]',M1e='[cmdk-group-heading=""]',EA='[cmdk-item=""]',SD=`${EA}:not([aria-disabled="true"])`,SE="cmdk-item-select",Qs="data-value",R1e=(e,t)=>mye(e,t),eV=y.createContext(void 0),Mm=()=>y.useContext(eV),tV=y.createContext(void 0),OA=()=>y.useContext(tV),nV=y.createContext(void 0),rV=y.forwardRef((e,t)=>{let n=y.useRef(null),r=td(()=>{var Y,oe,Q;return{search:"",value:(Q=(oe=e.value)!=null?oe:(Y=e.defaultValue)==null?void 0:Y.toLowerCase())!=null?Q:"",filtered:{count:0,items:new Map,groups:new Set}}}),i=td(()=>new Set),o=td(()=>new Map),a=td(()=>new Map),s=td(()=>new Set),u=iV(e),{label:l,children:c,value:f,onValueChange:h,filter:p,shouldFilter:m,vimBindings:v=!0,...b}=e,w=y.useId(),x=y.useId(),S=y.useId(),O=V1e();Bh(()=>{if(f!==void 0){let Y=f.trim().toLowerCase();r.current.value=Y,O(6,H),E.emit()}},[f]);let E=y.useMemo(()=>({subscribe:Y=>(s.current.add(Y),()=>s.current.delete(Y)),snapshot:()=>r.current,setState:(Y,oe,Q)=>{var J,ue,de;if(!Object.is(r.current[Y],oe)){if(r.current[Y]=oe,Y==="search")z(),M(),O(1,N);else if(Y==="value")if(((J=u.current)==null?void 0:J.value)!==void 0){let Se=oe??"";(de=(ue=u.current).onValueChange)==null||de.call(ue,Se);return}else Q||O(5,H);E.emit()}},emit:()=>{s.current.forEach(Y=>Y())}}),[]),C=y.useMemo(()=>({value:(Y,oe)=>{oe!==a.current.get(Y)&&(a.current.set(Y,oe),r.current.filtered.items.set(Y,k(oe)),O(2,()=>{M(),E.emit()}))},item:(Y,oe)=>(i.current.add(Y),oe&&(o.current.has(oe)?o.current.get(oe).add(Y):o.current.set(oe,new Set([Y]))),O(3,()=>{z(),M(),r.current.value||N(),E.emit()}),()=>{a.current.delete(Y),i.current.delete(Y),r.current.filtered.items.delete(Y);let Q=V();O(4,()=>{z(),Q?.getAttribute("id")===Y&&N(),E.emit()})}),group:Y=>(o.current.has(Y)||o.current.set(Y,new Set),()=>{a.current.delete(Y),o.current.delete(Y)}),filter:()=>u.current.shouldFilter,label:l||e["aria-label"],commandRef:n,listId:w,inputId:S,labelId:x}),[]);function k(Y){var oe,Q;let J=(Q=(oe=u.current)==null?void 0:oe.filter)!=null?Q:R1e;return Y?J(Y,r.current.search):0}function M(){if(!n.current||!r.current.search||u.current.shouldFilter===!1)return;let Y=r.current.filtered.items,oe=[];r.current.filtered.groups.forEach(J=>{let ue=o.current.get(J),de=0;ue.forEach(Se=>{let me=Y.get(Se);de=Math.max(me,de)}),oe.push([J,de])});let Q=n.current.querySelector(T1e);ne().sort((J,ue)=>{var de,Se;let me=J.getAttribute(Qs),Ze=ue.getAttribute(Qs);return((de=Y.get(Ze))!=null?de:0)-((Se=Y.get(me))!=null?Se:0)}).forEach(J=>{let ue=J.closest(IS);ue?ue.appendChild(J.parentElement===ue?J:J.closest(`${IS} > *`)):Q.appendChild(J.parentElement===Q?J:J.closest(`${IS} > *`))}),oe.sort((J,ue)=>ue[1]-J[1]).forEach(J=>{let ue=n.current.querySelector(`${jp}[${Qs}="${J[0]}"]`);ue?.parentElement.appendChild(ue)})}function N(){let Y=ne().find(Q=>!Q.ariaDisabled),oe=Y?.getAttribute(Qs);E.setState("value",oe||void 0)}function z(){if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let Y=0;for(let oe of i.current){let Q=a.current.get(oe),J=k(Q);r.current.filtered.items.set(oe,J),J>0&&Y++}for(let[oe,Q]of o.current)for(let J of Q)if(r.current.filtered.items.get(J)>0){r.current.filtered.groups.add(oe);break}r.current.filtered.count=Y}function H(){var Y,oe,Q;let J=V();J&&(((Y=J.parentElement)==null?void 0:Y.firstChild)===J&&((Q=(oe=J.closest(jp))==null?void 0:oe.querySelector(M1e))==null||Q.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function V(){var Y;return(Y=n.current)==null?void 0:Y.querySelector(`${EA}[aria-selected="true"]`)}function ne(){return Array.from(n.current.querySelectorAll(SD))}function Z(Y){let oe=ne()[Y];oe&&E.setState("value",oe.getAttribute(Qs))}function G(Y){var oe;let Q=V(),J=ne(),ue=J.findIndex(Se=>Se===Q),de=J[ue+Y];(oe=u.current)!=null&&oe.loop&&(de=ue+Y<0?J[J.length-1]:ue+Y===J.length?J[0]:J[ue+Y]),de&&E.setState("value",de.getAttribute(Qs))}function q(Y){let oe=V(),Q=oe?.closest(jp),J;for(;Q&&!J;)Q=Y>0?z1e(Q,jp):U1e(Q,jp),J=Q?.querySelector(SD);J?E.setState("value",J.getAttribute(Qs)):G(Y)}let W=()=>Z(ne().length-1),j=Y=>{Y.preventDefault(),Y.metaKey?W():Y.altKey?q(1):G(1)},K=Y=>{Y.preventDefault(),Y.metaKey?Z(0):Y.altKey?q(-1):G(-1)};return y.createElement("div",{ref:Rm([n,t]),...b,"cmdk-root":"",onKeyDown:Y=>{var oe;if((oe=b.onKeyDown)==null||oe.call(b,Y),!Y.defaultPrevented)switch(Y.key){case"n":case"j":{v&&Y.ctrlKey&&j(Y);break}case"ArrowDown":{j(Y);break}case"p":case"k":{v&&Y.ctrlKey&&K(Y);break}case"ArrowUp":{K(Y);break}case"Home":{Y.preventDefault(),Z(0);break}case"End":{Y.preventDefault(),W();break}case"Enter":if(!Y.nativeEvent.isComposing){Y.preventDefault();let Q=V();if(Q){let J=new Event(SE);Q.dispatchEvent(J)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:W1e},l),y.createElement(tV.Provider,{value:E},y.createElement(eV.Provider,{value:C},c)))}),D1e=y.forwardRef((e,t)=>{var n,r;let i=y.useId(),o=y.useRef(null),a=y.useContext(nV),s=Mm(),u=iV(e),l=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;Bh(()=>s.item(i,a?.id),[]);let c=oV(i,o,[e.value,e.children,o]),f=OA(),h=Jc(E=>E.value&&E.value===c.current),p=Jc(E=>l||s.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);y.useEffect(()=>{let E=o.current;if(!(!E||e.disabled))return E.addEventListener(SE,m),()=>E.removeEventListener(SE,m)},[p,e.onSelect,e.disabled]);function m(){var E,C;v(),(C=(E=u.current).onSelect)==null||C.call(E,c.current)}function v(){f.setState("value",c.current,!0)}if(!p)return null;let{disabled:b,value:w,onSelect:x,forceMount:S,...O}=e;return y.createElement("div",{ref:Rm([o,t]),...O,id:i,"cmdk-item":"",role:"option","aria-disabled":b||void 0,"aria-selected":h||void 0,"data-disabled":b||void 0,"data-selected":h||void 0,onPointerMove:b?void 0:v,onClick:b?void 0:m},e.children)}),$1e=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=y.useId(),s=y.useRef(null),u=y.useRef(null),l=y.useId(),c=Mm(),f=Jc(m=>i||c.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);Bh(()=>c.group(a),[]),oV(a,s,[e.value,e.heading,u]);let h=y.useMemo(()=>({id:a,forceMount:i}),[i]),p=y.createElement(nV.Provider,{value:h},r);return y.createElement("div",{ref:Rm([s,t]),...o,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&y.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},p))}),I1e=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=y.useRef(null),o=Jc(a=>!a.search);return!n&&!o?null:y.createElement("div",{ref:Rm([i,t]),...r,"cmdk-separator":"",role:"separator"})}),N1e=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=OA(),a=Jc(c=>c.search),s=Jc(c=>c.value),u=Mm(),l=y.useMemo(()=>{var c;let f=(c=u.commandRef.current)==null?void 0:c.querySelector(`${EA}[${Qs}="${s}"]`);return f?.getAttribute("id")},[s,u.commandRef]);return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||o.setState("search",c.target.value),n?.(c.target.value)}})}),L1e=y.forwardRef((e,t)=>{let{children:n,...r}=e,i=y.useRef(null),o=y.useRef(null),a=Mm();return y.useEffect(()=>{if(o.current&&i.current){let s=o.current,u=i.current,l,c=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let f=s.offsetHeight;u.style.setProperty("--cmdk-list-height",f.toFixed(1)+"px")})});return c.observe(s),()=>{cancelAnimationFrame(l),c.unobserve(s)}}},[]),y.createElement("div",{ref:Rm([i,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},y.createElement("div",{ref:o,"cmdk-list-sizer":""},n))}),F1e=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...s}=e;return y.createElement(O1e,{open:n,onOpenChange:r},y.createElement(A1e,{container:a},y.createElement(P1e,{"cmdk-overlay":"",className:i}),y.createElement(k1e,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(rV,{ref:t,...s}))))}),j1e=y.forwardRef((e,t)=>{let n=y.useRef(!0),r=Jc(i=>i.filtered.count===0);return y.useEffect(()=>{n.current=!1},[]),n.current||!r?null:y.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),B1e=y.forwardRef((e,t)=>{let{progress:n,children:r,...i}=e;return y.createElement("div",{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},y.createElement("div",{"aria-hidden":!0},r))}),IZe=Object.assign(rV,{List:L1e,Item:D1e,Input:N1e,Group:$1e,Separator:I1e,Dialog:F1e,Empty:j1e,Loading:B1e});function z1e(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function U1e(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function iV(e){let t=y.useRef(e);return Bh(()=>{t.current=e}),t}var Bh=typeof window>"u"?y.useEffect:y.useLayoutEffect;function td(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function Rm(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Jc(e){let t=OA(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function oV(e,t,n){let r=y.useRef(),i=Mm();return Bh(()=>{var o;let a=(()=>{var s;for(let u of n){if(typeof u=="string")return u.trim().toLowerCase();if(typeof u=="object"&&"current"in u)return u.current?(s=u.current.textContent)==null?void 0:s.trim().toLowerCase():r.current}})();i.value(e,a),(o=t.current)==null||o.setAttribute(Qs,a),r.current=a}),r}var V1e=()=>{let[e,t]=y.useState(),n=td(()=>new Map);return Bh(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}},W1e={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Cbe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),SH=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + */const H1e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),aV=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var Ebe={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"};/** + */var K1e={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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Obe=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},u)=>y.createElement("svg",{ref:u,...Ebe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:SH("lucide",i),...s},[...a.map(([l,c])=>y.createElement(l,c)),...Array.isArray(o)?o:[o]]));/** + */const q1e=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},u)=>y.createElement("svg",{ref:u,...K1e,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:aV("lucide",i),...s},[...a.map(([l,c])=>y.createElement(l,c)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const en=(e,t)=>{const n=y.forwardRef(({className:r,...i},o)=>y.createElement(Obe,{ref:o,iconNode:t,className:SH(`lucide-${Cbe(e)}`,r),...i}));return n.displayName=`${e}`,n};/** + */const en=(e,t)=>{const n=y.forwardRef(({className:r,...i},o)=>y.createElement(q1e,{ref:o,iconNode:t,className:aV(`lucide-${H1e(e)}`,r),...i}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vXe=en("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"}]]);/** + */const NZe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yXe=en("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/** + */const LZe=en("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bXe=en("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** + */const FZe=en("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xXe=en("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** + */const jZe=en("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wXe=en("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** + */const BZe=en("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _Xe=en("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** + */const zZe=en("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const SXe=en("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** + */const UZe=en("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const CXe=en("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** + */const VZe=en("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const EXe=en("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const WZe=en("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const OXe=en("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const HZe=en("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const AXe=en("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + */const KZe=en("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const PXe=en("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const qZe=en("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kXe=en("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"}]]);/** + */const GZe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const TXe=en("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + */const YZe=en("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const MXe=en("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"}]]);/** + */const ZZe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const RXe=en("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** + */const XZe=en("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const DXe=en("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** + */const QZe=en("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $Xe=en("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + */const JZe=en("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const IXe=en("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"}]]);/** + */const eXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const NXe=en("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"}]]);/** + */const tXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const LXe=en("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"}]]);/** + */const nXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const FXe=en("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + */const rXe=en("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jXe=en("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"}]]);/** + */const iXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const BXe=en("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** + */const oXe=en("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zXe=en("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** + */const aXe=en("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const UXe=en("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + */const sXe=en("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const HXe=en("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z",key:"jj09z8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** + */const uXe=en("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z",key:"jj09z8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const VXe=en("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"}]]);/** + */const lXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const WXe=en("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"}]]);/** + */const cXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qXe=en("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"}]]);/** + */const fXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KXe=en("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"}]]);/** + */const dXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GXe=en("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + */const hXe=en("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YXe=en("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"}]]);/** + */const pXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZXe=en("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"}]]);/** + */const gXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const XXe=en("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** + */const mXe=en("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const QXe=en("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"}]]);/** + */const vXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const JXe=en("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** + */const yXe=en("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const eQe=en("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"}]]);/** + */const bXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tQe=en("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"}]]);/** + */const xXe=en("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.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nQe=en("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Abe=["title"],Pbe=["title"];function gb(){return gb=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kbe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var rQe=function(t){var n=t.title,r=CH(t,Abe);return z.createElement("svg",gb({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&z.createElement("title",null,n),z.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),z.createElement("path",{d:"m226.8 239.2-9.7-15.6-17.9 4.4 11.9-14.1-9.7-15.6 17.1 6.9 11.8-14.1-1.3 18.4 17.1 6.9-17.9 4.4zM290.6 82l-10.1 15.4 11.6 14.3-17.7-4.8-10.1 15.5-1-18.4-17.7-4.8 17.2-6.6-1-18.4 11.6 14.3zm-54.4-56.6-2 18.3 16.8 7.6-18 3.8-2 18.3-9.2-16-17.9 3.8 12.3-13.7-9.2-15.9 16.8 7.5zm56.6 136.4-14.9 10.9 5.8 17.5-14.9-10.8-14.9 11 5.6-17.6-14.9-10.7 18.4-.1 5.6-17.6 5.8 17.5zM115 46.3l17.3 53.5h56.2l-45.4 32.9 17.3 53.5-45.4-33-45.5 33 17.4-53.5-45.5-32.9h56.3z",fill:"#FFDA44"}))},iQe=function(t){var n=t.title,r=CH(t,Pbe);return z.createElement("svg",gb({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&z.createElement("title",null,n),z.createElement("g",{fill:"#FFF"},z.createElement("path",{d:"M0 0h513v341.3H0V0z"}),z.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zM200.3 111.3 0 0v31.5l143.7 79.8h56.6z"})),z.createElement("path",{d:"M393.8 230 513 295.7V230H393.8zm-82.1 0L513 341.3v-31.5L369.3 230h-57.6zm146.9 111.3-147-81.7v81.7h147zM90.3 230 0 280.2V230h90.3zm110 14.2v97.2H25.5l174.8-97.2zm-82.1-132.9L0 45.6v65.7h118.2zm82.1 0L0 0v31.5l143.7 79.8h56.6zM53.4 0l147 81.7V0h-147zm368.3 111.3L513 61.1v50.2h-91.3zm-110-14.2V0h174.9L311.7 97.1z",fill:"#0052B4"}),z.createElement("g",{fill:"#D80027"},z.createElement("path",{d:"M288 0h-64v138.7H0v64h224v138.7h64V202.7h224v-64H288V0z"}),z.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zm-168 0L0 309.9v31.5L200.3 230h-56.6zm56.6-118.7L0 0v31.5l143.7 79.8h56.6zm168 0L513 31.5V0L311.7 111.3h56.6z"})))},LA="Avatar",[Tbe,oQe]=vi(LA),[Mbe,EH]=Tbe(LA),OH=y.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=y.useState("idle");return L.jsx(Mbe,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:L.jsx(pt.span,{...r,ref:t})})});OH.displayName=LA;var AH="AvatarImage",PH=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=EH(AH,n),s=Rbe(r,o.referrerPolicy),u=Hr(l=>{i(l),a.onImageLoadingStatusChange(l)});return ii(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?L.jsx(pt.img,{...o,ref:t,src:r}):null});PH.displayName=AH;var kH="AvatarFallback",TH=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=EH(kH,n),[a,s]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),a&&o.imageLoadingStatus!=="loaded"?L.jsx(pt.span,{...i,ref:t}):null});TH.displayName=kH;function Rbe(e,t){const[n,r]=y.useState("idle");return ii(()=>{if(!e){r("error");return}let i=!0;const o=new window.Image,a=s=>()=>{i&&r(s)};return r("loading"),o.onload=a("loaded"),o.onerror=a("error"),o.src=e,t&&(o.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var aQe=OH,sQe=PH,uQe=TH,Dbe=Array.isArray,yo=Dbe,$be=typeof ao=="object"&&ao&&ao.Object===Object&&ao,MH=$be,Ibe=MH,Nbe=typeof self=="object"&&self&&self.Object===Object&&self,Lbe=Ibe||Nbe||Function("return this")(),Ds=Lbe,Fbe=Ds,jbe=Fbe.Symbol,Lm=jbe,jD=Lm,RH=Object.prototype,Bbe=RH.hasOwnProperty,zbe=RH.toString,Hp=jD?jD.toStringTag:void 0;function Ube(e){var t=Bbe.call(e,Hp),n=e[Hp];try{e[Hp]=void 0;var r=!0}catch{}var i=zbe.call(e);return r&&(t?e[Hp]=n:delete e[Hp]),i}var Hbe=Ube,Vbe=Object.prototype,Wbe=Vbe.toString;function qbe(e){return Wbe.call(e)}var Kbe=qbe,BD=Lm,Gbe=Hbe,Ybe=Kbe,Zbe="[object Null]",Xbe="[object Undefined]",zD=BD?BD.toStringTag:void 0;function Qbe(e){return e==null?e===void 0?Xbe:Zbe:zD&&zD in Object(e)?Gbe(e):Ybe(e)}var Mu=Qbe;function Jbe(e){return e!=null&&typeof e=="object"}var Ru=Jbe,exe=Mu,txe=Ru,nxe="[object Symbol]";function rxe(e){return typeof e=="symbol"||txe(e)&&exe(e)==nxe}var Vh=rxe,ixe=yo,oxe=Vh,axe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sxe=/^\w*$/;function uxe(e,t){if(ixe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||oxe(e)?!0:sxe.test(e)||!axe.test(e)||t!=null&&e in Object(t)}var FA=uxe;function lxe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hl=lxe;const Wh=En(Hl);var cxe=Mu,fxe=Hl,dxe="[object AsyncFunction]",hxe="[object Function]",pxe="[object GeneratorFunction]",gxe="[object Proxy]";function mxe(e){if(!fxe(e))return!1;var t=cxe(e);return t==hxe||t==pxe||t==dxe||t==gxe}var jA=mxe;const Vt=En(jA);var vxe=Ds,yxe=vxe["__core-js_shared__"],bxe=yxe,US=bxe,UD=function(){var e=/[^.]+$/.exec(US&&US.keys&&US.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function xxe(e){return!!UD&&UD in e}var wxe=xxe,_xe=Function.prototype,Sxe=_xe.toString;function Cxe(e){if(e!=null){try{return Sxe.call(e)}catch{}try{return e+""}catch{}}return""}var DH=Cxe,Exe=jA,Oxe=wxe,Axe=Hl,Pxe=DH,kxe=/[\\^$.*+?()[\]{}|]/g,Txe=/^\[object .+?Constructor\]$/,Mxe=Function.prototype,Rxe=Object.prototype,Dxe=Mxe.toString,$xe=Rxe.hasOwnProperty,Ixe=RegExp("^"+Dxe.call($xe).replace(kxe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nxe(e){if(!Axe(e)||Oxe(e))return!1;var t=Exe(e)?Ixe:Txe;return t.test(Pxe(e))}var Lxe=Nxe;function Fxe(e,t){return e?.[t]}var jxe=Fxe,Bxe=Lxe,zxe=jxe;function Uxe(e,t){var n=zxe(e,t);return Bxe(n)?n:void 0}var yf=Uxe,Hxe=yf,Vxe=Hxe(Object,"create"),Cw=Vxe,HD=Cw;function Wxe(){this.__data__=HD?HD(null):{},this.size=0}var qxe=Wxe;function Kxe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Gxe=Kxe,Yxe=Cw,Zxe="__lodash_hash_undefined__",Xxe=Object.prototype,Qxe=Xxe.hasOwnProperty;function Jxe(e){var t=this.__data__;if(Yxe){var n=t[e];return n===Zxe?void 0:n}return Qxe.call(t,e)?t[e]:void 0}var ewe=Jxe,twe=Cw,nwe=Object.prototype,rwe=nwe.hasOwnProperty;function iwe(e){var t=this.__data__;return twe?t[e]!==void 0:rwe.call(t,e)}var owe=iwe,awe=Cw,swe="__lodash_hash_undefined__";function uwe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=awe&&t===void 0?swe:t,this}var lwe=uwe,cwe=qxe,fwe=Gxe,dwe=ewe,hwe=owe,pwe=lwe;function qh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var Mwe=Twe,Rwe=Ew;function Dwe(e,t){var n=this.__data__,r=Rwe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var $we=Dwe,Iwe=vwe,Nwe=Ewe,Lwe=Pwe,Fwe=Mwe,jwe=$we;function Kh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Z1e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var _Xe=function(t){var n=t.title,r=sV(t,G1e);return F.createElement("svg",cb({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&F.createElement("title",null,n),F.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),F.createElement("path",{d:"m226.8 239.2-9.7-15.6-17.9 4.4 11.9-14.1-9.7-15.6 17.1 6.9 11.8-14.1-1.3 18.4 17.1 6.9-17.9 4.4zM290.6 82l-10.1 15.4 11.6 14.3-17.7-4.8-10.1 15.5-1-18.4-17.7-4.8 17.2-6.6-1-18.4 11.6 14.3zm-54.4-56.6-2 18.3 16.8 7.6-18 3.8-2 18.3-9.2-16-17.9 3.8 12.3-13.7-9.2-15.9 16.8 7.5zm56.6 136.4-14.9 10.9 5.8 17.5-14.9-10.8-14.9 11 5.6-17.6-14.9-10.7 18.4-.1 5.6-17.6 5.8 17.5zM115 46.3l17.3 53.5h56.2l-45.4 32.9 17.3 53.5-45.4-33-45.5 33 17.4-53.5-45.5-32.9h56.3z",fill:"#FFDA44"}))},SXe=function(t){var n=t.title,r=sV(t,Y1e);return F.createElement("svg",cb({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&F.createElement("title",null,n),F.createElement("g",{fill:"#FFF"},F.createElement("path",{d:"M0 0h513v341.3H0V0z"}),F.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zM200.3 111.3 0 0v31.5l143.7 79.8h56.6z"})),F.createElement("path",{d:"M393.8 230 513 295.7V230H393.8zm-82.1 0L513 341.3v-31.5L369.3 230h-57.6zm146.9 111.3-147-81.7v81.7h147zM90.3 230 0 280.2V230h90.3zm110 14.2v97.2H25.5l174.8-97.2zm-82.1-132.9L0 45.6v65.7h118.2zm82.1 0L0 0v31.5l143.7 79.8h56.6zM53.4 0l147 81.7V0h-147zm368.3 111.3L513 61.1v50.2h-91.3zm-110-14.2V0h174.9L311.7 97.1z",fill:"#0052B4"}),F.createElement("g",{fill:"#D80027"},F.createElement("path",{d:"M288 0h-64v138.7H0v64h224v138.7h64V202.7h224v-64H288V0z"}),F.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zm-168 0L0 309.9v31.5L200.3 230h-56.6zm56.6-118.7L0 0v31.5l143.7 79.8h56.6zm168 0L513 31.5V0L311.7 111.3h56.6z"})))},AA="Avatar",[X1e,CXe]=vi(AA),[Q1e,uV]=X1e(AA),lV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=y.useState("idle");return I.jsx(Q1e,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:I.jsx(pt.span,{...r,ref:t})})});lV.displayName=AA;var cV="AvatarImage",fV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=uV(cV,n),s=J1e(r,o.referrerPolicy),u=Vr(l=>{i(l),a.onImageLoadingStatusChange(l)});return ii(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?I.jsx(pt.img,{...o,ref:t,src:r}):null});fV.displayName=cV;var dV="AvatarFallback",hV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=uV(dV,n),[a,s]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),a&&o.imageLoadingStatus!=="loaded"?I.jsx(pt.span,{...i,ref:t}):null});hV.displayName=dV;function J1e(e,t){const[n,r]=y.useState("idle");return ii(()=>{if(!e){r("error");return}let i=!0;const o=new window.Image,a=s=>()=>{i&&r(s)};return r("loading"),o.onload=a("loaded"),o.onerror=a("error"),o.src=e,t&&(o.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var EXe=lV,OXe=fV,AXe=hV,ebe=Array.isArray,vo=ebe,tbe=typeof la=="object"&&la&&la.Object===Object&&la,pV=tbe,nbe=pV,rbe=typeof self=="object"&&self&&self.Object===Object&&self,ibe=nbe||rbe||Function("return this")(),Ds=ibe,obe=Ds,abe=obe.Symbol,Dm=abe,CD=Dm,gV=Object.prototype,sbe=gV.hasOwnProperty,ube=gV.toString,Bp=CD?CD.toStringTag:void 0;function lbe(e){var t=sbe.call(e,Bp),n=e[Bp];try{e[Bp]=void 0;var r=!0}catch{}var i=ube.call(e);return r&&(t?e[Bp]=n:delete e[Bp]),i}var cbe=lbe,fbe=Object.prototype,dbe=fbe.toString;function hbe(e){return dbe.call(e)}var pbe=hbe,ED=Dm,gbe=cbe,mbe=pbe,vbe="[object Null]",ybe="[object Undefined]",OD=ED?ED.toStringTag:void 0;function bbe(e){return e==null?e===void 0?ybe:vbe:OD&&OD in Object(e)?gbe(e):mbe(e)}var Tu=bbe;function xbe(e){return e!=null&&typeof e=="object"}var Mu=xbe,wbe=Tu,_be=Mu,Sbe="[object Symbol]";function Cbe(e){return typeof e=="symbol"||_be(e)&&wbe(e)==Sbe}var zh=Cbe,Ebe=vo,Obe=zh,Abe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pbe=/^\w*$/;function kbe(e,t){if(Ebe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Obe(e)?!0:Pbe.test(e)||!Abe.test(e)||t!=null&&e in Object(t)}var PA=kbe;function Tbe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ul=Tbe;const Uh=Pn(Ul);var Mbe=Tu,Rbe=Ul,Dbe="[object AsyncFunction]",$be="[object Function]",Ibe="[object GeneratorFunction]",Nbe="[object Proxy]";function Lbe(e){if(!Rbe(e))return!1;var t=Mbe(e);return t==$be||t==Ibe||t==Dbe||t==Nbe}var kA=Lbe;const Wt=Pn(kA);var Fbe=Ds,jbe=Fbe["__core-js_shared__"],Bbe=jbe,NS=Bbe,AD=function(){var e=/[^.]+$/.exec(NS&&NS.keys&&NS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function zbe(e){return!!AD&&AD in e}var Ube=zbe,Vbe=Function.prototype,Wbe=Vbe.toString;function Hbe(e){if(e!=null){try{return Wbe.call(e)}catch{}try{return e+""}catch{}}return""}var mV=Hbe,Kbe=kA,qbe=Ube,Gbe=Ul,Ybe=mV,Zbe=/[\\^$.*+?()[\]{}|]/g,Xbe=/^\[object .+?Constructor\]$/,Qbe=Function.prototype,Jbe=Object.prototype,exe=Qbe.toString,txe=Jbe.hasOwnProperty,nxe=RegExp("^"+exe.call(txe).replace(Zbe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rxe(e){if(!Gbe(e)||qbe(e))return!1;var t=Kbe(e)?nxe:Xbe;return t.test(Ybe(e))}var ixe=rxe;function oxe(e,t){return e?.[t]}var axe=oxe,sxe=ixe,uxe=axe;function lxe(e,t){var n=uxe(e,t);return sxe(n)?n:void 0}var mf=lxe,cxe=mf,fxe=cxe(Object,"create"),bw=fxe,PD=bw;function dxe(){this.__data__=PD?PD(null):{},this.size=0}var hxe=dxe;function pxe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gxe=pxe,mxe=bw,vxe="__lodash_hash_undefined__",yxe=Object.prototype,bxe=yxe.hasOwnProperty;function xxe(e){var t=this.__data__;if(mxe){var n=t[e];return n===vxe?void 0:n}return bxe.call(t,e)?t[e]:void 0}var wxe=xxe,_xe=bw,Sxe=Object.prototype,Cxe=Sxe.hasOwnProperty;function Exe(e){var t=this.__data__;return _xe?t[e]!==void 0:Cxe.call(t,e)}var Oxe=Exe,Axe=bw,Pxe="__lodash_hash_undefined__";function kxe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Axe&&t===void 0?Pxe:t,this}var Txe=kxe,Mxe=hxe,Rxe=gxe,Dxe=wxe,$xe=Oxe,Ixe=Txe;function Vh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var Qxe=Xxe,Jxe=xw;function ewe(e,t){var n=this.__data__,r=Jxe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var twe=ewe,nwe=Fxe,rwe=Kxe,iwe=Yxe,owe=Qxe,awe=twe;function Wh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Cc=function(t){return Fm(t)&&t.indexOf("%")===t.length-1},Ke=function(t){return s_e(t)&&!Yh(t)},Wr=function(t){return Ke(t)||Fm(t)},f_e=0,bf=function(t){var n=++f_e;return"".concat(t||"").concat(n)},nf=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(!Ke(t)&&!Fm(t))return r;var o;if(Cc(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Yh(o)&&(o=r),i&&o>n&&(o=n),o},il=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},d_e=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 b_e(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 DE(e){"@babel/helpers - typeof";return DE=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},DE(e)}var ZD={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"},du=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},XD=null,VS=null,YA=function e(t){if(t===XD&&Array.isArray(VS))return VS;var n=[];return y.Children.forEach(t,function(r){Ut(r)||(n_e.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),VS=n,XD=t,n};function go(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return du(i)}):r=[du(t)],YA(e).forEach(function(i){var o=pa(i,"type.displayName")||pa(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Mo(e,t){var n=go(e,t);return n[0]}var QD=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Ke(r)||r<=0||!Ke(i)||i<=0)},x_e=["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"],w_e=function(t){return t&&t.type&&Fm(t.type)&&x_e.indexOf(t.type)>=0},HH=function(t){return t&&DE(t)==="object"&&"clipDot"in t},__e=function(t,n,r,i){var o,a=(o=HS?.[i])!==null&&o!==void 0?o:[];return!Vt(t)&&(i&&a.includes(n)||g_e.includes(n))||r&&GA.includes(n)},zt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(y.isValidElement(t)&&(i=t.props),!Wh(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;__e((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},$E=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return JD(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 A_e(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 NE(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,u=e.desc,l=O_e(e,E_e),c=i||{width:n,height:r,x:0,y:0},f=dn("recharts-surface",o);return z.createElement("svg",IE({},zt(l,!0,"svg"),{className:f,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),z.createElement("title",null,s),z.createElement("desc",null,u),t)}var P_e=["children","className"];function LE(){return LE=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 T_e(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 Cn=z.forwardRef(function(e,t){var n=e.children,r=e.className,i=k_e(e,P_e),o=dn("recharts-layer",r);return z.createElement("g",LE({className:o},zt(i,!0),{ref:t}),n)}),hu=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:D_e(e,t,n)}var I_e=$_e,N_e="\\ud800-\\udfff",L_e="\\u0300-\\u036f",F_e="\\ufe20-\\ufe2f",j_e="\\u20d0-\\u20ff",B_e=L_e+F_e+j_e,z_e="\\ufe0e\\ufe0f",U_e="\\u200d",H_e=RegExp("["+U_e+N_e+B_e+z_e+"]");function V_e(e){return H_e.test(e)}var VH=V_e;function W_e(e){return e.split("")}var q_e=W_e,WH="\\ud800-\\udfff",K_e="\\u0300-\\u036f",G_e="\\ufe20-\\ufe2f",Y_e="\\u20d0-\\u20ff",Z_e=K_e+G_e+Y_e,X_e="\\ufe0e\\ufe0f",Q_e="["+WH+"]",FE="["+Z_e+"]",jE="\\ud83c[\\udffb-\\udfff]",J_e="(?:"+FE+"|"+jE+")",qH="[^"+WH+"]",KH="(?:\\ud83c[\\udde6-\\uddff]){2}",GH="[\\ud800-\\udbff][\\udc00-\\udfff]",eSe="\\u200d",YH=J_e+"?",ZH="["+X_e+"]?",tSe="(?:"+eSe+"(?:"+[qH,KH,GH].join("|")+")"+ZH+YH+")*",nSe=ZH+YH+tSe,rSe="(?:"+[qH+FE+"?",FE,KH,GH,Q_e].join("|")+")",iSe=RegExp(jE+"(?="+jE+")|"+rSe+nSe,"g");function oSe(e){return e.match(iSe)||[]}var aSe=oSe,sSe=q_e,uSe=VH,lSe=aSe;function cSe(e){return uSe(e)?lSe(e):sSe(e)}var fSe=cSe,dSe=I_e,hSe=VH,pSe=fSe,gSe=LH;function mSe(e){return function(t){t=gSe(t);var n=hSe(t)?pSe(t):void 0,r=n?n[0]:t.charAt(0),i=n?dSe(n,1).join(""):t.slice(1);return r[e]()+i}}var vSe=mSe,ySe=vSe,bSe=ySe("toUpperCase"),xSe=bSe;const jw=En(xSe);function Hn(e){return function(){return e}}const XH=Math.cos,yb=Math.sin,rs=Math.sqrt,bb=Math.PI,Bw=2*bb,BE=Math.PI,zE=2*BE,dc=1e-6,wSe=zE-dc;function QH(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return QH;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;idc)if(!(Math.abs(f*u-l*c)>dc)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=i-s,v=u*u+l*l,b=p*p+m*m,w=Math.sqrt(v),x=Math.sqrt(h),S=o*Math.tan((BE-Math.acos((v+h-b)/(2*w*x)))/2),O=S/x,E=S/w;Math.abs(O-1)>dc&&this._append`L${t+O*c},${n+O*f}`,this._append`A${o},${o},0,0,${+(f*p>c*m)},${this._x1=t+E*u},${this._y1=n+E*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),l=t+s,c=n+u,f=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>dc||Math.abs(this._y1-c)>dc)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%zE+zE),h>wSe?this._append`A${r},${r},0,1,${f},${t-s},${n-u}A${r},${r},0,1,${f},${this._x1=l},${this._y1=c}`:h>dc&&this._append`A${r},${r},0,${+(h>=BE)},${f},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}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 ZA(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 SSe(t)}function XA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function JH(e){this._context=e}JH.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 zw(e){return new JH(e)}function eV(e){return e[0]}function tV(e){return e[1]}function nV(e,t){var n=Hn(!0),r=null,i=zw,o=null,a=ZA(s);e=typeof e=="function"?e:e===void 0?eV:Hn(e),t=typeof t=="function"?t:t===void 0?tV:Hn(t);function s(u){var l,c=(u=XA(u)).length,f,h=!1,p;for(r==null&&(o=i(p=a())),l=0;l<=c;++l)!(l=p;--m)s.point(S[m],O[m]);s.lineEnd(),s.areaEnd()}w&&(S[h]=+e(b,h,f),O[h]=+t(b,h,f),s.point(r?+r(b,h,f):S[h],n?+n(b,h,f):O[h]))}if(x)return s=null,x+""||null}function c(){return nV().defined(i).curve(a).context(o)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Hn(+f),r=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Hn(+f),l):e},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Hn(+f),l):r},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Hn(+f),n=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Hn(+f),l):t},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Hn(+f),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(r).y(t)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Hn(!!f),l):i},l.curve=function(f){return arguments.length?(a=f,o!=null&&(s=a(o)),l):a},l.context=function(f){return arguments.length?(f==null?o=s=null:s=a(o=f),l):o},l}class rV{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 CSe(e){return new rV(e,!0)}function ESe(e){return new rV(e,!1)}const QA={draw(e,t){const n=rs(t/bb);e.moveTo(n,0),e.arc(0,0,n,0,Bw)}},OSe={draw(e,t){const n=rs(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()}},iV=rs(1/3),ASe=iV*2,PSe={draw(e,t){const n=rs(t/ASe),r=n*iV;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},kSe={draw(e,t){const n=rs(t),r=-n/2;e.rect(r,r,n,n)}},TSe=.8908130915292852,oV=yb(bb/10)/yb(7*bb/10),MSe=yb(Bw/10)*oV,RSe=-XH(Bw/10)*oV,DSe={draw(e,t){const n=rs(t*TSe),r=MSe*n,i=RSe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Bw*o/5,s=XH(a),u=yb(a);e.lineTo(u*n,-s*n),e.lineTo(s*r-u*i,u*r+s*i)}e.closePath()}},WS=rs(3),$Se={draw(e,t){const n=-rs(t/(WS*3));e.moveTo(0,n*2),e.lineTo(-WS*n,-n),e.lineTo(WS*n,-n),e.closePath()}},na=-.5,ra=rs(3)/2,UE=1/rs(12),ISe=(UE/2+1)*3,NSe={draw(e,t){const n=rs(t/ISe),r=n/2,i=n*UE,o=r,a=n*UE+n,s=-o,u=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,u),e.lineTo(na*r-ra*i,ra*r+na*i),e.lineTo(na*o-ra*a,ra*o+na*a),e.lineTo(na*s-ra*u,ra*s+na*u),e.lineTo(na*r+ra*i,na*i-ra*r),e.lineTo(na*o+ra*a,na*a-ra*o),e.lineTo(na*s+ra*u,na*u-ra*s),e.closePath()}};function LSe(e,t){let n=null,r=ZA(i);e=typeof e=="function"?e:Hn(e||QA),t=typeof t=="function"?t:Hn(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Hn(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Hn(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function xb(){}function wb(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 aV(e){this._context=e}aV.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:wb(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:wb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function FSe(e){return new aV(e)}function sV(e){this._context=e}sV.prototype={areaStart:xb,areaEnd:xb,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:wb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jSe(e){return new sV(e)}function uV(e){this._context=e}uV.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:wb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function BSe(e){return new uV(e)}function lV(e){this._context=e}lV.prototype={areaStart:xb,areaEnd:xb,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 zSe(e){return new lV(e)}function t9(e){return e<0?-1:1}function n9(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(t9(o)+t9(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function r9(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function qS(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function _b(e){this._context=e}_b.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:qS(this,this._t0,r9(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,qS(this,r9(this,n=n9(this,e,t)),n);break;default:qS(this,this._t0,n=n9(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function cV(e){this._context=new fV(e)}(cV.prototype=Object.create(_b.prototype)).point=function(e,t){_b.prototype.point.call(this,t,e)};function fV(e){this._context=e}fV.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,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function USe(e){return new _b(e)}function HSe(e){return new cV(e)}function dV(e){this._context=e}dV.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=i9(e),i=i9(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[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 WSe(e){return new Uw(e,.5)}function qSe(e){return new Uw(e,0)}function KSe(e){return new Uw(e,1)}function th(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function GSe(e,t){return e[t]}function YSe(e){const t=[];return t.key=e,t}function ZSe(){var e=Hn([]),t=HE,n=th,r=GSe;function i(o){var a=Array.from(e.apply(this,arguments),YSe),s,u=a.length,l=-1,c;for(const f of o)for(s=0,++l;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function o3e(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 hV={symbolCircle:QA,symbolCross:OSe,symbolDiamond:PSe,symbolSquare:kSe,symbolStar:DSe,symbolTriangle:$Se,symbolWye:NSe},a3e=Math.PI/180,s3e=function(t){var n="symbol".concat(jw(t));return hV[n]||QA},u3e=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*a3e;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}},l3e=function(t,n){hV["symbol".concat(jw(t))]=n},Hw=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,u=i3e(t,e3e),l=a9(a9({},u),{},{type:r,size:o,sizeType:s}),c=function(){var b=s3e(r),w=LSe().type(b).size(u3e(o,s,r));return w()},f=l.className,h=l.cx,p=l.cy,m=zt(l,!0);return h===+h&&p===+p&&o===+o?z.createElement("path",VE({},m,{className:dn("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};Hw.registerSymbol=l3e;function nh(e){"@babel/helpers - typeof";return nh=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},nh(e)}function WE(){return WE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?1:-1},Sc=function(t){return $m(t)&&t.indexOf("%")===t.length-1},qe=function(t){return P2e(t)&&!Kh(t)},Hr=function(t){return qe(t)||$m(t)},R2e=0,vf=function(t){var n=++R2e;return"".concat(t||"").concat(n)},ef=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(!qe(t)&&!$m(t))return r;var o;if(Sc(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Kh(o)&&(o=r),i&&o>n&&(o=n),o},rl=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},D2e=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 B2e(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 EE(e){"@babel/helpers - typeof";return EE=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},EE(e)}var ID={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"},fu=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},ND=null,FS=null,jA=function e(t){if(t===ND&&Array.isArray(FS))return FS;var n=[];return y.Children.forEach(t,function(r){Ut(r)||(S2e.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),FS=n,ND=t,n};function po(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return fu(i)}):r=[fu(t)],jA(e).forEach(function(i){var o=pa(i,"type.displayName")||pa(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function To(e,t){var n=po(e,t);return n[0]}var LD=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!qe(r)||r<=0||!qe(i)||i<=0)},z2e=["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"],U2e=function(t){return t&&t.type&&$m(t.type)&&z2e.indexOf(t.type)>=0},OV=function(t){return t&&EE(t)==="object"&&"clipDot"in t},V2e=function(t,n,r,i){var o,a=(o=LS?.[i])!==null&&o!==void 0?o:[];return!Wt(t)&&(i&&a.includes(n)||N2e.includes(n))||r&&FA.includes(n)},zt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(y.isValidElement(t)&&(i=t.props),!Uh(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;V2e((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},OE=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return FD(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 G2e(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 PE(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,u=e.desc,l=q2e(e,K2e),c=i||{width:n,height:r,x:0,y:0},f=dn("recharts-surface",o);return F.createElement("svg",AE({},zt(l,!0,"svg"),{className:f,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),F.createElement("title",null,s),F.createElement("desc",null,u),t)}var Y2e=["children","className"];function kE(){return kE=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 X2e(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 Cn=F.forwardRef(function(e,t){var n=e.children,r=e.className,i=Z2e(e,Y2e),o=dn("recharts-layer",r);return F.createElement("g",kE({className:o},zt(i,!0),{ref:t}),n)}),du=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:e_e(e,t,n)}var n_e=t_e,r_e="\\ud800-\\udfff",i_e="\\u0300-\\u036f",o_e="\\ufe20-\\ufe2f",a_e="\\u20d0-\\u20ff",s_e=i_e+o_e+a_e,u_e="\\ufe0e\\ufe0f",l_e="\\u200d",c_e=RegExp("["+l_e+r_e+s_e+u_e+"]");function f_e(e){return c_e.test(e)}var AV=f_e;function d_e(e){return e.split("")}var h_e=d_e,PV="\\ud800-\\udfff",p_e="\\u0300-\\u036f",g_e="\\ufe20-\\ufe2f",m_e="\\u20d0-\\u20ff",v_e=p_e+g_e+m_e,y_e="\\ufe0e\\ufe0f",b_e="["+PV+"]",TE="["+v_e+"]",ME="\\ud83c[\\udffb-\\udfff]",x_e="(?:"+TE+"|"+ME+")",kV="[^"+PV+"]",TV="(?:\\ud83c[\\udde6-\\uddff]){2}",MV="[\\ud800-\\udbff][\\udc00-\\udfff]",w_e="\\u200d",RV=x_e+"?",DV="["+y_e+"]?",__e="(?:"+w_e+"(?:"+[kV,TV,MV].join("|")+")"+DV+RV+")*",S_e=DV+RV+__e,C_e="(?:"+[kV+TE+"?",TE,TV,MV,b_e].join("|")+")",E_e=RegExp(ME+"(?="+ME+")|"+C_e+S_e,"g");function O_e(e){return e.match(E_e)||[]}var A_e=O_e,P_e=h_e,k_e=AV,T_e=A_e;function M_e(e){return k_e(e)?T_e(e):P_e(e)}var R_e=M_e,D_e=n_e,$_e=AV,I_e=R_e,N_e=xV;function L_e(e){return function(t){t=N_e(t);var n=$_e(t)?I_e(t):void 0,r=n?n[0]:t.charAt(0),i=n?D_e(n,1).join(""):t.slice(1);return r[e]()+i}}var F_e=L_e,j_e=F_e,B_e=j_e("toUpperCase"),z_e=B_e;const $w=Pn(z_e);function Vn(e){return function(){return e}}const $V=Math.cos,hb=Math.sin,rs=Math.sqrt,pb=Math.PI,Iw=2*pb,RE=Math.PI,DE=2*RE,fc=1e-6,U_e=DE-fc;function IV(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return IV;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;ifc)if(!(Math.abs(f*u-l*c)>fc)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=i-s,v=u*u+l*l,b=p*p+m*m,w=Math.sqrt(v),x=Math.sqrt(h),S=o*Math.tan((RE-Math.acos((v+h-b)/(2*w*x)))/2),O=S/x,E=S/w;Math.abs(O-1)>fc&&this._append`L${t+O*c},${n+O*f}`,this._append`A${o},${o},0,0,${+(f*p>c*m)},${this._x1=t+E*u},${this._y1=n+E*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),l=t+s,c=n+u,f=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>fc||Math.abs(this._y1-c)>fc)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%DE+DE),h>U_e?this._append`A${r},${r},0,1,${f},${t-s},${n-u}A${r},${r},0,1,${f},${this._x1=l},${this._y1=c}`:h>fc&&this._append`A${r},${r},0,${+(h>=RE)},${f},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}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 BA(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 W_e(t)}function zA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function NV(e){this._context=e}NV.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 Nw(e){return new NV(e)}function LV(e){return e[0]}function FV(e){return e[1]}function jV(e,t){var n=Vn(!0),r=null,i=Nw,o=null,a=BA(s);e=typeof e=="function"?e:e===void 0?LV:Vn(e),t=typeof t=="function"?t:t===void 0?FV:Vn(t);function s(u){var l,c=(u=zA(u)).length,f,h=!1,p;for(r==null&&(o=i(p=a())),l=0;l<=c;++l)!(l=p;--m)s.point(S[m],O[m]);s.lineEnd(),s.areaEnd()}w&&(S[h]=+e(b,h,f),O[h]=+t(b,h,f),s.point(r?+r(b,h,f):S[h],n?+n(b,h,f):O[h]))}if(x)return s=null,x+""||null}function c(){return jV().defined(i).curve(a).context(o)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Vn(+f),r=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Vn(+f),l):e},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Vn(+f),l):r},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Vn(+f),n=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Vn(+f),l):t},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Vn(+f),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(r).y(t)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Vn(!!f),l):i},l.curve=function(f){return arguments.length?(a=f,o!=null&&(s=a(o)),l):a},l.context=function(f){return arguments.length?(f==null?o=s=null:s=a(o=f),l):o},l}class BV{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 H_e(e){return new BV(e,!0)}function K_e(e){return new BV(e,!1)}const UA={draw(e,t){const n=rs(t/pb);e.moveTo(n,0),e.arc(0,0,n,0,Iw)}},q_e={draw(e,t){const n=rs(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()}},zV=rs(1/3),G_e=zV*2,Y_e={draw(e,t){const n=rs(t/G_e),r=n*zV;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Z_e={draw(e,t){const n=rs(t),r=-n/2;e.rect(r,r,n,n)}},X_e=.8908130915292852,UV=hb(pb/10)/hb(7*pb/10),Q_e=hb(Iw/10)*UV,J_e=-$V(Iw/10)*UV,eSe={draw(e,t){const n=rs(t*X_e),r=Q_e*n,i=J_e*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Iw*o/5,s=$V(a),u=hb(a);e.lineTo(u*n,-s*n),e.lineTo(s*r-u*i,u*r+s*i)}e.closePath()}},jS=rs(3),tSe={draw(e,t){const n=-rs(t/(jS*3));e.moveTo(0,n*2),e.lineTo(-jS*n,-n),e.lineTo(jS*n,-n),e.closePath()}},ta=-.5,na=rs(3)/2,$E=1/rs(12),nSe=($E/2+1)*3,rSe={draw(e,t){const n=rs(t/nSe),r=n/2,i=n*$E,o=r,a=n*$E+n,s=-o,u=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,u),e.lineTo(ta*r-na*i,na*r+ta*i),e.lineTo(ta*o-na*a,na*o+ta*a),e.lineTo(ta*s-na*u,na*s+ta*u),e.lineTo(ta*r+na*i,ta*i-na*r),e.lineTo(ta*o+na*a,ta*a-na*o),e.lineTo(ta*s+na*u,ta*u-na*s),e.closePath()}};function iSe(e,t){let n=null,r=BA(i);e=typeof e=="function"?e:Vn(e||UA),t=typeof t=="function"?t:Vn(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Vn(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Vn(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function gb(){}function mb(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 VV(e){this._context=e}VV.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:mb(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:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oSe(e){return new VV(e)}function WV(e){this._context=e}WV.prototype={areaStart:gb,areaEnd:gb,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:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aSe(e){return new WV(e)}function HV(e){this._context=e}HV.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:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sSe(e){return new HV(e)}function KV(e){this._context=e}KV.prototype={areaStart:gb,areaEnd:gb,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 uSe(e){return new KV(e)}function BD(e){return e<0?-1:1}function zD(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(BD(o)+BD(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function UD(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function BS(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function vb(e){this._context=e}vb.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:BS(this,this._t0,UD(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,BS(this,UD(this,n=zD(this,e,t)),n);break;default:BS(this,this._t0,n=zD(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function qV(e){this._context=new GV(e)}(qV.prototype=Object.create(vb.prototype)).point=function(e,t){vb.prototype.point.call(this,t,e)};function GV(e){this._context=e}GV.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,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function lSe(e){return new vb(e)}function cSe(e){return new qV(e)}function YV(e){this._context=e}YV.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=VD(e),i=VD(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[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 dSe(e){return new Lw(e,.5)}function hSe(e){return new Lw(e,0)}function pSe(e){return new Lw(e,1)}function Qd(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function gSe(e,t){return e[t]}function mSe(e){const t=[];return t.key=e,t}function vSe(){var e=Vn([]),t=IE,n=Qd,r=gSe;function i(o){var a=Array.from(e.apply(this,arguments),mSe),s,u=a.length,l=-1,c;for(const f of o)for(s=0,++l;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OSe(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 ZV={symbolCircle:UA,symbolCross:q_e,symbolDiamond:Y_e,symbolSquare:Z_e,symbolStar:eSe,symbolTriangle:tSe,symbolWye:rSe},ASe=Math.PI/180,PSe=function(t){var n="symbol".concat($w(t));return ZV[n]||UA},kSe=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*ASe;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}},TSe=function(t,n){ZV["symbol".concat($w(t))]=n},Fw=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,u=ESe(t,wSe),l=HD(HD({},u),{},{type:r,size:o,sizeType:s}),c=function(){var b=PSe(r),w=iSe().type(b).size(kSe(o,s,r));return w()},f=l.className,h=l.cx,p=l.cy,m=zt(l,!0);return h===+h&&p===+p&&o===+o?F.createElement("path",NE({},m,{className:dn("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};Fw.registerSymbol=TSe;function Jd(e){"@babel/helpers - typeof";return Jd=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},Jd(e)}function LE(){return LE=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var x=p.inactive?l:p.color;return z.createElement("li",WE({className:b,style:f,key:"legend-item-".concat(m)},Sg(r.props,p,m)),z.createElement(NE,{width:a,height:a,viewBox:c,style:h},r.renderIcon(p)),z.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},v?v(w,p,m):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return z.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(y.PureComponent);Eg(JA,"displayName","Legend");Eg(JA,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var b3e=Ow;function x3e(){this.__data__=new b3e,this.size=0}var w3e=x3e;function _3e(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var S3e=_3e;function C3e(e){return this.__data__.get(e)}var E3e=C3e;function O3e(e){return this.__data__.has(e)}var A3e=O3e,P3e=Ow,k3e=zA,T3e=UA,M3e=200;function R3e(e,t){var n=this.__data__;if(n instanceof P3e){var r=n.__data__;if(!k3e||r.lengths))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,h=!0,p=n&eCe?new Z3e:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=iEe}var rP=oEe,aEe=Mu,sEe=rP,uEe=Ru,lEe="[object Arguments]",cEe="[object Array]",fEe="[object Boolean]",dEe="[object Date]",hEe="[object Error]",pEe="[object Function]",gEe="[object Map]",mEe="[object Number]",vEe="[object Object]",yEe="[object RegExp]",bEe="[object Set]",xEe="[object String]",wEe="[object WeakMap]",_Ee="[object ArrayBuffer]",SEe="[object DataView]",CEe="[object Float32Array]",EEe="[object Float64Array]",OEe="[object Int8Array]",AEe="[object Int16Array]",PEe="[object Int32Array]",kEe="[object Uint8Array]",TEe="[object Uint8ClampedArray]",MEe="[object Uint16Array]",REe="[object Uint32Array]",er={};er[CEe]=er[EEe]=er[OEe]=er[AEe]=er[PEe]=er[kEe]=er[TEe]=er[MEe]=er[REe]=!0;er[lEe]=er[cEe]=er[_Ee]=er[fEe]=er[SEe]=er[dEe]=er[hEe]=er[pEe]=er[gEe]=er[mEe]=er[vEe]=er[yEe]=er[bEe]=er[xEe]=er[wEe]=!1;function DEe(e){return uEe(e)&&sEe(e.length)&&!!er[aEe(e)]}var $Ee=DEe;function IEe(e){return function(t){return e(t)}}var CV=IEe,Ob={exports:{}};Ob.exports;(function(e,t){var n=MH,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(Ob,Ob.exports);var NEe=Ob.exports,LEe=$Ee,FEe=CV,h9=NEe,p9=h9&&h9.isTypedArray,jEe=p9?FEe(p9):LEe,EV=jEe,BEe=HCe,zEe=tP,UEe=yo,HEe=SV,VEe=nP,WEe=EV,qEe=Object.prototype,KEe=qEe.hasOwnProperty;function GEe(e,t){var n=UEe(e),r=!n&&zEe(e),i=!n&&!r&&HEe(e),o=!n&&!r&&!i&&WEe(e),a=n||r||i||o,s=a?BEe(e.length,String):[],u=s.length;for(var l in e)(t||KEe.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||VEe(l,u)))&&s.push(l);return s}var YEe=GEe,ZEe=Object.prototype;function XEe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ZEe;return e===n}var QEe=XEe;function JEe(e,t){return function(n){return e(t(n))}}var OV=JEe,e6e=OV,t6e=e6e(Object.keys,Object),n6e=t6e,r6e=QEe,i6e=n6e,o6e=Object.prototype,a6e=o6e.hasOwnProperty;function s6e(e){if(!r6e(e))return i6e(e);var t=[];for(var n in Object(e))a6e.call(e,n)&&n!="constructor"&&t.push(n);return t}var u6e=s6e,l6e=jA,c6e=rP;function f6e(e){return e!=null&&c6e(e.length)&&!l6e(e)}var jm=f6e,d6e=YEe,h6e=u6e,p6e=jm;function g6e(e){return p6e(e)?d6e(e):h6e(e)}var Vw=g6e,m6e=MCe,v6e=zCe,y6e=Vw;function b6e(e){return m6e(e,y6e,v6e)}var x6e=b6e,g9=x6e,w6e=1,_6e=Object.prototype,S6e=_6e.hasOwnProperty;function C6e(e,t,n,r,i,o){var a=n&w6e,s=g9(e),u=s.length,l=g9(t),c=l.length;if(u!=c&&!a)return!1;for(var f=u;f--;){var h=s[f];if(!(a?h in t:S6e.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var v=!0;o.set(e,t),o.set(t,e);for(var b=a;++f-1}var _Oe=wOe;function SOe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=FOe){var l=t?null:NOe(e);if(l)return LOe(l);a=!1,i=IOe,u=new ROe}else u=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eAe(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 tAe(e){return e.value}function nAe(e,t){if(z.isValidElement(e))return z.cloneElement(e,t);if(typeof e=="function")return z.createElement(e,t);t.ref;var n=JOe(t,WOe);return z.createElement(JA,n)}var M9=1,Id=function(e){function t(){var n;qOe(this,t);for(var r=arguments.length,i=new Array(r),o=0;oM9||Math.abs(i.height-this.lastBoundingBox.height)>M9)&&(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?Gs({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,u=i.margin,l=i.chartWidth,c=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var p=this.getBBoxSnapshot();f={left:((l||0)-p.width)/2}}else f=a==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();h={top:((c||0)-m.height)/2}}else h=s==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Gs(Gs({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,u=i.wrapperStyle,l=i.payloadUniqBy,c=i.payload,f=Gs(Gs({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(u)),u);return z.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},nAe(o,Gs(Gs({},this.props),{},{payload:DV(c,l,tAe)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Gs(Gs({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&Ke(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(y.PureComponent);Ww(Id,"displayName","Legend");Ww(Id,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var R9=Lm,rAe=tP,iAe=yo,D9=R9?R9.isConcatSpreadable:void 0;function oAe(e){return iAe(e)||rAe(e)||!!(D9&&e&&e[D9])}var aAe=oAe,sAe=wV,uAe=aAe;function NV(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=uAe),i||(i=[]);++o0&&n(s)?t>1?NV(s,t-1,n,r,i):sAe(i,s):r||(i[i.length]=s)}return i}var LV=NV;function lAe(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(n(o[u],u,o)===!1)break}return t}}var cAe=lAe,fAe=cAe,dAe=fAe(),hAe=dAe,pAe=hAe,gAe=Vw;function mAe(e,t){return e&&pAe(e,t,gAe)}var FV=mAe,vAe=jm;function yAe(e,t){return function(n,r){if(n==null)return n;if(!vAe(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&u&&!s&&!l||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!l&&e=s)return u;var l=n[r];return u*(l=="desc"?-1:1)}}return e.index-t.index}var RAe=MAe,ZS=VA,DAe=WA,$Ae=Vl,IAe=jV,NAe=AAe,LAe=CV,FAe=RAe,jAe=Qh,BAe=yo;function zAe(e,t,n){t.length?t=ZS(t,function(o){return BAe(o)?function(a){return DAe(a,o.length===1?o[0]:o)}:o}):t=[jAe];var r=-1;t=ZS(t,LAe($Ae));var i=IAe(e,function(o,a,s){var u=ZS(t,function(l){return l(o)});return{criteria:u,index:++r,value:o}});return NAe(i,function(o,a){return FAe(o,a,n)})}var UAe=zAe;function HAe(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 VAe=HAe,WAe=VAe,I9=Math.max;function qAe(e,t,n){return t=I9(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=I9(r.length-t,0),a=Array(o);++i0){if(++t>=nPe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var aPe=oPe,sPe=tPe,uPe=aPe,lPe=uPe(sPe),cPe=lPe,fPe=Qh,dPe=KAe,hPe=cPe;function pPe(e,t){return hPe(dPe(e,t,fPe),e+"")}var gPe=pPe,mPe=BA,vPe=jm,yPe=nP,bPe=Hl;function xPe(e,t,n){if(!bPe(n))return!1;var r=typeof t;return(r=="number"?vPe(n)&&yPe(t,n.length):r=="string"&&t in n)?mPe(n[t],e):!1}var qw=xPe,wPe=LV,_Pe=UAe,SPe=gPe,L9=qw,CPe=SPe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&L9(e,t[0],t[1])?t=[]:n>2&&L9(t[0],t[1],t[2])&&(t=[t[0]]),_Pe(e,wPe(t,1),[])}),EPe=CPe;const aP=En(EPe);function Og(e){"@babel/helpers - typeof";return Og=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},Og(e)}function JE(){return JE=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(Vp,"-left"),Ke(n)&&t&&Ke(t.x)&&n=t.y),"".concat(Vp,"-top"),Ke(r)&&t&&Ke(t.y)&&rv?Math.max(c,u[r]):Math.max(f,u[r])}function BPe(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 zPe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,u=e.viewBox,l,c,f;return a.height>0&&a.width>0&&n?(c=B9({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:u,viewBoxDimension:u.width}),f=B9({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:u,viewBoxDimension:u.height}),l=BPe({translateX:c,translateY:f,useTranslate3d:s})):l=FPe,{cssProperties:l,cssClasses:jPe({translateX:c,translateY:f,coordinate:n})}}function ih(e){"@babel/helpers - typeof";return ih=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},ih(e)}function z9(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 U9(e){for(var t=1;tH9||Math.abs(r.height-this.state.lastBoundingBox.height)>H9)&&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,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,u=i.animationEasing,l=i.children,c=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,m=i.position,v=i.reverseDirection,b=i.useTranslate3d,w=i.viewBox,x=i.wrapperStyle,S=zPe({allowEscapeViewBox:a,coordinate:c,offsetTopLeft:p,position:m,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:w}),O=S.cssClasses,E=S.cssProperties,C=U9(U9({transition:h&&o?"transform ".concat(s,"ms ").concat(u):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return z.createElement("div",{tabIndex:-1,className:O,style:C,ref:function(M){r.wrapperNode=M}},l)}}])}(y.PureComponent),XPe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},qa={isSsr:XPe(),get:function(t){return qa[t]},set:function(t,n){if(typeof t=="string")qa[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){qa[i]=t[i]})}}};function oh(e){"@babel/helpers - typeof";return oh=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},oh(e)}function V9(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 W9(e){for(var t=1;t0;return z.createElement(ZPe,{allowEscapeViewBox:a,animationDuration:s,animationEasing:u,isAnimationActive:h,active:o,coordinate:c,hasPayload:C,offset:p,position:b,reverseDirection:w,useTranslate3d:x,viewBox:S,wrapperStyle:O},s5e(l,W9(W9({},this.props),{},{payload:E})))}}])}(y.PureComponent);sP(Js,"displayName","Tooltip");sP(Js,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!qa.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 u5e=Ds,l5e=function(){return u5e.Date.now()},c5e=l5e,f5e=/\s/;function d5e(e){for(var t=e.length;t--&&f5e.test(e.charAt(t)););return t}var h5e=d5e,p5e=h5e,g5e=/^\s+/;function m5e(e){return e&&e.slice(0,p5e(e)+1).replace(g5e,"")}var v5e=m5e,y5e=v5e,q9=Hl,b5e=Vh,K9=NaN,x5e=/^[-+]0x[0-9a-f]+$/i,w5e=/^0b[01]+$/i,_5e=/^0o[0-7]+$/i,S5e=parseInt;function C5e(e){if(typeof e=="number")return e;if(b5e(e))return K9;if(q9(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=q9(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=y5e(e);var n=w5e.test(e);return n||_5e.test(e)?S5e(e.slice(2),n?2:8):x5e.test(e)?K9:+e}var WV=C5e,E5e=Hl,QS=c5e,G9=WV,O5e="Expected a function",A5e=Math.max,P5e=Math.min;function k5e(e,t,n){var r,i,o,a,s,u,l=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(O5e);t=G9(t)||0,E5e(n)&&(c=!!n.leading,f="maxWait"in n,o=f?A5e(G9(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(C){var k=r,M=i;return r=i=void 0,l=C,a=e.apply(M,k),a}function m(C){return l=C,s=setTimeout(w,t),c?p(C):a}function v(C){var k=C-u,M=C-l,N=t-k;return f?P5e(N,o-M):N}function b(C){var k=C-u,M=C-l;return u===void 0||k>=t||k<0||f&&M>=o}function w(){var C=QS();if(b(C))return x(C);s=setTimeout(w,v(C))}function x(C){return s=void 0,h&&r?p(C):(r=i=void 0,a)}function S(){s!==void 0&&clearTimeout(s),l=0,r=u=i=s=void 0}function O(){return s===void 0?a:x(QS())}function E(){var C=QS(),k=b(C);if(r=arguments,i=this,u=C,k){if(s===void 0)return m(u);if(f)return clearTimeout(s),s=setTimeout(w,t),p(u)}return s===void 0&&(s=setTimeout(w,t)),a}return E.cancel=S,E.flush=O,E}var T5e=k5e,M5e=T5e,R5e=Hl,D5e="Expected a function";function $5e(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(D5e);return R5e(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),M5e(e,t,{leading:r,maxWait:t,trailing:i})}var I5e=$5e;const qV=En(I5e);function Pg(e){"@babel/helpers - typeof";return Pg=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},Pg(e)}function Y9(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 by(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(ne=qV(ne,v,{trailing:!0,leading:!1}));var Z=new ResizeObserver(ne),R=E.current.getBoundingClientRect(),B=R.width,U=R.height;return Y(B,U),Z.observe(E.current),function(){Z.disconnect()}},[Y,v]);var W=y.useMemo(function(){var ne=N.containerWidth,Z=N.containerHeight;if(ne<0||Z<0)return null;hu(Cc(a)||Cc(u),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,a,u),hu(!n||n>0,"The aspect(%s) must be greater than zero.",n);var R=Cc(a)?ne:a,B=Cc(u)?Z:u;n&&n>0&&(R?B=R/n:B&&(R=B*n),h&&B>h&&(B=h)),hu(R>0||B>0,`The width(%s) and height(%s) of chart should be greater than 0, + H`).concat(ra,"M").concat(2*s,",").concat(o,` + A`).concat(a,",").concat(a,",0,1,1,").concat(s,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return F.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(ra/8,"h").concat(ra,"v").concat(ra*3/4,"h").concat(-ra,"z"),className:"recharts-legend-icon"});if(F.isValidElement(r.legendIcon)){var l=MSe({},r);return delete l.legendIcon,F.cloneElement(r.legendIcon,l)}return F.createElement(Fw,{fill:u,cx:o,cy:o,size:ra,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,o=i.payload,a=i.iconSize,s=i.layout,u=i.formatter,l=i.inactiveColor,c={x:0,y:0,width:ra,height:ra},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(p,m){var v=p.formatter||u,b=dn(wg(wg({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",p.inactive));if(p.type==="none")return null;var w=Wt(p.value)?null:p.value;du(!Wt(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var x=p.inactive?l:p.color;return F.createElement("li",LE({className:b,style:f,key:"legend-item-".concat(m)},bg(r.props,p,m)),F.createElement(PE,{width:a,height:a,viewBox:c,style:h},r.renderIcon(p)),F.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},v?v(w,p,m):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return F.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(y.PureComponent);wg(VA,"displayName","Legend");wg(VA,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var BSe=ww;function zSe(){this.__data__=new BSe,this.size=0}var USe=zSe;function VSe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var WSe=VSe;function HSe(e){return this.__data__.get(e)}var KSe=HSe;function qSe(e){return this.__data__.has(e)}var GSe=qSe,YSe=ww,ZSe=MA,XSe=RA,QSe=200;function JSe(e,t){var n=this.__data__;if(n instanceof YSe){var r=n.__data__;if(!ZSe||r.lengths))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,h=!0,p=n&w3e?new v3e:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=ECe}var qA=OCe,ACe=Tu,PCe=qA,kCe=Mu,TCe="[object Arguments]",MCe="[object Array]",RCe="[object Boolean]",DCe="[object Date]",$Ce="[object Error]",ICe="[object Function]",NCe="[object Map]",LCe="[object Number]",FCe="[object Object]",jCe="[object RegExp]",BCe="[object Set]",zCe="[object String]",UCe="[object WeakMap]",VCe="[object ArrayBuffer]",WCe="[object DataView]",HCe="[object Float32Array]",KCe="[object Float64Array]",qCe="[object Int8Array]",GCe="[object Int16Array]",YCe="[object Int32Array]",ZCe="[object Uint8Array]",XCe="[object Uint8ClampedArray]",QCe="[object Uint16Array]",JCe="[object Uint32Array]",er={};er[HCe]=er[KCe]=er[qCe]=er[GCe]=er[YCe]=er[ZCe]=er[XCe]=er[QCe]=er[JCe]=!0;er[TCe]=er[MCe]=er[VCe]=er[RCe]=er[WCe]=er[DCe]=er[$Ce]=er[ICe]=er[NCe]=er[LCe]=er[FCe]=er[jCe]=er[BCe]=er[zCe]=er[UCe]=!1;function eEe(e){return kCe(e)&&PCe(e.length)&&!!er[ACe(e)]}var tEe=eEe;function nEe(e){return function(t){return e(t)}}var sW=nEe,wb={exports:{}};wb.exports;(function(e,t){var n=pV,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(wb,wb.exports);var rEe=wb.exports,iEe=tEe,oEe=sW,QD=rEe,JD=QD&&QD.isTypedArray,aEe=JD?oEe(JD):iEe,uW=aEe,sEe=cCe,uEe=HA,lEe=vo,cEe=aW,fEe=KA,dEe=uW,hEe=Object.prototype,pEe=hEe.hasOwnProperty;function gEe(e,t){var n=lEe(e),r=!n&&uEe(e),i=!n&&!r&&cEe(e),o=!n&&!r&&!i&&dEe(e),a=n||r||i||o,s=a?sEe(e.length,String):[],u=s.length;for(var l in e)(t||pEe.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||fEe(l,u)))&&s.push(l);return s}var mEe=gEe,vEe=Object.prototype;function yEe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||vEe;return e===n}var bEe=yEe;function xEe(e,t){return function(n){return e(t(n))}}var lW=xEe,wEe=lW,_Ee=wEe(Object.keys,Object),SEe=_Ee,CEe=bEe,EEe=SEe,OEe=Object.prototype,AEe=OEe.hasOwnProperty;function PEe(e){if(!CEe(e))return EEe(e);var t=[];for(var n in Object(e))AEe.call(e,n)&&n!="constructor"&&t.push(n);return t}var kEe=PEe,TEe=kA,MEe=qA;function REe(e){return e!=null&&MEe(e.length)&&!TEe(e)}var Im=REe,DEe=mEe,$Ee=kEe,IEe=Im;function NEe(e){return IEe(e)?DEe(e):$Ee(e)}var jw=NEe,LEe=Q3e,FEe=uCe,jEe=jw;function BEe(e){return LEe(e,jEe,FEe)}var zEe=BEe,e9=zEe,UEe=1,VEe=Object.prototype,WEe=VEe.hasOwnProperty;function HEe(e,t,n,r,i,o){var a=n&UEe,s=e9(e),u=s.length,l=e9(t),c=l.length;if(u!=c&&!a)return!1;for(var f=u;f--;){var h=s[f];if(!(a?h in t:WEe.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var v=!0;o.set(e,t),o.set(t,e);for(var b=a;++f-1}var V4e=U4e;function W4e(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=oOe){var l=t?null:rOe(e);if(l)return iOe(l);a=!1,i=nOe,u=new J4e}else u=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wOe(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 _Oe(e){return e.value}function SOe(e,t){if(F.isValidElement(e))return F.cloneElement(e,t);if(typeof e=="function")return F.createElement(e,t);t.ref;var n=xOe(t,dOe);return F.createElement(VA,n)}var m9=1,Dd=function(e){function t(){var n;hOe(this,t);for(var r=arguments.length,i=new Array(r),o=0;om9||Math.abs(i.height-this.lastBoundingBox.height)>m9)&&(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?Gs({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,u=i.margin,l=i.chartWidth,c=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var p=this.getBBoxSnapshot();f={left:((l||0)-p.width)/2}}else f=a==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();h={top:((c||0)-m.height)/2}}else h=s==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Gs(Gs({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,u=i.wrapperStyle,l=i.payloadUniqBy,c=i.payload,f=Gs(Gs({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(u)),u);return F.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},SOe(o,Gs(Gs({},this.props),{},{payload:mW(c,l,_Oe)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Gs(Gs({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&qe(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(y.PureComponent);Bw(Dd,"displayName","Legend");Bw(Dd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var v9=Dm,COe=HA,EOe=vo,y9=v9?v9.isConcatSpreadable:void 0;function OOe(e){return EOe(e)||COe(e)||!!(y9&&e&&e[y9])}var AOe=OOe,POe=iW,kOe=AOe;function bW(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=kOe),i||(i=[]);++o0&&n(s)?t>1?bW(s,t-1,n,r,i):POe(i,s):r||(i[i.length]=s)}return i}var xW=bW;function TOe(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(n(o[u],u,o)===!1)break}return t}}var MOe=TOe,ROe=MOe,DOe=ROe(),$Oe=DOe,IOe=$Oe,NOe=jw;function LOe(e,t){return e&&IOe(e,t,NOe)}var wW=LOe,FOe=Im;function jOe(e,t){return function(n,r){if(n==null)return n;if(!FOe(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&u&&!s&&!l||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!l&&e=s)return u;var l=n[r];return u*(l=="desc"?-1:1)}}return e.index-t.index}var JOe=QOe,WS=$A,eAe=IA,tAe=Vl,nAe=_W,rAe=GOe,iAe=sW,oAe=JOe,aAe=Yh,sAe=vo;function uAe(e,t,n){t.length?t=WS(t,function(o){return sAe(o)?function(a){return eAe(a,o.length===1?o[0]:o)}:o}):t=[aAe];var r=-1;t=WS(t,iAe(tAe));var i=nAe(e,function(o,a,s){var u=WS(t,function(l){return l(o)});return{criteria:u,index:++r,value:o}});return rAe(i,function(o,a){return oAe(o,a,n)})}var lAe=uAe;function cAe(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 fAe=cAe,dAe=fAe,x9=Math.max;function hAe(e,t,n){return t=x9(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=x9(r.length-t,0),a=Array(o);++i0){if(++t>=SAe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var AAe=OAe,PAe=_Ae,kAe=AAe,TAe=kAe(PAe),MAe=TAe,RAe=Yh,DAe=pAe,$Ae=MAe;function IAe(e,t){return $Ae(DAe(e,t,RAe),e+"")}var NAe=IAe,LAe=TA,FAe=Im,jAe=KA,BAe=Ul;function zAe(e,t,n){if(!BAe(n))return!1;var r=typeof t;return(r=="number"?FAe(n)&&jAe(t,n.length):r=="string"&&t in n)?LAe(n[t],e):!1}var zw=zAe,UAe=xW,VAe=lAe,WAe=NAe,_9=zw,HAe=WAe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&_9(e,t[0],t[1])?t=[]:n>2&&_9(t[0],t[1],t[2])&&(t=[t[0]]),VAe(e,UAe(t,1),[])}),KAe=HAe;const ZA=Pn(KAe);function _g(e){"@babel/helpers - typeof";return _g=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},_g(e)}function HE(){return HE=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(zp,"-left"),qe(n)&&t&&qe(t.x)&&n=t.y),"".concat(zp,"-top"),qe(r)&&t&&qe(t.y)&&rv?Math.max(c,u[r]):Math.max(f,u[r])}function sPe(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 uPe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,u=e.viewBox,l,c,f;return a.height>0&&a.width>0&&n?(c=E9({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:u,viewBoxDimension:u.width}),f=E9({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:u,viewBoxDimension:u.height}),l=sPe({translateX:c,translateY:f,useTranslate3d:s})):l=oPe,{cssProperties:l,cssClasses:aPe({translateX:c,translateY:f,coordinate:n})}}function th(e){"@babel/helpers - typeof";return th=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},th(e)}function O9(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 A9(e){for(var t=1;tP9||Math.abs(r.height-this.state.lastBoundingBox.height)>P9)&&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,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,u=i.animationEasing,l=i.children,c=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,m=i.position,v=i.reverseDirection,b=i.useTranslate3d,w=i.viewBox,x=i.wrapperStyle,S=uPe({allowEscapeViewBox:a,coordinate:c,offsetTopLeft:p,position:m,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:w}),O=S.cssClasses,E=S.cssProperties,C=A9(A9({transition:h&&o?"transform ".concat(s,"ms ").concat(u):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return F.createElement("div",{tabIndex:-1,className:O,style:C,ref:function(M){r.wrapperNode=M}},l)}}])}(y.PureComponent),yPe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ka={isSsr:yPe(),get:function(t){return Ka[t]},set:function(t,n){if(typeof t=="string")Ka[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){Ka[i]=t[i]})}}};function nh(e){"@babel/helpers - typeof";return nh=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},nh(e)}function k9(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 T9(e){for(var t=1;t0;return F.createElement(vPe,{allowEscapeViewBox:a,animationDuration:s,animationEasing:u,isAnimationActive:h,active:o,coordinate:c,hasPayload:C,offset:p,position:b,reverseDirection:w,useTranslate3d:x,viewBox:S,wrapperStyle:O},PPe(l,T9(T9({},this.props),{},{payload:E})))}}])}(y.PureComponent);XA(Js,"displayName","Tooltip");XA(Js,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ka.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 kPe=Ds,TPe=function(){return kPe.Date.now()},MPe=TPe,RPe=/\s/;function DPe(e){for(var t=e.length;t--&&RPe.test(e.charAt(t)););return t}var $Pe=DPe,IPe=$Pe,NPe=/^\s+/;function LPe(e){return e&&e.slice(0,IPe(e)+1).replace(NPe,"")}var FPe=LPe,jPe=FPe,M9=Ul,BPe=zh,R9=NaN,zPe=/^[-+]0x[0-9a-f]+$/i,UPe=/^0b[01]+$/i,VPe=/^0o[0-7]+$/i,WPe=parseInt;function HPe(e){if(typeof e=="number")return e;if(BPe(e))return R9;if(M9(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=M9(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=jPe(e);var n=UPe.test(e);return n||VPe.test(e)?WPe(e.slice(2),n?2:8):zPe.test(e)?R9:+e}var PW=HPe,KPe=Ul,KS=MPe,D9=PW,qPe="Expected a function",GPe=Math.max,YPe=Math.min;function ZPe(e,t,n){var r,i,o,a,s,u,l=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(qPe);t=D9(t)||0,KPe(n)&&(c=!!n.leading,f="maxWait"in n,o=f?GPe(D9(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(C){var k=r,M=i;return r=i=void 0,l=C,a=e.apply(M,k),a}function m(C){return l=C,s=setTimeout(w,t),c?p(C):a}function v(C){var k=C-u,M=C-l,N=t-k;return f?YPe(N,o-M):N}function b(C){var k=C-u,M=C-l;return u===void 0||k>=t||k<0||f&&M>=o}function w(){var C=KS();if(b(C))return x(C);s=setTimeout(w,v(C))}function x(C){return s=void 0,h&&r?p(C):(r=i=void 0,a)}function S(){s!==void 0&&clearTimeout(s),l=0,r=u=i=s=void 0}function O(){return s===void 0?a:x(KS())}function E(){var C=KS(),k=b(C);if(r=arguments,i=this,u=C,k){if(s===void 0)return m(u);if(f)return clearTimeout(s),s=setTimeout(w,t),p(u)}return s===void 0&&(s=setTimeout(w,t)),a}return E.cancel=S,E.flush=O,E}var XPe=ZPe,QPe=XPe,JPe=Ul,e5e="Expected a function";function t5e(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(e5e);return JPe(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),QPe(e,t,{leading:r,maxWait:t,trailing:i})}var n5e=t5e;const kW=Pn(n5e);function Cg(e){"@babel/helpers - typeof";return Cg=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},Cg(e)}function $9(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 gy(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(ne=kW(ne,v,{trailing:!0,leading:!1}));var Z=new ResizeObserver(ne),G=E.current.getBoundingClientRect(),q=G.width,W=G.height;return H(q,W),Z.observe(E.current),function(){Z.disconnect()}},[H,v]);var V=y.useMemo(function(){var ne=N.containerWidth,Z=N.containerHeight;if(ne<0||Z<0)return null;du(Sc(a)||Sc(u),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,a,u),du(!n||n>0,"The aspect(%s) must be greater than zero.",n);var G=Sc(a)?ne:a,q=Sc(u)?Z:u;n&&n>0&&(G?q=G/n:q&&(G=q*n),h&&q>h&&(q=h)),du(G>0||q>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.`,R,B,a,u,c,f,n);var U=!Array.isArray(p)&&du(p.type).endsWith("Chart");return z.Children.map(p,function(F){return z.isValidElement(F)?y.cloneElement(F,by({width:R,height:B},U?{style:by({height:"100%",width:"100%",maxHeight:B,maxWidth:R},F.props.style)}:{})):F})},[n,p,u,h,f,c,N,a]);return z.createElement("div",{id:b?"".concat(b):void 0,className:dn("recharts-responsive-container",w),style:by(by({},O),{},{width:a,height:u,minWidth:c,minHeight:f,maxHeight:h}),ref:E},W)}),uP=function(t){return null};uP.displayName="Cell";function kg(e){"@babel/helpers - typeof";return kg=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},kg(e)}function X9(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 r6(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||qa.isSsr)return{width:0,height:0};var r=Y5e(n),i=JSON.stringify({text:t,copyStyle:r});if(Zf.widthCache[i])return Zf.widthCache[i];try{var o=document.getElementById(Q9);o||(o=document.createElement("span"),o.setAttribute("id",Q9),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=r6(r6({},G5e),r);Object.assign(o.style,a),o.textContent="".concat(t);var s=o.getBoundingClientRect(),u={width:s.width,height:s.height};return Zf.widthCache[i]=u,++Zf.cacheCount>K5e&&(Zf.cacheCount=0,Zf.widthCache={}),u}catch{return{width:0,height:0}}},Z5e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Tg(e){"@babel/helpers - typeof";return Tg=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},Tg(e)}function Tb(e,t){return e8e(e)||J5e(e,t)||Q5e(e,t)||X5e()}function X5e(){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 Q5e(e,t){if(e){if(typeof e=="string")return J9(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 J9(e,t)}}function J9(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 p8e(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 o7(e,t){return y8e(e)||v8e(e,t)||m8e(e,t)||g8e()}function g8e(){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 m8e(e,t){if(e){if(typeof e=="string")return a7(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 a7(e,t)}}function a7(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 R.reduce(function(B,U){var F=U.word,V=U.width,G=B[B.length-1];if(G&&(i==null||o||G.width+V+rU.width?B:U})};if(!c)return p;for(var v="…",b=function(R){var B=f.slice(0,R),U=ZV({breakAll:l,style:u,children:B+v}).wordsWithComputedWidth,F=h(U),V=F.length>a||m(F).width>Number(i);return[V,F]},w=0,x=f.length-1,S=0,O;w<=x&&S<=f.length-1;){var E=Math.floor((w+x)/2),C=E-1,k=b(C),M=o7(k,2),N=M[0],q=M[1],Y=b(E),W=o7(Y,1),ne=W[0];if(!N&&!ne&&(w=E+1),N&&ne&&(x=E-1),!N&&ne){O=q;break}S++}return O||p},s7=function(t){var n=Ut(t)?[]:t.toString().split(YV);return[{words:n}]},x8e=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!qa.isSsr){var u,l,c=ZV({breakAll:a,children:i,style:o});if(c){var f=c.wordsWithComputedWidth,h=c.spaceWidth;u=f,l=h}else return s7(i);return b8e({breakAll:a,children:i,maxLines:s,style:o},u,l,n,r)}return s7(i)},u7="#808080",Mb=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,s=a===void 0?"1em":a,u=t.capHeight,l=u===void 0?"0.71em":u,c=t.scaleToFit,f=c===void 0?!1:c,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,v=m===void 0?"end":m,b=t.fill,w=b===void 0?u7:b,x=i7(t,d8e),S=y.useMemo(function(){return x8e({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]),O=x.dx,E=x.dy,C=x.angle,k=x.className,M=x.breakAll,N=i7(x,h8e);if(!Wr(r)||!Wr(o))return null;var q=r+(Ke(O)?O:0),Y=o+(Ke(E)?E:0),W;switch(v){case"start":W=JS("calc(".concat(l,")"));break;case"middle":W=JS("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(l," / 2))"));break;default:W=JS("calc(".concat(S.length-1," * -").concat(s,")"));break}var ne=[];if(f){var Z=S[0].width,R=x.width;ne.push("scale(".concat((Ke(R)?R/Z:1)/Z,")"))}return C&&ne.push("rotate(".concat(C,", ").concat(q,", ").concat(Y,")")),ne.length&&(N.transform=ne.join(" ")),z.createElement("text",i6({},zt(N,!0),{x:q,y:Y,className:dn("recharts-text",k),textAnchor:p,fill:w.includes("url")?u7:w}),S.map(function(B,U){var F=B.words.join(M?"":" ");return z.createElement("tspan",{x:q,dy:U===0?W:s,key:"".concat(F,"-").concat(U)},F)}))};function Sl(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function w8e(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function lP(e){let t,n,r;e.length!==2?(t=Sl,n=(s,u)=>Sl(e(s),u),r=(s,u)=>e(s)-u):(t=e===Sl||e===w8e?e:_8e,n=e,r=e);function i(s,u,l=0,c=s.length){if(l>>1;n(s[f],u)<0?l=f+1:c=f}while(l>>1;n(s[f],u)<=0?l=f+1:c=f}while(ll&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function _8e(){return 0}function XV(e){return e===null?NaN:+e}function*S8e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const C8e=lP(Sl),Bm=C8e.right;lP(XV).center;class l7 extends Map{constructor(t,n=A8e){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(c7(this,t))}has(t){return super.has(c7(this,t))}set(t,n){return super.set(E8e(this,t),n)}delete(t){return super.delete(O8e(this,t))}}function c7({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function E8e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function O8e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function A8e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function P8e(e=Sl){if(e===Sl)return QV;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 QV(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const k8e=Math.sqrt(50),T8e=Math.sqrt(10),M8e=Math.sqrt(2);function Rb(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=k8e?10:o>=T8e?5:o>=M8e?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(e*l),u=Math.round(t*l),s/lt&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(e/l),u=Math.round(t/l),s*lt&&--u),u0))return[];if(e===t)return[e];const r=t=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l=r)&&(n=r);return n}function d7(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function JV(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?QV:P8e(i);r>n;){if(r-n>600){const u=r-n+1,l=t-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(n,Math.floor(t-l*f/u+h)),m=Math.min(r,Math.floor(t+(u-l)*f/u+h));JV(e,t,p,m,i)}const o=e[t];let a=n,s=r;for(Wp(e,n,t),i(e[r],o)>0&&Wp(e,n,r);a0;)--s}i(e[n],o)===0?Wp(e,n,s):(++s,Wp(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Wp(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function R8e(e,t,n){if(e=Float64Array.from(S8e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return d7(e);if(t>=1)return f7(e);var r,i=(r-1)*t,o=Math.floor(i),a=f7(JV(e,o).subarray(0,o+1)),s=d7(e.subarray(o+1));return a+(s-a)*(i-o)}}function D8e(e,t,n=XV){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,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function $8e(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,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?wy(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?wy(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=N8e.exec(e))?new uo(t[1],t[2],t[3],1):(t=L8e.exec(e))?new uo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=F8e.exec(e))?wy(t[1],t[2],t[3],t[4]):(t=j8e.exec(e))?wy(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=B8e.exec(e))?b7(t[1],t[2]/100,t[3]/100,1):(t=z8e.exec(e))?b7(t[1],t[2]/100,t[3]/100,t[4]):h7.hasOwnProperty(e)?m7(h7[e]):e==="transparent"?new uo(NaN,NaN,NaN,0):null}function m7(e){return new uo(e>>16&255,e>>8&255,e&255,1)}function wy(e,t,n,r){return r<=0&&(e=t=n=NaN),new uo(e,t,n,r)}function V8e(e){return e instanceof zm||(e=$g(e)),e?(e=e.rgb(),new uo(e.r,e.g,e.b,e.opacity)):new uo}function l6(e,t,n,r){return arguments.length===1?V8e(e):new uo(e,t,n,r??1)}function uo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}fP(uo,l6,tW(zm,{brighter(e){return e=e==null?Db:Math.pow(Db,e),new uo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Rg:Math.pow(Rg,e),new uo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new uo($c(this.r),$c(this.g),$c(this.b),$b(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:v7,formatHex:v7,formatHex8:W8e,formatRgb:y7,toString:y7}));function v7(){return`#${Ec(this.r)}${Ec(this.g)}${Ec(this.b)}`}function W8e(){return`#${Ec(this.r)}${Ec(this.g)}${Ec(this.b)}${Ec((isNaN(this.opacity)?1:this.opacity)*255)}`}function y7(){const e=$b(this.opacity);return`${e===1?"rgb(":"rgba("}${$c(this.r)}, ${$c(this.g)}, ${$c(this.b)}${e===1?")":`, ${e})`}`}function $b(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $c(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ec(e){return e=$c(e),(e<16?"0":"")+e.toString(16)}function b7(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ba(e,t,n,r)}function nW(e){if(e instanceof Ba)return new Ba(e.h,e.s,e.l,e.opacity);if(e instanceof zm||(e=$g(e)),!e)return new Ba;if(e instanceof Ba)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&u<1?0:a,new Ba(a,s,u,e.opacity)}function q8e(e,t,n,r){return arguments.length===1?nW(e):new Ba(e,t,n,r??1)}function Ba(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}fP(Ba,q8e,tW(zm,{brighter(e){return e=e==null?Db:Math.pow(Db,e),new Ba(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rg:Math.pow(Rg,e),new Ba(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 uo(e3(e>=240?e-240:e+120,i,r),e3(e,i,r),e3(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ba(x7(this.h),_y(this.s),_y(this.l),$b(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=$b(this.opacity);return`${e===1?"hsl(":"hsla("}${x7(this.h)}, ${_y(this.s)*100}%, ${_y(this.l)*100}%${e===1?")":`, ${e})`}`}}));function x7(e){return e=(e||0)%360,e<0?e+360:e}function _y(e){return Math.max(0,Math.min(1,e||0))}function e3(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 dP=e=>()=>e;function K8e(e,t){return function(n){return e+n*t}}function G8e(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 Y8e(e){return(e=+e)==1?rW:function(t,n){return n-t?G8e(t,n,e):dP(isNaN(t)?n:t)}}function rW(e,t){var n=t-e;return n?K8e(e,n):dP(isNaN(e)?t:e)}const w7=function e(t){var n=Y8e(t);function r(i,o){var a=n((i=l6(i)).r,(o=l6(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=rW(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function Z8e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Ib(r,i)})),n=t3.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function ske(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?uke:ske,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(t,e.map(r),Ib)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Nb),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=hP,c()},f.clamp=function(h){return arguments.length?(a=h?!0:Hi,c()):a!==Hi},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function pP(){return Kw()(Hi,Hi)}function lke(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Lb(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 ah(e){return e=Lb(Math.abs(e)),e?e[1]:NaN}function cke(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function fke(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var dke=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ig(e){if(!(t=dke.exec(e)))throw new Error("invalid format: "+e);var t;return new gP({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]})}Ig.prototype=gP.prototype;function gP(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+""}gP.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 hke(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 iW;function pke(e,t){var n=Lb(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(iW=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Lb(e,Math.max(0,t+o-1))[0]}function S7(e,t){var n=Lb(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 C7={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:lke,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)=>S7(e*100,t),r:S7,s:pke,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function E7(e){return e}var O7=Array.prototype.map,A7=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function gke(e){var t=e.grouping===void 0||e.thousands===void 0?E7:cke(O7.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+"",o=e.numerals===void 0?E7:fke(O7.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Ig(f);var h=f.fill,p=f.align,m=f.sign,v=f.symbol,b=f.zero,w=f.width,x=f.comma,S=f.precision,O=f.trim,E=f.type;E==="n"?(x=!0,E="g"):C7[E]||(S===void 0&&(S=12),O=!0,E="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var C=v==="$"?n:v==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",k=v==="$"?r:/[%p]/.test(E)?a:"",M=C7[E],N=/[defgprs%]/.test(E);S=S===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function q(Y){var W=C,ne=k,Z,R,B;if(E==="c")ne=M(Y)+ne,Y="";else{Y=+Y;var U=Y<0||1/Y<0;if(Y=isNaN(Y)?u:M(Math.abs(Y),S),O&&(Y=hke(Y)),U&&+Y==0&&m!=="+"&&(U=!1),W=(U?m==="("?m:s:m==="-"||m==="("?"":m)+W,ne=(E==="s"?A7[8+iW/3]:"")+ne+(U&&m==="("?")":""),N){for(Z=-1,R=Y.length;++ZB||B>57){ne=(B===46?i+Y.slice(Z+1):Y.slice(Z))+ne,Y=Y.slice(0,Z);break}}}x&&!b&&(Y=t(Y,1/0));var F=W.length+Y.length+ne.length,V=F>1)+W+Y+ne+V.slice(F);break;default:Y=V+W+Y+ne;break}return o(Y)}return q.toString=function(){return f+""},q}function c(f,h){var p=l((f=Ig(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(ah(h)/3)))*3,v=Math.pow(10,-m),b=A7[8+m/3];return function(w){return p(v*w)+b}}return{format:l,formatPrefix:c}}var Sy,mP,oW;mke({thousands:",",grouping:[3],currency:["$",""]});function mke(e){return Sy=gke(e),mP=Sy.format,oW=Sy.formatPrefix,Sy}function vke(e){return Math.max(0,-ah(Math.abs(e)))}function yke(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ah(t)/3)))*3-ah(Math.abs(e)))}function bke(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ah(t)-ah(e))+1}function aW(e,t,n,r){var i=s6(e,t,n),o;switch(r=Ig(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=yke(i,a))&&(r.precision=o),oW(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=bke(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=vke(i))&&(r.precision=o-(r.type==="%")*2);break}}return mP(r)}function Wl(e){var t=e.domain;return e.ticks=function(n){var r=t();return o6(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return aW(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,c=10;for(s0;){if(l=a6(a,s,n),l===u)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function Fb(){var e=pP();return e.copy=function(){return Um(e,Fb())},wa.apply(e,arguments),Wl(e)}function sW(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,Nb),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return sW(e).unknown(t)},e=arguments.length?Array.from(e,Nb):[0,1],Wl(n)}function uW(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function Cke(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 T7(e){return(t,n)=>-e(-t,n)}function vP(e){const t=e(P7,k7),n=t.domain;let r=10,i,o;function a(){return i=Cke(r),o=Ske(r),n()[0]<0?(i=T7(i),o=T7(o),e(xke,wke)):e(P7,k7),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const u=n();let l=u[0],c=u[u.length-1];const f=c0){for(;h<=p;++h)for(m=1;mc)break;w.push(v)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(v=h>0?m/o(-h):m*o(h),!(vc)break;w.push(v)}w.length*2{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Ig(u)).precision==null&&(u.trim=!0),u=mP(u)),s===1/0)return u;const l=Math.max(1,r*s/t.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*rn(uW(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function lW(){const e=vP(Kw()).domain([1,10]);return e.copy=()=>Um(e,lW()).base(e.base()),wa.apply(e,arguments),e}function M7(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function R7(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function yP(e){var t=1,n=e(M7(t),R7(t));return n.constant=function(r){return arguments.length?e(M7(t=+r),R7(t)):t},Wl(n)}function cW(){var e=yP(Kw());return e.copy=function(){return Um(e,cW()).constant(e.constant())},wa.apply(e,arguments)}function D7(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Eke(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Oke(e){return e<0?-e*e:e*e}function bP(e){var t=e(Hi,Hi),n=1;function r(){return n===1?e(Hi,Hi):n===.5?e(Eke,Oke):e(D7(n),D7(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Wl(t)}function xP(){var e=bP(Kw());return e.copy=function(){return Um(e,xP()).exponent(e.exponent())},wa.apply(e,arguments),e}function Ake(){return xP.apply(null,arguments).exponent(.5)}function $7(e){return Math.sign(e)*e*e}function Pke(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function fW(){var e=pP(),t=[0,1],n=!1,r;function i(o){var a=Pke(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert($7(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Nb)).map($7)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return fW(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},wa.apply(i,arguments),Wl(i)}function dW(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return hW().domain([e,t]).range(i).unknown(o)},wa.apply(Wl(a),arguments)}function pW(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Bm(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return pW().domain(e).range(t).unknown(n)},wa.apply(i,arguments)}const n3=new Date,r3=new Date;function Zr(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return u;let l;do u.push(l=new Date(+o)),t(o,s),e(o);while(lZr(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(n3.setTime(+o),r3.setTime(+a),e(n3),e(r3),Math.floor(n(n3,r3))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const jb=Zr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);jb.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Zr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):jb);jb.range;const ou=1e3,fa=ou*60,au=fa*60,Cu=au*24,wP=Cu*7,I7=Cu*30,i3=Cu*365,Oc=Zr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ou)},(e,t)=>(t-e)/ou,e=>e.getUTCSeconds());Oc.range;const _P=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ou)},(e,t)=>{e.setTime(+e+t*fa)},(e,t)=>(t-e)/fa,e=>e.getMinutes());_P.range;const SP=Zr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*fa)},(e,t)=>(t-e)/fa,e=>e.getUTCMinutes());SP.range;const CP=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ou-e.getMinutes()*fa)},(e,t)=>{e.setTime(+e+t*au)},(e,t)=>(t-e)/au,e=>e.getHours());CP.range;const EP=Zr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*au)},(e,t)=>(t-e)/au,e=>e.getUTCHours());EP.range;const Hm=Zr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*fa)/Cu,e=>e.getDate()-1);Hm.range;const Gw=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Cu,e=>e.getUTCDate()-1);Gw.range;const gW=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Cu,e=>Math.floor(e/Cu));gW.range;function xf(e){return Zr(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())*fa)/wP)}const Yw=xf(0),Bb=xf(1),kke=xf(2),Tke=xf(3),sh=xf(4),Mke=xf(5),Rke=xf(6);Yw.range;Bb.range;kke.range;Tke.range;sh.range;Mke.range;Rke.range;function wf(e){return Zr(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)/wP)}const Zw=wf(0),zb=wf(1),Dke=wf(2),$ke=wf(3),uh=wf(4),Ike=wf(5),Nke=wf(6);Zw.range;zb.range;Dke.range;$ke.range;uh.range;Ike.range;Nke.range;const OP=Zr(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());OP.range;const AP=Zr(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());AP.range;const Eu=Zr(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());Eu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(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)});Eu.range;const Ou=Zr(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());Ou.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(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)});Ou.range;function mW(e,t,n,r,i,o){const a=[[Oc,1,ou],[Oc,5,5*ou],[Oc,15,15*ou],[Oc,30,30*ou],[o,1,fa],[o,5,5*fa],[o,15,15*fa],[o,30,30*fa],[i,1,au],[i,3,3*au],[i,6,6*au],[i,12,12*au],[r,1,Cu],[r,2,2*Cu],[n,1,wP],[t,1,I7],[t,3,3*I7],[e,1,i3]];function s(l,c,f){const h=cb).right(a,h);if(p===a.length)return e.every(s6(l/i3,c/i3,f));if(p===0)return jb.every(Math.max(s6(l,c,f),1));const[m,v]=a[h/a[p-1][2]53)return null;"w"in be||(be.w=1),"Z"in be?(lt=a3(qp(be.y,0,1)),Nt=lt.getUTCDay(),lt=Nt>4||Nt===0?zb.ceil(lt):zb(lt),lt=Gw.offset(lt,(be.V-1)*7),be.y=lt.getUTCFullYear(),be.m=lt.getUTCMonth(),be.d=lt.getUTCDate()+(be.w+6)%7):(lt=o3(qp(be.y,0,1)),Nt=lt.getDay(),lt=Nt>4||Nt===0?Bb.ceil(lt):Bb(lt),lt=Hm.offset(lt,(be.V-1)*7),be.y=lt.getFullYear(),be.m=lt.getMonth(),be.d=lt.getDate()+(be.w+6)%7)}else("W"in be||"U"in be)&&("w"in be||(be.w="u"in be?be.u%7:"W"in be?1:0),Nt="Z"in be?a3(qp(be.y,0,1)).getUTCDay():o3(qp(be.y,0,1)).getDay(),be.m=0,be.d="W"in be?(be.w+6)%7+be.W*7-(Nt+5)%7:be.w+be.U*7-(Nt+6)%7);return"Z"in be?(be.H+=be.Z/100|0,be.M+=be.Z%100,a3(be)):o3(be)}}function M(Ae,Le,$e,be){for(var yt=0,lt=Le.length,Nt=$e.length,yn,nn;yt=Nt)return-1;if(yn=Le.charCodeAt(yt++),yn===37){if(yn=Le.charAt(yt++),nn=E[yn in N7?Le.charAt(yt++):yn],!nn||(be=nn(Ae,$e,be))<0)return-1}else if(yn!=$e.charCodeAt(be++))return-1}return be}function N(Ae,Le,$e){var be=l.exec(Le.slice($e));return be?(Ae.p=c.get(be[0].toLowerCase()),$e+be[0].length):-1}function q(Ae,Le,$e){var be=p.exec(Le.slice($e));return be?(Ae.w=m.get(be[0].toLowerCase()),$e+be[0].length):-1}function Y(Ae,Le,$e){var be=f.exec(Le.slice($e));return be?(Ae.w=h.get(be[0].toLowerCase()),$e+be[0].length):-1}function W(Ae,Le,$e){var be=w.exec(Le.slice($e));return be?(Ae.m=x.get(be[0].toLowerCase()),$e+be[0].length):-1}function ne(Ae,Le,$e){var be=v.exec(Le.slice($e));return be?(Ae.m=b.get(be[0].toLowerCase()),$e+be[0].length):-1}function Z(Ae,Le,$e){return M(Ae,t,Le,$e)}function R(Ae,Le,$e){return M(Ae,n,Le,$e)}function B(Ae,Le,$e){return M(Ae,r,Le,$e)}function U(Ae){return a[Ae.getDay()]}function F(Ae){return o[Ae.getDay()]}function V(Ae){return u[Ae.getMonth()]}function G(Ae){return s[Ae.getMonth()]}function oe(Ae){return i[+(Ae.getHours()>=12)]}function Q(Ae){return 1+~~(Ae.getMonth()/3)}function X(Ae){return a[Ae.getUTCDay()]}function ue(Ae){return o[Ae.getUTCDay()]}function de(Ae){return u[Ae.getUTCMonth()]}function Se(Ae){return s[Ae.getUTCMonth()]}function me(Ae){return i[+(Ae.getUTCHours()>=12)]}function Ze(Ae){return 1+~~(Ae.getUTCMonth()/3)}return{format:function(Ae){var Le=C(Ae+="",S);return Le.toString=function(){return Ae},Le},parse:function(Ae){var Le=k(Ae+="",!1);return Le.toString=function(){return Ae},Le},utcFormat:function(Ae){var Le=C(Ae+="",O);return Le.toString=function(){return Ae},Le},utcParse:function(Ae){var Le=k(Ae+="",!0);return Le.toString=function(){return Ae},Le}}}var N7={"-":"",_:" ",0:"0"},ai=/^\s*\d+/,Uke=/^%/,Hke=/[\\^$*+?|[\]().{}]/g;function bn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function Wke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function qke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Kke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Gke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Yke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function L7(e,t,n){var r=ai.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function F7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Zke(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 Xke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Qke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function j7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Jke(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function B7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function eTe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function tTe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function nTe(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function rTe(e,t,n){var r=ai.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function iTe(e,t,n){var r=Uke.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function oTe(e,t,n){var r=ai.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function aTe(e,t,n){var r=ai.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function z7(e,t){return bn(e.getDate(),t,2)}function sTe(e,t){return bn(e.getHours(),t,2)}function uTe(e,t){return bn(e.getHours()%12||12,t,2)}function lTe(e,t){return bn(1+Hm.count(Eu(e),e),t,3)}function vW(e,t){return bn(e.getMilliseconds(),t,3)}function cTe(e,t){return vW(e,t)+"000"}function fTe(e,t){return bn(e.getMonth()+1,t,2)}function dTe(e,t){return bn(e.getMinutes(),t,2)}function hTe(e,t){return bn(e.getSeconds(),t,2)}function pTe(e){var t=e.getDay();return t===0?7:t}function gTe(e,t){return bn(Yw.count(Eu(e)-1,e),t,2)}function yW(e){var t=e.getDay();return t>=4||t===0?sh(e):sh.ceil(e)}function mTe(e,t){return e=yW(e),bn(sh.count(Eu(e),e)+(Eu(e).getDay()===4),t,2)}function vTe(e){return e.getDay()}function yTe(e,t){return bn(Bb.count(Eu(e)-1,e),t,2)}function bTe(e,t){return bn(e.getFullYear()%100,t,2)}function xTe(e,t){return e=yW(e),bn(e.getFullYear()%100,t,2)}function wTe(e,t){return bn(e.getFullYear()%1e4,t,4)}function _Te(e,t){var n=e.getDay();return e=n>=4||n===0?sh(e):sh.ceil(e),bn(e.getFullYear()%1e4,t,4)}function STe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+bn(t/60|0,"0",2)+bn(t%60,"0",2)}function U7(e,t){return bn(e.getUTCDate(),t,2)}function CTe(e,t){return bn(e.getUTCHours(),t,2)}function ETe(e,t){return bn(e.getUTCHours()%12||12,t,2)}function OTe(e,t){return bn(1+Gw.count(Ou(e),e),t,3)}function bW(e,t){return bn(e.getUTCMilliseconds(),t,3)}function ATe(e,t){return bW(e,t)+"000"}function PTe(e,t){return bn(e.getUTCMonth()+1,t,2)}function kTe(e,t){return bn(e.getUTCMinutes(),t,2)}function TTe(e,t){return bn(e.getUTCSeconds(),t,2)}function MTe(e){var t=e.getUTCDay();return t===0?7:t}function RTe(e,t){return bn(Zw.count(Ou(e)-1,e),t,2)}function xW(e){var t=e.getUTCDay();return t>=4||t===0?uh(e):uh.ceil(e)}function DTe(e,t){return e=xW(e),bn(uh.count(Ou(e),e)+(Ou(e).getUTCDay()===4),t,2)}function $Te(e){return e.getUTCDay()}function ITe(e,t){return bn(zb.count(Ou(e)-1,e),t,2)}function NTe(e,t){return bn(e.getUTCFullYear()%100,t,2)}function LTe(e,t){return e=xW(e),bn(e.getUTCFullYear()%100,t,2)}function FTe(e,t){return bn(e.getUTCFullYear()%1e4,t,4)}function jTe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?uh(e):uh.ceil(e),bn(e.getUTCFullYear()%1e4,t,4)}function BTe(){return"+0000"}function H7(){return"%"}function V7(e){return+e}function W7(e){return Math.floor(+e/1e3)}var Xf,wW,_W;zTe({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 zTe(e){return Xf=zke(e),wW=Xf.format,Xf.parse,_W=Xf.utcFormat,Xf.utcParse,Xf}function UTe(e){return new Date(e)}function HTe(e){return e instanceof Date?+e:+new Date(+e)}function PP(e,t,n,r,i,o,a,s,u,l){var c=pP(),f=c.invert,h=c.domain,p=l(".%L"),m=l(":%S"),v=l("%I:%M"),b=l("%I %p"),w=l("%a %d"),x=l("%b %d"),S=l("%B"),O=l("%Y");function E(C){return(u(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>R8e(e,o/r))},n.copy=function(){return OW(t).domain(e)},Du.apply(n,arguments)}function Qw(){var e=0,t=.5,n=1,r=1,i,o,a,s,u,l=Hi,c,f=!1,h;function p(v){return isNaN(v=+v)?h:(v=.5+((v=+c(v))-o)*(r*vt}var XTe=ZTe,QTe=TW,JTe=XTe,eMe=Qh;function tMe(e){return e&&e.length?QTe(e,eMe,JTe):void 0}var nMe=tMe;const ll=En(nMe);function rMe(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};st.decimalPlaces=st.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*tr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};st.dividedBy=st.div=function(e){return pu(this,new this.constructor(e))};st.dividedToIntegerBy=st.idiv=function(e){var t=this,n=t.constructor;return zn(pu(t,new n(e),0,1),n.precision)};st.equals=st.eq=function(e){return!this.cmp(e)};st.exponent=function(){return Mr(this)};st.greaterThan=st.gt=function(e){return this.cmp(e)>0};st.greaterThanOrEqualTo=st.gte=function(e){return this.cmp(e)>=0};st.isInteger=st.isint=function(){return this.e>this.d.length-2};st.isNegative=st.isneg=function(){return this.s<0};st.isPositive=st.ispos=function(){return this.s>0};st.isZero=function(){return this.s===0};st.lessThan=st.lt=function(e){return this.cmp(e)<0};st.lessThanOrEqualTo=st.lte=function(e){return this.cmp(e)<1};st.logarithm=st.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq($o))throw Error(ya+"NaN");if(n.s<1)throw Error(ya+(n.s?"NaN":"-Infinity"));return n.eq($o)?new r(0):(ar=!1,t=pu(Ng(n,o),Ng(e,o),o),ar=!0,zn(t,i))};st.minus=st.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?$W(t,e):RW(t,(e.s=-e.s,e))};st.modulo=st.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ya+"NaN");return n.s?(ar=!1,t=pu(n,e,0,1).times(e),ar=!0,n.minus(t)):zn(new r(n),i)};st.naturalExponential=st.exp=function(){return DW(this)};st.naturalLogarithm=st.ln=function(){return Ng(this)};st.negated=st.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};st.plus=st.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?RW(t,e):$W(t,(e.s=-e.s,e))};st.precision=st.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ic+e);if(t=Mr(i)+1,r=i.d.length-1,n=r*tr+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};st.squareRoot=st.sqrt=function(){var e,t,n,r,i,o,a,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(ya+"NaN")}for(e=Mr(s),ar=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ys(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=tp((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 u(t)):r=new u(i.toString()),n=u.precision,i=a=n+3;;)if(o=r,r=o.plus(pu(s,o,a+2)).times(.5),ys(o.d).slice(0,a)===(t=ys(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(zn(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return ar=!0,zn(r,n)};st.times=st.mul=function(e){var t,n,r,i,o,a,s,u,l,c=this,f=c.constructor,h=c.d,p=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,n=c.e+e.e,u=h.length,l=p.length,u=0;){for(t=0,i=u+r;i>r;)s=o[i]+p[r]*h[i-r-1]+t,o[i--]=s%ei|0,t=s/ei|0;o[i]=(o[i]+t)%ei|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,ar?zn(e,f.precision):e};st.toDecimalPlaces=st.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Rs(e,0,ep),t===void 0?t=r.rounding:Rs(t,0,8),zn(n,e+Mr(n)+1,t))};st.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=of(r,!0):(Rs(e,0,ep),t===void 0?t=i.rounding:Rs(t,0,8),r=zn(new i(r),e+1,t),n=of(r,!0,e+1)),n};st.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?of(i):(Rs(e,0,ep),t===void 0?t=o.rounding:Rs(t,0,8),r=zn(new o(i),e+Mr(i)+1,t),n=of(r.abs(),!1,e+Mr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};st.toInteger=st.toint=function(){var e=this,t=e.constructor;return zn(new t(e),Mr(e)+1,t.rounding)};st.toNumber=function(){return+this};st.toPower=st.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,l=12,c=+(e=new u(e));if(!e.s)return new u($o);if(s=new u(s),!s.s){if(e.s<1)throw Error(ya+"Infinity");return s}if(s.eq($o))return s;if(r=u.precision,e.eq($o))return zn(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=c<0?-c:c)<=MW){for(i=new u($o),t=Math.ceil(r/tr+4),ar=!1;n%2&&(i=i.times(s),G7(i.d,t)),n=tp(n/2),n!==0;)s=s.times(s),G7(s.d,t);return ar=!0,e.s<0?new u($o).div(i):zn(i,r)}}else if(o<0)throw Error(ya+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,ar=!1,i=e.times(Ng(s,r+l)),ar=!0,i=DW(i),i.s=o,i};st.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Mr(i),r=of(i,n<=o.toExpNeg||n>=o.toExpPos)):(Rs(e,1,ep),t===void 0?t=o.rounding:Rs(t,0,8),i=zn(new o(i),e,t),n=Mr(i),r=of(i,e<=n||n<=o.toExpNeg,e)),r};st.toSignificantDigits=st.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Rs(e,1,ep),t===void 0?t=r.rounding:Rs(t,0,8)),zn(new r(n),e,t)};st.toString=st.valueOf=st.val=st.toJSON=st[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Mr(e),n=e.constructor;return of(e,t<=n.toExpNeg||t>=n.toExpPos)};function RW(e,t){var n,r,i,o,a,s,u,l,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),ar?zn(t,f):t;if(u=e.d,l=t.d,a=e.e,i=t.e,u=u.slice(),o=a-i,o){for(o<0?(r=u,o=-o,s=l.length):(r=l,i=a,s=u.length),a=Math.ceil(f/tr),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=u.length,o=l.length,s-o<0&&(o=s,r=l,l=u,u=r),n=0;o;)n=(u[--o]=u[o]+l[o]+n)/ei|0,u[o]%=ei;for(n&&(u.unshift(n),++i),s=u.length;u[--s]==0;)u.pop();return t.d=u,t.e=i,ar?zn(t,f):t}function Rs(e,t,n){if(e!==~~e||en)throw Error(Ic+e)}function ys(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(s=u=0;si[s]?1:-1;break}return u}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var s,u,l,c,f,h,p,m,v,b,w,x,S,O,E,C,k,M,N=r.constructor,q=r.s==i.s?1:-1,Y=r.d,W=i.d;if(!r.s)return new N(r);if(!i.s)throw Error(ya+"Division by zero");for(u=r.e-i.e,k=W.length,E=Y.length,p=new N(q),m=p.d=[],l=0;W[l]==(Y[l]||0);)++l;if(W[l]>(Y[l]||0)&&--u,o==null?x=o=N.precision:a?x=o+(Mr(r)-Mr(i))+1:x=o,x<0)return new N(0);if(x=x/tr+2|0,l=0,k==1)for(c=0,W=W[0],x++;(l1&&(W=e(W,c),Y=e(Y,c),k=W.length,E=Y.length),O=k,v=Y.slice(0,k),b=v.length;b=ei/2&&++C;do c=0,s=t(W,v,k,b),s<0?(w=v[0],k!=b&&(w=w*ei+(v[1]||0)),c=w/C|0,c>1?(c>=ei&&(c=ei-1),f=e(W,c),h=f.length,b=v.length,s=t(f,v,h,b),s==1&&(c--,n(f,k16)throw Error(MP+Mr(e));if(!e.s)return new c($o);for(t==null?(ar=!1,s=f):s=t,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(r=Math.log(pc(2,l))/Math.LN10*2+5|0,s+=r,n=i=o=new c($o),c.precision=s;;){if(i=zn(i.times(e),s),n=n.times(++u),a=o.plus(pu(i,n,s)),ys(a.d).slice(0,s)===ys(o.d).slice(0,s)){for(;l--;)o=zn(o.times(o),s);return c.precision=f,t==null?(ar=!0,zn(o,f)):o}o=a}}function Mr(e){for(var t=e.e*tr,n=e.d[0];n>=10;n/=10)t++;return t}function s3(e,t,n){if(t>e.LN10.sd())throw ar=!0,n&&(e.precision=n),Error(ya+"LN10 precision limit exceeded");return zn(new e(e.LN10),t)}function Ju(e){for(var t="";e--;)t+="0";return t}function Ng(e,t){var n,r,i,o,a,s,u,l,c,f=1,h=10,p=e,m=p.d,v=p.constructor,b=v.precision;if(p.s<1)throw Error(ya+(p.s?"NaN":"-Infinity"));if(p.eq($o))return new v(0);if(t==null?(ar=!1,l=b):l=t,p.eq(10))return t==null&&(ar=!0),s3(v,l);if(l+=h,v.precision=l,n=ys(m),r=n.charAt(0),o=Mr(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ys(p.d),r=n.charAt(0),f++;o=Mr(p),r>1?(p=new v("0."+n),o++):p=new v(r+"."+n.slice(1))}else return u=s3(v,l+2,b).times(o+""),p=Ng(new v(r+"."+n.slice(1)),l-h).plus(u),v.precision=b,t==null?(ar=!0,zn(p,b)):p;for(s=a=p=pu(p.minus($o),p.plus($o),l),c=zn(p.times(p),l),i=3;;){if(a=zn(a.times(c),l),u=s.plus(pu(a,new v(i),l)),ys(u.d).slice(0,l)===ys(s.d).slice(0,l))return s=s.times(2),o!==0&&(s=s.plus(s3(v,l+2,b).times(o+""))),s=pu(s,new v(f),l),v.precision=b,t==null?(ar=!0,zn(s,b)):s;s=u,i+=2}}function K7(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=tp(n/tr),e.d=[],r=(n+1)%tr,n<0&&(r+=tr),rUb||e.e<-Ub))throw Error(MP+n)}else e.s=0,e.e=0,e.d=[0];return e}function zn(e,t,n){var r,i,o,a,s,u,l,c,f=e.d;for(a=1,o=f[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=tr,i=t,l=f[c=0];else{if(c=Math.ceil((r+1)/tr),o=f.length,c>=o)return e;for(l=o=f[c],a=1;o>=10;o/=10)a++;r%=tr,i=r-tr+a}if(n!==void 0&&(o=pc(10,a-i-1),s=l/o%10|0,u=t<0||f[c+1]!==void 0||l%o,u=n<4?(s||u)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||u||n==6&&(r>0?i>0?l/pc(10,a-i):0:f[c-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return u?(o=Mr(e),f.length=1,t=t-o-1,f[0]=pc(10,(tr-t%tr)%tr),e.e=tp(-t/tr)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=c,o=1,c--):(f.length=c+1,o=pc(10,tr-r),f[c]=i>0?(l/pc(10,a-i)%pc(10,i)|0)*o:0),u)for(;;)if(c==0){(f[0]+=o)==ei&&(f[0]=1,++e.e);break}else{if(f[c]+=o,f[c]!=ei)break;f[c--]=0,o=1}for(r=f.length;f[--r]===0;)f.pop();if(ar&&(e.e>Ub||e.e<-Ub))throw Error(MP+Mr(e));return e}function $W(e,t){var n,r,i,o,a,s,u,l,c,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ar?zn(t,p):t;if(u=e.d,f=t.d,r=t.e,l=e.e,u=u.slice(),a=l-r,a){for(c=a<0,c?(n=u,a=-a,s=f.length):(n=f,r=l,s=u.length),i=Math.max(Math.ceil(p/tr),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=u.length,s=f.length,c=i0;--i)u[s++]=0;for(i=f.length;i>a;){if(u[--i]0?o=o.charAt(0)+"."+o.slice(1)+Ju(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ju(-i-1)+o,n&&(r=n-a)>0&&(o+=Ju(r))):i>=a?(o+=Ju(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Ju(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=Ju(r))),e.s<0?"-"+o:o}function G7(e,t){if(e.length>t)return e.length=t,!0}function IW(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ic+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return K7(a,o.toString())}else if(typeof o!="string")throw Error(Ic+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,EMe.test(o))K7(a,o);else throw Error(Ic+o)}if(i.prototype=st,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=IW,i.config=i.set=OMe,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(Ic+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Ic+n+": "+r);return this}var RP=IW(CMe);$o=new RP(1);const Nn=RP;function AMe(e){return MMe(e)||TMe(e)||kMe(e)||PMe()}function PMe(){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 kMe(e,t){if(e){if(typeof e=="string")return d6(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 d6(e,t)}}function TMe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function MMe(e){if(Array.isArray(e))return d6(e)}function d6(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-a,Y7(function(){for(var s=arguments.length,u=new Array(s),l=0;le.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,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,o=u}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function qMe(e){if(Array.isArray(e))return e}function BW(e){var t=Lg(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function zW(e,t,n){if(e.lte(0))return new Nn(0);var r=t2.getDigitCount(e.toNumber()),i=new Nn(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Nn(Math.ceil(o.div(a).toNumber())).add(n).mul(a),u=s.mul(i);return t?u:new Nn(Math.ceil(u))}function KMe(e,t,n){var r=1,i=new Nn(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Nn(10).pow(t2.getDigitCount(e)-1),i=new Nn(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Nn(Math.floor(e)))}else e===0?i=new Nn(Math.floor((t-1)/2)):n||(i=new Nn(Math.floor(e)));var a=Math.floor((t-1)/2),s=IMe($Me(function(u){return i.add(new Nn(u-a).mul(r)).toNumber()}),h6);return s(0,t)}function UW(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 Nn(0),tickMin:new Nn(0),tickMax:new Nn(0)};var o=zW(new Nn(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new Nn(0):(a=new Nn(e).add(t).div(2),a=a.sub(new Nn(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),u=Math.ceil(new Nn(t).sub(a).div(o).toNumber()),l=s+u+1;return l>n?UW(e,t,n,r,i+1):(l0?u+(n-l):u,s=t>0?s:s+(n-l)),{step:o,tickMin:a.sub(new Nn(s).mul(o)),tickMax:a.add(new Nn(u).mul(o))})}function GMe(e){var t=Lg(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),s=BW([n,r]),u=Lg(s,2),l=u[0],c=u[1];if(l===-1/0||c===1/0){var f=c===1/0?[l].concat(g6(h6(0,i-1).map(function(){return 1/0}))):[].concat(g6(h6(0,i-1).map(function(){return-1/0})),[c]);return n>r?p6(f):f}if(l===c)return KMe(l,i,o);var h=UW(l,c,a,o),p=h.step,m=h.tickMin,v=h.tickMax,b=t2.rangeStep(m,v.add(new Nn(.1).mul(p)),p);return n>r?p6(b):b}function YMe(e,t){var n=Lg(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=BW([r,i]),s=Lg(a,2),u=s[0],l=s[1];if(u===-1/0||l===1/0)return[r,i];if(u===l)return[u];var c=Math.max(t,2),f=zW(new Nn(l).sub(u).div(c-1),o,0),h=[].concat(g6(t2.rangeStep(new Nn(u),new Nn(l).sub(new Nn(.99).mul(f)),f)),[l]);return r>i?p6(h):h}var ZMe=FW(GMe),XMe=FW(YMe),QMe="Invariant failed";function af(e,t){throw new Error(QMe)}var JMe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function lh(e){"@babel/helpers - typeof";return lh=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},lh(e)}function Hb(){return Hb=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 aRe(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 sRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uRe(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,o=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r?.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var u=o.range,l=0;l0?i[l-1].coordinate:i[s-1].coordinate,f=i[l].coordinate,h=l>=s-1?i[0].coordinate:i[l+1].coordinate,p=void 0;if(Ua(f-c)!==Ua(h-f)){var m=[];if(Ua(h-f)===Ua(u[1]-u[0])){p=h;var v=f+u[1]-u[0];m[0]=Math.min(v,(v+c)/2),m[1]=Math.max(v,(v+c)/2)}else{p=c;var b=h+u[1]-u[0];m[0]=Math.min(f,(b+f)/2),m[1]=Math.max(f,(b+f)/2)}var w=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>w[0]&&t<=w[1]||t>=m[0]&&t<=m[1]){a=i[l].index;break}}else{var x=Math.min(c,h),S=Math.max(c,h);if(t>(x+f)/2&&t<=(S+f)/2){a=i[l].index;break}}}else for(var O=0;O0&&O(r[O].coordinate+r[O-1].coordinate)/2&&t<=(r[O].coordinate+r[O+1].coordinate)/2||O===s-1&&t>(r[O].coordinate+r[O-1].coordinate)/2){a=r[O].index;break}return a},DP=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?mr(mr({},t.type.defaultProps),t.props):t.props,a=o.stroke,s=o.fill,u;switch(i){case"Line":u=a;break;case"Area":case"Radar":u=a&&a!=="none"?a:s;break;default:u=s;break}return u},ERe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},s=Object.keys(o),u=0,l=s.length;u=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?mr(mr({},x),w[0].props):w[0].props,O=S.barSize,E=S[b];a[E]||(a[E]=[]);var C=Ut(O)?n:O;a[E].push({item:w[0],stackList:w.slice(1),barSize:Ut(C)?void 0:nf(C,r,0)})}}return a},ORe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,s=t.maxBarSize,u=a.length;if(u<1)return null;var l=nf(n,i,0,!0),c,f=[];if(a[0].barSize===+a[0].barSize){var h=!1,p=i/u,m=a.reduce(function(O,E){return O+E.barSize||0},0);m+=(u-1)*l,m>=i&&(m-=(u-1)*l,l=0),m>=i&&p>0&&(h=!0,p*=.9,m=u*p);var v=(i-m)/2>>0,b={offset:v-l,size:0};c=a.reduce(function(O,E){var C={item:E.item,position:{offset:b.offset+b.size+l,size:h?p:E.barSize}},k=[].concat(Q7(O),[C]);return b=k[k.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){k.push({item:M,position:b})}),k},f)}else{var w=nf(r,i,0,!0);i-2*w-(u-1)*l<=0&&(l=0);var x=(i-2*w-(u-1)*l)/u;x>1&&(x>>=0);var S=s===+s?Math.min(x,s):x;c=a.reduce(function(O,E,C){var k=[].concat(Q7(O),[{item:E.item,position:{offset:w+(x+l)*C+(x-S)/2,size:S}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){k.push({item:M,position:k[k.length-1].position})}),k},f)}return c},ARe=function(t,n,r,i){var o=r.children,a=r.width,s=r.margin,u=a-(s.left||0)-(s.right||0),l=qW({children:o,legendWidth:u});if(l){var c=i||{},f=c.width,h=c.height,p=l.align,m=l.verticalAlign,v=l.layout;if((v==="vertical"||v==="horizontal"&&m==="middle")&&p!=="center"&&Ke(t[p]))return mr(mr({},t),{},Ld({},p,t[p]+(f||0)));if((v==="horizontal"||v==="vertical"&&p==="center")&&m!=="middle"&&Ke(t[m]))return mr(mr({},t),{},Ld({},m,t[m]+(h||0)))}return t},PRe=function(t,n,r){return Ut(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},KW=function(t,n,r,i,o){var a=n.props.children,s=go(a,np).filter(function(l){return PRe(i,o,l.props.direction)});if(s&&s.length){var u=s.map(function(l){return l.props.dataKey});return t.reduce(function(l,c){var f=qr(c,r);if(Ut(f))return l;var h=Array.isArray(f)?[Jw(f),ll(f)]:[f,f],p=u.reduce(function(m,v){var b=qr(c,v,0),w=h[0]-Math.abs(Array.isArray(b)?b[0]:b),x=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(w,m[0]),Math.max(x,m[1])]},[1/0,-1/0]);return[Math.min(p[0],l[0]),Math.max(p[1],l[1])]},[1/0,-1/0])}return null},kRe=function(t,n,r,i,o){var a=n.map(function(s){return KW(t,s,r,o,i)}).filter(function(s){return!Ut(s)});return a&&a.length?a.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]):null},GW=function(t,n,r,i,o){var a=n.map(function(u){var l=u.props.dataKey;return r==="number"&&l&&KW(t,u,l,i)||P0(t,l,r,o)});if(r==="number")return a.reduce(function(u,l){return[Math.min(u[0],l[0]),Math.max(u[1],l[1])]},[1/0,-1/0]);var s={};return a.reduce(function(u,l){for(var c=0,f=l.length;c=2?Ua(s[0]-s[1])*2*l:l,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var h=o?o.indexOf(f):f;return{coordinate:i(h)+l,value:f,offset:l}});return c.filter(function(f){return!Yh(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+l,value:f,index:h,offset:l}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+l,value:f,offset:l}}):i.domain().map(function(f,h){return{coordinate:i(f)+l,value:o?o[f]:f,index:h,offset:l}})},u3=new WeakMap,Cy=function(t,n){if(typeof n!="function")return t;u3.has(t)||u3.set(t,new WeakMap);var r=u3.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},TRe=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,s=t.axisType;if(i==="auto")return a==="radial"&&s==="radiusAxis"?{scale:Mg(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:Fb(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:A0(),realScaleType:"point"}:o==="category"?{scale:Mg(),realScaleType:"band"}:{scale:Fb(),realScaleType:"linear"};if(Fm(i)){var u="scale".concat(jw(i));return{scale:(q7[u]||A0)(),realScaleType:q7[u]?u:"point"}}return Vt(i)?{scale:i}:{scale:A0(),realScaleType:"point"}},e$=1e-4,MRe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-e$,a=Math.max(i[0],i[1])+e$,s=t(n[0]),u=t(n[r-1]);(sa||ua)&&t.domain([n[0],n[r-1]])}},RRe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[s][r][0]=o,t[s][r][1]=o+u,o=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+u,a=t[s][r][1])}},IRe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+s,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},NRe={sign:$Re,expand:XSe,none:th,silhouette:QSe,wiggle:JSe,positive:IRe},LRe=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),o=NRe[r],a=ZSe().keys(i).value(function(s,u){return+qr(s,u,0)}).order(HE).offset(o);return a(t)},FRe=function(t,n,r,i,o,a){if(!t)return null;var s=a?n.reverse():n,u={},l=s.reduce(function(f,h){var p,m=(p=h.type)!==null&&p!==void 0&&p.defaultProps?mr(mr({},h.type.defaultProps),h.props):h.props,v=m.stackId,b=m.hide;if(b)return f;var w=m[r],x=f[w]||{hasStack:!1,stackGroups:{}};if(Wr(v)){var S=x.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(h),x.hasStack=!0,x.stackGroups[v]=S}else x.stackGroups[bf("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return mr(mr({},f),{},Ld({},w,x))},u),c={};return Object.keys(l).reduce(function(f,h){var p=l[h];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(v,b){var w=p.stackGroups[b];return mr(mr({},v),{},Ld({},b,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:LRe(t,w.items,o)}))},m)}return mr(mr({},f),{},Ld({},h,p))},c)},jRe=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,s=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var l=t.domain();if(!l.length)return null;var c=ZMe(l,o,s);return t.domain([Jw(c),ll(c)]),{niceTicks:c}}if(o&&i==="number"){var f=t.domain(),h=XMe(f,o,s);return{niceTicks:h}}return null};function ch(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ut(i[t.dataKey])){var s=mb(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var u=qr(i,Ut(a)?t.dataKey:a);return Ut(u)?null:t.scale(u)}var t$=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var u=qr(a,n.dataKey,n.domain[s]);return Ut(u)?null:n.scale(u)-o/2+i},BRe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},zRe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?mr(mr({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Wr(o)){var a=n[o];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},URe=function(t){return t.reduce(function(n,r){return[Jw(r.concat([n[0]]).filter(Ke)),ll(r.concat([n[1]]).filter(Ke))]},[1/0,-1/0])},XW=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],s=a.stackedData,u=s.reduce(function(l,c){var f=URe(c.slice(n,r+1));return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},n$=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,r$=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,b6=function(t,n,r){if(Vt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(Ke(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(n$.test(t[0])){var o=+n$.exec(t[0])[1];i[0]=n[0]-o}else Vt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(Ke(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(r$.test(t[1])){var a=+r$.exec(t[1])[1];i[1]=n[1]+a}else Vt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Wb=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 o=aP(n,function(f){return f.coordinate}),a=1/0,s=1,u=o.length;sa&&(l=2*Math.PI-l),{radius:s,angle:qRe(l),angleInRadian:l}},YRe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},ZRe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),s=Math.min(o,a);return t+s*360},s$=function(t,n){var r=t.x,i=t.y,o=GRe({x:r,y:i},n),a=o.radius,s=o.angle,u=n.innerRadius,l=n.outerRadius;if(al)return!1;if(a===0)return!0;var c=YRe(n),f=c.startAngle,h=c.endAngle,p=s,m;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 m?a$(a$({},n),{},{radius:a,angle:ZRe(p,n)}):null};function zg(e){"@babel/helpers - typeof";return zg=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},zg(e)}var XRe=["offset"];function QRe(e){return nDe(e)||tDe(e)||eDe(e)||JRe()}function JRe(){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 eDe(e,t){if(e){if(typeof e=="string")return x6(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 x6(e,t)}}function tDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nDe(e){if(Array.isArray(e))return x6(e)}function x6(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 iDe(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 u$(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 jr(e){for(var t=1;t=0?1:-1,S,O;i==="insideStart"?(S=p+x*a,O=v):i==="insideEnd"?(S=m-x*a,O=!v):i==="end"&&(S=m+x*a,O=v),O=w<=0?O:!O;var E=pi(l,c,b,S),C=pi(l,c,b,S+(O?1:-1)*359),k="M".concat(E.x,",").concat(E.y,` + height and width.`,G,q,a,u,c,f,n);var W=!Array.isArray(p)&&fu(p.type).endsWith("Chart");return F.Children.map(p,function(j){return F.isValidElement(j)?y.cloneElement(j,gy({width:G,height:q},W?{style:gy({height:"100%",width:"100%",maxHeight:q,maxWidth:G},j.props.style)}:{})):j})},[n,p,u,h,f,c,N,a]);return F.createElement("div",{id:b?"".concat(b):void 0,className:dn("recharts-responsive-container",w),style:gy(gy({},O),{},{width:a,height:u,minWidth:c,minHeight:f,maxHeight:h}),ref:E},V)}),QA=function(t){return null};QA.displayName="Cell";function Eg(e){"@babel/helpers - typeof";return Eg=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},Eg(e)}function N9(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 YE(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ka.isSsr)return{width:0,height:0};var r=m5e(n),i=JSON.stringify({text:t,copyStyle:r});if(Gf.widthCache[i])return Gf.widthCache[i];try{var o=document.getElementById(L9);o||(o=document.createElement("span"),o.setAttribute("id",L9),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=YE(YE({},g5e),r);Object.assign(o.style,a),o.textContent="".concat(t);var s=o.getBoundingClientRect(),u={width:s.width,height:s.height};return Gf.widthCache[i]=u,++Gf.cacheCount>p5e&&(Gf.cacheCount=0,Gf.widthCache={}),u}catch{return{width:0,height:0}}},v5e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Og(e){"@babel/helpers - typeof";return Og=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},Og(e)}function Eb(e,t){return w5e(e)||x5e(e,t)||b5e(e,t)||y5e()}function y5e(){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 b5e(e,t){if(e){if(typeof e=="string")return F9(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 F9(e,t)}}function F9(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 I5e(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 W9(e,t){return j5e(e)||F5e(e,t)||L5e(e,t)||N5e()}function N5e(){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 L5e(e,t){if(e){if(typeof e=="string")return H9(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 H9(e,t)}}function H9(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 G.reduce(function(q,W){var j=W.word,K=W.width,Y=q[q.length-1];if(Y&&(i==null||o||Y.width+K+rW.width?q:W})};if(!c)return p;for(var v="…",b=function(G){var q=f.slice(0,G),W=DW({breakAll:l,style:u,children:q+v}).wordsWithComputedWidth,j=h(W),K=j.length>a||m(j).width>Number(i);return[K,j]},w=0,x=f.length-1,S=0,O;w<=x&&S<=f.length-1;){var E=Math.floor((w+x)/2),C=E-1,k=b(C),M=W9(k,2),N=M[0],z=M[1],H=b(E),V=W9(H,1),ne=V[0];if(!N&&!ne&&(w=E+1),N&&ne&&(x=E-1),!N&&ne){O=z;break}S++}return O||p},K9=function(t){var n=Ut(t)?[]:t.toString().split(RW);return[{words:n}]},z5e=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!Ka.isSsr){var u,l,c=DW({breakAll:a,children:i,style:o});if(c){var f=c.wordsWithComputedWidth,h=c.spaceWidth;u=f,l=h}else return K9(i);return B5e({breakAll:a,children:i,maxLines:s,style:o},u,l,n,r)}return K9(i)},q9="#808080",Ob=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,s=a===void 0?"1em":a,u=t.capHeight,l=u===void 0?"0.71em":u,c=t.scaleToFit,f=c===void 0?!1:c,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,v=m===void 0?"end":m,b=t.fill,w=b===void 0?q9:b,x=V9(t,D5e),S=y.useMemo(function(){return z5e({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]),O=x.dx,E=x.dy,C=x.angle,k=x.className,M=x.breakAll,N=V9(x,$5e);if(!Hr(r)||!Hr(o))return null;var z=r+(qe(O)?O:0),H=o+(qe(E)?E:0),V;switch(v){case"start":V=qS("calc(".concat(l,")"));break;case"middle":V=qS("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(l," / 2))"));break;default:V=qS("calc(".concat(S.length-1," * -").concat(s,")"));break}var ne=[];if(f){var Z=S[0].width,G=x.width;ne.push("scale(".concat((qe(G)?G/Z:1)/Z,")"))}return C&&ne.push("rotate(".concat(C,", ").concat(z,", ").concat(H,")")),ne.length&&(N.transform=ne.join(" ")),F.createElement("text",ZE({},zt(N,!0),{x:z,y:H,className:dn("recharts-text",k),textAnchor:p,fill:w.includes("url")?q9:w}),S.map(function(q,W){var j=q.words.join(M?"":" ");return F.createElement("tspan",{x:z,dy:W===0?V:s,key:"".concat(j,"-").concat(W)},j)}))};function _l(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function U5e(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function JA(e){let t,n,r;e.length!==2?(t=_l,n=(s,u)=>_l(e(s),u),r=(s,u)=>e(s)-u):(t=e===_l||e===U5e?e:V5e,n=e,r=e);function i(s,u,l=0,c=s.length){if(l>>1;n(s[f],u)<0?l=f+1:c=f}while(l>>1;n(s[f],u)<=0?l=f+1:c=f}while(ll&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function V5e(){return 0}function $W(e){return e===null?NaN:+e}function*W5e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const H5e=JA(_l),Nm=H5e.right;JA($W).center;class G9 extends Map{constructor(t,n=G5e){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(Y9(this,t))}has(t){return super.has(Y9(this,t))}set(t,n){return super.set(K5e(this,t),n)}delete(t){return super.delete(q5e(this,t))}}function Y9({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function K5e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function q5e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function G5e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Y5e(e=_l){if(e===_l)return IW;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 IW(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Z5e=Math.sqrt(50),X5e=Math.sqrt(10),Q5e=Math.sqrt(2);function Ab(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Z5e?10:o>=X5e?5:o>=Q5e?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(e*l),u=Math.round(t*l),s/lt&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(e/l),u=Math.round(t/l),s*lt&&--u),u0))return[];if(e===t)return[e];const r=t=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l=r)&&(n=r);return n}function X9(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function NW(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?IW:Y5e(i);r>n;){if(r-n>600){const u=r-n+1,l=t-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(n,Math.floor(t-l*f/u+h)),m=Math.min(r,Math.floor(t+(u-l)*f/u+h));NW(e,t,p,m,i)}const o=e[t];let a=n,s=r;for(Up(e,n,t),i(e[r],o)>0&&Up(e,n,r);a0;)--s}i(e[n],o)===0?Up(e,n,s):(++s,Up(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Up(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function J5e(e,t,n){if(e=Float64Array.from(W5e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return X9(e);if(t>=1)return Z9(e);var r,i=(r-1)*t,o=Math.floor(i),a=Z9(NW(e,o).subarray(0,o+1)),s=X9(e.subarray(o+1));return a+(s-a)*(i-o)}}function e8e(e,t,n=$W){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,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function t8e(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,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?vy(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?vy(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=r8e.exec(e))?new so(t[1],t[2],t[3],1):(t=i8e.exec(e))?new so(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=o8e.exec(e))?vy(t[1],t[2],t[3],t[4]):(t=a8e.exec(e))?vy(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=s8e.exec(e))?i7(t[1],t[2]/100,t[3]/100,1):(t=u8e.exec(e))?i7(t[1],t[2]/100,t[3]/100,t[4]):Q9.hasOwnProperty(e)?t7(Q9[e]):e==="transparent"?new so(NaN,NaN,NaN,0):null}function t7(e){return new so(e>>16&255,e>>8&255,e&255,1)}function vy(e,t,n,r){return r<=0&&(e=t=n=NaN),new so(e,t,n,r)}function f8e(e){return e instanceof Lm||(e=Tg(e)),e?(e=e.rgb(),new so(e.r,e.g,e.b,e.opacity)):new so}function t6(e,t,n,r){return arguments.length===1?f8e(e):new so(e,t,n,r??1)}function so(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}tP(so,t6,FW(Lm,{brighter(e){return e=e==null?Pb:Math.pow(Pb,e),new so(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pg:Math.pow(Pg,e),new so(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new so(Dc(this.r),Dc(this.g),Dc(this.b),kb(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:n7,formatHex:n7,formatHex8:d8e,formatRgb:r7,toString:r7}));function n7(){return`#${Cc(this.r)}${Cc(this.g)}${Cc(this.b)}`}function d8e(){return`#${Cc(this.r)}${Cc(this.g)}${Cc(this.b)}${Cc((isNaN(this.opacity)?1:this.opacity)*255)}`}function r7(){const e=kb(this.opacity);return`${e===1?"rgb(":"rgba("}${Dc(this.r)}, ${Dc(this.g)}, ${Dc(this.b)}${e===1?")":`, ${e})`}`}function kb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cc(e){return e=Dc(e),(e<16?"0":"")+e.toString(16)}function i7(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ba(e,t,n,r)}function jW(e){if(e instanceof Ba)return new Ba(e.h,e.s,e.l,e.opacity);if(e instanceof Lm||(e=Tg(e)),!e)return new Ba;if(e instanceof Ba)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&u<1?0:a,new Ba(a,s,u,e.opacity)}function h8e(e,t,n,r){return arguments.length===1?jW(e):new Ba(e,t,n,r??1)}function Ba(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}tP(Ba,h8e,FW(Lm,{brighter(e){return e=e==null?Pb:Math.pow(Pb,e),new Ba(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pg:Math.pow(Pg,e),new Ba(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 so(GS(e>=240?e-240:e+120,i,r),GS(e,i,r),GS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ba(o7(this.h),yy(this.s),yy(this.l),kb(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=kb(this.opacity);return`${e===1?"hsl(":"hsla("}${o7(this.h)}, ${yy(this.s)*100}%, ${yy(this.l)*100}%${e===1?")":`, ${e})`}`}}));function o7(e){return e=(e||0)%360,e<0?e+360:e}function yy(e){return Math.max(0,Math.min(1,e||0))}function GS(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 nP=e=>()=>e;function p8e(e,t){return function(n){return e+n*t}}function g8e(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 m8e(e){return(e=+e)==1?BW:function(t,n){return n-t?g8e(t,n,e):nP(isNaN(t)?n:t)}}function BW(e,t){var n=t-e;return n?p8e(e,n):nP(isNaN(e)?t:e)}const a7=function e(t){var n=m8e(t);function r(i,o){var a=n((i=t6(i)).r,(o=t6(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=BW(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function v8e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Tb(r,i)})),n=YS.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function P8e(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?k8e:P8e,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(t,e.map(r),Tb)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Mb),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=rP,c()},f.clamp=function(h){return arguments.length?(a=h?!0:Vi,c()):a!==Vi},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function iP(){return Uw()(Vi,Vi)}function T8e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rb(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 rh(e){return e=Rb(Math.abs(e)),e?e[1]:NaN}function M8e(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function R8e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var D8e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Mg(e){if(!(t=D8e.exec(e)))throw new Error("invalid format: "+e);var t;return new oP({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]})}Mg.prototype=oP.prototype;function oP(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+""}oP.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 $8e(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 zW;function I8e(e,t){var n=Rb(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(zW=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Rb(e,Math.max(0,t+o-1))[0]}function u7(e,t){var n=Rb(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 l7={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:T8e,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)=>u7(e*100,t),r:u7,s:I8e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function c7(e){return e}var f7=Array.prototype.map,d7=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function N8e(e){var t=e.grouping===void 0||e.thousands===void 0?c7:M8e(f7.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+"",o=e.numerals===void 0?c7:R8e(f7.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Mg(f);var h=f.fill,p=f.align,m=f.sign,v=f.symbol,b=f.zero,w=f.width,x=f.comma,S=f.precision,O=f.trim,E=f.type;E==="n"?(x=!0,E="g"):l7[E]||(S===void 0&&(S=12),O=!0,E="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var C=v==="$"?n:v==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",k=v==="$"?r:/[%p]/.test(E)?a:"",M=l7[E],N=/[defgprs%]/.test(E);S=S===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function z(H){var V=C,ne=k,Z,G,q;if(E==="c")ne=M(H)+ne,H="";else{H=+H;var W=H<0||1/H<0;if(H=isNaN(H)?u:M(Math.abs(H),S),O&&(H=$8e(H)),W&&+H==0&&m!=="+"&&(W=!1),V=(W?m==="("?m:s:m==="-"||m==="("?"":m)+V,ne=(E==="s"?d7[8+zW/3]:"")+ne+(W&&m==="("?")":""),N){for(Z=-1,G=H.length;++Zq||q>57){ne=(q===46?i+H.slice(Z+1):H.slice(Z))+ne,H=H.slice(0,Z);break}}}x&&!b&&(H=t(H,1/0));var j=V.length+H.length+ne.length,K=j>1)+V+H+ne+K.slice(j);break;default:H=K+V+H+ne;break}return o(H)}return z.toString=function(){return f+""},z}function c(f,h){var p=l((f=Mg(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(rh(h)/3)))*3,v=Math.pow(10,-m),b=d7[8+m/3];return function(w){return p(v*w)+b}}return{format:l,formatPrefix:c}}var by,aP,UW;L8e({thousands:",",grouping:[3],currency:["$",""]});function L8e(e){return by=N8e(e),aP=by.format,UW=by.formatPrefix,by}function F8e(e){return Math.max(0,-rh(Math.abs(e)))}function j8e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(rh(t)/3)))*3-rh(Math.abs(e)))}function B8e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,rh(t)-rh(e))+1}function VW(e,t,n,r){var i=JE(e,t,n),o;switch(r=Mg(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=j8e(i,a))&&(r.precision=o),UW(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=B8e(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=F8e(i))&&(r.precision=o-(r.type==="%")*2);break}}return aP(r)}function Wl(e){var t=e.domain;return e.ticks=function(n){var r=t();return XE(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return VW(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,c=10;for(s0;){if(l=QE(a,s,n),l===u)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function Db(){var e=iP();return e.copy=function(){return Fm(e,Db())},wa.apply(e,arguments),Wl(e)}function WW(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,Mb),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return WW(e).unknown(t)},e=arguments.length?Array.from(e,Mb):[0,1],Wl(n)}function HW(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function H8e(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 g7(e){return(t,n)=>-e(-t,n)}function sP(e){const t=e(h7,p7),n=t.domain;let r=10,i,o;function a(){return i=H8e(r),o=W8e(r),n()[0]<0?(i=g7(i),o=g7(o),e(z8e,U8e)):e(h7,p7),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const u=n();let l=u[0],c=u[u.length-1];const f=c0){for(;h<=p;++h)for(m=1;mc)break;w.push(v)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(v=h>0?m/o(-h):m*o(h),!(vc)break;w.push(v)}w.length*2{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Mg(u)).precision==null&&(u.trim=!0),u=aP(u)),s===1/0)return u;const l=Math.max(1,r*s/t.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*rn(HW(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function KW(){const e=sP(Uw()).domain([1,10]);return e.copy=()=>Fm(e,KW()).base(e.base()),wa.apply(e,arguments),e}function m7(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function v7(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function uP(e){var t=1,n=e(m7(t),v7(t));return n.constant=function(r){return arguments.length?e(m7(t=+r),v7(t)):t},Wl(n)}function qW(){var e=uP(Uw());return e.copy=function(){return Fm(e,qW()).constant(e.constant())},wa.apply(e,arguments)}function y7(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function K8e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function q8e(e){return e<0?-e*e:e*e}function lP(e){var t=e(Vi,Vi),n=1;function r(){return n===1?e(Vi,Vi):n===.5?e(K8e,q8e):e(y7(n),y7(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Wl(t)}function cP(){var e=lP(Uw());return e.copy=function(){return Fm(e,cP()).exponent(e.exponent())},wa.apply(e,arguments),e}function G8e(){return cP.apply(null,arguments).exponent(.5)}function b7(e){return Math.sign(e)*e*e}function Y8e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function GW(){var e=iP(),t=[0,1],n=!1,r;function i(o){var a=Y8e(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(b7(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Mb)).map(b7)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return GW(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},wa.apply(i,arguments),Wl(i)}function YW(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return ZW().domain([e,t]).range(i).unknown(o)},wa.apply(Wl(a),arguments)}function XW(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Nm(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return XW().domain(e).range(t).unknown(n)},wa.apply(i,arguments)}const ZS=new Date,XS=new Date;function Zr(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return u;let l;do u.push(l=new Date(+o)),t(o,s),e(o);while(lZr(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(ZS.setTime(+o),XS.setTime(+a),e(ZS),e(XS),Math.floor(n(ZS,XS))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const $b=Zr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$b.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Zr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):$b);$b.range;const ou=1e3,fa=ou*60,au=fa*60,Su=au*24,fP=Su*7,x7=Su*30,QS=Su*365,Ec=Zr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ou)},(e,t)=>(t-e)/ou,e=>e.getUTCSeconds());Ec.range;const dP=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ou)},(e,t)=>{e.setTime(+e+t*fa)},(e,t)=>(t-e)/fa,e=>e.getMinutes());dP.range;const hP=Zr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*fa)},(e,t)=>(t-e)/fa,e=>e.getUTCMinutes());hP.range;const pP=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ou-e.getMinutes()*fa)},(e,t)=>{e.setTime(+e+t*au)},(e,t)=>(t-e)/au,e=>e.getHours());pP.range;const gP=Zr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*au)},(e,t)=>(t-e)/au,e=>e.getUTCHours());gP.range;const jm=Zr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*fa)/Su,e=>e.getDate()-1);jm.range;const Vw=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Su,e=>e.getUTCDate()-1);Vw.range;const QW=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Su,e=>Math.floor(e/Su));QW.range;function yf(e){return Zr(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())*fa)/fP)}const Ww=yf(0),Ib=yf(1),Z8e=yf(2),X8e=yf(3),ih=yf(4),Q8e=yf(5),J8e=yf(6);Ww.range;Ib.range;Z8e.range;X8e.range;ih.range;Q8e.range;J8e.range;function bf(e){return Zr(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)/fP)}const Hw=bf(0),Nb=bf(1),eke=bf(2),tke=bf(3),oh=bf(4),nke=bf(5),rke=bf(6);Hw.range;Nb.range;eke.range;tke.range;oh.range;nke.range;rke.range;const mP=Zr(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());mP.range;const vP=Zr(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());vP.range;const Cu=Zr(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());Cu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(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)});Cu.range;const Eu=Zr(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());Eu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(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)});Eu.range;function JW(e,t,n,r,i,o){const a=[[Ec,1,ou],[Ec,5,5*ou],[Ec,15,15*ou],[Ec,30,30*ou],[o,1,fa],[o,5,5*fa],[o,15,15*fa],[o,30,30*fa],[i,1,au],[i,3,3*au],[i,6,6*au],[i,12,12*au],[r,1,Su],[r,2,2*Su],[n,1,fP],[t,1,x7],[t,3,3*x7],[e,1,QS]];function s(l,c,f){const h=cb).right(a,h);if(p===a.length)return e.every(JE(l/QS,c/QS,f));if(p===0)return $b.every(Math.max(JE(l,c,f),1));const[m,v]=a[h/a[p-1][2]53)return null;"w"in be||(be.w=1),"Z"in be?(lt=e3(Vp(be.y,0,1)),Nt=lt.getUTCDay(),lt=Nt>4||Nt===0?Nb.ceil(lt):Nb(lt),lt=Vw.offset(lt,(be.V-1)*7),be.y=lt.getUTCFullYear(),be.m=lt.getUTCMonth(),be.d=lt.getUTCDate()+(be.w+6)%7):(lt=JS(Vp(be.y,0,1)),Nt=lt.getDay(),lt=Nt>4||Nt===0?Ib.ceil(lt):Ib(lt),lt=jm.offset(lt,(be.V-1)*7),be.y=lt.getFullYear(),be.m=lt.getMonth(),be.d=lt.getDate()+(be.w+6)%7)}else("W"in be||"U"in be)&&("w"in be||(be.w="u"in be?be.u%7:"W"in be?1:0),Nt="Z"in be?e3(Vp(be.y,0,1)).getUTCDay():JS(Vp(be.y,0,1)).getDay(),be.m=0,be.d="W"in be?(be.w+6)%7+be.W*7-(Nt+5)%7:be.w+be.U*7-(Nt+6)%7);return"Z"in be?(be.H+=be.Z/100|0,be.M+=be.Z%100,e3(be)):JS(be)}}function M(Ae,Le,$e,be){for(var yt=0,lt=Le.length,Nt=$e.length,yn,nn;yt=Nt)return-1;if(yn=Le.charCodeAt(yt++),yn===37){if(yn=Le.charAt(yt++),nn=E[yn in w7?Le.charAt(yt++):yn],!nn||(be=nn(Ae,$e,be))<0)return-1}else if(yn!=$e.charCodeAt(be++))return-1}return be}function N(Ae,Le,$e){var be=l.exec(Le.slice($e));return be?(Ae.p=c.get(be[0].toLowerCase()),$e+be[0].length):-1}function z(Ae,Le,$e){var be=p.exec(Le.slice($e));return be?(Ae.w=m.get(be[0].toLowerCase()),$e+be[0].length):-1}function H(Ae,Le,$e){var be=f.exec(Le.slice($e));return be?(Ae.w=h.get(be[0].toLowerCase()),$e+be[0].length):-1}function V(Ae,Le,$e){var be=w.exec(Le.slice($e));return be?(Ae.m=x.get(be[0].toLowerCase()),$e+be[0].length):-1}function ne(Ae,Le,$e){var be=v.exec(Le.slice($e));return be?(Ae.m=b.get(be[0].toLowerCase()),$e+be[0].length):-1}function Z(Ae,Le,$e){return M(Ae,t,Le,$e)}function G(Ae,Le,$e){return M(Ae,n,Le,$e)}function q(Ae,Le,$e){return M(Ae,r,Le,$e)}function W(Ae){return a[Ae.getDay()]}function j(Ae){return o[Ae.getDay()]}function K(Ae){return u[Ae.getMonth()]}function Y(Ae){return s[Ae.getMonth()]}function oe(Ae){return i[+(Ae.getHours()>=12)]}function Q(Ae){return 1+~~(Ae.getMonth()/3)}function J(Ae){return a[Ae.getUTCDay()]}function ue(Ae){return o[Ae.getUTCDay()]}function de(Ae){return u[Ae.getUTCMonth()]}function Se(Ae){return s[Ae.getUTCMonth()]}function me(Ae){return i[+(Ae.getUTCHours()>=12)]}function Ze(Ae){return 1+~~(Ae.getUTCMonth()/3)}return{format:function(Ae){var Le=C(Ae+="",S);return Le.toString=function(){return Ae},Le},parse:function(Ae){var Le=k(Ae+="",!1);return Le.toString=function(){return Ae},Le},utcFormat:function(Ae){var Le=C(Ae+="",O);return Le.toString=function(){return Ae},Le},utcParse:function(Ae){var Le=k(Ae+="",!0);return Le.toString=function(){return Ae},Le}}}var w7={"-":"",_:" ",0:"0"},ai=/^\s*\d+/,lke=/^%/,cke=/[\\^$*+?|[\]().{}]/g;function bn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function dke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function hke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function pke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function gke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function mke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function _7(e,t,n){var r=ai.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function S7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function vke(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 yke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function bke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function C7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function xke(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function E7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function wke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function _ke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Ske(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Cke(e,t,n){var r=ai.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Eke(e,t,n){var r=lke.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Oke(e,t,n){var r=ai.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ake(e,t,n){var r=ai.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function O7(e,t){return bn(e.getDate(),t,2)}function Pke(e,t){return bn(e.getHours(),t,2)}function kke(e,t){return bn(e.getHours()%12||12,t,2)}function Tke(e,t){return bn(1+jm.count(Cu(e),e),t,3)}function eH(e,t){return bn(e.getMilliseconds(),t,3)}function Mke(e,t){return eH(e,t)+"000"}function Rke(e,t){return bn(e.getMonth()+1,t,2)}function Dke(e,t){return bn(e.getMinutes(),t,2)}function $ke(e,t){return bn(e.getSeconds(),t,2)}function Ike(e){var t=e.getDay();return t===0?7:t}function Nke(e,t){return bn(Ww.count(Cu(e)-1,e),t,2)}function tH(e){var t=e.getDay();return t>=4||t===0?ih(e):ih.ceil(e)}function Lke(e,t){return e=tH(e),bn(ih.count(Cu(e),e)+(Cu(e).getDay()===4),t,2)}function Fke(e){return e.getDay()}function jke(e,t){return bn(Ib.count(Cu(e)-1,e),t,2)}function Bke(e,t){return bn(e.getFullYear()%100,t,2)}function zke(e,t){return e=tH(e),bn(e.getFullYear()%100,t,2)}function Uke(e,t){return bn(e.getFullYear()%1e4,t,4)}function Vke(e,t){var n=e.getDay();return e=n>=4||n===0?ih(e):ih.ceil(e),bn(e.getFullYear()%1e4,t,4)}function Wke(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+bn(t/60|0,"0",2)+bn(t%60,"0",2)}function A7(e,t){return bn(e.getUTCDate(),t,2)}function Hke(e,t){return bn(e.getUTCHours(),t,2)}function Kke(e,t){return bn(e.getUTCHours()%12||12,t,2)}function qke(e,t){return bn(1+Vw.count(Eu(e),e),t,3)}function nH(e,t){return bn(e.getUTCMilliseconds(),t,3)}function Gke(e,t){return nH(e,t)+"000"}function Yke(e,t){return bn(e.getUTCMonth()+1,t,2)}function Zke(e,t){return bn(e.getUTCMinutes(),t,2)}function Xke(e,t){return bn(e.getUTCSeconds(),t,2)}function Qke(e){var t=e.getUTCDay();return t===0?7:t}function Jke(e,t){return bn(Hw.count(Eu(e)-1,e),t,2)}function rH(e){var t=e.getUTCDay();return t>=4||t===0?oh(e):oh.ceil(e)}function eTe(e,t){return e=rH(e),bn(oh.count(Eu(e),e)+(Eu(e).getUTCDay()===4),t,2)}function tTe(e){return e.getUTCDay()}function nTe(e,t){return bn(Nb.count(Eu(e)-1,e),t,2)}function rTe(e,t){return bn(e.getUTCFullYear()%100,t,2)}function iTe(e,t){return e=rH(e),bn(e.getUTCFullYear()%100,t,2)}function oTe(e,t){return bn(e.getUTCFullYear()%1e4,t,4)}function aTe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?oh(e):oh.ceil(e),bn(e.getUTCFullYear()%1e4,t,4)}function sTe(){return"+0000"}function P7(){return"%"}function k7(e){return+e}function T7(e){return Math.floor(+e/1e3)}var Yf,iH,oH;uTe({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 uTe(e){return Yf=uke(e),iH=Yf.format,Yf.parse,oH=Yf.utcFormat,Yf.utcParse,Yf}function lTe(e){return new Date(e)}function cTe(e){return e instanceof Date?+e:+new Date(+e)}function yP(e,t,n,r,i,o,a,s,u,l){var c=iP(),f=c.invert,h=c.domain,p=l(".%L"),m=l(":%S"),v=l("%I:%M"),b=l("%I %p"),w=l("%a %d"),x=l("%b %d"),S=l("%B"),O=l("%Y");function E(C){return(u(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>J5e(e,o/r))},n.copy=function(){return lH(t).domain(e)},Ru.apply(n,arguments)}function qw(){var e=0,t=.5,n=1,r=1,i,o,a,s,u,l=Vi,c,f=!1,h;function p(v){return isNaN(v=+v)?h:(v=.5+((v=+c(v))-o)*(r*vt}var yTe=vTe,bTe=hH,xTe=yTe,wTe=Yh;function _Te(e){return e&&e.length?bTe(e,wTe,xTe):void 0}var STe=_Te;const ul=Pn(STe);function CTe(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};st.decimalPlaces=st.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*tr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};st.dividedBy=st.div=function(e){return hu(this,new this.constructor(e))};st.dividedToIntegerBy=st.idiv=function(e){var t=this,n=t.constructor;return zn(hu(t,new n(e),0,1),n.precision)};st.equals=st.eq=function(e){return!this.cmp(e)};st.exponent=function(){return Mr(this)};st.greaterThan=st.gt=function(e){return this.cmp(e)>0};st.greaterThanOrEqualTo=st.gte=function(e){return this.cmp(e)>=0};st.isInteger=st.isint=function(){return this.e>this.d.length-2};st.isNegative=st.isneg=function(){return this.s<0};st.isPositive=st.ispos=function(){return this.s>0};st.isZero=function(){return this.s===0};st.lessThan=st.lt=function(e){return this.cmp(e)<0};st.lessThanOrEqualTo=st.lte=function(e){return this.cmp(e)<1};st.logarithm=st.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Do))throw Error(ya+"NaN");if(n.s<1)throw Error(ya+(n.s?"NaN":"-Infinity"));return n.eq(Do)?new r(0):(ar=!1,t=hu(Rg(n,o),Rg(e,o),o),ar=!0,zn(t,i))};st.minus=st.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?vH(t,e):gH(t,(e.s=-e.s,e))};st.modulo=st.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ya+"NaN");return n.s?(ar=!1,t=hu(n,e,0,1).times(e),ar=!0,n.minus(t)):zn(new r(n),i)};st.naturalExponential=st.exp=function(){return mH(this)};st.naturalLogarithm=st.ln=function(){return Rg(this)};st.negated=st.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};st.plus=st.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?gH(t,e):vH(t,(e.s=-e.s,e))};st.precision=st.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($c+e);if(t=Mr(i)+1,r=i.d.length-1,n=r*tr+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};st.squareRoot=st.sqrt=function(){var e,t,n,r,i,o,a,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(ya+"NaN")}for(e=Mr(s),ar=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ys(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Qh((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 u(t)):r=new u(i.toString()),n=u.precision,i=a=n+3;;)if(o=r,r=o.plus(hu(s,o,a+2)).times(.5),ys(o.d).slice(0,a)===(t=ys(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(zn(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return ar=!0,zn(r,n)};st.times=st.mul=function(e){var t,n,r,i,o,a,s,u,l,c=this,f=c.constructor,h=c.d,p=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,n=c.e+e.e,u=h.length,l=p.length,u=0;){for(t=0,i=u+r;i>r;)s=o[i]+p[r]*h[i-r-1]+t,o[i--]=s%ei|0,t=s/ei|0;o[i]=(o[i]+t)%ei|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,ar?zn(e,f.precision):e};st.toDecimalPlaces=st.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Rs(e,0,Xh),t===void 0?t=r.rounding:Rs(t,0,8),zn(n,e+Mr(n)+1,t))};st.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=nf(r,!0):(Rs(e,0,Xh),t===void 0?t=i.rounding:Rs(t,0,8),r=zn(new i(r),e+1,t),n=nf(r,!0,e+1)),n};st.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?nf(i):(Rs(e,0,Xh),t===void 0?t=o.rounding:Rs(t,0,8),r=zn(new o(i),e+Mr(i)+1,t),n=nf(r.abs(),!1,e+Mr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};st.toInteger=st.toint=function(){var e=this,t=e.constructor;return zn(new t(e),Mr(e)+1,t.rounding)};st.toNumber=function(){return+this};st.toPower=st.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,l=12,c=+(e=new u(e));if(!e.s)return new u(Do);if(s=new u(s),!s.s){if(e.s<1)throw Error(ya+"Infinity");return s}if(s.eq(Do))return s;if(r=u.precision,e.eq(Do))return zn(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=c<0?-c:c)<=pH){for(i=new u(Do),t=Math.ceil(r/tr+4),ar=!1;n%2&&(i=i.times(s),D7(i.d,t)),n=Qh(n/2),n!==0;)s=s.times(s),D7(s.d,t);return ar=!0,e.s<0?new u(Do).div(i):zn(i,r)}}else if(o<0)throw Error(ya+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,ar=!1,i=e.times(Rg(s,r+l)),ar=!0,i=mH(i),i.s=o,i};st.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Mr(i),r=nf(i,n<=o.toExpNeg||n>=o.toExpPos)):(Rs(e,1,Xh),t===void 0?t=o.rounding:Rs(t,0,8),i=zn(new o(i),e,t),n=Mr(i),r=nf(i,e<=n||n<=o.toExpNeg,e)),r};st.toSignificantDigits=st.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Rs(e,1,Xh),t===void 0?t=r.rounding:Rs(t,0,8)),zn(new r(n),e,t)};st.toString=st.valueOf=st.val=st.toJSON=st[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Mr(e),n=e.constructor;return nf(e,t<=n.toExpNeg||t>=n.toExpPos)};function gH(e,t){var n,r,i,o,a,s,u,l,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),ar?zn(t,f):t;if(u=e.d,l=t.d,a=e.e,i=t.e,u=u.slice(),o=a-i,o){for(o<0?(r=u,o=-o,s=l.length):(r=l,i=a,s=u.length),a=Math.ceil(f/tr),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=u.length,o=l.length,s-o<0&&(o=s,r=l,l=u,u=r),n=0;o;)n=(u[--o]=u[o]+l[o]+n)/ei|0,u[o]%=ei;for(n&&(u.unshift(n),++i),s=u.length;u[--s]==0;)u.pop();return t.d=u,t.e=i,ar?zn(t,f):t}function Rs(e,t,n){if(e!==~~e||en)throw Error($c+e)}function ys(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(s=u=0;si[s]?1:-1;break}return u}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var s,u,l,c,f,h,p,m,v,b,w,x,S,O,E,C,k,M,N=r.constructor,z=r.s==i.s?1:-1,H=r.d,V=i.d;if(!r.s)return new N(r);if(!i.s)throw Error(ya+"Division by zero");for(u=r.e-i.e,k=V.length,E=H.length,p=new N(z),m=p.d=[],l=0;V[l]==(H[l]||0);)++l;if(V[l]>(H[l]||0)&&--u,o==null?x=o=N.precision:a?x=o+(Mr(r)-Mr(i))+1:x=o,x<0)return new N(0);if(x=x/tr+2|0,l=0,k==1)for(c=0,V=V[0],x++;(l1&&(V=e(V,c),H=e(H,c),k=V.length,E=H.length),O=k,v=H.slice(0,k),b=v.length;b=ei/2&&++C;do c=0,s=t(V,v,k,b),s<0?(w=v[0],k!=b&&(w=w*ei+(v[1]||0)),c=w/C|0,c>1?(c>=ei&&(c=ei-1),f=e(V,c),h=f.length,b=v.length,s=t(f,v,h,b),s==1&&(c--,n(f,k16)throw Error(wP+Mr(e));if(!e.s)return new c(Do);for(t==null?(ar=!1,s=f):s=t,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(r=Math.log(hc(2,l))/Math.LN10*2+5|0,s+=r,n=i=o=new c(Do),c.precision=s;;){if(i=zn(i.times(e),s),n=n.times(++u),a=o.plus(hu(i,n,s)),ys(a.d).slice(0,s)===ys(o.d).slice(0,s)){for(;l--;)o=zn(o.times(o),s);return c.precision=f,t==null?(ar=!0,zn(o,f)):o}o=a}}function Mr(e){for(var t=e.e*tr,n=e.d[0];n>=10;n/=10)t++;return t}function t3(e,t,n){if(t>e.LN10.sd())throw ar=!0,n&&(e.precision=n),Error(ya+"LN10 precision limit exceeded");return zn(new e(e.LN10),t)}function Qu(e){for(var t="";e--;)t+="0";return t}function Rg(e,t){var n,r,i,o,a,s,u,l,c,f=1,h=10,p=e,m=p.d,v=p.constructor,b=v.precision;if(p.s<1)throw Error(ya+(p.s?"NaN":"-Infinity"));if(p.eq(Do))return new v(0);if(t==null?(ar=!1,l=b):l=t,p.eq(10))return t==null&&(ar=!0),t3(v,l);if(l+=h,v.precision=l,n=ys(m),r=n.charAt(0),o=Mr(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ys(p.d),r=n.charAt(0),f++;o=Mr(p),r>1?(p=new v("0."+n),o++):p=new v(r+"."+n.slice(1))}else return u=t3(v,l+2,b).times(o+""),p=Rg(new v(r+"."+n.slice(1)),l-h).plus(u),v.precision=b,t==null?(ar=!0,zn(p,b)):p;for(s=a=p=hu(p.minus(Do),p.plus(Do),l),c=zn(p.times(p),l),i=3;;){if(a=zn(a.times(c),l),u=s.plus(hu(a,new v(i),l)),ys(u.d).slice(0,l)===ys(s.d).slice(0,l))return s=s.times(2),o!==0&&(s=s.plus(t3(v,l+2,b).times(o+""))),s=hu(s,new v(f),l),v.precision=b,t==null?(ar=!0,zn(s,b)):s;s=u,i+=2}}function R7(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=Qh(n/tr),e.d=[],r=(n+1)%tr,n<0&&(r+=tr),rLb||e.e<-Lb))throw Error(wP+n)}else e.s=0,e.e=0,e.d=[0];return e}function zn(e,t,n){var r,i,o,a,s,u,l,c,f=e.d;for(a=1,o=f[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=tr,i=t,l=f[c=0];else{if(c=Math.ceil((r+1)/tr),o=f.length,c>=o)return e;for(l=o=f[c],a=1;o>=10;o/=10)a++;r%=tr,i=r-tr+a}if(n!==void 0&&(o=hc(10,a-i-1),s=l/o%10|0,u=t<0||f[c+1]!==void 0||l%o,u=n<4?(s||u)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||u||n==6&&(r>0?i>0?l/hc(10,a-i):0:f[c-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return u?(o=Mr(e),f.length=1,t=t-o-1,f[0]=hc(10,(tr-t%tr)%tr),e.e=Qh(-t/tr)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=c,o=1,c--):(f.length=c+1,o=hc(10,tr-r),f[c]=i>0?(l/hc(10,a-i)%hc(10,i)|0)*o:0),u)for(;;)if(c==0){(f[0]+=o)==ei&&(f[0]=1,++e.e);break}else{if(f[c]+=o,f[c]!=ei)break;f[c--]=0,o=1}for(r=f.length;f[--r]===0;)f.pop();if(ar&&(e.e>Lb||e.e<-Lb))throw Error(wP+Mr(e));return e}function vH(e,t){var n,r,i,o,a,s,u,l,c,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ar?zn(t,p):t;if(u=e.d,f=t.d,r=t.e,l=e.e,u=u.slice(),a=l-r,a){for(c=a<0,c?(n=u,a=-a,s=f.length):(n=f,r=l,s=u.length),i=Math.max(Math.ceil(p/tr),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=u.length,s=f.length,c=i0;--i)u[s++]=0;for(i=f.length;i>a;){if(u[--i]0?o=o.charAt(0)+"."+o.slice(1)+Qu(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Qu(-i-1)+o,n&&(r=n-a)>0&&(o+=Qu(r))):i>=a?(o+=Qu(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Qu(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=Qu(r))),e.s<0?"-"+o:o}function D7(e,t){if(e.length>t)return e.length=t,!0}function yH(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error($c+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return R7(a,o.toString())}else if(typeof o!="string")throw Error($c+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,KTe.test(o))R7(a,o);else throw Error($c+o)}if(i.prototype=st,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=yH,i.config=i.set=qTe,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($c+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error($c+n+": "+r);return this}var _P=yH(HTe);Do=new _P(1);const Nn=_P;function GTe(e){return QTe(e)||XTe(e)||ZTe(e)||YTe()}function YTe(){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 ZTe(e,t){if(e){if(typeof e=="string")return i6(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 i6(e,t)}}function XTe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function QTe(e){if(Array.isArray(e))return i6(e)}function i6(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-a,$7(function(){for(var s=arguments.length,u=new Array(s),l=0;le.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,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,o=u}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function hMe(e){if(Array.isArray(e))return e}function SH(e){var t=Dg(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function CH(e,t,n){if(e.lte(0))return new Nn(0);var r=Zw.getDigitCount(e.toNumber()),i=new Nn(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Nn(Math.ceil(o.div(a).toNumber())).add(n).mul(a),u=s.mul(i);return t?u:new Nn(Math.ceil(u))}function pMe(e,t,n){var r=1,i=new Nn(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Nn(10).pow(Zw.getDigitCount(e)-1),i=new Nn(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Nn(Math.floor(e)))}else e===0?i=new Nn(Math.floor((t-1)/2)):n||(i=new Nn(Math.floor(e)));var a=Math.floor((t-1)/2),s=nMe(tMe(function(u){return i.add(new Nn(u-a).mul(r)).toNumber()}),o6);return s(0,t)}function EH(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 Nn(0),tickMin:new Nn(0),tickMax:new Nn(0)};var o=CH(new Nn(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new Nn(0):(a=new Nn(e).add(t).div(2),a=a.sub(new Nn(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),u=Math.ceil(new Nn(t).sub(a).div(o).toNumber()),l=s+u+1;return l>n?EH(e,t,n,r,i+1):(l0?u+(n-l):u,s=t>0?s:s+(n-l)),{step:o,tickMin:a.sub(new Nn(s).mul(o)),tickMax:a.add(new Nn(u).mul(o))})}function gMe(e){var t=Dg(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),s=SH([n,r]),u=Dg(s,2),l=u[0],c=u[1];if(l===-1/0||c===1/0){var f=c===1/0?[l].concat(s6(o6(0,i-1).map(function(){return 1/0}))):[].concat(s6(o6(0,i-1).map(function(){return-1/0})),[c]);return n>r?a6(f):f}if(l===c)return pMe(l,i,o);var h=EH(l,c,a,o),p=h.step,m=h.tickMin,v=h.tickMax,b=Zw.rangeStep(m,v.add(new Nn(.1).mul(p)),p);return n>r?a6(b):b}function mMe(e,t){var n=Dg(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=SH([r,i]),s=Dg(a,2),u=s[0],l=s[1];if(u===-1/0||l===1/0)return[r,i];if(u===l)return[u];var c=Math.max(t,2),f=CH(new Nn(l).sub(u).div(c-1),o,0),h=[].concat(s6(Zw.rangeStep(new Nn(u),new Nn(l).sub(new Nn(.99).mul(f)),f)),[l]);return r>i?a6(h):h}var vMe=wH(gMe),yMe=wH(mMe),bMe="Invariant failed";function rf(e,t){throw new Error(bMe)}var xMe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ah(e){"@babel/helpers - typeof";return ah=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},ah(e)}function Fb(){return Fb=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 AMe(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 PMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kMe(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,o=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r?.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var u=o.range,l=0;l0?i[l-1].coordinate:i[s-1].coordinate,f=i[l].coordinate,h=l>=s-1?i[0].coordinate:i[l+1].coordinate,p=void 0;if(Ua(f-c)!==Ua(h-f)){var m=[];if(Ua(h-f)===Ua(u[1]-u[0])){p=h;var v=f+u[1]-u[0];m[0]=Math.min(v,(v+c)/2),m[1]=Math.max(v,(v+c)/2)}else{p=c;var b=h+u[1]-u[0];m[0]=Math.min(f,(b+f)/2),m[1]=Math.max(f,(b+f)/2)}var w=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>w[0]&&t<=w[1]||t>=m[0]&&t<=m[1]){a=i[l].index;break}}else{var x=Math.min(c,h),S=Math.max(c,h);if(t>(x+f)/2&&t<=(S+f)/2){a=i[l].index;break}}}else for(var O=0;O0&&O(r[O].coordinate+r[O-1].coordinate)/2&&t<=(r[O].coordinate+r[O+1].coordinate)/2||O===s-1&&t>(r[O].coordinate+r[O-1].coordinate)/2){a=r[O].index;break}return a},SP=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?mr(mr({},t.type.defaultProps),t.props):t.props,a=o.stroke,s=o.fill,u;switch(i){case"Line":u=a;break;case"Area":case"Radar":u=a&&a!=="none"?a:s;break;default:u=s;break}return u},KMe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},s=Object.keys(o),u=0,l=s.length;u=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?mr(mr({},x),w[0].props):w[0].props,O=S.barSize,E=S[b];a[E]||(a[E]=[]);var C=Ut(O)?n:O;a[E].push({item:w[0],stackList:w.slice(1),barSize:Ut(C)?void 0:ef(C,r,0)})}}return a},qMe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,s=t.maxBarSize,u=a.length;if(u<1)return null;var l=ef(n,i,0,!0),c,f=[];if(a[0].barSize===+a[0].barSize){var h=!1,p=i/u,m=a.reduce(function(O,E){return O+E.barSize||0},0);m+=(u-1)*l,m>=i&&(m-=(u-1)*l,l=0),m>=i&&p>0&&(h=!0,p*=.9,m=u*p);var v=(i-m)/2>>0,b={offset:v-l,size:0};c=a.reduce(function(O,E){var C={item:E.item,position:{offset:b.offset+b.size+l,size:h?p:E.barSize}},k=[].concat(L7(O),[C]);return b=k[k.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){k.push({item:M,position:b})}),k},f)}else{var w=ef(r,i,0,!0);i-2*w-(u-1)*l<=0&&(l=0);var x=(i-2*w-(u-1)*l)/u;x>1&&(x>>=0);var S=s===+s?Math.min(x,s):x;c=a.reduce(function(O,E,C){var k=[].concat(L7(O),[{item:E.item,position:{offset:w+(x+l)*C+(x-S)/2,size:S}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){k.push({item:M,position:k[k.length-1].position})}),k},f)}return c},GMe=function(t,n,r,i){var o=r.children,a=r.width,s=r.margin,u=a-(s.left||0)-(s.right||0),l=kH({children:o,legendWidth:u});if(l){var c=i||{},f=c.width,h=c.height,p=l.align,m=l.verticalAlign,v=l.layout;if((v==="vertical"||v==="horizontal"&&m==="middle")&&p!=="center"&&qe(t[p]))return mr(mr({},t),{},Id({},p,t[p]+(f||0)));if((v==="horizontal"||v==="vertical"&&p==="center")&&m!=="middle"&&qe(t[m]))return mr(mr({},t),{},Id({},m,t[m]+(h||0)))}return t},YMe=function(t,n,r){return Ut(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},TH=function(t,n,r,i,o){var a=n.props.children,s=po(a,Jh).filter(function(l){return YMe(i,o,l.props.direction)});if(s&&s.length){var u=s.map(function(l){return l.props.dataKey});return t.reduce(function(l,c){var f=Kr(c,r);if(Ut(f))return l;var h=Array.isArray(f)?[Gw(f),ul(f)]:[f,f],p=u.reduce(function(m,v){var b=Kr(c,v,0),w=h[0]-Math.abs(Array.isArray(b)?b[0]:b),x=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(w,m[0]),Math.max(x,m[1])]},[1/0,-1/0]);return[Math.min(p[0],l[0]),Math.max(p[1],l[1])]},[1/0,-1/0])}return null},ZMe=function(t,n,r,i,o){var a=n.map(function(s){return TH(t,s,r,o,i)}).filter(function(s){return!Ut(s)});return a&&a.length?a.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]):null},MH=function(t,n,r,i,o){var a=n.map(function(u){var l=u.props.dataKey;return r==="number"&&l&&TH(t,u,l,i)||E0(t,l,r,o)});if(r==="number")return a.reduce(function(u,l){return[Math.min(u[0],l[0]),Math.max(u[1],l[1])]},[1/0,-1/0]);var s={};return a.reduce(function(u,l){for(var c=0,f=l.length;c=2?Ua(s[0]-s[1])*2*l:l,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var h=o?o.indexOf(f):f;return{coordinate:i(h)+l,value:f,offset:l}});return c.filter(function(f){return!Kh(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+l,value:f,index:h,offset:l}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+l,value:f,offset:l}}):i.domain().map(function(f,h){return{coordinate:i(f)+l,value:o?o[f]:f,index:h,offset:l}})},n3=new WeakMap,xy=function(t,n){if(typeof n!="function")return t;n3.has(t)||n3.set(t,new WeakMap);var r=n3.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},XMe=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,s=t.axisType;if(i==="auto")return a==="radial"&&s==="radiusAxis"?{scale:Ag(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:Db(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:C0(),realScaleType:"point"}:o==="category"?{scale:Ag(),realScaleType:"band"}:{scale:Db(),realScaleType:"linear"};if($m(i)){var u="scale".concat($w(i));return{scale:(M7[u]||C0)(),realScaleType:M7[u]?u:"point"}}return Wt(i)?{scale:i}:{scale:C0(),realScaleType:"point"}},j7=1e-4,QMe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-j7,a=Math.max(i[0],i[1])+j7,s=t(n[0]),u=t(n[r-1]);(sa||ua)&&t.domain([n[0],n[r-1]])}},JMe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[s][r][0]=o,t[s][r][1]=o+u,o=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+u,a=t[s][r][1])}},nRe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+s,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},rRe={sign:tRe,expand:ySe,none:Qd,silhouette:bSe,wiggle:xSe,positive:nRe},iRe=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),o=rRe[r],a=vSe().keys(i).value(function(s,u){return+Kr(s,u,0)}).order(IE).offset(o);return a(t)},oRe=function(t,n,r,i,o,a){if(!t)return null;var s=a?n.reverse():n,u={},l=s.reduce(function(f,h){var p,m=(p=h.type)!==null&&p!==void 0&&p.defaultProps?mr(mr({},h.type.defaultProps),h.props):h.props,v=m.stackId,b=m.hide;if(b)return f;var w=m[r],x=f[w]||{hasStack:!1,stackGroups:{}};if(Hr(v)){var S=x.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(h),x.hasStack=!0,x.stackGroups[v]=S}else x.stackGroups[vf("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return mr(mr({},f),{},Id({},w,x))},u),c={};return Object.keys(l).reduce(function(f,h){var p=l[h];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(v,b){var w=p.stackGroups[b];return mr(mr({},v),{},Id({},b,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:iRe(t,w.items,o)}))},m)}return mr(mr({},f),{},Id({},h,p))},c)},aRe=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,s=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var l=t.domain();if(!l.length)return null;var c=vMe(l,o,s);return t.domain([Gw(c),ul(c)]),{niceTicks:c}}if(o&&i==="number"){var f=t.domain(),h=yMe(f,o,s);return{niceTicks:h}}return null};function sh(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ut(i[t.dataKey])){var s=fb(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var u=Kr(i,Ut(a)?t.dataKey:a);return Ut(u)?null:t.scale(u)}var B7=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var u=Kr(a,n.dataKey,n.domain[s]);return Ut(u)?null:n.scale(u)-o/2+i},sRe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},uRe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?mr(mr({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Hr(o)){var a=n[o];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},lRe=function(t){return t.reduce(function(n,r){return[Gw(r.concat([n[0]]).filter(qe)),ul(r.concat([n[1]]).filter(qe))]},[1/0,-1/0])},$H=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],s=a.stackedData,u=s.reduce(function(l,c){var f=lRe(c.slice(n,r+1));return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},z7=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,U7=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,f6=function(t,n,r){if(Wt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(qe(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(z7.test(t[0])){var o=+z7.exec(t[0])[1];i[0]=n[0]-o}else Wt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(qe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(U7.test(t[1])){var a=+U7.exec(t[1])[1];i[1]=n[1]+a}else Wt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Bb=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 o=ZA(n,function(f){return f.coordinate}),a=1/0,s=1,u=o.length;sa&&(l=2*Math.PI-l),{radius:s,angle:hRe(l),angleInRadian:l}},mRe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},vRe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),s=Math.min(o,a);return t+s*360},K7=function(t,n){var r=t.x,i=t.y,o=gRe({x:r,y:i},n),a=o.radius,s=o.angle,u=n.innerRadius,l=n.outerRadius;if(al)return!1;if(a===0)return!0;var c=mRe(n),f=c.startAngle,h=c.endAngle,p=s,m;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 m?H7(H7({},n),{},{radius:a,angle:vRe(p,n)}):null};function Lg(e){"@babel/helpers - typeof";return Lg=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},Lg(e)}var yRe=["offset"];function bRe(e){return SRe(e)||_Re(e)||wRe(e)||xRe()}function xRe(){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 wRe(e,t){if(e){if(typeof e=="string")return d6(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 d6(e,t)}}function _Re(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function SRe(e){if(Array.isArray(e))return d6(e)}function d6(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 ERe(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 q7(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 jr(e){for(var t=1;t=0?1:-1,S,O;i==="insideStart"?(S=p+x*a,O=v):i==="insideEnd"?(S=m-x*a,O=!v):i==="end"&&(S=m+x*a,O=v),O=w<=0?O:!O;var E=pi(l,c,b,S),C=pi(l,c,b,S+(O?1:-1)*359),k="M".concat(E.x,",").concat(E.y,` A`).concat(b,",").concat(b,",0,1,").concat(O?0:1,`, - `).concat(C.x,",").concat(C.y),M=Ut(t.id)?bf("recharts-radial-line-"):t.id;return z.createElement("text",Ug({},r,{dominantBaseline:"central",className:dn("recharts-radial-bar-label",s)}),z.createElement("defs",null,z.createElement("path",{id:M,d:k})),z.createElement("textPath",{xlinkHref:"#".concat(M)},n))},fDe=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,a=o.cx,s=o.cy,u=o.innerRadius,l=o.outerRadius,c=o.startAngle,f=o.endAngle,h=(c+f)/2;if(i==="outside"){var p=pi(a,s,l+r,h),m=p.x,v=p.y;return{x:m,y:v,textAnchor:m>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var b=(u+l)/2,w=pi(a,s,b,h),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},dDe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,s=a.x,u=a.y,l=a.width,c=a.height,f=c>=0?1:-1,h=f*i,p=f>0?"end":"start",m=f>0?"start":"end",v=l>=0?1:-1,b=v*i,w=v>0?"end":"start",x=v>0?"start":"end";if(o==="top"){var S={x:s+l/2,y:u-f*i,textAnchor:"middle",verticalAnchor:p};return jr(jr({},S),r?{height:Math.max(u-r.y,0),width:l}:{})}if(o==="bottom"){var O={x:s+l/2,y:u+c+h,textAnchor:"middle",verticalAnchor:m};return jr(jr({},O),r?{height:Math.max(r.y+r.height-(u+c),0),width:l}:{})}if(o==="left"){var E={x:s-b,y:u+c/2,textAnchor:w,verticalAnchor:"middle"};return jr(jr({},E),r?{width:Math.max(E.x-r.x,0),height:c}:{})}if(o==="right"){var C={x:s+l+b,y:u+c/2,textAnchor:x,verticalAnchor:"middle"};return jr(jr({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:c}:{})}var k=r?{width:l,height:c}:{};return o==="insideLeft"?jr({x:s+b,y:u+c/2,textAnchor:x,verticalAnchor:"middle"},k):o==="insideRight"?jr({x:s+l-b,y:u+c/2,textAnchor:w,verticalAnchor:"middle"},k):o==="insideTop"?jr({x:s+l/2,y:u+h,textAnchor:"middle",verticalAnchor:m},k):o==="insideBottom"?jr({x:s+l/2,y:u+c-h,textAnchor:"middle",verticalAnchor:p},k):o==="insideTopLeft"?jr({x:s+b,y:u+h,textAnchor:x,verticalAnchor:m},k):o==="insideTopRight"?jr({x:s+l-b,y:u+h,textAnchor:w,verticalAnchor:m},k):o==="insideBottomLeft"?jr({x:s+b,y:u+c-h,textAnchor:x,verticalAnchor:p},k):o==="insideBottomRight"?jr({x:s+l-b,y:u+c-h,textAnchor:w,verticalAnchor:p},k):Wh(o)&&(Ke(o.x)||Cc(o.x))&&(Ke(o.y)||Cc(o.y))?jr({x:s+nf(o.x,l),y:u+nf(o.y,c),textAnchor:"end",verticalAnchor:"end"},k):jr({x:s+l/2,y:u+c/2,textAnchor:"middle",verticalAnchor:"middle"},k)},hDe=function(t){return"cx"in t&&Ke(t.cx)};function ki(e){var t=e.offset,n=t===void 0?5:t,r=rDe(e,XRe),i=jr({offset:n},r),o=i.viewBox,a=i.position,s=i.value,u=i.children,l=i.content,c=i.className,f=c===void 0?"":c,h=i.textBreakAll;if(!o||Ut(s)&&Ut(u)&&!y.isValidElement(l)&&!Vt(l))return null;if(y.isValidElement(l))return y.cloneElement(l,i);var p;if(Vt(l)){if(p=y.createElement(l,i),y.isValidElement(p))return p}else p=uDe(i);var m=hDe(o),v=zt(i,!0);if(m&&(a==="insideStart"||a==="insideEnd"||a==="end"))return cDe(i,p,v);var b=m?fDe(i):dDe(i);return z.createElement(Mb,Ug({className:dn("recharts-label",f)},v,b,{breakAll:h}),p)}ki.displayName="Label";var JW=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,s=t.r,u=t.radius,l=t.innerRadius,c=t.outerRadius,f=t.x,h=t.y,p=t.top,m=t.left,v=t.width,b=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(Ke(v)&&Ke(b)){if(Ke(f)&&Ke(h))return{x:f,y:h,width:v,height:b};if(Ke(p)&&Ke(m))return{x:p,y:m,width:v,height:b}}return Ke(f)&&Ke(h)?{x:f,y:h,width:0,height:0}:Ke(n)&&Ke(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:l||0,outerRadius:c||u||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},pDe=function(t,n){return t?t===!0?z.createElement(ki,{key:"label-implicit",viewBox:n}):Wr(t)?z.createElement(ki,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===ki?y.cloneElement(t,{key:"label-implicit",viewBox:n}):z.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Vt(t)?z.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Wh(t)?z.createElement(ki,Ug({viewBox:n},t,{key:"label-implicit"})):null:null},gDe=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,o=JW(t),a=go(i,ki).map(function(u,l){return y.cloneElement(u,{viewBox:n||o,key:"label-".concat(l)})});if(!r)return a;var s=pDe(t.label,n||o);return[s].concat(QRe(a))};ki.parseViewBox=JW;ki.renderCallByParent=gDe;function mDe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var vDe=mDe;const yDe=En(vDe);function Hg(e){"@babel/helpers - typeof";return Hg=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},Hg(e)}var bDe=["valueAccessor"],xDe=["data","dataKey","clockWise","id","textBreakAll"];function wDe(e){return EDe(e)||CDe(e)||SDe(e)||_De()}function _De(){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 SDe(e,t){if(e){if(typeof e=="string")return w6(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 w6(e,t)}}function CDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EDe(e){if(Array.isArray(e))return w6(e)}function w6(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 kDe(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 TDe=function(t){return Array.isArray(t.value)?yDe(t.value):t.value};function As(e){var t=e.valueAccessor,n=t===void 0?TDe:t,r=f$(e,bDe),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,u=r.textBreakAll,l=f$(r,xDe);return!i||!i.length?null:z.createElement(Cn,{className:"recharts-label-list"},i.map(function(c,f){var h=Ut(o)?n(c,f):qr(c&&c.payload,o),p=Ut(s)?{}:{id:"".concat(s,"-").concat(f)};return z.createElement(ki,Kb({},zt(c,!0),l,p,{parentViewBox:c.parentViewBox,value:h,textBreakAll:u,viewBox:ki.parseViewBox(Ut(a)?c:c$(c$({},c),{},{clockWise:a})),key:"label-".concat(f),index:f}))}))}As.displayName="LabelList";function MDe(e,t){return e?e===!0?z.createElement(As,{key:"labelList-implicit",data:t}):z.isValidElement(e)||Vt(e)?z.createElement(As,{key:"labelList-implicit",data:t,content:e}):Wh(e)?z.createElement(As,Kb({data:t},e,{key:"labelList-implicit"})):null:null}function RDe(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=go(r,As).map(function(a,s){return y.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var o=MDe(e.label,t);return[o].concat(wDe(i))}As.renderCallByParent=RDe;function Vg(e){"@babel/helpers - typeof";return Vg=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},Vg(e)}function _6(){return _6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var b=(u+l)/2,w=pi(a,s,b,h),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},DRe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,s=a.x,u=a.y,l=a.width,c=a.height,f=c>=0?1:-1,h=f*i,p=f>0?"end":"start",m=f>0?"start":"end",v=l>=0?1:-1,b=v*i,w=v>0?"end":"start",x=v>0?"start":"end";if(o==="top"){var S={x:s+l/2,y:u-f*i,textAnchor:"middle",verticalAnchor:p};return jr(jr({},S),r?{height:Math.max(u-r.y,0),width:l}:{})}if(o==="bottom"){var O={x:s+l/2,y:u+c+h,textAnchor:"middle",verticalAnchor:m};return jr(jr({},O),r?{height:Math.max(r.y+r.height-(u+c),0),width:l}:{})}if(o==="left"){var E={x:s-b,y:u+c/2,textAnchor:w,verticalAnchor:"middle"};return jr(jr({},E),r?{width:Math.max(E.x-r.x,0),height:c}:{})}if(o==="right"){var C={x:s+l+b,y:u+c/2,textAnchor:x,verticalAnchor:"middle"};return jr(jr({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:c}:{})}var k=r?{width:l,height:c}:{};return o==="insideLeft"?jr({x:s+b,y:u+c/2,textAnchor:x,verticalAnchor:"middle"},k):o==="insideRight"?jr({x:s+l-b,y:u+c/2,textAnchor:w,verticalAnchor:"middle"},k):o==="insideTop"?jr({x:s+l/2,y:u+h,textAnchor:"middle",verticalAnchor:m},k):o==="insideBottom"?jr({x:s+l/2,y:u+c-h,textAnchor:"middle",verticalAnchor:p},k):o==="insideTopLeft"?jr({x:s+b,y:u+h,textAnchor:x,verticalAnchor:m},k):o==="insideTopRight"?jr({x:s+l-b,y:u+h,textAnchor:w,verticalAnchor:m},k):o==="insideBottomLeft"?jr({x:s+b,y:u+c-h,textAnchor:x,verticalAnchor:p},k):o==="insideBottomRight"?jr({x:s+l-b,y:u+c-h,textAnchor:w,verticalAnchor:p},k):Uh(o)&&(qe(o.x)||Sc(o.x))&&(qe(o.y)||Sc(o.y))?jr({x:s+ef(o.x,l),y:u+ef(o.y,c),textAnchor:"end",verticalAnchor:"end"},k):jr({x:s+l/2,y:u+c/2,textAnchor:"middle",verticalAnchor:"middle"},k)},$Re=function(t){return"cx"in t&&qe(t.cx)};function ki(e){var t=e.offset,n=t===void 0?5:t,r=CRe(e,yRe),i=jr({offset:n},r),o=i.viewBox,a=i.position,s=i.value,u=i.children,l=i.content,c=i.className,f=c===void 0?"":c,h=i.textBreakAll;if(!o||Ut(s)&&Ut(u)&&!y.isValidElement(l)&&!Wt(l))return null;if(y.isValidElement(l))return y.cloneElement(l,i);var p;if(Wt(l)){if(p=y.createElement(l,i),y.isValidElement(p))return p}else p=kRe(i);var m=$Re(o),v=zt(i,!0);if(m&&(a==="insideStart"||a==="insideEnd"||a==="end"))return MRe(i,p,v);var b=m?RRe(i):DRe(i);return F.createElement(Ob,Fg({className:dn("recharts-label",f)},v,b,{breakAll:h}),p)}ki.displayName="Label";var NH=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,s=t.r,u=t.radius,l=t.innerRadius,c=t.outerRadius,f=t.x,h=t.y,p=t.top,m=t.left,v=t.width,b=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(qe(v)&&qe(b)){if(qe(f)&&qe(h))return{x:f,y:h,width:v,height:b};if(qe(p)&&qe(m))return{x:p,y:m,width:v,height:b}}return qe(f)&&qe(h)?{x:f,y:h,width:0,height:0}:qe(n)&&qe(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:l||0,outerRadius:c||u||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},IRe=function(t,n){return t?t===!0?F.createElement(ki,{key:"label-implicit",viewBox:n}):Hr(t)?F.createElement(ki,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===ki?y.cloneElement(t,{key:"label-implicit",viewBox:n}):F.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Wt(t)?F.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Uh(t)?F.createElement(ki,Fg({viewBox:n},t,{key:"label-implicit"})):null:null},NRe=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,o=NH(t),a=po(i,ki).map(function(u,l){return y.cloneElement(u,{viewBox:n||o,key:"label-".concat(l)})});if(!r)return a;var s=IRe(t.label,n||o);return[s].concat(bRe(a))};ki.parseViewBox=NH;ki.renderCallByParent=NRe;function LRe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var FRe=LRe;const jRe=Pn(FRe);function jg(e){"@babel/helpers - typeof";return jg=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},jg(e)}var BRe=["valueAccessor"],zRe=["data","dataKey","clockWise","id","textBreakAll"];function URe(e){return KRe(e)||HRe(e)||WRe(e)||VRe()}function VRe(){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 WRe(e,t){if(e){if(typeof e=="string")return h6(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 h6(e,t)}}function HRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KRe(e){if(Array.isArray(e))return h6(e)}function h6(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 ZRe(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 XRe=function(t){return Array.isArray(t.value)?jRe(t.value):t.value};function As(e){var t=e.valueAccessor,n=t===void 0?XRe:t,r=Z7(e,BRe),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,u=r.textBreakAll,l=Z7(r,zRe);return!i||!i.length?null:F.createElement(Cn,{className:"recharts-label-list"},i.map(function(c,f){var h=Ut(o)?n(c,f):Kr(c&&c.payload,o),p=Ut(s)?{}:{id:"".concat(s,"-").concat(f)};return F.createElement(ki,Ub({},zt(c,!0),l,p,{parentViewBox:c.parentViewBox,value:h,textBreakAll:u,viewBox:ki.parseViewBox(Ut(a)?c:Y7(Y7({},c),{},{clockWise:a})),key:"label-".concat(f),index:f}))}))}As.displayName="LabelList";function QRe(e,t){return e?e===!0?F.createElement(As,{key:"labelList-implicit",data:t}):F.isValidElement(e)||Wt(e)?F.createElement(As,{key:"labelList-implicit",data:t,content:e}):Uh(e)?F.createElement(As,Ub({data:t},e,{key:"labelList-implicit"})):null:null}function JRe(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=po(r,As).map(function(a,s){return y.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var o=QRe(e.label,t);return[o].concat(URe(i))}As.renderCallByParent=JRe;function Bg(e){"@babel/helpers - typeof";return Bg=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},Bg(e)}function p6(){return p6=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>l),`, `).concat(f.x,",").concat(f.y,` `);if(i>0){var p=pi(n,r,i,a),m=pi(n,r,i,l);h+="L ".concat(m.x,",").concat(m.y,` A `).concat(i,",").concat(i,`,0, `).concat(+(Math.abs(u)>180),",").concat(+(a<=l),`, - `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},LDe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,u=t.cornerIsExternal,l=t.startAngle,c=t.endAngle,f=Ua(c-l),h=Ey({cx:n,cy:r,radius:o,angle:l,sign:f,cornerRadius:a,cornerIsExternal:u}),p=h.circleTangency,m=h.lineTangency,v=h.theta,b=Ey({cx:n,cy:r,radius:o,angle:c,sign:-f,cornerRadius:a,cornerIsExternal:u}),w=b.circleTangency,x=b.lineTangency,S=b.theta,O=u?Math.abs(l-c):Math.abs(l-c)-v-S;if(O<0)return s?"M ".concat(m.x,",").concat(m.y,` + `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},iDe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,u=t.cornerIsExternal,l=t.startAngle,c=t.endAngle,f=Ua(c-l),h=wy({cx:n,cy:r,radius:o,angle:l,sign:f,cornerRadius:a,cornerIsExternal:u}),p=h.circleTangency,m=h.lineTangency,v=h.theta,b=wy({cx:n,cy:r,radius:o,angle:c,sign:-f,cornerRadius:a,cornerIsExternal:u}),w=b.circleTangency,x=b.lineTangency,S=b.theta,O=u?Math.abs(l-c):Math.abs(l-c)-v-S;if(O<0)return s?"M ".concat(m.x,",").concat(m.y,` a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 - `):eq({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:l,endAngle:c});var E="M ".concat(m.x,",").concat(m.y,` + `):LH({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:l,endAngle:c});var E="M ".concat(m.x,",").concat(m.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` A`).concat(o,",").concat(o,",0,").concat(+(O>180),",").concat(+(f<0),",").concat(w.x,",").concat(w.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(x.x,",").concat(x.y,` - `);if(i>0){var C=Ey({cx:n,cy:r,radius:i,angle:l,sign:f,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),k=C.circleTangency,M=C.lineTangency,N=C.theta,q=Ey({cx:n,cy:r,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),Y=q.circleTangency,W=q.lineTangency,ne=q.theta,Z=u?Math.abs(l-c):Math.abs(l-c)-N-ne;if(Z<0&&a===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(W.x,",").concat(W.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(Y.x,",").concat(Y.y,` + `);if(i>0){var C=wy({cx:n,cy:r,radius:i,angle:l,sign:f,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),k=C.circleTangency,M=C.lineTangency,N=C.theta,z=wy({cx:n,cy:r,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),H=z.circleTangency,V=z.lineTangency,ne=z.theta,Z=u?Math.abs(l-c):Math.abs(l-c)-N-ne;if(Z<0&&a===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(V.x,",").concat(V.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(H.x,",").concat(H.y,` A`).concat(i,",").concat(i,",0,").concat(+(Z>180),",").concat(+(f>0),",").concat(k.x,",").concat(k.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(M.x,",").concat(M.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},FDe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},tq=function(t){var n=h$(h$({},FDe),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,u=n.forceCornerRadius,l=n.cornerIsExternal,c=n.startAngle,f=n.endAngle,h=n.className;if(a0&&Math.abs(c-f)<360?b=LDe({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(v,m/2),forceCornerRadius:u,cornerIsExternal:l,startAngle:c,endAngle:f}):b=eq({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:c,endAngle:f}),z.createElement("path",_6({},zt(n,!0),{className:p,d:b,role:"img"}))};function Wg(e){"@babel/helpers - typeof";return Wg=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},Wg(e)}function S6(){return S6=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 GDe(e,t){return rp(e.getTime(),t.getTime())}function w$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,s;(a=i.next())&&!a.done;){for(var u=t.entries(),l=!1,c=0;(s=u.next())&&!s.done;){var f=a.value,h=f[0],p=f[1],m=s.value,v=m[0],b=m[1];!l&&!r[c]&&(l=n.equals(h,v,o,c,e,t,n)&&n.equals(p,b,h,v,e,t,n))&&(r[c]=!0),c++}if(!l)return!1;o++}return!0}function YDe(e,t,n){var r=x$(e),i=r.length;if(x$(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===rq&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!nq(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function Xp(e,t,n){var r=y$(e),i=r.length;if(y$(t).length!==i)return!1;for(var o,a,s;i-- >0;)if(o=r[i],o===rq&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!nq(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=b$(e,o),s=b$(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function ZDe(e,t){return rp(e.valueOf(),t.valueOf())}function XDe(e,t){return e.source===t.source&&e.flags===t.flags}function _$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var s=t.values(),u=!1,l=0;(a=s.next())&&!a.done;)!u&&!r[l]&&(u=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[l]=!0),l++;if(!u)return!1}return!0}function QDe(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 JDe="[object Arguments]",e9e="[object Boolean]",t9e="[object Date]",n9e="[object Map]",r9e="[object Number]",i9e="[object Object]",o9e="[object RegExp]",a9e="[object Set]",s9e="[object String]",u9e=Array.isArray,S$=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,C$=Object.assign,l9e=Object.prototype.toString.call.bind(Object.prototype.toString);function c9e(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,u=e.areTypedArraysEqual;return function(c,f,h){if(c===f)return!0;if(c==null||f==null||typeof c!="object"||typeof f!="object")return c!==c&&f!==f;var p=c.constructor;if(p!==f.constructor)return!1;if(p===Object)return i(c,f,h);if(u9e(c))return t(c,f,h);if(S$!=null&&S$(c))return u(c,f,h);if(p===Date)return n(c,f,h);if(p===RegExp)return a(c,f,h);if(p===Map)return r(c,f,h);if(p===Set)return s(c,f,h);var m=l9e(c);return m===t9e?n(c,f,h):m===o9e?a(c,f,h):m===n9e?r(c,f,h):m===a9e?s(c,f,h):m===i9e?typeof c.then!="function"&&typeof f.then!="function"&&i(c,f,h):m===JDe?i(c,f,h):m===e9e||m===r9e||m===s9e?o(c,f,h):!1}}function f9e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Xp:KDe,areDatesEqual:GDe,areMapsEqual:r?v$(w$,Xp):w$,areObjectsEqual:r?Xp:YDe,arePrimitiveWrappersEqual:ZDe,areRegExpsEqual:XDe,areSetsEqual:r?v$(_$,Xp):_$,areTypedArraysEqual:r?Xp:QDe};if(n&&(i=C$({},i,n(i))),t){var o=Ay(i.areArraysEqual),a=Ay(i.areMapsEqual),s=Ay(i.areObjectsEqual),u=Ay(i.areSetsEqual);i=C$({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:u})}return i}function d9e(e){return function(t,n,r,i,o,a,s){return e(t,n,s)}}function h9e(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(u,l){var c=r(),f=c.cache,h=f===void 0?t?new WeakMap:void 0:f,p=c.meta;return n(u,l,{cache:h,equals:i,meta:p,strict:o})};if(t)return function(u,l){return n(u,l,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(u,l){return n(u,l,a)}}var p9e=Kl();Kl({strict:!0});Kl({circular:!0});Kl({circular:!0,strict:!0});Kl({createInternalComparator:function(){return rp}});Kl({strict:!0,createInternalComparator:function(){return rp}});Kl({circular:!0,createInternalComparator:function(){return rp}});Kl({circular:!0,createInternalComparator:function(){return rp},strict:!0});function Kl(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,s=f9e(e),u=c9e(s),l=r?r(u):d9e(u);return h9e({circular:n,comparator:u,createState:i,equals:l,strict:a})}function g9e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function E$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):g9e(i)};requestAnimationFrame(r)}function C6(e){"@babel/helpers - typeof";return C6=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},C6(e)}function m9e(e){return x9e(e)||b9e(e)||y9e(e)||v9e()}function v9e(){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 y9e(e,t){if(e){if(typeof e=="string")return O$(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 O$(e,t)}}function O$(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:w<0?0:w},v=function(w){for(var x=w>1?1:w,S=x,O=0;O<8;++O){var E=f(S)-x,C=p(S);if(Math.abs(E-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,s=a===void 0?17:a,u=function(c,f,h){var p=-(c-f)*r,m=h*o,v=h+(p-m)*s/1e3,b=h*s/1e3+c;return Math.abs(b-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 X9e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function l3(e){return t7e(e)||e7e(e)||J9e(e)||Q9e()}function Q9e(){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 J9e(e,t){if(e){if(typeof e=="string")return k6(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 k6(e,t)}}function e7e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function t7e(e){if(Array.isArray(e))return k6(e)}function k6(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 Zb(e){return Zb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zb(e)}var Xa=function(e){a7e(n,e);var t=s7e(n);function n(r,i){var o;n7e(this,n),o=t.call(this,r,i);var a=o.props,s=a.isActive,u=a.attributeName,l=a.from,c=a.to,f=a.steps,h=a.children,p=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(R6(o)),o.changeStyle=o.changeStyle.bind(R6(o)),!s||p<=0)return o.state={style:{}},typeof h=="function"&&(o.state={style:c}),M6(o);if(f&&f.length)o.state={style:f[0].style};else if(l){if(typeof h=="function")return o.state={style:l},M6(o);o.state={style:u?f0({},u,l):l}}else o.state={style:{}};return o}return i7e(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,s=o.canBegin,u=o.attributeName,l=o.shouldReAnimate,c=o.to,f=o.from,h=this.state.style;if(s){if(!a){var p={style:u?f0({},u,c):c};this.state&&h&&(u&&h[u]!==c||!u&&h!==c)&&this.setState(p);return}if(!(p9e(i.to,c)&&i.canBegin&&i.isActive)){var m=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=m||l?f:i.to;if(this.state&&h){var b={style:u?f0({},u,v):v};(u&&h[u]!==v||!u&&h!==v)&&this.setState(b)}this.runAnimation(ka(ka({},this.props),{},{from:v,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 o=this,a=i.from,s=i.to,u=i.duration,l=i.easing,c=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=G9e(a,s,L9e(l),u,this.changeStyle),m=function(){o.stopJSAnimation=p()};this.manager.start([h,c,m,u,f])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,s=i.begin,u=i.onAnimationStart,l=a[0],c=l.style,f=l.duration,h=f===void 0?0:f,p=function(v,b,w){if(w===0)return v;var x=b.duration,S=b.easing,O=S===void 0?"ease":S,E=b.style,C=b.properties,k=b.onAnimationEnd,M=w>0?a[w-1]:b,N=C||Object.keys(E);if(typeof O=="function"||O==="spring")return[].concat(l3(v),[o.runJSAnimation.bind(o,{from:M.style,to:E,duration:x,easing:O}),x]);var q=k$(N,x,O),Y=ka(ka(ka({},M.style),E),{},{transition:q});return[].concat(l3(v),[Y,x,k]).filter(E9e)};return this.manager.start([u].concat(l3(a.reduce(p,[c,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=w9e());var o=i.begin,a=i.duration,s=i.attributeName,u=i.to,l=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof l=="function"||typeof p=="function"||l==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var v=s?f0({},s,u):u,b=k$(Object.keys(v),a,l);m.start([c,o,ka(ka({},v),{},{transition:b}),a,f])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=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 u=Z9e(i,Y9e),l=y.Children.count(o),c=this.state.style;if(typeof o=="function")return o(c);if(!s||l===0||a<=0)return o;var f=function(p){var m=p.props,v=m.style,b=v===void 0?{}:v,w=m.className,x=y.cloneElement(p,ka(ka({},u),{},{style:ka(ka({},b),c),className:w}));return x};return l===1?f(y.Children.only(o)):z.createElement("div",null,y.Children.map(o,function(h){return f(h)}))}}]),n}(y.PureComponent);Xa.displayName="Animate";Xa.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Xa.propTypes={from:Mt.oneOfType([Mt.object,Mt.string]),to:Mt.oneOfType([Mt.object,Mt.string]),attributeName:Mt.string,duration:Mt.number,begin:Mt.number,easing:Mt.oneOfType([Mt.string,Mt.func]),steps:Mt.arrayOf(Mt.shape({duration:Mt.number.isRequired,style:Mt.object.isRequired,easing:Mt.oneOfType([Mt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Mt.func]),properties:Mt.arrayOf("string"),onAnimationEnd:Mt.func})),children:Mt.oneOfType([Mt.node,Mt.func]),isActive:Mt.bool,canBegin:Mt.bool,onAnimationEnd:Mt.func,shouldReAnimate:Mt.bool,onAnimationStart:Mt.func,onAnimationReStart:Mt.func};Mt.object,Mt.object,Mt.object,Mt.element;Mt.object,Mt.object,Mt.object,Mt.oneOfType([Mt.array,Mt.element]),Mt.any;function Gg(e){"@babel/helpers - typeof";return Gg=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},Gg(e)}function Xb(){return Xb=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,u=r>=0?1:-1,l=i>=0&&r>=0||i<0&&r<0?1:0,c;if(a>0&&o instanceof Array){for(var f=[0,0,0,0],h=0,p=4;ha?a:o[h];c="M".concat(t,",").concat(n+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(l,",").concat(t+u*f[0],",").concat(n)),c+="L ".concat(t+r-u*f[1],",").concat(n),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(l,`, + A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(M.x,",").concat(M.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},oDe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},FH=function(t){var n=Q7(Q7({},oDe),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,u=n.forceCornerRadius,l=n.cornerIsExternal,c=n.startAngle,f=n.endAngle,h=n.className;if(a0&&Math.abs(c-f)<360?b=iDe({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(v,m/2),forceCornerRadius:u,cornerIsExternal:l,startAngle:c,endAngle:f}):b=LH({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:c,endAngle:f}),F.createElement("path",p6({},zt(n,!0),{className:p,d:b,role:"img"}))};function zg(e){"@babel/helpers - typeof";return zg=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},zg(e)}function g6(){return g6=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 gDe(e,t){return ep(e.getTime(),t.getTime())}function a$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,s;(a=i.next())&&!a.done;){for(var u=t.entries(),l=!1,c=0;(s=u.next())&&!s.done;){var f=a.value,h=f[0],p=f[1],m=s.value,v=m[0],b=m[1];!l&&!r[c]&&(l=n.equals(h,v,o,c,e,t,n)&&n.equals(p,b,h,v,e,t,n))&&(r[c]=!0),c++}if(!l)return!1;o++}return!0}function mDe(e,t,n){var r=o$(e),i=r.length;if(o$(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===BH&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!jH(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function Gp(e,t,n){var r=r$(e),i=r.length;if(r$(t).length!==i)return!1;for(var o,a,s;i-- >0;)if(o=r[i],o===BH&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!jH(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=i$(e,o),s=i$(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function vDe(e,t){return ep(e.valueOf(),t.valueOf())}function yDe(e,t){return e.source===t.source&&e.flags===t.flags}function s$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var s=t.values(),u=!1,l=0;(a=s.next())&&!a.done;)!u&&!r[l]&&(u=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[l]=!0),l++;if(!u)return!1}return!0}function bDe(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 xDe="[object Arguments]",wDe="[object Boolean]",_De="[object Date]",SDe="[object Map]",CDe="[object Number]",EDe="[object Object]",ODe="[object RegExp]",ADe="[object Set]",PDe="[object String]",kDe=Array.isArray,u$=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,l$=Object.assign,TDe=Object.prototype.toString.call.bind(Object.prototype.toString);function MDe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,u=e.areTypedArraysEqual;return function(c,f,h){if(c===f)return!0;if(c==null||f==null||typeof c!="object"||typeof f!="object")return c!==c&&f!==f;var p=c.constructor;if(p!==f.constructor)return!1;if(p===Object)return i(c,f,h);if(kDe(c))return t(c,f,h);if(u$!=null&&u$(c))return u(c,f,h);if(p===Date)return n(c,f,h);if(p===RegExp)return a(c,f,h);if(p===Map)return r(c,f,h);if(p===Set)return s(c,f,h);var m=TDe(c);return m===_De?n(c,f,h):m===ODe?a(c,f,h):m===SDe?r(c,f,h):m===ADe?s(c,f,h):m===EDe?typeof c.then!="function"&&typeof f.then!="function"&&i(c,f,h):m===xDe?i(c,f,h):m===wDe||m===CDe||m===PDe?o(c,f,h):!1}}function RDe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Gp:pDe,areDatesEqual:gDe,areMapsEqual:r?n$(a$,Gp):a$,areObjectsEqual:r?Gp:mDe,arePrimitiveWrappersEqual:vDe,areRegExpsEqual:yDe,areSetsEqual:r?n$(s$,Gp):s$,areTypedArraysEqual:r?Gp:bDe};if(n&&(i=l$({},i,n(i))),t){var o=Sy(i.areArraysEqual),a=Sy(i.areMapsEqual),s=Sy(i.areObjectsEqual),u=Sy(i.areSetsEqual);i=l$({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:u})}return i}function DDe(e){return function(t,n,r,i,o,a,s){return e(t,n,s)}}function $De(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(u,l){var c=r(),f=c.cache,h=f===void 0?t?new WeakMap:void 0:f,p=c.meta;return n(u,l,{cache:h,equals:i,meta:p,strict:o})};if(t)return function(u,l){return n(u,l,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(u,l){return n(u,l,a)}}var IDe=Kl();Kl({strict:!0});Kl({circular:!0});Kl({circular:!0,strict:!0});Kl({createInternalComparator:function(){return ep}});Kl({strict:!0,createInternalComparator:function(){return ep}});Kl({circular:!0,createInternalComparator:function(){return ep}});Kl({circular:!0,createInternalComparator:function(){return ep},strict:!0});function Kl(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,s=RDe(e),u=MDe(s),l=r?r(u):DDe(u);return $De({circular:n,comparator:u,createState:i,equals:l,strict:a})}function NDe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function c$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):NDe(i)};requestAnimationFrame(r)}function m6(e){"@babel/helpers - typeof";return m6=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},m6(e)}function LDe(e){return zDe(e)||BDe(e)||jDe(e)||FDe()}function FDe(){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 jDe(e,t){if(e){if(typeof e=="string")return f$(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 f$(e,t)}}function f$(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:w<0?0:w},v=function(w){for(var x=w>1?1:w,S=x,O=0;O<8;++O){var E=f(S)-x,C=p(S);if(Math.abs(E-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,s=a===void 0?17:a,u=function(c,f,h){var p=-(c-f)*r,m=h*o,v=h+(p-m)*s/1e3,b=h*s/1e3+c;return Math.abs(b-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 y9e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function r3(e){return _9e(e)||w9e(e)||x9e(e)||b9e()}function b9e(){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 x9e(e,t){if(e){if(typeof e=="string")return w6(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 w6(e,t)}}function w9e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _9e(e){if(Array.isArray(e))return w6(e)}function w6(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 Hb(e){return Hb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hb(e)}var Xa=function(e){A9e(n,e);var t=P9e(n);function n(r,i){var o;S9e(this,n),o=t.call(this,r,i);var a=o.props,s=a.isActive,u=a.attributeName,l=a.from,c=a.to,f=a.steps,h=a.children,p=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(C6(o)),o.changeStyle=o.changeStyle.bind(C6(o)),!s||p<=0)return o.state={style:{}},typeof h=="function"&&(o.state={style:c}),S6(o);if(f&&f.length)o.state={style:f[0].style};else if(l){if(typeof h=="function")return o.state={style:l},S6(o);o.state={style:u?u0({},u,l):l}}else o.state={style:{}};return o}return E9e(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,s=o.canBegin,u=o.attributeName,l=o.shouldReAnimate,c=o.to,f=o.from,h=this.state.style;if(s){if(!a){var p={style:u?u0({},u,c):c};this.state&&h&&(u&&h[u]!==c||!u&&h!==c)&&this.setState(p);return}if(!(IDe(i.to,c)&&i.canBegin&&i.isActive)){var m=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=m||l?f:i.to;if(this.state&&h){var b={style:u?u0({},u,v):v};(u&&h[u]!==v||!u&&h!==v)&&this.setState(b)}this.runAnimation(ka(ka({},this.props),{},{from:v,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 o=this,a=i.from,s=i.to,u=i.duration,l=i.easing,c=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=g9e(a,s,i9e(l),u,this.changeStyle),m=function(){o.stopJSAnimation=p()};this.manager.start([h,c,m,u,f])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,s=i.begin,u=i.onAnimationStart,l=a[0],c=l.style,f=l.duration,h=f===void 0?0:f,p=function(v,b,w){if(w===0)return v;var x=b.duration,S=b.easing,O=S===void 0?"ease":S,E=b.style,C=b.properties,k=b.onAnimationEnd,M=w>0?a[w-1]:b,N=C||Object.keys(E);if(typeof O=="function"||O==="spring")return[].concat(r3(v),[o.runJSAnimation.bind(o,{from:M.style,to:E,duration:x,easing:O}),x]);var z=p$(N,x,O),H=ka(ka(ka({},M.style),E),{},{transition:z});return[].concat(r3(v),[H,x,k]).filter(KDe)};return this.manager.start([u].concat(r3(a.reduce(p,[c,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=UDe());var o=i.begin,a=i.duration,s=i.attributeName,u=i.to,l=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof l=="function"||typeof p=="function"||l==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var v=s?u0({},s,u):u,b=p$(Object.keys(v),a,l);m.start([c,o,ka(ka({},v),{},{transition:b}),a,f])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=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 u=v9e(i,m9e),l=y.Children.count(o),c=this.state.style;if(typeof o=="function")return o(c);if(!s||l===0||a<=0)return o;var f=function(p){var m=p.props,v=m.style,b=v===void 0?{}:v,w=m.className,x=y.cloneElement(p,ka(ka({},u),{},{style:ka(ka({},b),c),className:w}));return x};return l===1?f(y.Children.only(o)):F.createElement("div",null,y.Children.map(o,function(h){return f(h)}))}}]),n}(y.PureComponent);Xa.displayName="Animate";Xa.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Xa.propTypes={from:Mt.oneOfType([Mt.object,Mt.string]),to:Mt.oneOfType([Mt.object,Mt.string]),attributeName:Mt.string,duration:Mt.number,begin:Mt.number,easing:Mt.oneOfType([Mt.string,Mt.func]),steps:Mt.arrayOf(Mt.shape({duration:Mt.number.isRequired,style:Mt.object.isRequired,easing:Mt.oneOfType([Mt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Mt.func]),properties:Mt.arrayOf("string"),onAnimationEnd:Mt.func})),children:Mt.oneOfType([Mt.node,Mt.func]),isActive:Mt.bool,canBegin:Mt.bool,onAnimationEnd:Mt.func,shouldReAnimate:Mt.bool,onAnimationStart:Mt.func,onAnimationReStart:Mt.func};Mt.object,Mt.object,Mt.object,Mt.element;Mt.object,Mt.object,Mt.object,Mt.oneOfType([Mt.array,Mt.element]),Mt.any;function Wg(e){"@babel/helpers - typeof";return Wg=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},Wg(e)}function Kb(){return Kb=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,u=r>=0?1:-1,l=i>=0&&r>=0||i<0&&r<0?1:0,c;if(a>0&&o instanceof Array){for(var f=[0,0,0,0],h=0,p=4;ha?a:o[h];c="M".concat(t,",").concat(n+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(l,",").concat(t+u*f[0],",").concat(n)),c+="L ".concat(t+r-u*f[1],",").concat(n),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(l,`, `).concat(t+r,",").concat(n+s*f[1])),c+="L ".concat(t+r,",").concat(n+i-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(l,`, `).concat(t+r-u*f[2],",").concat(n+i)),c+="L ".concat(t+u*f[3],",").concat(n+i),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(l,`, `).concat(t,",").concat(n+i-s*f[3])),c+="Z"}else if(a>0&&o===+o&&o>0){var m=Math.min(a,o);c="M ".concat(t,",").concat(n+s*m,` @@ -450,29 +450,29 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho L `).concat(t+r,",").concat(n+i-s*m,` A `).concat(m,",").concat(m,",0,0,").concat(l,",").concat(t+r-u*m,",").concat(n+i,` L `).concat(t+u*m,",").concat(n+i,` - A `).concat(m,",").concat(m,",0,0,").concat(l,",").concat(t,",").concat(n+i-s*m," Z")}else c="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return c},v7e=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,s=n.width,u=n.height;if(Math.abs(s)>0&&Math.abs(u)>0){var l=Math.min(o,o+s),c=Math.max(o,o+s),f=Math.min(a,a+u),h=Math.max(a,a+u);return r>=l&&r<=c&&i>=f&&i<=h}return!1},y7e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},$P=function(t){var n=L$(L$({},y7e),t),r=y.useRef(),i=y.useState(-1),o=l7e(i,2),a=o[0],s=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var O=r.current.getTotalLength();O&&s(O)}catch{}},[]);var u=n.x,l=n.y,c=n.width,f=n.height,h=n.radius,p=n.className,m=n.animationEasing,v=n.animationDuration,b=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(u!==+u||l!==+l||c!==+c||f!==+f||c===0||f===0)return null;var S=dn("recharts-rectangle",p);return x?z.createElement(Xa,{canBegin:a>0,from:{width:c,height:f,x:u,y:l},to:{width:c,height:f,x:u,y:l},duration:v,animationEasing:m,isActive:x},function(O){var E=O.width,C=O.height,k=O.x,M=O.y;return z.createElement(Xa,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:w,easing:m},z.createElement("path",Xb({},zt(n,!0),{className:S,d:F$(k,M,E,C,h),ref:r})))}):z.createElement("path",Xb({},zt(n,!0),{className:S,d:F$(u,l,c,f,h)}))};function D6(){return D6=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 E7e(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 O7e=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},A7e=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,s=a===void 0?0:a,u=t.left,l=u===void 0?0:u,c=t.width,f=c===void 0?0:c,h=t.height,p=h===void 0?0:h,m=t.className,v=C7e(t,b7e),b=x7e({x:r,y:o,top:s,left:l,width:f,height:p},v);return!Ke(r)||!Ke(o)||!Ke(f)||!Ke(p)||!Ke(s)||!Ke(l)?null:z.createElement("path",$6({},zt(b,!0),{className:dn("recharts-cross",m),d:O7e(r,o,f,p,s,l)}))},P7e=OV,k7e=P7e(Object.getPrototypeOf,Object),T7e=k7e,M7e=Mu,R7e=T7e,D7e=Ru,$7e="[object Object]",I7e=Function.prototype,N7e=Object.prototype,cq=I7e.toString,L7e=N7e.hasOwnProperty,F7e=cq.call(Object);function j7e(e){if(!D7e(e)||M7e(e)!=$7e)return!1;var t=R7e(e);if(t===null)return!0;var n=L7e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&cq.call(n)==F7e}var B7e=j7e;const z7e=En(B7e);var U7e=Mu,H7e=Ru,V7e="[object Boolean]";function W7e(e){return e===!0||e===!1||H7e(e)&&U7e(e)==V7e}var q7e=W7e;const K7e=En(q7e);function Zg(e){"@babel/helpers - typeof";return Zg=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},Zg(e)}function Qb(){return Qb=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:u,y:l},to:{upperWidth:c,lowerWidth:f,height:h,x:u,y:l},duration:v,animationEasing:m,isActive:w},function(S){var O=S.upperWidth,E=S.lowerWidth,C=S.height,k=S.x,M=S.y;return z.createElement(Xa,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:m},z.createElement("path",Qb({},zt(n,!0),{className:x,d:H$(k,M,O,E,C),ref:r})))}):z.createElement("g",null,z.createElement("path",Qb({},zt(n,!0),{className:x,d:H$(u,l,c,f,h)})))},i$e=["option","shapeType","propTransformer","activeClassName","isActive"];function Xg(e){"@babel/helpers - typeof";return Xg=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},Xg(e)}function o$e(e,t){if(e==null)return{};var n=a$e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function a$e(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 V$(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 Jb(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),Po(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a?.({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),Po(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Po(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Po(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Po(r,"handleSlideDragStart",function(i){var o=X$(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return H$e(t,e),j$e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,s=this.props,u=s.gap,l=s.data,c=l.length-1,f=Math.min(i,o),h=Math.max(i,o),p=t.getIndexInRange(a,f),m=t.getIndexInRange(a,h);return{startIndex:p-p%u,endIndex:m===c?c:m-m%u}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,u=qr(o[r],s,r);return Vt(a)?a(u,r):u}},{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,o=i.slideMoveStartX,a=i.startX,s=i.endX,u=this.props,l=u.x,c=u.width,f=u.travellerWidth,h=u.startIndex,p=u.endIndex,m=u.onChange,v=r.pageX-o;v>0?v=Math.min(v,l+c-f-s,l+c-f-a):v<0&&(v=Math.max(v,l-a,l-s));var b=this.getIndex({startX:a+v,endX:s+v});(b.startIndex!==h||b.endIndex!==p)&&m&&m(b),this.setState({startX:a+v,endX:s+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=X$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,u=i.startX,l=this.state[a],c=this.props,f=c.x,h=c.width,p=c.travellerWidth,m=c.onChange,v=c.gap,b=c.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-o;x>0?x=Math.min(x,f+h-p-l):x<0&&(x=Math.max(x,f-l)),w[a]=l+x;var S=this.getIndex(w),O=S.startIndex,E=S.endIndex,C=function(){var M=b.length-1;return a==="startX"&&(s>u?O%v===0:E%v===0)||su?E%v===0:O%v===0)||s>u&&E===M};this.setState(Po(Po({},a,l+x),"brushMoveStartX",r.pageX),function(){m&&C()&&m(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,u=a.startX,l=a.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=l||i==="endX"&&p<=u||this.setState(Po({},i,p),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,u=r.fill,l=r.stroke;return z.createElement("rect",{stroke:l,fill:u,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,u=r.data,l=r.children,c=r.padding,f=y.Children.only(l);return f?z.cloneElement(f,{x:i,y:o,width:a,height:s,margin:c,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,s=this,u=this.props,l=u.y,c=u.travellerWidth,f=u.height,h=u.traveller,p=u.ariaLabel,m=u.data,v=u.startIndex,b=u.endIndex,w=Math.max(r,this.props.x),x=f3(f3({},zt(this.props,!1)),{},{x:w,y:l,width:c,height:f}),S=p||"Min value: ".concat((o=m[v])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=m[b])===null||a===void 0?void 0:a.name);return z.createElement(Cn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),s.handleTravellerMoveKeyboard(E.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 o=this.props,a=o.y,s=o.height,u=o.stroke,l=o.travellerWidth,c=Math.min(r,i)+l,f=Math.max(Math.abs(i-r)-l,0);return z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:c,y:a,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,s=r.height,u=r.travellerWidth,l=r.stroke,c=this.state,f=c.startX,h=c.endX,p=5,m={pointerEvents:"none",fill:l};return z.createElement(Cn,{className:"recharts-brush-texts"},z.createElement(Mb,tx({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:a+s/2},m),this.getTextOfTick(i)),z.createElement(Mb,tx({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+u+p,y:a+s/2},m),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,s=r.x,u=r.y,l=r.width,c=r.height,f=r.alwaysShowText,h=this.state,p=h.startX,m=h.endX,v=h.isTextActive,b=h.isSlideMoving,w=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!Ke(s)||!Ke(u)||!Ke(l)||!Ke(c)||l<=0||c<=0)return null;var S=dn("recharts-brush",o),O=z.Children.count(a)===1,E=L$e("userSelect","none");return z.createElement(Cn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(v||b||w||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,s=r.height,u=r.stroke,l=Math.floor(o+s/2)-1;return z.createElement(z.Fragment,null,z.createElement("rect",{x:i,y:o,width:a,height:s,fill:u,stroke:"none"}),z.createElement("line",{x1:i+1,y1:l,x2:i+a-1,y2:l,fill:"none",stroke:"#fff"}),z.createElement("line",{x1:i+1,y1:l+2,x2:i+a-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return z.isValidElement(r)?o=z.cloneElement(r,i):Vt(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,s=r.x,u=r.travellerWidth,l=r.updateId,c=r.startIndex,f=r.endIndex;if(o!==i.prevData||l!==i.prevUpdateId)return f3({prevData:o,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:a},o&&o.length?W$e({data:o,width:a,x:s,travellerWidth:u,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([s,s+a-u]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:o,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,s=o-1;s-a>1;){var u=Math.floor((a+s)/2);r[u]>i?s=u:a=u}return i>=r[s]?s:a}}])}(y.PureComponent);Po(hh,"displayName","Brush");Po(hh,"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 q$e=oP;function K$e(e,t){var n;return q$e(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var G$e=K$e,Y$e=yV,Z$e=Vl,X$e=G$e,Q$e=yo,J$e=qw;function eIe(e,t,n){var r=Q$e(e)?Y$e:X$e;return n&&J$e(e,t,n)&&(t=void 0),r(e,Z$e(t))}var tIe=eIe;const nIe=En(tIe);var Ps=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},Q$=BV;function rIe(e,t,n){t=="__proto__"&&Q$?Q$(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var iIe=rIe,oIe=iIe,aIe=FV,sIe=Vl;function uIe(e,t){var n={};return t=sIe(t),aIe(e,function(r,i,o){oIe(n,i,t(r,i,o))}),n}var lIe=uIe;const cIe=En(lIe);function fIe(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 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}function kIe(e,t){var n=e.x,r=e.y,i=AIe(e,SIe),o="".concat(n),a=parseInt(o,10),s="".concat(r),u=parseInt(s,10),l="".concat(t.height||i.height),c=parseInt(l,10),f="".concat(t.width||i.width),h=parseInt(f,10);return Qp(Qp(Qp(Qp(Qp({},t),i),a?{x:a}:{}),u?{y:u}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function eI(e){return z.createElement(I6,L6({shapeType:"rectangle",propTransformer:kIe,activeClassName:"recharts-active-bar"},e))}var TIe=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 o=typeof r=="number";return o?t(r,i):(o||af(),n)}},MIe=["value","background"],mq;function ph(e){"@babel/helpers - typeof";return ph=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},ph(e)}function RIe(e,t){if(e==null)return{};var n=DIe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DIe(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 rx(){return rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(R)0&&Math.abs(Z)0&&(ne=Math.min((ue||0)-(Z[de-1]||0),ne))}),Number.isFinite(ne)){var R=ne/W,B=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(k=R*B/2),v.padding==="no-gap"){var U=nf(t.barCategoryGap,R*B),F=R*B/2;k=F-U-(F-U)/B*U}}}i==="xAxis"?M=[r.left+(S.left||0)+(k||0),r.left+r.width-(S.right||0)-(k||0)]:i==="yAxis"?M=u==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(k||0),r.top+r.height-(S.bottom||0)-(k||0)]:M=v.range,E&&(M=[M[1],M[0]]);var V=TRe(v,o,h),G=V.scale,oe=V.realScaleType;G.domain(w).range(M),MRe(G);var Q=jRe(G,$a($a({},v),{},{realScaleType:oe}));i==="xAxis"?(Y=b==="top"&&!O||b==="bottom"&&O,N=r.left,q=f[C]-Y*v.height):i==="yAxis"&&(Y=b==="left"&&!O||b==="right"&&O,N=f[C]-Y*v.width,q=r.top);var X=$a($a($a({},v),Q),{},{realScaleType:oe,x:N,y:q,scale:G,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return X.bandSize=Wb(X,Q),!v.hide&&i==="xAxis"?f[C]+=(Y?-1:1)*X.height:v.hide||(f[C]+=(Y?-1:1)*X.width),$a($a({},p),{},o2({},m,X))},{})},xq=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},WIe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return xq({x:n,y:r},{x:i,y:o})},wq=function(){function e(t){zIe(this,e),this.scale=t}return UIe(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,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();o2(wq,"EPS",1e-4);var IP=function(t){var n=Object.keys(t).reduce(function(r,i){return $a($a({},r),{},o2({},i,wq.create(t[i])))},{});return $a($a({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return cIe(i,function(u,l){return n[l].apply(u,{bandAware:a,position:s})})},isInRange:function(i){return gq(i,function(o,a){return n[a].isInRange(o)})}})};function qIe(e){return(e%180+180)%180}var KIe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=qIe(i),a=o*Math.PI/180,s=Math.atan(r/n),u=a>s&&a-1?i[o?t[a]:a]:void 0}}var QIe=XIe,JIe=fq;function eNe(e){var t=JIe(e),n=t%1;return t===t?n?t-n:t:0}var tNe=eNe,nNe=RV,rNe=Vl,iNe=tNe,oNe=Math.max;function aNe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:iNe(n);return i<0&&(i=oNe(r+i,0)),nNe(e,rNe(t),i)}var sNe=aNe,uNe=QIe,lNe=sNe,cNe=uNe(lNe),fNe=cNe;const dNe=En(fNe);var hNe=g2e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),NP=y.createContext(void 0),LP=y.createContext(void 0),_q=y.createContext(void 0),Sq=y.createContext({}),Cq=y.createContext(void 0),Eq=y.createContext(0),Oq=y.createContext(0),oI=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,u=t.width,l=t.height,c=hNe(o);return z.createElement(NP.Provider,{value:r},z.createElement(LP.Provider,{value:i},z.createElement(Sq.Provider,{value:o},z.createElement(_q.Provider,{value:c},z.createElement(Cq.Provider,{value:a},z.createElement(Eq.Provider,{value:l},z.createElement(Oq.Provider,{value:u},s)))))))},pNe=function(){return y.useContext(Cq)},Aq=function(t){var n=y.useContext(NP);n==null&&af();var r=n[t];return r==null&&af(),r},gNe=function(){var t=y.useContext(NP);return il(t)},mNe=function(){var t=y.useContext(LP),n=dNe(t,function(r){return gq(r.domain,Number.isFinite)});return n||il(t)},Pq=function(t){var n=y.useContext(LP);n==null&&af();var r=n[t];return r==null&&af(),r},vNe=function(){var t=y.useContext(_q);return t},yNe=function(){return y.useContext(Sq)},FP=function(){return y.useContext(Oq)},jP=function(){return y.useContext(Eq)};function gh(e){"@babel/helpers - typeof";return gh=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},gh(e)}function bNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xNe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function tLe(e,t){return Iq(e,t+1)}function nLe(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,u=0,l=1,c=a,f=function(){var m=r?.[u];if(m===void 0)return{v:Iq(r,l)};var v=u,b,w=function(){return b===void 0&&(b=n(m,v)),b},x=m.coordinate,S=u===0||ux(e,x,w,c,s);S||(u=0,c=a,l+=1),S&&(c=x+e*(w()/2+i),u+=l)},h;l<=o.length;)if(h=f(),h)return h.v;return[]}function nm(e){"@babel/helpers - typeof";return nm=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},nm(e)}function hI(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 Ai(e){for(var t=1;t0?p.coordinate-b*e:p.coordinate})}else o[h]=p=Ai(Ai({},p),{},{tickCoord:p.coordinate});var w=ux(e,p.tickCoord,v,s,u);w&&(u=p.tickCoord-e*(v()/2+i),o[h]=Ai(Ai({},p),{},{isShow:!0}))},c=a-1;c>=0;c--)l(c);return o}function sLe(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,u=t.start,l=t.end;if(o){var c=r[s-1],f=n(c,s-1),h=e*(c.coordinate+e*f/2-l);a[s-1]=c=Ai(Ai({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var p=ux(e,c.tickCoord,function(){return f},u,l);p&&(l=c.tickCoord-e*(f/2+i),a[s-1]=Ai(Ai({},c),{},{isShow:!0}))}for(var m=o?s-1:s,v=function(x){var S=a[x],O,E=function(){return O===void 0&&(O=n(S,x)),O};if(x===0){var C=e*(S.coordinate-e*E()/2-u);a[x]=S=Ai(Ai({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[x]=S=Ai(Ai({},S),{},{tickCoord:S.coordinate});var k=ux(e,S.tickCoord,E,u,l);k&&(u=S.tickCoord+e*(E()/2+i),a[x]=Ai(Ai({},S),{},{isShow:!0}))},b=0;b=2?Ua(i[1].coordinate-i[0].coordinate):1,w=eLe(o,b,p);return u==="equidistantPreserveStart"?nLe(b,w,v,i,a):(u==="preserveStart"||u==="preserveStartEnd"?h=sLe(b,w,v,i,a,u==="preserveStartEnd"):h=aLe(b,w,v,i,a),h.filter(function(x){return x.isShow}))}var uLe=["viewBox"],lLe=["viewBox"],cLe=["ticks"];function yh(e){"@babel/helpers - typeof";return yh=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},yh(e)}function bd(){return bd=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 fLe(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 dLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gI(e,t){for(var n=0;n0?u(this.props):u(p)),a<=0||s<=0||!m||!m.length?null:z.createElement(Cn,{className:dn("recharts-cartesian-axis",l),ref:function(b){r.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),ki.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return z.isValidElement(r)?a=z.cloneElement(r,i):Vt(r)?a=r(i):a=z.createElement(Mb,bd({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(y.Component);HP(op,"displayName","CartesianAxis");HP(op,"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 bLe=["x1","y1","x2","y2","key"],xLe=["offset"];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 mI(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 Ti(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CLe(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 ELe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height,u=t.ry;return z.createElement("rect",{x:i,y:o,ry:u,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Fq(e,t){var n;if(z.isValidElement(e))n=z.cloneElement(e,t);else if(Vt(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,u=vI(t,bLe),l=zt(u,!1);l.offset;var c=vI(l,xLe);n=z.createElement("line",Ac({},c,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function OLe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,u){var l=Ti(Ti({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(u),index:u});return Fq(i,l)});return z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function ALe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,u){var l=Ti(Ti({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(u),index:u});return Fq(i,l)});return z.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function PLe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,u=e.horizontal,l=u===void 0?!0:u;if(!l||!t||!t.length)return null;var c=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var m=!c[p+1],v=m?i+a-h:c[p+1]-h;if(v<=0)return null;var b=p%t.length;return z.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:v,width:o,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function kLe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,u=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var c=l.map(function(h){return Math.round(h+o-o)}).sort(function(h,p){return h-p});o!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var m=!c[p+1],v=m?o+s-h:c[p+1]-h;if(v<=0)return null;var b=p%r.length;return z.createElement("rect",{key:"react-".concat(p),x:h,y:a,width:v,height:u,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var TLe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return ZW(UP(Ti(Ti(Ti({},op.defaultProps),r),{},{ticks:su(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},MLe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return ZW(UP(Ti(Ti(Ti({},op.defaultProps),r),{},{ticks:su(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Qf={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function RLe(e){var t,n,r,i,o,a,s=FP(),u=jP(),l=yNe(),c=Ti(Ti({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Qf.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Qf.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Qf.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Qf.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Qf.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Qf.verticalFill,x:Ke(e.x)?e.x:l.left,y:Ke(e.y)?e.y:l.top,width:Ke(e.width)?e.width:l.width,height:Ke(e.height)?e.height:l.height}),f=c.x,h=c.y,p=c.width,m=c.height,v=c.syncWithTicks,b=c.horizontalValues,w=c.verticalValues,x=gNe(),S=mNe();if(!Ke(p)||p<=0||!Ke(m)||m<=0||!Ke(f)||f!==+f||!Ke(h)||h!==+h)return null;var O=c.verticalCoordinatesGenerator||TLe,E=c.horizontalCoordinatesGenerator||MLe,C=c.horizontalPoints,k=c.verticalPoints;if((!C||!C.length)&&Vt(E)){var M=b&&b.length,N=E({yAxis:S?Ti(Ti({},S),{},{ticks:M?b:S.ticks}):void 0,width:s,height:u,offset:l},M?!0:v);hu(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(sf(N),"]")),Array.isArray(N)&&(C=N)}if((!k||!k.length)&&Vt(O)){var q=w&&w.length,Y=O({xAxis:x?Ti(Ti({},x),{},{ticks:q?w:x.ticks}):void 0,width:s,height:u,offset:l},q?!0:v);hu(Array.isArray(Y),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(sf(Y),"]")),Array.isArray(Y)&&(k=Y)}return z.createElement("g",{className:"recharts-cartesian-grid"},z.createElement(ELe,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),z.createElement(OLe,Ac({},c,{offset:l,horizontalPoints:C,xAxis:x,yAxis:S})),z.createElement(ALe,Ac({},c,{offset:l,verticalPoints:k,xAxis:x,yAxis:S})),z.createElement(PLe,Ac({},c,{horizontalPoints:C})),z.createElement(kLe,Ac({},c,{verticalPoints:k})))}RLe.displayName="CartesianGrid";var DLe=["type","layout","connectNulls","ref"],$Le=["key"];function bh(e){"@babel/helpers - typeof";return bh=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},bh(e)}function yI(e,t){if(e==null)return{};var n=ILe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ILe(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 T0(){return T0=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(Jf(u.slice(0,m)),[f-v]);break}var b=p.length%2===0?[0,h]:[h];return[].concat(Jf(t.repeat(u,c)),Jf(p),b).map(function(w){return"".concat(w,"px")}).join(", ")}),Ia(n,"id",bf("recharts-line-")),Ia(n,"pathRef",function(a){n.mainCurve=a}),Ia(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Ia(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return WLe(t,e),zLe(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 o=this.props,a=o.points,s=o.xAxis,u=o.yAxis,l=o.layout,c=o.children,f=go(c,np);if(!f)return null;var h=function(v,b){return{x:v.x,y:v.y,value:v.value,errorVal:qr(v.payload,b)}},p={clipPath:r?"url(#clipPath-".concat(i,")"):null};return z.createElement(Cn,p,f.map(function(m){return z.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:a,xAxis:s,yAxis:u,layout:l,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,u=s.dot,l=s.points,c=s.dataKey,f=zt(this.props,!1),h=zt(u,!0),p=l.map(function(v,b){var w=Ao(Ao(Ao({key:"dot-".concat(b),r:3},f),h),{},{value:v.value,dataKey:c,cx:v.x,cy:v.y,index:b,payload:v.payload});return t.renderDotItem(u,w)}),m={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return z.createElement(Cn,T0({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(r,i,o,a){var s=this.props,u=s.type,l=s.layout,c=s.connectNulls;s.ref;var f=yI(s,DLe),h=Ao(Ao(Ao({},zt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:u,layout:l,connectNulls:c});return z.createElement(Nc,T0({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,u=a.strokeDasharray,l=a.isAnimationActive,c=a.animationBegin,f=a.animationDuration,h=a.animationEasing,p=a.animationId,m=a.animateNewValues,v=a.width,b=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return z.createElement(Xa,{begin:c,duration:f,isActive:l,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var E=O.t;if(x){var C=x.length/s.length,k=s.map(function(W,ne){var Z=Math.floor(ne*C);if(x[Z]){var R=x[Z],B=Er(R.x,W.x),U=Er(R.y,W.y);return Ao(Ao({},W),{},{x:B(E),y:U(E)})}if(m){var F=Er(v*2,W.x),V=Er(b/2,W.y);return Ao(Ao({},W),{},{x:F(E),y:V(E)})}return Ao(Ao({},W),{},{x:W.x,y:W.y})});return o.renderCurveStatically(k,r,i)}var M=Er(0,S),N=M(E),q;if(u){var Y="".concat(u).split(/[,\s]+/gim).map(function(W){return parseFloat(W)});q=o.getStrokeDasharray(N,S,Y)}else q=o.generateSimpleStrokeDasharray(S,N);return o.renderCurveStatically(s,r,i,{strokeDasharray:q})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,s=o.isAnimationActive,u=this.state,l=u.prevPoints,c=u.totalLength;return s&&a&&a.length&&(!l&&c>0||!rf(l,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,u=i.className,l=i.xAxis,c=i.yAxis,f=i.top,h=i.left,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=dn("recharts-line",u),O=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,C=O||E,k=Ut(b)?this.id:b,M=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},N=M.r,q=N===void 0?3:N,Y=M.strokeWidth,W=Y===void 0?2:Y,ne=HH(a)?a:{},Z=ne.clipDot,R=Z===void 0?!0:Z,B=q*2+W;return z.createElement(Cn,{className:S},O||E?z.createElement("defs",null,z.createElement("clipPath",{id:"clipPath-".concat(k)},z.createElement("rect",{x:O?h:h-p/2,y:E?f:f-m/2,width:O?p:p*2,height:E?m:m*2})),!R&&z.createElement("clipPath",{id:"clipPath-dots-".concat(k)},z.createElement("rect",{x:h-B/2,y:f-B/2,width:p+B,height:m+B}))):null,!x&&this.renderCurve(C,k),this.renderErrorBar(C,k),(x||a)&&this.renderDots(C,R,k),(!v||w)&&As.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 o=r.length%2!==0?[].concat(Jf(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YLe(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 Pc(){return Pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!rf(c,a)||!rf(f,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,u=i.className,l=i.top,c=i.left,f=i.xAxis,h=i.yAxis,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=dn("recharts-area",u),O=f&&f.allowDataOverflow,E=h&&h.allowDataOverflow,C=O||E,k=Ut(b)?this.id:b,M=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},N=M.r,q=N===void 0?3:N,Y=M.strokeWidth,W=Y===void 0?2:Y,ne=HH(a)?a:{},Z=ne.clipDot,R=Z===void 0?!0:Z,B=q*2+W;return z.createElement(Cn,{className:S},O||E?z.createElement("defs",null,z.createElement("clipPath",{id:"clipPath-".concat(k)},z.createElement("rect",{x:O?c:c-p/2,y:E?l:l-m/2,width:O?p:p*2,height:E?m:m*2})),!R&&z.createElement("clipPath",{id:"clipPath-dots-".concat(k)},z.createElement("rect",{x:c-B/2,y:l-B/2,width:p+B,height:m+B}))):null,x?null:this.renderArea(C,k),(a||x)&&this.renderDots(C,R,k),(!v||w)&&As.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}}])}(y.PureComponent);zq=_f;bs(_f,"displayName","Area");bs(_f,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!qa.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});bs(_f,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(Ke(s)&&typeof s=="number")return s;var u=i==="horizontal"?r:n,l=u.scale.domain();if(u.type==="number"){var c=Math.max(l[0],l[1]),f=Math.min(l[0],l[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]});bs(_f,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,u=e.dataKey,l=e.stackedData,c=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,m=l&&l.length,v=zq.getBaseValue(t,n,r,i),b=p==="horizontal",w=!1,x=f.map(function(O,E){var C;m?C=l[c+E]:(C=qr(O,u),Array.isArray(C)?w=!0:C=[v,C]);var k=C[1]==null||m&&qr(O,u)==null;return b?{x:ch({axis:r,ticks:o,bandSize:s,entry:O,index:E}),y:k?null:i.scale(C[1]),value:C,payload:O}:{x:k?null:r.scale(C[1]),y:ch({axis:i,ticks:a,bandSize:s,entry:O,index:E}),value:C,payload:O}}),S;return m||w?S=x.map(function(O){var E=Array.isArray(O.value)?O.value[0]:null;return b?{x:O.x,y:E!=null&&O.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:O.y}}):S=b?i.scale(v):r.scale(v),Zu({points:x,baseLine:S,layout:p,isRange:w},h)});bs(_f,"renderDotItem",function(e,t){var n;if(z.isValidElement(e))n=z.cloneElement(e,t);else if(Vt(e))n=e(t);else{var r=dn("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=Uq(t,GLe);n=z.createElement(n2,Pc({},o,{key:i,className:r}))}return n});function wh(e){"@babel/helpers - typeof";return wh=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},wh(e)}function rFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iFe(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hFe(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 pFe(e){var t=e.option,n=e.isActive,r=dFe(e,fFe);return typeof t=="string"?z.createElement(I6,M0({option:z.createElement(Hw,M0({type:t},r)),isActive:n,shapeType:"symbols"},r)):z.createElement(I6,M0({option:t,isActive:n,shapeType:"symbols"},r))}function _h(e){"@babel/helpers - typeof";return _h=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},_h(e)}function R0(){return R0=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 uje(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 lje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cje(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&Ke(i)&&Ke(o)?t.slice(i,o+1):[]};function cK(e){return e==="number"?[0,"auto"]:void 0}var o4=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=h2(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(u,l){var c,f=(c=l.props.data)!==null&&c!==void 0?c:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var p=f===void 0?s:f;h=mb(p,a.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(Oh(u),[QW(l,h)]):u},[])},TI=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=_je(o,r),s=t.orderedTooltipTicks,u=t.tooltipAxis,l=t.tooltipTicks,c=CRe(a,s,l,u);if(c>=0&&l){var f=l[c]&&l[c].value,h=o4(t,n,c,f),p=Sje(r,s,c,o);return{activeTooltipIndex:c,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},Cje=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,f=t.children,h=t.stackOffset,p=YW(c,o);return r.reduce(function(m,v){var b,w=v.type.defaultProps!==void 0?Ee(Ee({},v.type.defaultProps),v.props):v.props,x=w.type,S=w.dataKey,O=w.allowDataOverflow,E=w.allowDuplicatedCategory,C=w.scale,k=w.ticks,M=w.includeHidden,N=w[a];if(m[N])return m;var q=h2(t.data,{graphicalItems:i.filter(function(Q){var X,ue=a in Q.props?Q.props[a]:(X=Q.type.defaultProps)===null||X===void 0?void 0:X[a];return ue===N}),dataStartIndex:u,dataEndIndex:l}),Y=q.length,W,ne,Z;ZFe(w.domain,O,x)&&(W=b6(w.domain,null,O),p&&(x==="number"||C!=="auto")&&(Z=P0(q,S,"category")));var R=cK(x);if(!W||W.length===0){var B,U=(B=w.domain)!==null&&B!==void 0?B:R;if(S){if(W=P0(q,S,x),x==="category"&&p){var F=d_e(W);E&&F?(ne=W,W=ex(0,Y)):E||(W=i$(U,W,v).reduce(function(Q,X){return Q.indexOf(X)>=0?Q:[].concat(Oh(Q),[X])},[]))}else if(x==="category")E?W=W.filter(function(Q){return Q!==""&&!Ut(Q)}):W=i$(U,W,v).reduce(function(Q,X){return Q.indexOf(X)>=0||X===""||Ut(X)?Q:[].concat(Oh(Q),[X])},[]);else if(x==="number"){var V=kRe(q,i.filter(function(Q){var X,ue,de=a in Q.props?Q.props[a]:(X=Q.type.defaultProps)===null||X===void 0?void 0:X[a],Se="hide"in Q.props?Q.props.hide:(ue=Q.type.defaultProps)===null||ue===void 0?void 0:ue.hide;return de===N&&(M||!Se)}),S,o,c);V&&(W=V)}p&&(x==="number"||C!=="auto")&&(Z=P0(q,S,"category"))}else p?W=ex(0,Y):s&&s[N]&&s[N].hasStack&&x==="number"?W=h==="expand"?[0,1]:XW(s[N].stackGroups,u,l):W=GW(q,i.filter(function(Q){var X=a in Q.props?Q.props[a]:Q.type.defaultProps[a],ue="hide"in Q.props?Q.props.hide:Q.type.defaultProps.hide;return X===N&&(M||!ue)}),x,c,!0);if(x==="number")W=n4(f,W,N,o,k),U&&(W=b6(U,W,O));else if(x==="category"&&U){var G=U,oe=W.every(function(Q){return G.indexOf(Q)>=0});oe&&(W=G)}}return Ee(Ee({},m),{},kt({},N,Ee(Ee({},w),{},{axisType:o,domain:W,categoricalDomain:Z,duplicateDomain:ne,originalDomain:(b=w.domain)!==null&&b!==void 0?b:R,isCategorical:p,layout:c})))},{})},Eje=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,f=t.children,h=h2(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:l}),p=h.length,m=YW(c,o),v=-1;return r.reduce(function(b,w){var x=w.type.defaultProps!==void 0?Ee(Ee({},w.type.defaultProps),w.props):w.props,S=x[a],O=cK("number");if(!b[S]){v++;var E;return m?E=ex(0,p):s&&s[S]&&s[S].hasStack?(E=XW(s[S].stackGroups,u,l),E=n4(f,E,S,o)):(E=b6(O,GW(h,r.filter(function(C){var k,M,N=a in C.props?C.props[a]:(k=C.type.defaultProps)===null||k===void 0?void 0:k[a],q="hide"in C.props?C.props.hide:(M=C.type.defaultProps)===null||M===void 0?void 0:M.hide;return N===S&&!q}),"number",c),i.defaultProps.allowDataOverflow),E=n4(f,E,S,o)),Ee(Ee({},b),{},kt({},S,Ee(Ee({axisType:o},i.defaultProps),{},{hide:!0,orientation:pa(xje,"".concat(o,".").concat(v%2),null),domain:E,originalDomain:O,isCategorical:m,layout:c})))}return b},{})},Oje=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.children,f="".concat(i,"Id"),h=go(c,o),p={};return h.length?p=Cje(t,{axes:h,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l}):a&&a.length&&(p=Eje(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l})),p},Aje=function(t){var n=il(t),r=su(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:aP(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Wb(n,r)}},MI=function(t){var n=t.children,r=t.defaultShowTooltip,i=Mo(n,hh),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},Pje=function(t){return!t||!t.length?!1:t.some(function(n){var r=du(n&&n.type);return r&&r.indexOf("Bar")>=0})},RI=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"}},kje=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,u=s===void 0?{}:s,l=r.width,c=r.height,f=r.children,h=r.margin||{},p=Mo(f,hh),m=Mo(f,Id),v=Object.keys(u).reduce(function(E,C){var k=u[C],M=k.orientation;return!k.mirror&&!k.hide?Ee(Ee({},E),{},kt({},M,E[M]+k.width)):E},{left:h.left||0,right:h.right||0}),b=Object.keys(a).reduce(function(E,C){var k=a[C],M=k.orientation;return!k.mirror&&!k.hide?Ee(Ee({},E),{},kt({},M,pa(E,"".concat(M))+k.height)):E},{top:h.top||0,bottom:h.bottom||0}),w=Ee(Ee({},b),v),x=w.bottom;p&&(w.bottom+=p.props.height||hh.defaultProps.height),m&&n&&(w=ARe(w,i,r,n));var S=l-w.left-w.right,O=c-w.top-w.bottom;return Ee(Ee({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(O,0)})},Tje=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},Mje=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,u=t.axisComponents,l=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,h=function(w,x){var S=x.graphicalItems,O=x.stackGroups,E=x.offset,C=x.updateId,k=x.dataStartIndex,M=x.dataEndIndex,N=w.barSize,q=w.layout,Y=w.barGap,W=w.barCategoryGap,ne=w.maxBarSize,Z=RI(q),R=Z.numericAxisName,B=Z.cateAxisName,U=Pje(S),F=[];return S.forEach(function(V,G){var oe=h2(w.data,{graphicalItems:[V],dataStartIndex:k,dataEndIndex:M}),Q=V.type.defaultProps!==void 0?Ee(Ee({},V.type.defaultProps),V.props):V.props,X=Q.dataKey,ue=Q.maxBarSize,de=Q["".concat(R,"Id")],Se=Q["".concat(B,"Id")],me={},Ze=u.reduce(function(Ue,je){var ke=x["".concat(je.axisType,"Map")],nt=Q["".concat(je.axisType,"Id")];ke&&ke[nt]||je.axisType==="zAxis"||af();var mt=ke[nt];return Ee(Ee({},Ue),{},kt(kt({},je.axisType,mt),"".concat(je.axisType,"Ticks"),su(mt)))},me),Ae=Ze[B],Le=Ze["".concat(B,"Ticks")],$e=O&&O[de]&&O[de].hasStack&&zRe(V,O[de].stackGroups),be=du(V.type).indexOf("Bar")>=0,yt=Wb(Ae,Le),lt=[],Nt=U&&ERe({barSize:N,stackGroups:O,totalSize:Tje(Ze,B)});if(be){var yn,nn,ie=Ut(ue)?ne:ue,pe=(yn=(nn=Wb(Ae,Le,!0))!==null&&nn!==void 0?nn:ie)!==null&&yn!==void 0?yn:0;lt=ORe({barGap:Y,barCategoryGap:W,bandSize:pe!==yt?pe:yt,sizeList:Nt[Se],maxBarSize:ie}),pe!==yt&&(lt=lt.map(function(Ue){return Ee(Ee({},Ue),{},{position:Ee(Ee({},Ue.position),{},{offset:Ue.position.offset-pe/2})})}))}var ye=V&&V.type&&V.type.getComposedData;ye&&F.push({props:Ee(Ee({},ye(Ee(Ee({},Ze),{},{displayedData:oe,props:w,dataKey:X,item:V,bandSize:yt,barPosition:lt,offset:E,stackedData:$e,layout:q,dataStartIndex:k,dataEndIndex:M}))),{},kt(kt(kt({key:V.key||"item-".concat(G)},R,Ze[R]),B,Ze[B]),"animationId",C)),childIndex:C_e(V,w.children),item:V})}),F},p=function(w,x){var S=w.props,O=w.dataStartIndex,E=w.dataEndIndex,C=w.updateId;if(!QD({props:S}))return null;var k=S.children,M=S.layout,N=S.stackOffset,q=S.data,Y=S.reverseStackOrder,W=RI(M),ne=W.numericAxisName,Z=W.cateAxisName,R=go(k,r),B=FRe(q,R,"".concat(ne,"Id"),"".concat(Z,"Id"),N,Y),U=u.reduce(function(Q,X){var ue="".concat(X.axisType,"Map");return Ee(Ee({},Q),{},kt({},ue,Oje(S,Ee(Ee({},X),{},{graphicalItems:R,stackGroups:X.axisType===ne&&B,dataStartIndex:O,dataEndIndex:E}))))},{}),F=kje(Ee(Ee({},U),{},{props:S,graphicalItems:R}),x?.legendBBox);Object.keys(U).forEach(function(Q){U[Q]=c(S,U[Q],F,Q.replace("Map",""),n)});var V=U["".concat(Z,"Map")],G=Aje(V),oe=h(S,Ee(Ee({},U),{},{dataStartIndex:O,dataEndIndex:E,updateId:C,graphicalItems:R,stackGroups:B,offset:F}));return Ee(Ee({formattedGraphicalItems:oe,graphicalItems:R,offset:F,stackGroups:B},G),U)},m=function(b){function w(x){var S,O,E;return lje(this,w),E=dje(this,w,[x]),kt(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),kt(E,"accessibilityManager",new YFe),kt(E,"handleLegendBBoxUpdate",function(C){if(C){var k=E.state,M=k.dataStartIndex,N=k.dataEndIndex,q=k.updateId;E.setState(Ee({legendBBox:C},p({props:E.props,dataStartIndex:M,dataEndIndex:N,updateId:q},Ee(Ee({},E.state),{},{legendBBox:C}))))}}),kt(E,"handleReceiveSyncEvent",function(C,k,M){if(E.props.syncId===C){if(M===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(k)}}),kt(E,"handleBrushChange",function(C){var k=C.startIndex,M=C.endIndex;if(k!==E.state.dataStartIndex||M!==E.state.dataEndIndex){var N=E.state.updateId;E.setState(function(){return Ee({dataStartIndex:k,dataEndIndex:M},p({props:E.props,dataStartIndex:k,dataEndIndex:M,updateId:N},E.state))}),E.triggerSyncEvent({dataStartIndex:k,dataEndIndex:M})}}),kt(E,"handleMouseEnter",function(C){var k=E.getMouseInfo(C);if(k){var M=Ee(Ee({},k),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var N=E.props.onMouseEnter;Vt(N)&&N(M,C)}}),kt(E,"triggeredAfterMouseMove",function(C){var k=E.getMouseInfo(C),M=k?Ee(Ee({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(M),E.triggerSyncEvent(M);var N=E.props.onMouseMove;Vt(N)&&N(M,C)}),kt(E,"handleItemMouseEnter",function(C){E.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),kt(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),kt(E,"handleMouseMove",function(C){C.persist(),E.throttleTriggeredAfterMouseMove(C)}),kt(E,"handleMouseLeave",function(C){E.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};E.setState(k),E.triggerSyncEvent(k);var M=E.props.onMouseLeave;Vt(M)&&M(k,C)}),kt(E,"handleOuterEvent",function(C){var k=S_e(C),M=pa(E.props,"".concat(k));if(k&&Vt(M)){var N,q;/.*touch.*/i.test(k)?q=E.getMouseInfo(C.changedTouches[0]):q=E.getMouseInfo(C),M((N=q)!==null&&N!==void 0?N:{},C)}}),kt(E,"handleClick",function(C){var k=E.getMouseInfo(C);if(k){var M=Ee(Ee({},k),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var N=E.props.onClick;Vt(N)&&N(M,C)}}),kt(E,"handleMouseDown",function(C){var k=E.props.onMouseDown;if(Vt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleMouseUp",function(C){var k=E.props.onMouseUp;if(Vt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),kt(E,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseDown(C.changedTouches[0])}),kt(E,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseUp(C.changedTouches[0])}),kt(E,"handleDoubleClick",function(C){var k=E.props.onDoubleClick;if(Vt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleContextMenu",function(C){var k=E.props.onContextMenu;if(Vt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"triggerSyncEvent",function(C){E.props.syncId!==void 0&&h3.emit(p3,E.props.syncId,C,E.eventEmitterSymbol)}),kt(E,"applySyncEvent",function(C){var k=E.props,M=k.layout,N=k.syncMethod,q=E.state.updateId,Y=C.dataStartIndex,W=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)E.setState(Ee({dataStartIndex:Y,dataEndIndex:W},p({props:E.props,dataStartIndex:Y,dataEndIndex:W,updateId:q},E.state)));else if(C.activeTooltipIndex!==void 0){var ne=C.chartX,Z=C.chartY,R=C.activeTooltipIndex,B=E.state,U=B.offset,F=B.tooltipTicks;if(!U)return;if(typeof N=="function")R=N(F,C);else if(N==="value"){R=-1;for(var V=0;V=0){var $e,be;if(ne.dataKey&&!ne.allowDuplicatedCategory){var yt=typeof ne.dataKey=="function"?Le:"payload.".concat(ne.dataKey.toString());$e=mb(V,yt,R),be=G&&oe&&mb(oe,yt,R)}else $e=V?.[Z],be=G&&oe&&oe[Z];if(Se||de){var lt=C.props.activeIndex!==void 0?C.props.activeIndex:Z;return[y.cloneElement(C,Ee(Ee(Ee({},N.props),Ze),{},{activeIndex:lt})),null,null]}if(!Ut($e))return[Ae].concat(Oh(E.renderActivePoints({item:N,activePoint:$e,basePoint:be,childIndex:Z,isRange:G})))}else{var Nt,yn=(Nt=E.getItemByXY(E.state.activeCoordinate))!==null&&Nt!==void 0?Nt:{graphicalItem:Ae},nn=yn.graphicalItem,ie=nn.item,pe=ie===void 0?C:ie,ye=nn.childIndex,Ue=Ee(Ee(Ee({},N.props),Ze),{},{activeIndex:ye});return[y.cloneElement(pe,Ue),null,null]}return G?[Ae,null,null]:[Ae,null]}),kt(E,"renderCustomized",function(C,k,M){return y.cloneElement(C,Ee(Ee({key:"recharts-customized-".concat(M)},E.props),E.state))}),kt(E,"renderMap",{CartesianGrid:{handler:ky,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:ky},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:ky},YAxis:{handler:ky},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:bf("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=qV(E.triggeredAfterMouseMove,(O=x.throttleDelay)!==null&&O!==void 0?O:1e3/60),E.state={},E}return gje(w,b),fje(w,[{key:"componentDidMount",value:function(){var S,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,O=S.children,E=S.data,C=S.height,k=S.layout,M=Mo(O,Js);if(M){var N=M.props.defaultIndex;if(!(typeof N!="number"||N<0||N>this.state.tooltipTicks.length-1)){var q=this.state.tooltipTicks[N]&&this.state.tooltipTicks[N].value,Y=o4(this.state,E,N,q),W=this.state.tooltipTicks[N].coordinate,ne=(this.state.offset.top+C)/2,Z=k==="horizontal",R=Z?{x:W,y:ne}:{y:W,x:ne},B=this.state.formattedGraphicalItems.find(function(F){var V=F.item;return V.type.name==="Scatter"});B&&(R=Ee(Ee({},R),B.props.points[N].tooltipPosition),Y=B.props.points[N].tooltipPayload);var U={activeTooltipIndex:N,isTooltipActive:!0,activeLabel:q,activePayload:Y,activeCoordinate:R};this.setState(U),this.renderCursor(M),this.accessibilityManager.setIndex(N)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var E,C;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){$E([Mo(S.children,Js)],[Mo(this.props.children,Js)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Mo(this.props.children,Js);if(S&&typeof S.props.shared=="boolean"){var O=S.props.shared?"axis":"item";return s.indexOf(O)>=0?O:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var O=this.container,E=O.getBoundingClientRect(),C=Z5e(E),k={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},M=E.width/O.offsetWidth||1,N=this.inRange(k.chartX,k.chartY,M);if(!N)return null;var q=this.state,Y=q.xAxisMap,W=q.yAxisMap,ne=this.getTooltipEventType();if(ne!=="axis"&&Y&&W){var Z=il(Y).scale,R=il(W).scale,B=Z&&Z.invert?Z.invert(k.chartX):null,U=R&&R.invert?R.invert(k.chartY):null;return Ee(Ee({},k),{},{xValue:B,yValue:U})}var F=TI(this.state,this.props.data,this.props.layout,N);return F?Ee(Ee({},k),F):null}},{key:"inRange",value:function(S,O){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,k=S/E,M=O/E;if(C==="horizontal"||C==="vertical"){var N=this.state.offset,q=k>=N.left&&k<=N.left+N.width&&M>=N.top&&M<=N.top+N.height;return q?{x:k,y:M}:null}var Y=this.state,W=Y.angleAxisMap,ne=Y.radiusAxisMap;if(W&&ne){var Z=il(W);return s$({x:k,y:M},Z)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,O=this.getTooltipEventType(),E=Mo(S,Js),C={};E&&O==="axis"&&(E.props.trigger==="click"?C={onClick:this.handleClick}:C={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 k=vb(this.props,this.handleOuterEvent);return Ee(Ee({},k),C)}},{key:"addListener",value:function(){h3.on(p3,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){h3.removeListener(p3,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,O,E){for(var C=this.state.formattedGraphicalItems,k=0,M=C.length;k{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:u="automatic",...l}=e,c=Pm(s),[f,h]=Za({prop:r,onChange:i,defaultProp:o});return L.jsx(Dje,{scope:n,baseId:jo(),value:f,onValueChange:h,orientation:a,dir:c,activationMode:u,children:L.jsx(pt.div,{dir:c,"data-orientation":a,...l,ref:t})})});dK.displayName=qP;var hK="TabsList",pK=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=KP(hK,n),a=fK(n);return L.jsx(sU,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:L.jsx(pt.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});pK.displayName=hK;var gK="TabsTrigger",mK=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=KP(gK,n),s=fK(n),u=bK(a.baseId,r),l=xK(a.baseId,r),c=r===a.value;return L.jsx(uU,{asChild:!0,...s,focusable:!i,active:c,children:L.jsx(pt.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":l,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:t,onMouseDown:Ye(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?a.onValueChange(r):f.preventDefault()}),onKeyDown:Ye(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(r)}),onFocus:Ye(e.onFocus,()=>{const f=a.activationMode!=="manual";!c&&!i&&f&&a.onValueChange(r)})})})});mK.displayName=gK;var vK="TabsContent",yK=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,s=KP(vK,n),u=bK(s.baseId,r),l=xK(s.baseId,r),c=r===s.value,f=y.useRef(c);return y.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),L.jsx(Gr,{present:i||c,children:({present:h})=>L.jsx(pt.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:l,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&o})})});yK.displayName=vK;function bK(e,t){return`${e}-trigger-${t}`}function xK(e,t){return`${e}-content-${t}`}var dQe=dK,hQe=pK,pQe=mK,gQe=yK;function a4(e,[t,n]){return Math.min(n,Math.max(t,e))}function GP(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var $je=[" ","Enter","ArrowUp","ArrowDown"],Ije=[" ","Enter"],Vm="Select",[p2,g2,Nje]=dA(Vm),[ap,mQe]=vi(Vm,[Nje,Ul]),m2=Ul(),[Lje,Gl]=ap(Vm),[Fje,jje]=ap(Vm),wK=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:s,onValueChange:u,dir:l,name:c,autoComplete:f,disabled:h,required:p,form:m}=e,v=m2(t),[b,w]=y.useState(null),[x,S]=y.useState(null),[O,E]=y.useState(!1),C=Pm(l),[k=!1,M]=Za({prop:r,defaultProp:i,onChange:o}),[N,q]=Za({prop:a,defaultProp:s,onChange:u}),Y=y.useRef(null),W=b?m||!!b.closest("form"):!0,[ne,Z]=y.useState(new Set),R=Array.from(ne).map(B=>B.props.value).join(";");return L.jsx(fw,{...v,children:L.jsxs(Lje,{required:p,scope:t,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:O,onValueNodeHasChildrenChange:E,contentId:jo(),value:N,onValueChange:q,open:k,onOpenChange:M,dir:C,triggerPointerDownPosRef:Y,disabled:h,children:[L.jsx(p2.Provider,{scope:t,children:L.jsx(Fje,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(B=>{Z(U=>new Set(U).add(B))},[]),onNativeOptionRemove:y.useCallback(B=>{Z(U=>{const F=new Set(U);return F.delete(B),F})},[]),children:n})}),W?L.jsxs(KK,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:f,value:N,onChange:B=>q(B.target.value),disabled:h,form:m,children:[N===void 0?L.jsx("option",{value:""}):null,Array.from(ne)]},R):null]})})};wK.displayName=Vm;var _K="SelectTrigger",SK=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=m2(n),a=Gl(_K,n),s=a.disabled||r,u=Gt(t,a.onTriggerChange),l=g2(n),c=y.useRef("touch"),[f,h,p]=GK(v=>{const b=l().filter(S=>!S.disabled),w=b.find(S=>S.value===a.value),x=YK(b,v,w);x!==void 0&&a.onValueChange(x.value)}),m=v=>{s||(a.onOpenChange(!0),p()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return L.jsx(Tm,{asChild:!0,...o,children:L.jsx(pt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":qK(a.value)?"":void 0,...i,ref:u,onClick:Ye(i.onClick,v=>{v.currentTarget.focus(),c.current!=="mouse"&&m(v)}),onPointerDown:Ye(i.onPointerDown,v=>{c.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(m(v),v.preventDefault())}),onKeyDown:Ye(i.onKeyDown,v=>{const b=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&h(v.key),!(b&&v.key===" ")&&$je.includes(v.key)&&(m(),v.preventDefault())})})})});SK.displayName=_K;var CK="SelectValue",EK=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...s}=e,u=Gl(CK,n),{onValueNodeHasChildrenChange:l}=u,c=o!==void 0,f=Gt(t,u.onValueNodeChange);return ii(()=>{l(c)},[l,c]),L.jsx(pt.span,{...s,ref:f,style:{pointerEvents:"none"},children:qK(u.value)?L.jsx(L.Fragment,{children:a}):o})});EK.displayName=CK;var Bje="SelectIcon",OK=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return L.jsx(pt.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});OK.displayName=Bje;var zje="SelectPortal",AK=e=>L.jsx(Bh,{asChild:!0,...e});AK.displayName=zje;var uf="SelectContent",PK=y.forwardRef((e,t)=>{const n=Gl(uf,e.__scopeSelect),[r,i]=y.useState();if(ii(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Pu.createPortal(L.jsx(kK,{scope:e.__scopeSelect,children:L.jsx(p2.Slot,{scope:e.__scopeSelect,children:L.jsx("div",{children:e.children})})}),o):null}return L.jsx(TK,{...e,ref:t})});PK.displayName=uf;var Ta=10,[kK,Yl]=ap(uf),Uje="SelectContentImpl",TK=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b,...w}=e,x=Gl(uf,n),[S,O]=y.useState(null),[E,C]=y.useState(null),k=Gt(t,me=>O(me)),[M,N]=y.useState(null),[q,Y]=y.useState(null),W=g2(n),[ne,Z]=y.useState(!1),R=y.useRef(!1);y.useEffect(()=>{if(S)return Am(S)},[S]),sw();const B=y.useCallback(me=>{const[Ze,...Ae]=W().map(be=>be.ref.current),[Le]=Ae.slice(-1),$e=document.activeElement;for(const be of me)if(be===$e||(be?.scrollIntoView({block:"nearest"}),be===Ze&&E&&(E.scrollTop=0),be===Le&&E&&(E.scrollTop=E.scrollHeight),be?.focus(),document.activeElement!==$e))return},[W,E]),U=y.useCallback(()=>B([M,S]),[B,M,S]);y.useEffect(()=>{ne&&U()},[ne,U]);const{onOpenChange:F,triggerPointerDownPosRef:V}=x;y.useEffect(()=>{if(S){let me={x:0,y:0};const Ze=Le=>{me={x:Math.abs(Math.round(Le.pageX)-(V.current?.x??0)),y:Math.abs(Math.round(Le.pageY)-(V.current?.y??0))}},Ae=Le=>{me.x<=10&&me.y<=10?Le.preventDefault():S.contains(Le.target)||F(!1),document.removeEventListener("pointermove",Ze),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",Ze),document.addEventListener("pointerup",Ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ze),document.removeEventListener("pointerup",Ae,{capture:!0})}}},[S,F,V]),y.useEffect(()=>{const me=()=>F(!1);return window.addEventListener("blur",me),window.addEventListener("resize",me),()=>{window.removeEventListener("blur",me),window.removeEventListener("resize",me)}},[F]);const[G,oe]=GK(me=>{const Ze=W().filter($e=>!$e.disabled),Ae=Ze.find($e=>$e.ref.current===document.activeElement),Le=YK(Ze,me,Ae);Le&&setTimeout(()=>Le.ref.current.focus())}),Q=y.useCallback((me,Ze,Ae)=>{const Le=!R.current&&!Ae;(x.value!==void 0&&x.value===Ze||Le)&&(N(me),Le&&(R.current=!0))},[x.value]),X=y.useCallback(()=>S?.focus(),[S]),ue=y.useCallback((me,Ze,Ae)=>{const Le=!R.current&&!Ae;(x.value!==void 0&&x.value===Ze||Le)&&Y(me)},[x.value]),de=r==="popper"?s4:MK,Se=de===s4?{side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b}:{};return L.jsx(kK,{scope:n,content:S,viewport:E,onViewportChange:C,itemRefCallback:Q,selectedItem:M,onItemLeave:X,itemTextRefCallback:ue,focusSelectedItem:U,selectedItemText:q,position:r,isPositioned:ne,searchRef:G,children:L.jsx(Om,{as:Pl,allowPinchZoom:!0,children:L.jsx(Em,{asChild:!0,trapped:x.open,onMountAutoFocus:me=>{me.preventDefault()},onUnmountAutoFocus:Ye(i,me=>{x.trigger?.focus({preventScroll:!0}),me.preventDefault()}),children:L.jsx(jh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:me=>me.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:L.jsx(de,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:me=>me.preventDefault(),...w,...Se,onPlaced:()=>Z(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ye(w.onKeyDown,me=>{const Ze=me.ctrlKey||me.altKey||me.metaKey;if(me.key==="Tab"&&me.preventDefault(),!Ze&&me.key.length===1&&oe(me.key),["ArrowUp","ArrowDown","Home","End"].includes(me.key)){let Le=W().filter($e=>!$e.disabled).map($e=>$e.ref.current);if(["ArrowUp","End"].includes(me.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(me.key)){const $e=me.target,be=Le.indexOf($e);Le=Le.slice(be+1)}setTimeout(()=>B(Le)),me.preventDefault()}})})})})})})});TK.displayName=Uje;var Hje="SelectItemAlignedPosition",MK=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Gl(uf,n),a=Yl(uf,n),[s,u]=y.useState(null),[l,c]=y.useState(null),f=Gt(t,k=>c(k)),h=g2(n),p=y.useRef(!1),m=y.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:w,focusSelectedItem:x}=a,S=y.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&l&&v&&b&&w){const k=o.trigger.getBoundingClientRect(),M=l.getBoundingClientRect(),N=o.valueNode.getBoundingClientRect(),q=w.getBoundingClientRect();if(o.dir!=="rtl"){const $e=q.left-M.left,be=N.left-$e,yt=k.left-be,lt=k.width+yt,Nt=Math.max(lt,M.width),yn=window.innerWidth-Ta,nn=a4(be,[Ta,Math.max(Ta,yn-Nt)]);s.style.minWidth=lt+"px",s.style.left=nn+"px"}else{const $e=M.right-q.right,be=window.innerWidth-N.right-$e,yt=window.innerWidth-k.right-be,lt=k.width+yt,Nt=Math.max(lt,M.width),yn=window.innerWidth-Ta,nn=a4(be,[Ta,Math.max(Ta,yn-Nt)]);s.style.minWidth=lt+"px",s.style.right=nn+"px"}const Y=h(),W=window.innerHeight-Ta*2,ne=v.scrollHeight,Z=window.getComputedStyle(l),R=parseInt(Z.borderTopWidth,10),B=parseInt(Z.paddingTop,10),U=parseInt(Z.borderBottomWidth,10),F=parseInt(Z.paddingBottom,10),V=R+B+ne+F+U,G=Math.min(b.offsetHeight*5,V),oe=window.getComputedStyle(v),Q=parseInt(oe.paddingTop,10),X=parseInt(oe.paddingBottom,10),ue=k.top+k.height/2-Ta,de=W-ue,Se=b.offsetHeight/2,me=b.offsetTop+Se,Ze=R+B+me,Ae=V-Ze;if(Ze<=ue){const $e=Y.length>0&&b===Y[Y.length-1].ref.current;s.style.bottom="0px";const be=l.clientHeight-v.offsetTop-v.offsetHeight,yt=Math.max(de,Se+($e?X:0)+be+U),lt=Ze+yt;s.style.height=lt+"px"}else{const $e=Y.length>0&&b===Y[0].ref.current;s.style.top="0px";const yt=Math.max(ue,R+v.offsetTop+($e?Q:0)+Se)+Ae;s.style.height=yt+"px",v.scrollTop=Ze-ue+v.offsetTop}s.style.margin=`${Ta}px 0`,s.style.minHeight=G+"px",s.style.maxHeight=W+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,s,l,v,b,w,o.dir,r]);ii(()=>S(),[S]);const[O,E]=y.useState();ii(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const C=y.useCallback(k=>{k&&m.current===!0&&(S(),x?.(),m.current=!1)},[S,x]);return L.jsx(Wje,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:L.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:L.jsx(pt.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});MK.displayName=Hje;var Vje="SelectPopperPosition",s4=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ta,...o}=e,a=m2(n);return L.jsx(dw,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.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)"}})});s4.displayName=Vje;var[Wje,YP]=ap(uf,{}),u4="SelectViewport",RK=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Yl(u4,n),a=YP(u4,n),s=Gt(t,o.onViewportChange),u=y.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(p2.Slot,{scope:n,children:L.jsx(pt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ye(i.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h?.current&&f){const p=Math.abs(u.current-c.scrollTop);if(p>0){const m=window.innerHeight-Ta*2,v=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),w=Math.max(v,b);if(w0?O:0,f.style.justifyContent="flex-end")}}}u.current=c.scrollTop})})})]})});RK.displayName=u4;var DK="SelectGroup",[qje,Kje]=ap(DK),$K=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=jo();return L.jsx(qje,{scope:n,id:i,children:L.jsx(pt.div,{role:"group","aria-labelledby":i,...r,ref:t})})});$K.displayName=DK;var IK="SelectLabel",NK=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Kje(IK,n);return L.jsx(pt.div,{id:i.id,...r,ref:t})});NK.displayName=IK;var vx="SelectItem",[Gje,LK]=ap(vx),FK=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,s=Gl(vx,n),u=Yl(vx,n),l=s.value===r,[c,f]=y.useState(o??""),[h,p]=y.useState(!1),m=Gt(t,x=>u.itemRefCallback?.(x,r,i)),v=jo(),b=y.useRef("touch"),w=()=>{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(Gje,{scope:n,value:r,disabled:i,textId:v,isSelected:l,onItemTextChange:y.useCallback(x=>{f(S=>S||(x?.textContent??"").trim())},[]),children:L.jsx(p2.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:L.jsx(pt.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:m,onFocus:Ye(a.onFocus,()=>p(!0)),onBlur:Ye(a.onBlur,()=>p(!1)),onClick:Ye(a.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Ye(a.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Ye(a.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:Ye(a.onPointerMove,x=>{b.current=x.pointerType,i?u.onItemLeave?.():b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:Ye(a.onKeyDown,x=>{u.searchRef?.current!==""&&x.key===" "||(Ije.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});FK.displayName=vx;var d0="SelectItemText",jK=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=Gl(d0,n),s=Yl(d0,n),u=LK(d0,n),l=jje(d0,n),[c,f]=y.useState(null),h=Gt(t,w=>f(w),u.onItemTextChange,w=>s.itemTextRefCallback?.(w,u.value,u.disabled)),p=c?.textContent,m=y.useMemo(()=>L.jsx("option",{value:u.value,disabled:u.disabled,children:p},u.value),[u.disabled,u.value,p]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=l;return ii(()=>(v(m),()=>b(m)),[v,b,m]),L.jsxs(L.Fragment,{children:[L.jsx(pt.span,{id:u.textId,...o,ref:h}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Pu.createPortal(o.children,a.valueNode):null]})});jK.displayName=d0;var BK="SelectItemIndicator",zK=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return LK(BK,n).isSelected?L.jsx(pt.span,{"aria-hidden":!0,...r,ref:t}):null});zK.displayName=BK;var l4="SelectScrollUpButton",UK=y.forwardRef((e,t)=>{const n=Yl(l4,e.__scopeSelect),r=YP(l4,e.__scopeSelect),[i,o]=y.useState(!1),a=Gt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=u.scrollTop>0;o(l)};const u=n.viewport;return s(),u.addEventListener("scroll",s),()=>u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?L.jsx(VK,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop-u.offsetHeight)}}):null});UK.displayName=l4;var c4="SelectScrollDownButton",HK=y.forwardRef((e,t)=>{const n=Yl(c4,e.__scopeSelect),r=YP(c4,e.__scopeSelect),[i,o]=y.useState(!1),a=Gt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=u.scrollHeight-u.clientHeight,c=Math.ceil(u.scrollTop)u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?L.jsx(VK,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop+u.offsetHeight)}}):null});HK.displayName=c4;var VK=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Yl("SelectScrollButton",n),a=y.useRef(null),s=g2(n),u=y.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return y.useEffect(()=>()=>u(),[u]),ii(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),L.jsx(pt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ye(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ye(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ye(i.onPointerLeave,()=>{u()})})}),Yje="SelectSeparator",WK=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return L.jsx(pt.div,{"aria-hidden":!0,...r,ref:t})});WK.displayName=Yje;var f4="SelectArrow",Zje=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=m2(n),o=Gl(f4,n),a=Yl(f4,n);return o.open&&a.position==="popper"?L.jsx(hw,{...i,...r,ref:t}):null});Zje.displayName=f4;function qK(e){return e===""||e===void 0}var KK=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=y.useRef(null),o=Gt(t,i),a=GP(n);return y.useEffect(()=>{const s=i.current,u=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==n&&c){const f=new Event("change",{bubbles:!0});c.call(s,n),s.dispatchEvent(f)}},[a,n]),L.jsx(TA,{asChild:!0,children:L.jsx("select",{...r,ref:o,defaultValue:n})})});KK.displayName="BubbleSelect";function GK(e){const t=Hr(e),n=y.useRef(""),r=y.useRef(0),i=y.useCallback(a=>{const s=n.current+a;t(s),function u(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(s)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function YK(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Xje(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function Xje(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var vQe=wK,yQe=SK,bQe=EK,xQe=OK,wQe=AK,_Qe=PK,SQe=RK,CQe=$K,EQe=NK,OQe=FK,AQe=jK,PQe=zK,kQe=UK,TQe=HK,MQe=WK;const ZP=6048e5,Qje=864e5,DI=Symbol.for("constructDateFrom");function oi(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&DI in e?e[DI](t):e instanceof Date?new e.constructor(t):new Date(t)}function Dn(e,t){return oi(t||e,e)}function Ui(e,t,n){const r=Dn(e,n?.in);return isNaN(t)?oi(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Qa(e,t,n){const r=Dn(e,n?.in);if(isNaN(t))return oi(n?.in||e,NaN);if(!t)return r;const i=r.getDate(),o=oi(n?.in||e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let Jje={};function Wm(){return Jje}function ba(e,t){const n=Wm(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Dn(e,t?.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function yx(e){const t=Dn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Sf(e,...t){const n=oi.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function cf(e,t){const n=Dn(e,t?.in);return n.setHours(0,0,0,0),n}function xs(e,t,n){const[r,i]=Sf(n?.in,e,t),o=cf(r),a=cf(i),s=+o-yx(o),u=+a-yx(a);return Math.round((s-u)/Qje)}function eBe(e,t){const n=ZK(e,t),r=oi(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),lf(r)}function d4(e,t,n){return Ui(e,t*7,n)}function tBe(e,t,n){return Qa(e,t*12,n)}function nBe(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Dn(i,r);(!n||n{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Dn(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),oi(r,n||NaN)}function lo(e,t,n){const[r,i]=Sf(n?.in,e,t);return+cf(r)==+cf(i)}function XP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function iBe(e){return!(!XP(e)&&typeof e!="number"||isNaN(+Dn(e)))}function om(e,t,n){const[r,i]=Sf(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function oBe(e,t,n){const[r,i]=Sf(n?.in,e,t),o=ba(r,n),a=ba(i,n),s=+o-yx(o),u=+a-yx(a);return Math.round((s-u)/ZP)}function QP(e,t){const n=Dn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function mo(e,t){const n=Dn(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function XK(e,t){const n=Dn(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function JP(e,t){const n=Wm(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Dn(e,t?.in),o=i.getDay(),a=(o{let r;const i=aBe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Fd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const uBe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},lBe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},cBe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fBe={date:Fd({formats:uBe,defaultWidth:"full"}),time:Fd({formats:lBe,defaultWidth:"full"}),dateTime:Fd({formats:cBe,defaultWidth:"full"})},dBe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},hBe=(e,t,n,r)=>dBe[e];function ps(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const pBe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},gBe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mBe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vBe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},yBe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},bBe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},xBe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},wBe={ordinalNumber:xBe,era:ps({values:pBe,defaultWidth:"wide"}),quarter:ps({values:gBe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ps({values:mBe,defaultWidth:"wide"}),day:ps({values:vBe,defaultWidth:"wide"}),dayPeriod:ps({values:yBe,defaultWidth:"wide",formattingValues:bBe,defaultFormattingWidth:"wide"})};function gs(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?SBe(s,f=>f.test(a)):_Be(s,f=>f.test(a));let l;l=e.valueCallback?e.valueCallback(u):u,l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(a.length);return{value:l,rest:c}}}function _Be(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function SBe(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const CBe=/^(\d+)(th|st|nd|rd)?/i,EBe=/\d+/i,OBe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ABe={any:[/^b/i,/^(a|c)/i]},PBe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kBe={any:[/1/i,/2/i,/3/i,/4/i]},TBe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},MBe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},RBe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},DBe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},$Be={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},IBe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},NBe={ordinalNumber:JK({matchPattern:CBe,parsePattern:EBe,valueCallback:e=>parseInt(e,10)}),era:gs({matchPatterns:OBe,defaultMatchWidth:"wide",parsePatterns:ABe,defaultParseWidth:"any"}),quarter:gs({matchPatterns:PBe,defaultMatchWidth:"wide",parsePatterns:kBe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gs({matchPatterns:TBe,defaultMatchWidth:"wide",parsePatterns:MBe,defaultParseWidth:"any"}),day:gs({matchPatterns:RBe,defaultMatchWidth:"wide",parsePatterns:DBe,defaultParseWidth:"any"}),dayPeriod:gs({matchPatterns:$Be,defaultMatchWidth:"any",parsePatterns:IBe,defaultParseWidth:"any"})},eG={code:"en-US",formatDistance:sBe,formatLong:fBe,formatRelative:hBe,localize:wBe,match:NBe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function LBe(e,t){const n=Dn(e,t?.in);return xs(n,XK(n))+1}function tG(e,t){const n=Dn(e,t?.in),r=+lf(n)-+eBe(n);return Math.round(r/ZP)+1}function nG(e,t){const n=Dn(e,t?.in),r=n.getFullYear(),i=Wm(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=oi(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=ba(a,t),u=oi(t?.in||e,0);u.setFullYear(r,0,o),u.setHours(0,0,0,0);const l=ba(u,t);return+n>=+s?r+1:+n>=+l?r:r-1}function FBe(e,t){const n=Wm(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=nG(e,t),o=oi(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),ba(o,t)}function rG(e,t){const n=Dn(e,t?.in),r=+ba(n,t)-+FBe(n,t);return Math.round(r/ZP)+1}function Mn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ku={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Mn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Mn(n+1,2)},d(e,t){return Mn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Mn(e.getHours()%12||12,t.length)},H(e,t){return Mn(e.getHours(),t.length)},m(e,t){return Mn(e.getMinutes(),t.length)},s(e,t){return Mn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Mn(i,t.length)}},ed={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},$I={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Ku.y(e,t)},Y:function(e,t,n,r){const i=nG(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Mn(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Mn(o,t.length)},R:function(e,t){const n=ZK(e);return Mn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Mn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Mn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Mn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ku.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Mn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=rG(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Mn(i,t.length)},I:function(e,t,n){const r=tG(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Mn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ku.d(e,t)},D:function(e,t,n){const r=LBe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Mn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Mn(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Mn(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Mn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=ed.noon:r===0?i=ed.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=ed.evening:r>=12?i=ed.afternoon:r>=4?i=ed.morning:i=ed.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ku.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ku.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Mn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Mn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ku.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ku.s(e,t)},S:function(e,t){return Ku.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return NI(r);case"XXXX":case"XX":return gc(r);case"XXXXX":case"XXX":default:return gc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return NI(r);case"xxxx":case"xx":return gc(r);case"xxxxx":case"xxx":default:return gc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+II(r,":");case"OOOO":default:return"GMT"+gc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+II(r,":");case"zzzz":default:return"GMT"+gc(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Mn(r,t.length)},T:function(e,t,n){return Mn(+e,t.length)}};function II(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Mn(o,2)}function NI(e,t){return e%60===0?(e>0?"-":"+")+Mn(Math.abs(e)/60,2):gc(e,t)}function gc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Mn(Math.trunc(r/60),2),o=Mn(r%60,2);return n+i+t+o}const LI=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},iG=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},jBe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return LI(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",LI(r,t)).replace("{{time}}",iG(i,t))},BBe={p:iG,P:jBe},zBe=/^D+$/,UBe=/^Y+$/,HBe=["D","DD","YY","YYYY"];function VBe(e){return zBe.test(e)}function WBe(e){return UBe.test(e)}function qBe(e,t,n){const r=KBe(e,t,n);if(console.warn(r),HBe.includes(e))throw new RangeError(r)}function KBe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const GBe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,YBe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ZBe=/^'([^]*?)'?$/,XBe=/''/g,QBe=/[a-zA-Z]/;function Cf(e,t,n){const r=Wm(),i=n?.locale??r.locale??eG,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Dn(e,n?.in);if(!iBe(s))throw new RangeError("Invalid time value");let u=t.match(YBe).map(c=>{const f=c[0];if(f==="p"||f==="P"){const h=BBe[f];return h(c,i.formatLong)}return c}).join("").match(GBe).map(c=>{if(c==="''")return{isToken:!1,value:"'"};const f=c[0];if(f==="'")return{isToken:!1,value:JBe(c)};if($I[f])return{isToken:!0,value:c};if(f.match(QBe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:c}});i.localize.preprocessor&&(u=i.localize.preprocessor(s,u));const l={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return u.map(c=>{if(!c.isToken)return c.value;const f=c.value;(!n?.useAdditionalWeekYearTokens&&WBe(f)||!n?.useAdditionalDayOfYearTokens&&VBe(f))&&qBe(f,t,String(e));const h=$I[f[0]];return h(s,f,i.localize,l)}).join("")}function JBe(e){const t=e.match(ZBe);return t?t[1].replace(XBe,"'"):e}function eze(e,t){const n=Dn(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=oi(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function tze(e){return Math.trunc(+Dn(e)/1e3)}function nze(e,t){const n=Dn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(0,0,0,0),Dn(n,t?.in)}function rze(e,t){const n=Dn(e,t?.in);return oBe(nze(n,t),mo(n,t),t)+1}function h4(e,t){return+Dn(e)>+Dn(t)}function oG(e,t){return+Dn(e)<+Dn(t)}function ize(e,t,n){const[r,i]=Sf(n?.in,e,t);return+ba(r,n)==+ba(i,n)}function e5(e,t,n){const[r,i]=Sf(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function oze(e,t,n){const[r,i]=Sf(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function m3(e,t,n){return Ui(e,-t,n)}function v3(e,t,n){const r=Dn(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=oi(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=eze(a);return r.setMonth(t,Math.min(o,s)),r}function FI(e,t,n){const r=Dn(e,n?.in);return isNaN(+r)?oi(e,NaN):(r.setFullYear(t),r)}function RQe(e){return cf(Date.now(),e)}const aze={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},sze=(e,t,n)=>{let r;const i=aze[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},uze={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},lze={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},cze={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},fze={date:Fd({formats:uze,defaultWidth:"full"}),time:Fd({formats:lze,defaultWidth:"full"}),dateTime:Fd({formats:cze,defaultWidth:"full"})};function jI(e,t,n){const r="eeee p";return ize(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const dze={lastWeek:jI,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:jI,other:"PP p"},hze=(e,t,n,r)=>{const i=dze[e];return typeof i=="function"?i(t,n,r):i},pze={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},gze={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},mze={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},vze={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},yze={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},bze={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},xze=(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},wze={ordinalNumber:xze,era:ps({values:pze,defaultWidth:"wide"}),quarter:ps({values:gze,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ps({values:mze,defaultWidth:"wide"}),day:ps({values:vze,defaultWidth:"wide"}),dayPeriod:ps({values:yze,defaultWidth:"wide",formattingValues:bze,defaultFormattingWidth:"wide"})},_ze=/^(第\s*)?\d+(日|时|分|秒)?/i,Sze=/\d+/i,Cze={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},Eze={any:[/^(前)/i,/^(公元)/i]},Oze={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},Aze={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},Pze={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},kze={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},Tze={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},Mze={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},Rze={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},Dze={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},$ze={ordinalNumber:JK({matchPattern:_ze,parsePattern:Sze,valueCallback:e=>parseInt(e,10)}),era:gs({matchPatterns:Cze,defaultMatchWidth:"wide",parsePatterns:Eze,defaultParseWidth:"any"}),quarter:gs({matchPatterns:Oze,defaultMatchWidth:"wide",parsePatterns:Aze,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gs({matchPatterns:Pze,defaultMatchWidth:"wide",parsePatterns:kze,defaultParseWidth:"any"}),day:gs({matchPatterns:Tze,defaultMatchWidth:"wide",parsePatterns:Mze,defaultParseWidth:"any"}),dayPeriod:gs({matchPatterns:Rze,defaultMatchWidth:"any",parsePatterns:Dze,defaultParseWidth:"any"})},DQe={code:"zh-CN",formatDistance:sze,formatLong:fze,formatRelative:hze,localize:wze,match:$ze,options:{weekStartsOn:1,firstWeekContainsDate:4}};var Rt=function(){return Rt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r1&&(u||!l),f=t>1&&(l||!u),h=function(){r&&o(r)},p=function(){i&&o(i)};return L.jsx(hUe,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:f,nextMonth:i,previousMonth:r,onPreviousClick:h,onNextClick:p})}function pUe(e){var t,n=qn(),r=n.classNames,i=n.disableNavigation,o=n.styles,a=n.captionLayout,s=n.components,u=(t=s?.CaptionLabel)!==null&&t!==void 0?t:uG,l;return i?l=L.jsx(u,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?l=L.jsx(BI,{displayMonth:e.displayMonth,id:e.id}):a==="dropdown-buttons"?l=L.jsxs(L.Fragment,{children:[L.jsx(BI,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),L.jsx(zI,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):l=L.jsxs(L.Fragment,{children:[L.jsx(u,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),L.jsx(zI,{displayMonth:e.displayMonth,id:e.id})]}),L.jsx("div",{className:r.caption,style:o.caption,children:l})}function gUe(e){var t=qn(),n=t.footer,r=t.styles,i=t.classNames.tfoot;return n?L.jsx("tfoot",{className:i,style:r.tfoot,children:L.jsx("tr",{children:L.jsx("td",{colSpan:8,children:n})})}):L.jsx(L.Fragment,{})}function mUe(e,t,n){for(var r=n?lf(new Date):ba(new Date,{locale:e,weekStartsOn:t}),i=[],o=0;o<7;o++){var a=Ui(r,o);i.push(a)}return i}function vUe(){var e=qn(),t=e.classNames,n=e.styles,r=e.showWeekNumber,i=e.locale,o=e.weekStartsOn,a=e.ISOWeek,s=e.formatters.formatWeekdayName,u=e.labels.labelWeekday,l=mUe(i,o,a);return L.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&L.jsx("td",{style:n.head_cell,className:t.head_cell}),l.map(function(c,f){return L.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":u(c,{locale:i}),children:s(c,{locale:i})},f)})]})}function yUe(){var e,t=qn(),n=t.classNames,r=t.styles,i=t.components,o=(e=i?.HeadRow)!==null&&e!==void 0?e:vUe;return L.jsx("thead",{style:r.head,className:n.head,children:L.jsx(o,{})})}function bUe(e){var t=qn(),n=t.locale,r=t.formatters.formatDay;return L.jsx(L.Fragment,{children:r(e.date,{locale:n})})}var t5=y.createContext(void 0);function xUe(e){if(!qm(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return L.jsx(t5.Provider,{value:t,children:e.children})}return L.jsx(wUe,{initialProps:e.initialProps,children:e.children})}function wUe(e){var t=e.initialProps,n=e.children,r=t.selected,i=t.min,o=t.max,a=function(l,c,f){var h,p;(h=t.onDayClick)===null||h===void 0||h.call(t,l,c,f);var m=!!(c.selected&&i&&r?.length===i);if(!m){var v=!!(!c.selected&&o&&r?.length===o);if(!v){var b=r?aG([],r):[];if(c.selected){var w=b.findIndex(function(x){return lo(l,x)});b.splice(w,1)}else b.push(l);(p=t.onSelect)===null||p===void 0||p.call(t,b,l,c,f)}}},s={disabled:[]};r&&s.disabled.push(function(l){var c=o&&r.length>o-1,f=r.some(function(h){return lo(h,l)});return!!(c&&!f)});var u={selected:r,onDayClick:a,modifiers:s};return L.jsx(t5.Provider,{value:u,children:n})}function n5(){var e=y.useContext(t5);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function _Ue(e,t){var n=t||{},r=n.from,i=n.to;return r&&i?lo(i,e)&&lo(r,e)?void 0:lo(i,e)?{from:i,to:void 0}:lo(r,e)?void 0:h4(r,e)?{from:e,to:i}:{from:r,to:e}:i?h4(e,i)?{from:i,to:e}:{from:e,to:i}:r?oG(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var r5=y.createContext(void 0);function SUe(e){if(!Km(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return L.jsx(r5.Provider,{value:t,children:e.children})}return L.jsx(CUe,{initialProps:e.initialProps,children:e.children})}function CUe(e){var t=e.initialProps,n=e.children,r=t.selected,i=r||{},o=i.from,a=i.to,s=t.min,u=t.max,l=function(p,m,v){var b,w;(b=t.onDayClick)===null||b===void 0||b.call(t,p,m,v);var x=_Ue(p,r);(w=t.onSelect)===null||w===void 0||w.call(t,x,p,m,v)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(c.range_start=[o],a?(c.range_end=[a],lo(o,a)||(c.range_middle=[{after:o,before:a}])):c.range_end=[o]):a&&(c.range_start=[a],c.range_end=[a]),s&&(o&&!a&&c.disabled.push({after:m3(o,s-1),before:Ui(o,s-1)}),o&&a&&c.disabled.push({after:o,before:Ui(o,s-1)}),!o&&a&&c.disabled.push({after:m3(a,s-1),before:Ui(a,s-1)})),u){if(o&&!a&&(c.disabled.push({before:Ui(o,-u+1)}),c.disabled.push({after:Ui(o,u-1)})),o&&a){var f=xs(a,o)+1,h=u-f;c.disabled.push({before:m3(o,h)}),c.disabled.push({after:Ui(a,h)})}!o&&a&&(c.disabled.push({before:Ui(a,-u+1)}),c.disabled.push({after:Ui(a,u-1)}))}return L.jsx(r5.Provider,{value:{selected:r,onDayClick:l,modifiers:c},children:n})}function i5(){var e=y.useContext(r5);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function a1(e){return Array.isArray(e)?aG([],e):e!==void 0?[e]:[]}function EUe(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],i=n[1];t[r]=a1(i)}),t}var Ja;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Ja||(Ja={}));var OUe=Ja.Selected,Ys=Ja.Disabled,AUe=Ja.Hidden,PUe=Ja.Today,y3=Ja.RangeEnd,b3=Ja.RangeMiddle,x3=Ja.RangeStart,kUe=Ja.Outside;function TUe(e,t,n){var r,i=(r={},r[OUe]=a1(e.selected),r[Ys]=a1(e.disabled),r[AUe]=a1(e.hidden),r[PUe]=[e.today],r[y3]=[],r[b3]=[],r[x3]=[],r[kUe]=[],r);return e.fromDate&&i[Ys].push({before:e.fromDate}),e.toDate&&i[Ys].push({after:e.toDate}),qm(e)?i[Ys]=i[Ys].concat(t.modifiers[Ys]):Km(e)&&(i[Ys]=i[Ys].concat(n.modifiers[Ys]),i[x3]=n.modifiers[x3],i[b3]=n.modifiers[b3],i[y3]=n.modifiers[y3]),i}var fG=y.createContext(void 0);function MUe(e){var t=qn(),n=n5(),r=i5(),i=TUe(t,n,r),o=EUe(t.modifiers),a=Rt(Rt({},i),o);return L.jsx(fG.Provider,{value:a,children:e.children})}function dG(){var e=y.useContext(fG);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function RUe(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function DUe(e){return!!(e&&typeof e=="object"&&"from"in e)}function $Ue(e){return!!(e&&typeof e=="object"&&"after"in e)}function IUe(e){return!!(e&&typeof e=="object"&&"before"in e)}function NUe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function LUe(e,t){var n,r=t.from,i=t.to;if(r&&i){var o=xs(i,r)<0;o&&(n=[i,r],r=n[0],i=n[1]);var a=xs(e,r)>=0&&xs(i,e)>=0;return a}return i?lo(i,e):r?lo(r,e):!1}function FUe(e){return XP(e)}function jUe(e){return Array.isArray(e)&&e.every(XP)}function BUe(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(FUe(n))return lo(e,n);if(jUe(n))return n.includes(e);if(DUe(n))return LUe(e,n);if(NUe(n))return n.dayOfWeek.includes(e.getDay());if(RUe(n)){var r=xs(n.before,e),i=xs(n.after,e),o=r>0,a=i<0,s=h4(n.before,n.after);return s?a&&o:o||a}return $Ue(n)?xs(e,n.after)>0:IUe(n)?xs(n.before,e)>0:typeof n=="function"?n(e):!1})}function o5(e,t,n){var r=Object.keys(t).reduce(function(o,a){var s=t[a];return BUe(e,s)&&o.push(a),o},[]),i={};return r.forEach(function(o){return i[o]=!0}),n&&!e5(e,n)&&(i.outside=!0),i}function zUe(e,t){for(var n=mo(e[0]),r=QP(e[e.length-1]),i,o,a=n;a<=r;){var s=o5(a,t),u=!s.disabled&&!s.hidden;if(!u){a=Ui(a,1);continue}if(s.selected)return a;s.today&&!o&&(o=a),i||(i=a),a=Ui(a,1)}return o||i}var UUe=365;function hG(e,t){var n=t.moveBy,r=t.direction,i=t.context,o=t.modifiers,a=t.retry,s=a===void 0?{count:0,lastFocused:e}:a,u=i.weekStartsOn,l=i.fromDate,c=i.toDate,f=i.locale,h={day:Ui,week:d4,month:Qa,year:tBe,startOfWeek:function(b){return i.ISOWeek?lf(b):ba(b,{locale:f,weekStartsOn:u})},endOfWeek:function(b){return i.ISOWeek?QK(b):JP(b,{locale:f,weekStartsOn:u})}},p=h[n](e,r==="after"?1:-1);r==="before"&&l?p=nBe([l,p]):r==="after"&&c&&(p=rBe([c,p]));var m=!0;if(o){var v=o5(p,o);m=!v.disabled&&!v.hidden}return m?p:s.count>UUe?s.lastFocused:hG(p,{moveBy:n,direction:r,context:i,modifiers:o,retry:Rt(Rt({},s),{count:s.count+1})})}var pG=y.createContext(void 0);function HUe(e){var t=Gm(),n=dG(),r=y.useState(),i=r[0],o=r[1],a=y.useState(),s=a[0],u=a[1],l=zUe(t.displayMonths,n),c=i??(s&&t.isDateDisplayed(s))?s:l,f=function(){u(i),o(void 0)},h=function(b){o(b)},p=qn(),m=function(b,w){if(i){var x=hG(i,{moveBy:b,direction:w,context:p,modifiers:n});lo(i,x)||(t.goToDate(x,i),h(x))}},v={focusedDay:i,focusTarget:c,blur:f,focus:h,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return L.jsx(pG.Provider,{value:v,children:e.children})}function a5(){var e=y.useContext(pG);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function VUe(e,t){var n=dG(),r=o5(e,n,t);return r}var s5=y.createContext(void 0);function WUe(e){if(!v2(e.initialProps)){var t={selected:void 0};return L.jsx(s5.Provider,{value:t,children:e.children})}return L.jsx(qUe,{initialProps:e.initialProps,children:e.children})}function qUe(e){var t=e.initialProps,n=e.children,r=function(o,a,s){var u,l,c;if((u=t.onDayClick)===null||u===void 0||u.call(t,o,a,s),a.selected&&!t.required){(l=t.onSelect)===null||l===void 0||l.call(t,void 0,o,a,s);return}(c=t.onSelect)===null||c===void 0||c.call(t,o,o,a,s)},i={selected:t.selected,onDayClick:r};return L.jsx(s5.Provider,{value:i,children:n})}function gG(){var e=y.useContext(s5);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function KUe(e,t){var n=qn(),r=gG(),i=n5(),o=i5(),a=a5(),s=a.focusDayAfter,u=a.focusDayBefore,l=a.focusWeekAfter,c=a.focusWeekBefore,f=a.blur,h=a.focus,p=a.focusMonthBefore,m=a.focusMonthAfter,v=a.focusYearBefore,b=a.focusYearAfter,w=a.focusStartOfWeek,x=a.focusEndOfWeek,S=function(U){var F,V,G,oe;v2(n)?(F=r.onDayClick)===null||F===void 0||F.call(r,e,t,U):qm(n)?(V=i.onDayClick)===null||V===void 0||V.call(i,e,t,U):Km(n)?(G=o.onDayClick)===null||G===void 0||G.call(o,e,t,U):(oe=n.onDayClick)===null||oe===void 0||oe.call(n,e,t,U)},O=function(U){var F;h(e),(F=n.onDayFocus)===null||F===void 0||F.call(n,e,t,U)},E=function(U){var F;f(),(F=n.onDayBlur)===null||F===void 0||F.call(n,e,t,U)},C=function(U){var F;(F=n.onDayMouseEnter)===null||F===void 0||F.call(n,e,t,U)},k=function(U){var F;(F=n.onDayMouseLeave)===null||F===void 0||F.call(n,e,t,U)},M=function(U){var F;(F=n.onDayPointerEnter)===null||F===void 0||F.call(n,e,t,U)},N=function(U){var F;(F=n.onDayPointerLeave)===null||F===void 0||F.call(n,e,t,U)},q=function(U){var F;(F=n.onDayTouchCancel)===null||F===void 0||F.call(n,e,t,U)},Y=function(U){var F;(F=n.onDayTouchEnd)===null||F===void 0||F.call(n,e,t,U)},W=function(U){var F;(F=n.onDayTouchMove)===null||F===void 0||F.call(n,e,t,U)},ne=function(U){var F;(F=n.onDayTouchStart)===null||F===void 0||F.call(n,e,t,U)},Z=function(U){var F;(F=n.onDayKeyUp)===null||F===void 0||F.call(n,e,t,U)},R=function(U){var F;switch(U.key){case"ArrowLeft":U.preventDefault(),U.stopPropagation(),n.dir==="rtl"?s():u();break;case"ArrowRight":U.preventDefault(),U.stopPropagation(),n.dir==="rtl"?u():s();break;case"ArrowDown":U.preventDefault(),U.stopPropagation(),l();break;case"ArrowUp":U.preventDefault(),U.stopPropagation(),c();break;case"PageUp":U.preventDefault(),U.stopPropagation(),U.shiftKey?v():p();break;case"PageDown":U.preventDefault(),U.stopPropagation(),U.shiftKey?b():m();break;case"Home":U.preventDefault(),U.stopPropagation(),w();break;case"End":U.preventDefault(),U.stopPropagation(),x();break}(F=n.onDayKeyDown)===null||F===void 0||F.call(n,e,t,U)},B={onClick:S,onFocus:O,onBlur:E,onKeyDown:R,onKeyUp:Z,onMouseEnter:C,onMouseLeave:k,onPointerEnter:M,onPointerLeave:N,onTouchCancel:q,onTouchEnd:Y,onTouchMove:W,onTouchStart:ne};return B}function GUe(){var e=qn(),t=gG(),n=n5(),r=i5(),i=v2(e)?t.selected:qm(e)?n.selected:Km(e)?r.selected:void 0;return i}function YUe(e){return Object.values(Ja).includes(e)}function ZUe(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var i=e.modifiersClassNames[r];if(i)n.push(i);else if(YUe(r)){var o=e.classNames["day_".concat(r)];o&&n.push(o)}}),n}function XUe(e,t){var n=Rt({},e.styles.day);return Object.keys(t).forEach(function(r){var i;n=Rt(Rt({},n),(i=e.modifiersStyles)===null||i===void 0?void 0:i[r])}),n}function QUe(e,t,n){var r,i,o,a=qn(),s=a5(),u=VUe(e,t),l=KUe(e,u),c=GUe(),f=!!(a.onDayClick||a.mode!=="default");y.useEffect(function(){var C;u.outside||s.focusedDay&&f&&lo(s.focusedDay,e)&&((C=n.current)===null||C===void 0||C.focus())},[s.focusedDay,e,n,f,u.outside]);var h=ZUe(a,u).join(" "),p=XUe(a,u),m=!!(u.outside&&!a.showOutsideDays||u.hidden),v=(o=(i=a.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:bUe,b=L.jsx(v,{date:e,displayMonth:t,activeModifiers:u}),w={style:p,className:h,children:b,role:"gridcell"},x=s.focusTarget&&lo(s.focusTarget,e)&&!u.outside,S=s.focusedDay&&lo(s.focusedDay,e),O=Rt(Rt(Rt({},w),(r={disabled:u.disabled,role:"gridcell"},r["aria-selected"]=u.selected,r.tabIndex=S||x?0:-1,r)),l),E={isButton:f,isHidden:m,activeModifiers:u,selectedDays:c,buttonProps:O,divProps:w};return E}function JUe(e){var t=y.useRef(null),n=QUe(e.date,e.displayMonth,t);return n.isHidden?L.jsx("div",{role:"gridcell"}):n.isButton?L.jsx(bx,Rt({name:"day",ref:t},n.buttonProps)):L.jsx("div",Rt({},n.divProps))}function eHe(e){var t=e.number,n=e.dates,r=qn(),i=r.onWeekNumberClick,o=r.styles,a=r.classNames,s=r.locale,u=r.labels.labelWeekNumber,l=r.formatters.formatWeekNumber,c=l(Number(t),{locale:s});if(!i)return L.jsx("span",{className:a.weeknumber,style:o.weeknumber,children:c});var f=u(Number(t),{locale:s}),h=function(p){i(t,n,p)};return L.jsx(bx,{name:"week-number","aria-label":f,className:a.weeknumber,style:o.weeknumber,onClick:h,children:c})}function tHe(e){var t,n,r=qn(),i=r.styles,o=r.classNames,a=r.showWeekNumber,s=r.components,u=(t=s?.Day)!==null&&t!==void 0?t:JUe,l=(n=s?.WeekNumber)!==null&&n!==void 0?n:eHe,c;return a&&(c=L.jsx("td",{className:o.cell,style:i.cell,children:L.jsx(l,{number:e.weekNumber,dates:e.dates})})),L.jsxs("tr",{className:o.row,style:i.row,children:[c,e.dates.map(function(f){return L.jsx("td",{className:o.cell,style:i.cell,role:"presentation",children:L.jsx(u,{displayMonth:e.displayMonth,date:f})},tze(f))})]})}function UI(e,t,n){for(var r=n?.ISOWeek?QK(t):JP(t,n),i=n?.ISOWeek?lf(e):ba(e,n),o=xs(r,i),a=[],s=0;s<=o;s++)a.push(Ui(i,s));var u=a.reduce(function(l,c){var f=n?.ISOWeek?tG(c):rG(c,n),h=l.find(function(p){return p.weekNumber===f});return h?(h.dates.push(c),l):(l.push({weekNumber:f,dates:[c]}),l)},[]);return u}function nHe(e,t){var n=UI(mo(e),QP(e),t);if(t?.useFixedWeeks){var r=rze(e,t);if(r<6){var i=n[n.length-1],o=i.dates[i.dates.length-1],a=d4(o,6-r),s=UI(d4(o,1),a,t);n.push.apply(n,s)}}return n}function rHe(e){var t,n,r,i=qn(),o=i.locale,a=i.classNames,s=i.styles,u=i.hideHead,l=i.fixedWeeks,c=i.components,f=i.weekStartsOn,h=i.firstWeekContainsDate,p=i.ISOWeek,m=nHe(e.displayMonth,{useFixedWeeks:!!l,ISOWeek:p,locale:o,weekStartsOn:f,firstWeekContainsDate:h}),v=(t=c?.Head)!==null&&t!==void 0?t:yUe,b=(n=c?.Row)!==null&&n!==void 0?n:tHe,w=(r=c?.Footer)!==null&&r!==void 0?r:gUe;return L.jsxs("table",{id:e.id,className:a.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!u&&L.jsx(v,{}),L.jsx("tbody",{className:a.tbody,style:s.tbody,children:m.map(function(x){return L.jsx(b,{displayMonth:e.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),L.jsx(w,{displayMonth:e.displayMonth})]})}function iHe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var oHe=iHe()?y.useLayoutEffect:y.useEffect,w3=!1,aHe=0;function HI(){return"react-day-picker-".concat(++aHe)}function sHe(e){var t,n=e??(w3?HI():null),r=y.useState(n),i=r[0],o=r[1];return oHe(function(){i===null&&o(HI())},[]),y.useEffect(function(){w3===!1&&(w3=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function uHe(e){var t,n,r=qn(),i=r.dir,o=r.classNames,a=r.styles,s=r.components,u=Gm().displayMonths,l=sHe(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,f=[o.month],h=a.month,p=e.displayIndex===0,m=e.displayIndex===u.length-1,v=!p&&!m;i==="rtl"&&(t=[p,m],m=t[0],p=t[1]),p&&(f.push(o.caption_start),h=Rt(Rt({},h),a.caption_start)),m&&(f.push(o.caption_end),h=Rt(Rt({},h),a.caption_end)),v&&(f.push(o.caption_between),h=Rt(Rt({},h),a.caption_between));var b=(n=s?.Caption)!==null&&n!==void 0?n:pUe;return L.jsxs("div",{className:f.join(" "),style:h,children:[L.jsx(b,{id:l,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),L.jsx(rHe,{id:c,"aria-labelledby":l,displayMonth:e.displayMonth})]},e.displayIndex)}function lHe(e){var t=qn(),n=t.classNames,r=t.styles;return L.jsx("div",{className:n.months,style:r.months,children:e.children})}function cHe(e){var t,n,r=e.initialProps,i=qn(),o=a5(),a=Gm(),s=y.useState(!1),u=s[0],l=s[1];y.useEffect(function(){i.initialFocus&&o.focusTarget&&(u||(o.focus(o.focusTarget),l(!0)))},[i.initialFocus,u,o.focus,o.focusTarget,o]);var c=[i.classNames.root,i.className];i.numberOfMonths>1&&c.push(i.classNames.multiple_months),i.showWeekNumber&&c.push(i.classNames.with_weeknumber);var f=Rt(Rt({},i.styles.root),i.style),h=Object.keys(r).filter(function(m){return m.startsWith("data-")}).reduce(function(m,v){var b;return Rt(Rt({},m),(b={},b[v]=r[v],b))},{}),p=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:lHe;return L.jsx("div",Rt({className:c.join(" "),style:f,dir:i.dir,id:i.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:L.jsx(p,{children:a.displayMonths.map(function(m,v){return L.jsx(uHe,{displayIndex:v,displayMonth:m},v)})})}))}function fHe(e){var t=e.children,n=Ize(e,["children"]);return L.jsx(eUe,{initialProps:n,children:L.jsx(cUe,{children:L.jsx(WUe,{initialProps:n,children:L.jsx(xUe,{initialProps:n,children:L.jsx(SUe,{initialProps:n,children:L.jsx(MUe,{children:L.jsx(HUe,{children:t})})})})})})})}function $Qe(e){return L.jsx(fHe,Rt({},e,{children:L.jsx(cHe,{initialProps:e})}))}var u5="Popover",[mG,IQe]=vi(u5,[Ul]),Ym=Ul(),[dHe,Zl]=mG(u5),vG=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,s=Ym(t),u=y.useRef(null),[l,c]=y.useState(!1),[f=!1,h]=Za({prop:r,defaultProp:i,onChange:o});return L.jsx(fw,{...s,children:L.jsx(dHe,{scope:t,contentId:jo(),triggerRef:u,open:f,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:l,onCustomAnchorAdd:y.useCallback(()=>c(!0),[]),onCustomAnchorRemove:y.useCallback(()=>c(!1),[]),modal:a,children:n})})};vG.displayName=u5;var yG="PopoverAnchor",hHe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Zl(yG,n),o=Ym(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=i;return y.useEffect(()=>(a(),()=>s()),[a,s]),L.jsx(Tm,{...o,...r,ref:t})});hHe.displayName=yG;var bG="PopoverTrigger",xG=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Zl(bG,n),o=Ym(n),a=Gt(t,i.triggerRef),s=L.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":EG(i.open),...r,ref:a,onClick:Ye(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:L.jsx(Tm,{asChild:!0,...o,children:s})});xG.displayName=bG;var l5="PopoverPortal",[pHe,gHe]=mG(l5,{forceMount:void 0}),wG=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Zl(l5,t);return L.jsx(pHe,{scope:t,forceMount:n,children:L.jsx(Gr,{present:n||o.open,children:L.jsx(Bh,{asChild:!0,container:i,children:r})})})};wG.displayName=l5;var Ah="PopoverContent",_G=y.forwardRef((e,t)=>{const n=gHe(Ah,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Zl(Ah,e.__scopePopover);return L.jsx(Gr,{present:r||o.open,children:o.modal?L.jsx(mHe,{...i,ref:t}):L.jsx(vHe,{...i,ref:t})})});_G.displayName=Ah;var mHe=y.forwardRef((e,t)=>{const n=Zl(Ah,e.__scopePopover),r=y.useRef(null),i=Gt(t,r),o=y.useRef(!1);return y.useEffect(()=>{const a=r.current;if(a)return Am(a)},[]),L.jsx(Om,{as:Pl,allowPinchZoom:!0,children:L.jsx(SG,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,a=>{a.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0,l=s.button===2||u;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Ye(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),vHe=y.forwardRef((e,t)=>{const n=Zl(Ah,e.__scopePopover),r=y.useRef(!1),i=y.useRef(!1);return L.jsx(SG,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),SG=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:c,...f}=e,h=Zl(Ah,n),p=Ym(n);return sw(),L.jsx(Em,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:L.jsx(jh,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:L.jsx(dw,{"data-state":EG(h.open),role:"dialog",id:h.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),CG="PopoverClose",yHe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Zl(CG,n);return L.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});yHe.displayName=CG;var bHe="PopoverArrow",xHe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ym(n);return L.jsx(hw,{...i,...r,ref:t})});xHe.displayName=bHe;function EG(e){return e?"open":"closed"}var NQe=vG,LQe=xG,FQe=wG,jQe=_G,xx={exports:{}};/** + A `).concat(m,",").concat(m,",0,0,").concat(l,",").concat(t,",").concat(n+i-s*m," Z")}else c="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return c},F9e=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,s=n.width,u=n.height;if(Math.abs(s)>0&&Math.abs(u)>0){var l=Math.min(o,o+s),c=Math.max(o,o+s),f=Math.min(a,a+u),h=Math.max(a,a+u);return r>=l&&r<=c&&i>=f&&i<=h}return!1},j9e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},CP=function(t){var n=_$(_$({},j9e),t),r=y.useRef(),i=y.useState(-1),o=T9e(i,2),a=o[0],s=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var O=r.current.getTotalLength();O&&s(O)}catch{}},[]);var u=n.x,l=n.y,c=n.width,f=n.height,h=n.radius,p=n.className,m=n.animationEasing,v=n.animationDuration,b=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(u!==+u||l!==+l||c!==+c||f!==+f||c===0||f===0)return null;var S=dn("recharts-rectangle",p);return x?F.createElement(Xa,{canBegin:a>0,from:{width:c,height:f,x:u,y:l},to:{width:c,height:f,x:u,y:l},duration:v,animationEasing:m,isActive:x},function(O){var E=O.width,C=O.height,k=O.x,M=O.y;return F.createElement(Xa,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:w,easing:m},F.createElement("path",Kb({},zt(n,!0),{className:S,d:S$(k,M,E,C,h),ref:r})))}):F.createElement("path",Kb({},zt(n,!0),{className:S,d:S$(u,l,c,f,h)}))};function E6(){return E6=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 K9e(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 q9e=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},G9e=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,s=a===void 0?0:a,u=t.left,l=u===void 0?0:u,c=t.width,f=c===void 0?0:c,h=t.height,p=h===void 0?0:h,m=t.className,v=H9e(t,B9e),b=z9e({x:r,y:o,top:s,left:l,width:f,height:p},v);return!qe(r)||!qe(o)||!qe(f)||!qe(p)||!qe(s)||!qe(l)?null:F.createElement("path",O6({},zt(b,!0),{className:dn("recharts-cross",m),d:q9e(r,o,f,p,s,l)}))},Y9e=lW,Z9e=Y9e(Object.getPrototypeOf,Object),X9e=Z9e,Q9e=Tu,J9e=X9e,e7e=Mu,t7e="[object Object]",n7e=Function.prototype,r7e=Object.prototype,qH=n7e.toString,i7e=r7e.hasOwnProperty,o7e=qH.call(Object);function a7e(e){if(!e7e(e)||Q9e(e)!=t7e)return!1;var t=J9e(e);if(t===null)return!0;var n=i7e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&qH.call(n)==o7e}var s7e=a7e;const u7e=Pn(s7e);var l7e=Tu,c7e=Mu,f7e="[object Boolean]";function d7e(e){return e===!0||e===!1||c7e(e)&&l7e(e)==f7e}var h7e=d7e;const p7e=Pn(h7e);function Kg(e){"@babel/helpers - typeof";return Kg=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},Kg(e)}function qb(){return qb=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:u,y:l},to:{upperWidth:c,lowerWidth:f,height:h,x:u,y:l},duration:v,animationEasing:m,isActive:w},function(S){var O=S.upperWidth,E=S.lowerWidth,C=S.height,k=S.x,M=S.y;return F.createElement(Xa,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:m},F.createElement("path",qb({},zt(n,!0),{className:x,d:P$(k,M,O,E,C),ref:r})))}):F.createElement("g",null,F.createElement("path",qb({},zt(n,!0),{className:x,d:P$(u,l,c,f,h)})))},E7e=["option","shapeType","propTransformer","activeClassName","isActive"];function qg(e){"@babel/helpers - typeof";return qg=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},qg(e)}function O7e(e,t){if(e==null)return{};var n=A7e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function A7e(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 k$(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 Gb(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),Ao(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a?.({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),Ao(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Ao(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Ao(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Ao(r,"handleSlideDragStart",function(i){var o=N$(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return c$e(t,e),a$e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,s=this.props,u=s.gap,l=s.data,c=l.length-1,f=Math.min(i,o),h=Math.max(i,o),p=t.getIndexInRange(a,f),m=t.getIndexInRange(a,h);return{startIndex:p-p%u,endIndex:m===c?c:m-m%u}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,u=Kr(o[r],s,r);return Wt(a)?a(u,r):u}},{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,o=i.slideMoveStartX,a=i.startX,s=i.endX,u=this.props,l=u.x,c=u.width,f=u.travellerWidth,h=u.startIndex,p=u.endIndex,m=u.onChange,v=r.pageX-o;v>0?v=Math.min(v,l+c-f-s,l+c-f-a):v<0&&(v=Math.max(v,l-a,l-s));var b=this.getIndex({startX:a+v,endX:s+v});(b.startIndex!==h||b.endIndex!==p)&&m&&m(b),this.setState({startX:a+v,endX:s+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=N$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,u=i.startX,l=this.state[a],c=this.props,f=c.x,h=c.width,p=c.travellerWidth,m=c.onChange,v=c.gap,b=c.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-o;x>0?x=Math.min(x,f+h-p-l):x<0&&(x=Math.max(x,f-l)),w[a]=l+x;var S=this.getIndex(w),O=S.startIndex,E=S.endIndex,C=function(){var M=b.length-1;return a==="startX"&&(s>u?O%v===0:E%v===0)||su?E%v===0:O%v===0)||s>u&&E===M};this.setState(Ao(Ao({},a,l+x),"brushMoveStartX",r.pageX),function(){m&&C()&&m(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,u=a.startX,l=a.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=l||i==="endX"&&p<=u||this.setState(Ao({},i,p),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,u=r.fill,l=r.stroke;return F.createElement("rect",{stroke:l,fill:u,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,u=r.data,l=r.children,c=r.padding,f=y.Children.only(l);return f?F.cloneElement(f,{x:i,y:o,width:a,height:s,margin:c,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,s=this,u=this.props,l=u.y,c=u.travellerWidth,f=u.height,h=u.traveller,p=u.ariaLabel,m=u.data,v=u.startIndex,b=u.endIndex,w=Math.max(r,this.props.x),x=o3(o3({},zt(this.props,!1)),{},{x:w,y:l,width:c,height:f}),S=p||"Min value: ".concat((o=m[v])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=m[b])===null||a===void 0?void 0:a.name);return F.createElement(Cn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),s.handleTravellerMoveKeyboard(E.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 o=this.props,a=o.y,s=o.height,u=o.stroke,l=o.travellerWidth,c=Math.min(r,i)+l,f=Math.max(Math.abs(i-r)-l,0);return F.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:c,y:a,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,s=r.height,u=r.travellerWidth,l=r.stroke,c=this.state,f=c.startX,h=c.endX,p=5,m={pointerEvents:"none",fill:l};return F.createElement(Cn,{className:"recharts-brush-texts"},F.createElement(Ob,Zb({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:a+s/2},m),this.getTextOfTick(i)),F.createElement(Ob,Zb({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+u+p,y:a+s/2},m),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,s=r.x,u=r.y,l=r.width,c=r.height,f=r.alwaysShowText,h=this.state,p=h.startX,m=h.endX,v=h.isTextActive,b=h.isSlideMoving,w=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!qe(s)||!qe(u)||!qe(l)||!qe(c)||l<=0||c<=0)return null;var S=dn("recharts-brush",o),O=F.Children.count(a)===1,E=i$e("userSelect","none");return F.createElement(Cn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(v||b||w||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,s=r.height,u=r.stroke,l=Math.floor(o+s/2)-1;return F.createElement(F.Fragment,null,F.createElement("rect",{x:i,y:o,width:a,height:s,fill:u,stroke:"none"}),F.createElement("line",{x1:i+1,y1:l,x2:i+a-1,y2:l,fill:"none",stroke:"#fff"}),F.createElement("line",{x1:i+1,y1:l+2,x2:i+a-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return F.isValidElement(r)?o=F.cloneElement(r,i):Wt(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,s=r.x,u=r.travellerWidth,l=r.updateId,c=r.startIndex,f=r.endIndex;if(o!==i.prevData||l!==i.prevUpdateId)return o3({prevData:o,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:a},o&&o.length?d$e({data:o,width:a,x:s,travellerWidth:u,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([s,s+a-u]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:o,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,s=o-1;s-a>1;){var u=Math.floor((a+s)/2);r[u]>i?s=u:a=u}return i>=r[s]?s:a}}])}(y.PureComponent);Ao(ch,"displayName","Brush");Ao(ch,"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 h$e=YA;function p$e(e,t){var n;return h$e(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var g$e=p$e,m$e=tW,v$e=Vl,y$e=g$e,b$e=vo,x$e=zw;function w$e(e,t,n){var r=b$e(e)?m$e:y$e;return n&&x$e(e,t,n)&&(t=void 0),r(e,v$e(t))}var _$e=w$e;const S$e=Pn(_$e);var Ps=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},L$=SW;function C$e(e,t,n){t=="__proto__"&&L$?L$(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var E$e=C$e,O$e=E$e,A$e=wW,P$e=Vl;function k$e(e,t){var n={};return t=P$e(t),A$e(e,function(r,i,o){O$e(n,i,t(r,i,o))}),n}var T$e=k$e;const M$e=Pn(T$e);function R$e(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 Y$e(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 Z$e(e,t){var n=e.x,r=e.y,i=G$e(e,W$e),o="".concat(n),a=parseInt(o,10),s="".concat(r),u=parseInt(s,10),l="".concat(t.height||i.height),c=parseInt(l,10),f="".concat(t.width||i.width),h=parseInt(f,10);return Yp(Yp(Yp(Yp(Yp({},t),i),a?{x:a}:{}),u?{y:u}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function j$(e){return F.createElement(A6,k6({shapeType:"rectangle",propTransformer:Z$e,activeClassName:"recharts-active-bar"},e))}var X$e=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 o=typeof r=="number";return o?t(r,i):(o||rf(),n)}},Q$e=["value","background"],JH;function fh(e){"@babel/helpers - typeof";return fh=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},fh(e)}function J$e(e,t){if(e==null)return{};var n=eIe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eIe(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 Qb(){return Qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(G)0&&Math.abs(Z)0&&(ne=Math.min((ue||0)-(Z[de-1]||0),ne))}),Number.isFinite(ne)){var G=ne/V,q=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(k=G*q/2),v.padding==="no-gap"){var W=ef(t.barCategoryGap,G*q),j=G*q/2;k=j-W-(j-W)/q*W}}}i==="xAxis"?M=[r.left+(S.left||0)+(k||0),r.left+r.width-(S.right||0)-(k||0)]:i==="yAxis"?M=u==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(k||0),r.top+r.height-(S.bottom||0)-(k||0)]:M=v.range,E&&(M=[M[1],M[0]]);var K=XMe(v,o,h),Y=K.scale,oe=K.realScaleType;Y.domain(w).range(M),QMe(Y);var Q=aRe(Y,$a($a({},v),{},{realScaleType:oe}));i==="xAxis"?(H=b==="top"&&!O||b==="bottom"&&O,N=r.left,z=f[C]-H*v.height):i==="yAxis"&&(H=b==="left"&&!O||b==="right"&&O,N=f[C]-H*v.width,z=r.top);var J=$a($a($a({},v),Q),{},{realScaleType:oe,x:N,y:z,scale:Y,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return J.bandSize=Bb(J,Q),!v.hide&&i==="xAxis"?f[C]+=(H?-1:1)*J.height:v.hide||(f[C]+=(H?-1:1)*J.width),$a($a({},p),{},e2({},m,J))},{})},rK=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},dIe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return rK({x:n,y:r},{x:i,y:o})},iK=function(){function e(t){uIe(this,e),this.scale=t}return lIe(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,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();e2(iK,"EPS",1e-4);var EP=function(t){var n=Object.keys(t).reduce(function(r,i){return $a($a({},r),{},e2({},i,iK.create(t[i])))},{});return $a($a({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return M$e(i,function(u,l){return n[l].apply(u,{bandAware:a,position:s})})},isInRange:function(i){return QH(i,function(o,a){return n[a].isInRange(o)})}})};function hIe(e){return(e%180+180)%180}var pIe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=hIe(i),a=o*Math.PI/180,s=Math.atan(r/n),u=a>s&&a-1?i[o?t[a]:a]:void 0}}var bIe=yIe,xIe=GH;function wIe(e){var t=xIe(e),n=t%1;return t===t?n?t-n:t:0}var _Ie=wIe,SIe=gW,CIe=Vl,EIe=_Ie,OIe=Math.max;function AIe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:EIe(n);return i<0&&(i=OIe(r+i,0)),SIe(e,CIe(t),i)}var PIe=AIe,kIe=bIe,TIe=PIe,MIe=kIe(TIe),RIe=MIe;const DIe=Pn(RIe);var $Ie=Nwe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),OP=y.createContext(void 0),AP=y.createContext(void 0),oK=y.createContext(void 0),aK=y.createContext({}),sK=y.createContext(void 0),uK=y.createContext(0),lK=y.createContext(0),W$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,u=t.width,l=t.height,c=$Ie(o);return F.createElement(OP.Provider,{value:r},F.createElement(AP.Provider,{value:i},F.createElement(aK.Provider,{value:o},F.createElement(oK.Provider,{value:c},F.createElement(sK.Provider,{value:a},F.createElement(uK.Provider,{value:l},F.createElement(lK.Provider,{value:u},s)))))))},IIe=function(){return y.useContext(sK)},cK=function(t){var n=y.useContext(OP);n==null&&rf();var r=n[t];return r==null&&rf(),r},NIe=function(){var t=y.useContext(OP);return rl(t)},LIe=function(){var t=y.useContext(AP),n=DIe(t,function(r){return QH(r.domain,Number.isFinite)});return n||rl(t)},fK=function(t){var n=y.useContext(AP);n==null&&rf();var r=n[t];return r==null&&rf(),r},FIe=function(){var t=y.useContext(oK);return t},jIe=function(){return y.useContext(aK)},PP=function(){return y.useContext(lK)},kP=function(){return y.useContext(uK)};function dh(e){"@babel/helpers - typeof";return dh=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},dh(e)}function BIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zIe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function _Ne(e,t){return yK(e,t+1)}function SNe(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,u=0,l=1,c=a,f=function(){var m=r?.[u];if(m===void 0)return{v:yK(r,l)};var v=u,b,w=function(){return b===void 0&&(b=n(m,v)),b},x=m.coordinate,S=u===0||rx(e,x,w,c,s);S||(u=0,c=a,l+=1),S&&(c=x+e*(w()/2+i),u+=l)},h;l<=o.length;)if(h=f(),h)return h.v;return[]}function Qg(e){"@babel/helpers - typeof";return Qg=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},Qg(e)}function Q$(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 Ai(e){for(var t=1;t0?p.coordinate-b*e:p.coordinate})}else o[h]=p=Ai(Ai({},p),{},{tickCoord:p.coordinate});var w=rx(e,p.tickCoord,v,s,u);w&&(u=p.tickCoord-e*(v()/2+i),o[h]=Ai(Ai({},p),{},{isShow:!0}))},c=a-1;c>=0;c--)l(c);return o}function PNe(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,u=t.start,l=t.end;if(o){var c=r[s-1],f=n(c,s-1),h=e*(c.coordinate+e*f/2-l);a[s-1]=c=Ai(Ai({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var p=rx(e,c.tickCoord,function(){return f},u,l);p&&(l=c.tickCoord-e*(f/2+i),a[s-1]=Ai(Ai({},c),{},{isShow:!0}))}for(var m=o?s-1:s,v=function(x){var S=a[x],O,E=function(){return O===void 0&&(O=n(S,x)),O};if(x===0){var C=e*(S.coordinate-e*E()/2-u);a[x]=S=Ai(Ai({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[x]=S=Ai(Ai({},S),{},{tickCoord:S.coordinate});var k=rx(e,S.tickCoord,E,u,l);k&&(u=S.tickCoord+e*(E()/2+i),a[x]=Ai(Ai({},S),{},{isShow:!0}))},b=0;b=2?Ua(i[1].coordinate-i[0].coordinate):1,w=wNe(o,b,p);return u==="equidistantPreserveStart"?SNe(b,w,v,i,a):(u==="preserveStart"||u==="preserveStartEnd"?h=PNe(b,w,v,i,a,u==="preserveStartEnd"):h=ANe(b,w,v,i,a),h.filter(function(x){return x.isShow}))}var kNe=["viewBox"],TNe=["viewBox"],MNe=["ticks"];function gh(e){"@babel/helpers - typeof";return gh=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},gh(e)}function vd(){return vd=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 RNe(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 DNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eI(e,t){for(var n=0;n0?u(this.props):u(p)),a<=0||s<=0||!m||!m.length?null:F.createElement(Cn,{className:dn("recharts-cartesian-axis",l),ref:function(b){r.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),ki.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return F.isValidElement(r)?a=F.cloneElement(r,i):Wt(r)?a=r(i):a=F.createElement(Ob,vd({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(y.Component);DP(np,"displayName","CartesianAxis");DP(np,"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 BNe=["x1","y1","x2","y2","key"],zNe=["offset"];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 tI(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 Ti(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HNe(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 KNe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height,u=t.ry;return F.createElement("rect",{x:i,y:o,ry:u,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function wK(e,t){var n;if(F.isValidElement(e))n=F.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,u=nI(t,BNe),l=zt(u,!1);l.offset;var c=nI(l,zNe);n=F.createElement("line",Oc({},c,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function qNe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,u){var l=Ti(Ti({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(u),index:u});return wK(i,l)});return F.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function GNe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,u){var l=Ti(Ti({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(u),index:u});return wK(i,l)});return F.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function YNe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,u=e.horizontal,l=u===void 0?!0:u;if(!l||!t||!t.length)return null;var c=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var m=!c[p+1],v=m?i+a-h:c[p+1]-h;if(v<=0)return null;var b=p%t.length;return F.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:v,width:o,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return F.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function ZNe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,u=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var c=l.map(function(h){return Math.round(h+o-o)}).sort(function(h,p){return h-p});o!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var m=!c[p+1],v=m?o+s-h:c[p+1]-h;if(v<=0)return null;var b=p%r.length;return F.createElement("rect",{key:"react-".concat(p),x:h,y:a,width:v,height:u,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return F.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var XNe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return DH(RP(Ti(Ti(Ti({},np.defaultProps),r),{},{ticks:su(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},QNe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return DH(RP(Ti(Ti(Ti({},np.defaultProps),r),{},{ticks:su(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Zf={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function JNe(e){var t,n,r,i,o,a,s=PP(),u=kP(),l=jIe(),c=Ti(Ti({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Zf.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Zf.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Zf.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Zf.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Zf.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Zf.verticalFill,x:qe(e.x)?e.x:l.left,y:qe(e.y)?e.y:l.top,width:qe(e.width)?e.width:l.width,height:qe(e.height)?e.height:l.height}),f=c.x,h=c.y,p=c.width,m=c.height,v=c.syncWithTicks,b=c.horizontalValues,w=c.verticalValues,x=NIe(),S=LIe();if(!qe(p)||p<=0||!qe(m)||m<=0||!qe(f)||f!==+f||!qe(h)||h!==+h)return null;var O=c.verticalCoordinatesGenerator||XNe,E=c.horizontalCoordinatesGenerator||QNe,C=c.horizontalPoints,k=c.verticalPoints;if((!C||!C.length)&&Wt(E)){var M=b&&b.length,N=E({yAxis:S?Ti(Ti({},S),{},{ticks:M?b:S.ticks}):void 0,width:s,height:u,offset:l},M?!0:v);du(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(of(N),"]")),Array.isArray(N)&&(C=N)}if((!k||!k.length)&&Wt(O)){var z=w&&w.length,H=O({xAxis:x?Ti(Ti({},x),{},{ticks:z?w:x.ticks}):void 0,width:s,height:u,offset:l},z?!0:v);du(Array.isArray(H),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(of(H),"]")),Array.isArray(H)&&(k=H)}return F.createElement("g",{className:"recharts-cartesian-grid"},F.createElement(KNe,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),F.createElement(qNe,Oc({},c,{offset:l,horizontalPoints:C,xAxis:x,yAxis:S})),F.createElement(GNe,Oc({},c,{offset:l,verticalPoints:k,xAxis:x,yAxis:S})),F.createElement(YNe,Oc({},c,{horizontalPoints:C})),F.createElement(ZNe,Oc({},c,{verticalPoints:k})))}JNe.displayName="CartesianGrid";var eLe=["type","layout","connectNulls","ref"],tLe=["key"];function mh(e){"@babel/helpers - typeof";return mh=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},mh(e)}function rI(e,t){if(e==null)return{};var n=nLe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nLe(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 A0(){return A0=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(Xf(u.slice(0,m)),[f-v]);break}var b=p.length%2===0?[0,h]:[h];return[].concat(Xf(t.repeat(u,c)),Xf(p),b).map(function(w){return"".concat(w,"px")}).join(", ")}),Ia(n,"id",vf("recharts-line-")),Ia(n,"pathRef",function(a){n.mainCurve=a}),Ia(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Ia(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return dLe(t,e),uLe(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 o=this.props,a=o.points,s=o.xAxis,u=o.yAxis,l=o.layout,c=o.children,f=po(c,Jh);if(!f)return null;var h=function(v,b){return{x:v.x,y:v.y,value:v.value,errorVal:Kr(v.payload,b)}},p={clipPath:r?"url(#clipPath-".concat(i,")"):null};return F.createElement(Cn,p,f.map(function(m){return F.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:a,xAxis:s,yAxis:u,layout:l,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,u=s.dot,l=s.points,c=s.dataKey,f=zt(this.props,!1),h=zt(u,!0),p=l.map(function(v,b){var w=Oo(Oo(Oo({key:"dot-".concat(b),r:3},f),h),{},{value:v.value,dataKey:c,cx:v.x,cy:v.y,index:b,payload:v.payload});return t.renderDotItem(u,w)}),m={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return F.createElement(Cn,A0({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(r,i,o,a){var s=this.props,u=s.type,l=s.layout,c=s.connectNulls;s.ref;var f=rI(s,eLe),h=Oo(Oo(Oo({},zt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:u,layout:l,connectNulls:c});return F.createElement(Ic,A0({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,u=a.strokeDasharray,l=a.isAnimationActive,c=a.animationBegin,f=a.animationDuration,h=a.animationEasing,p=a.animationId,m=a.animateNewValues,v=a.width,b=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return F.createElement(Xa,{begin:c,duration:f,isActive:l,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var E=O.t;if(x){var C=x.length/s.length,k=s.map(function(V,ne){var Z=Math.floor(ne*C);if(x[Z]){var G=x[Z],q=Er(G.x,V.x),W=Er(G.y,V.y);return Oo(Oo({},V),{},{x:q(E),y:W(E)})}if(m){var j=Er(v*2,V.x),K=Er(b/2,V.y);return Oo(Oo({},V),{},{x:j(E),y:K(E)})}return Oo(Oo({},V),{},{x:V.x,y:V.y})});return o.renderCurveStatically(k,r,i)}var M=Er(0,S),N=M(E),z;if(u){var H="".concat(u).split(/[,\s]+/gim).map(function(V){return parseFloat(V)});z=o.getStrokeDasharray(N,S,H)}else z=o.generateSimpleStrokeDasharray(S,N);return o.renderCurveStatically(s,r,i,{strokeDasharray:z})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,s=o.isAnimationActive,u=this.state,l=u.prevPoints,c=u.totalLength;return s&&a&&a.length&&(!l&&c>0||!tf(l,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,u=i.className,l=i.xAxis,c=i.yAxis,f=i.top,h=i.left,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=dn("recharts-line",u),O=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,C=O||E,k=Ut(b)?this.id:b,M=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},N=M.r,z=N===void 0?3:N,H=M.strokeWidth,V=H===void 0?2:H,ne=OV(a)?a:{},Z=ne.clipDot,G=Z===void 0?!0:Z,q=z*2+V;return F.createElement(Cn,{className:S},O||E?F.createElement("defs",null,F.createElement("clipPath",{id:"clipPath-".concat(k)},F.createElement("rect",{x:O?h:h-p/2,y:E?f:f-m/2,width:O?p:p*2,height:E?m:m*2})),!G&&F.createElement("clipPath",{id:"clipPath-dots-".concat(k)},F.createElement("rect",{x:h-q/2,y:f-q/2,width:p+q,height:m+q}))):null,!x&&this.renderCurve(C,k),this.renderErrorBar(C,k),(x||a)&&this.renderDots(C,G,k),(!v||w)&&As.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 o=r.length%2!==0?[].concat(Xf(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mLe(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 Ac(){return Ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!tf(c,a)||!tf(f,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,u=i.className,l=i.top,c=i.left,f=i.xAxis,h=i.yAxis,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=dn("recharts-area",u),O=f&&f.allowDataOverflow,E=h&&h.allowDataOverflow,C=O||E,k=Ut(b)?this.id:b,M=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},N=M.r,z=N===void 0?3:N,H=M.strokeWidth,V=H===void 0?2:H,ne=OV(a)?a:{},Z=ne.clipDot,G=Z===void 0?!0:Z,q=z*2+V;return F.createElement(Cn,{className:S},O||E?F.createElement("defs",null,F.createElement("clipPath",{id:"clipPath-".concat(k)},F.createElement("rect",{x:O?c:c-p/2,y:E?l:l-m/2,width:O?p:p*2,height:E?m:m*2})),!G&&F.createElement("clipPath",{id:"clipPath-dots-".concat(k)},F.createElement("rect",{x:c-q/2,y:l-q/2,width:p+q,height:m+q}))):null,x?null:this.renderArea(C,k),(a||x)&&this.renderDots(C,G,k),(!v||w)&&As.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}}])}(y.PureComponent);CK=xf;bs(xf,"displayName","Area");bs(xf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ka.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});bs(xf,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(qe(s)&&typeof s=="number")return s;var u=i==="horizontal"?r:n,l=u.scale.domain();if(u.type==="number"){var c=Math.max(l[0],l[1]),f=Math.min(l[0],l[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]});bs(xf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,u=e.dataKey,l=e.stackedData,c=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,m=l&&l.length,v=CK.getBaseValue(t,n,r,i),b=p==="horizontal",w=!1,x=f.map(function(O,E){var C;m?C=l[c+E]:(C=Kr(O,u),Array.isArray(C)?w=!0:C=[v,C]);var k=C[1]==null||m&&Kr(O,u)==null;return b?{x:sh({axis:r,ticks:o,bandSize:s,entry:O,index:E}),y:k?null:i.scale(C[1]),value:C,payload:O}:{x:k?null:r.scale(C[1]),y:sh({axis:i,ticks:a,bandSize:s,entry:O,index:E}),value:C,payload:O}}),S;return m||w?S=x.map(function(O){var E=Array.isArray(O.value)?O.value[0]:null;return b?{x:O.x,y:E!=null&&O.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:O.y}}):S=b?i.scale(v):r.scale(v),Yu({points:x,baseLine:S,layout:p,isRange:w},h)});bs(xf,"renderDotItem",function(e,t){var n;if(F.isValidElement(e))n=F.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=dn("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=EK(t,gLe);n=F.createElement(Xw,Ac({},o,{key:i,className:r}))}return n});function yh(e){"@babel/helpers - typeof";return yh=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},yh(e)}function CLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ELe(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Le(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 ILe(e){var t=e.option,n=e.isActive,r=DLe(e,RLe);return typeof t=="string"?F.createElement(A6,P0({option:F.createElement(Fw,P0({type:t},r)),isActive:n,shapeType:"symbols"},r)):F.createElement(A6,P0({option:t,isActive:n,shapeType:"symbols"},r))}function bh(e){"@babel/helpers - typeof";return bh=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},bh(e)}function k0(){return k0=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 kFe(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 TFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MFe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&qe(i)&&qe(o)?t.slice(i,o+1):[]};function qK(e){return e==="number"?[0,"auto"]:void 0}var X6=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=u2(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(u,l){var c,f=(c=l.props.data)!==null&&c!==void 0?c:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var p=f===void 0?s:f;h=fb(p,a.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(Sh(u),[IH(l,h)]):u},[])},gI=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=VFe(o,r),s=t.orderedTooltipTicks,u=t.tooltipAxis,l=t.tooltipTicks,c=HMe(a,s,l,u);if(c>=0&&l){var f=l[c]&&l[c].value,h=X6(t,n,c,f),p=WFe(r,s,c,o);return{activeTooltipIndex:c,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},HFe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,f=t.children,h=t.stackOffset,p=RH(c,o);return r.reduce(function(m,v){var b,w=v.type.defaultProps!==void 0?Ee(Ee({},v.type.defaultProps),v.props):v.props,x=w.type,S=w.dataKey,O=w.allowDataOverflow,E=w.allowDuplicatedCategory,C=w.scale,k=w.ticks,M=w.includeHidden,N=w[a];if(m[N])return m;var z=u2(t.data,{graphicalItems:i.filter(function(Q){var J,ue=a in Q.props?Q.props[a]:(J=Q.type.defaultProps)===null||J===void 0?void 0:J[a];return ue===N}),dataStartIndex:u,dataEndIndex:l}),H=z.length,V,ne,Z;vFe(w.domain,O,x)&&(V=f6(w.domain,null,O),p&&(x==="number"||C!=="auto")&&(Z=E0(z,S,"category")));var G=qK(x);if(!V||V.length===0){var q,W=(q=w.domain)!==null&&q!==void 0?q:G;if(S){if(V=E0(z,S,x),x==="category"&&p){var j=D2e(V);E&&j?(ne=V,V=Yb(0,H)):E||(V=V7(W,V,v).reduce(function(Q,J){return Q.indexOf(J)>=0?Q:[].concat(Sh(Q),[J])},[]))}else if(x==="category")E?V=V.filter(function(Q){return Q!==""&&!Ut(Q)}):V=V7(W,V,v).reduce(function(Q,J){return Q.indexOf(J)>=0||J===""||Ut(J)?Q:[].concat(Sh(Q),[J])},[]);else if(x==="number"){var K=ZMe(z,i.filter(function(Q){var J,ue,de=a in Q.props?Q.props[a]:(J=Q.type.defaultProps)===null||J===void 0?void 0:J[a],Se="hide"in Q.props?Q.props.hide:(ue=Q.type.defaultProps)===null||ue===void 0?void 0:ue.hide;return de===N&&(M||!Se)}),S,o,c);K&&(V=K)}p&&(x==="number"||C!=="auto")&&(Z=E0(z,S,"category"))}else p?V=Yb(0,H):s&&s[N]&&s[N].hasStack&&x==="number"?V=h==="expand"?[0,1]:$H(s[N].stackGroups,u,l):V=MH(z,i.filter(function(Q){var J=a in Q.props?Q.props[a]:Q.type.defaultProps[a],ue="hide"in Q.props?Q.props.hide:Q.type.defaultProps.hide;return J===N&&(M||!ue)}),x,c,!0);if(x==="number")V=G6(f,V,N,o,k),W&&(V=f6(W,V,O));else if(x==="category"&&W){var Y=W,oe=V.every(function(Q){return Y.indexOf(Q)>=0});oe&&(V=Y)}}return Ee(Ee({},m),{},kt({},N,Ee(Ee({},w),{},{axisType:o,domain:V,categoricalDomain:Z,duplicateDomain:ne,originalDomain:(b=w.domain)!==null&&b!==void 0?b:G,isCategorical:p,layout:c})))},{})},KFe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,f=t.children,h=u2(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:l}),p=h.length,m=RH(c,o),v=-1;return r.reduce(function(b,w){var x=w.type.defaultProps!==void 0?Ee(Ee({},w.type.defaultProps),w.props):w.props,S=x[a],O=qK("number");if(!b[S]){v++;var E;return m?E=Yb(0,p):s&&s[S]&&s[S].hasStack?(E=$H(s[S].stackGroups,u,l),E=G6(f,E,S,o)):(E=f6(O,MH(h,r.filter(function(C){var k,M,N=a in C.props?C.props[a]:(k=C.type.defaultProps)===null||k===void 0?void 0:k[a],z="hide"in C.props?C.props.hide:(M=C.type.defaultProps)===null||M===void 0?void 0:M.hide;return N===S&&!z}),"number",c),i.defaultProps.allowDataOverflow),E=G6(f,E,S,o)),Ee(Ee({},b),{},kt({},S,Ee(Ee({axisType:o},i.defaultProps),{},{hide:!0,orientation:pa(zFe,"".concat(o,".").concat(v%2),null),domain:E,originalDomain:O,isCategorical:m,layout:c})))}return b},{})},qFe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.children,f="".concat(i,"Id"),h=po(c,o),p={};return h.length?p=HFe(t,{axes:h,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l}):a&&a.length&&(p=KFe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l})),p},GFe=function(t){var n=rl(t),r=su(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:ZA(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Bb(n,r)}},mI=function(t){var n=t.children,r=t.defaultShowTooltip,i=To(n,ch),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},YFe=function(t){return!t||!t.length?!1:t.some(function(n){var r=fu(n&&n.type);return r&&r.indexOf("Bar")>=0})},vI=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"}},ZFe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,u=s===void 0?{}:s,l=r.width,c=r.height,f=r.children,h=r.margin||{},p=To(f,ch),m=To(f,Dd),v=Object.keys(u).reduce(function(E,C){var k=u[C],M=k.orientation;return!k.mirror&&!k.hide?Ee(Ee({},E),{},kt({},M,E[M]+k.width)):E},{left:h.left||0,right:h.right||0}),b=Object.keys(a).reduce(function(E,C){var k=a[C],M=k.orientation;return!k.mirror&&!k.hide?Ee(Ee({},E),{},kt({},M,pa(E,"".concat(M))+k.height)):E},{top:h.top||0,bottom:h.bottom||0}),w=Ee(Ee({},b),v),x=w.bottom;p&&(w.bottom+=p.props.height||ch.defaultProps.height),m&&n&&(w=GMe(w,i,r,n));var S=l-w.left-w.right,O=c-w.top-w.bottom;return Ee(Ee({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(O,0)})},XFe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},QFe=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,u=t.axisComponents,l=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,h=function(w,x){var S=x.graphicalItems,O=x.stackGroups,E=x.offset,C=x.updateId,k=x.dataStartIndex,M=x.dataEndIndex,N=w.barSize,z=w.layout,H=w.barGap,V=w.barCategoryGap,ne=w.maxBarSize,Z=vI(z),G=Z.numericAxisName,q=Z.cateAxisName,W=YFe(S),j=[];return S.forEach(function(K,Y){var oe=u2(w.data,{graphicalItems:[K],dataStartIndex:k,dataEndIndex:M}),Q=K.type.defaultProps!==void 0?Ee(Ee({},K.type.defaultProps),K.props):K.props,J=Q.dataKey,ue=Q.maxBarSize,de=Q["".concat(G,"Id")],Se=Q["".concat(q,"Id")],me={},Ze=u.reduce(function(Ue,je){var ke=x["".concat(je.axisType,"Map")],nt=Q["".concat(je.axisType,"Id")];ke&&ke[nt]||je.axisType==="zAxis"||rf();var mt=ke[nt];return Ee(Ee({},Ue),{},kt(kt({},je.axisType,mt),"".concat(je.axisType,"Ticks"),su(mt)))},me),Ae=Ze[q],Le=Ze["".concat(q,"Ticks")],$e=O&&O[de]&&O[de].hasStack&&uRe(K,O[de].stackGroups),be=fu(K.type).indexOf("Bar")>=0,yt=Bb(Ae,Le),lt=[],Nt=W&&KMe({barSize:N,stackGroups:O,totalSize:XFe(Ze,q)});if(be){var yn,nn,ie=Ut(ue)?ne:ue,pe=(yn=(nn=Bb(Ae,Le,!0))!==null&&nn!==void 0?nn:ie)!==null&&yn!==void 0?yn:0;lt=qMe({barGap:H,barCategoryGap:V,bandSize:pe!==yt?pe:yt,sizeList:Nt[Se],maxBarSize:ie}),pe!==yt&&(lt=lt.map(function(Ue){return Ee(Ee({},Ue),{},{position:Ee(Ee({},Ue.position),{},{offset:Ue.position.offset-pe/2})})}))}var ye=K&&K.type&&K.type.getComposedData;ye&&j.push({props:Ee(Ee({},ye(Ee(Ee({},Ze),{},{displayedData:oe,props:w,dataKey:J,item:K,bandSize:yt,barPosition:lt,offset:E,stackedData:$e,layout:z,dataStartIndex:k,dataEndIndex:M}))),{},kt(kt(kt({key:K.key||"item-".concat(Y)},G,Ze[G]),q,Ze[q]),"animationId",C)),childIndex:H2e(K,w.children),item:K})}),j},p=function(w,x){var S=w.props,O=w.dataStartIndex,E=w.dataEndIndex,C=w.updateId;if(!LD({props:S}))return null;var k=S.children,M=S.layout,N=S.stackOffset,z=S.data,H=S.reverseStackOrder,V=vI(M),ne=V.numericAxisName,Z=V.cateAxisName,G=po(k,r),q=oRe(z,G,"".concat(ne,"Id"),"".concat(Z,"Id"),N,H),W=u.reduce(function(Q,J){var ue="".concat(J.axisType,"Map");return Ee(Ee({},Q),{},kt({},ue,qFe(S,Ee(Ee({},J),{},{graphicalItems:G,stackGroups:J.axisType===ne&&q,dataStartIndex:O,dataEndIndex:E}))))},{}),j=ZFe(Ee(Ee({},W),{},{props:S,graphicalItems:G}),x?.legendBBox);Object.keys(W).forEach(function(Q){W[Q]=c(S,W[Q],j,Q.replace("Map",""),n)});var K=W["".concat(Z,"Map")],Y=GFe(K),oe=h(S,Ee(Ee({},W),{},{dataStartIndex:O,dataEndIndex:E,updateId:C,graphicalItems:G,stackGroups:q,offset:j}));return Ee(Ee({formattedGraphicalItems:oe,graphicalItems:G,offset:j,stackGroups:q},Y),W)},m=function(b){function w(x){var S,O,E;return TFe(this,w),E=DFe(this,w,[x]),kt(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),kt(E,"accessibilityManager",new mFe),kt(E,"handleLegendBBoxUpdate",function(C){if(C){var k=E.state,M=k.dataStartIndex,N=k.dataEndIndex,z=k.updateId;E.setState(Ee({legendBBox:C},p({props:E.props,dataStartIndex:M,dataEndIndex:N,updateId:z},Ee(Ee({},E.state),{},{legendBBox:C}))))}}),kt(E,"handleReceiveSyncEvent",function(C,k,M){if(E.props.syncId===C){if(M===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(k)}}),kt(E,"handleBrushChange",function(C){var k=C.startIndex,M=C.endIndex;if(k!==E.state.dataStartIndex||M!==E.state.dataEndIndex){var N=E.state.updateId;E.setState(function(){return Ee({dataStartIndex:k,dataEndIndex:M},p({props:E.props,dataStartIndex:k,dataEndIndex:M,updateId:N},E.state))}),E.triggerSyncEvent({dataStartIndex:k,dataEndIndex:M})}}),kt(E,"handleMouseEnter",function(C){var k=E.getMouseInfo(C);if(k){var M=Ee(Ee({},k),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var N=E.props.onMouseEnter;Wt(N)&&N(M,C)}}),kt(E,"triggeredAfterMouseMove",function(C){var k=E.getMouseInfo(C),M=k?Ee(Ee({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(M),E.triggerSyncEvent(M);var N=E.props.onMouseMove;Wt(N)&&N(M,C)}),kt(E,"handleItemMouseEnter",function(C){E.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),kt(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),kt(E,"handleMouseMove",function(C){C.persist(),E.throttleTriggeredAfterMouseMove(C)}),kt(E,"handleMouseLeave",function(C){E.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};E.setState(k),E.triggerSyncEvent(k);var M=E.props.onMouseLeave;Wt(M)&&M(k,C)}),kt(E,"handleOuterEvent",function(C){var k=W2e(C),M=pa(E.props,"".concat(k));if(k&&Wt(M)){var N,z;/.*touch.*/i.test(k)?z=E.getMouseInfo(C.changedTouches[0]):z=E.getMouseInfo(C),M((N=z)!==null&&N!==void 0?N:{},C)}}),kt(E,"handleClick",function(C){var k=E.getMouseInfo(C);if(k){var M=Ee(Ee({},k),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var N=E.props.onClick;Wt(N)&&N(M,C)}}),kt(E,"handleMouseDown",function(C){var k=E.props.onMouseDown;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleMouseUp",function(C){var k=E.props.onMouseUp;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),kt(E,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseDown(C.changedTouches[0])}),kt(E,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseUp(C.changedTouches[0])}),kt(E,"handleDoubleClick",function(C){var k=E.props.onDoubleClick;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleContextMenu",function(C){var k=E.props.onContextMenu;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"triggerSyncEvent",function(C){E.props.syncId!==void 0&&s3.emit(u3,E.props.syncId,C,E.eventEmitterSymbol)}),kt(E,"applySyncEvent",function(C){var k=E.props,M=k.layout,N=k.syncMethod,z=E.state.updateId,H=C.dataStartIndex,V=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)E.setState(Ee({dataStartIndex:H,dataEndIndex:V},p({props:E.props,dataStartIndex:H,dataEndIndex:V,updateId:z},E.state)));else if(C.activeTooltipIndex!==void 0){var ne=C.chartX,Z=C.chartY,G=C.activeTooltipIndex,q=E.state,W=q.offset,j=q.tooltipTicks;if(!W)return;if(typeof N=="function")G=N(j,C);else if(N==="value"){G=-1;for(var K=0;K=0){var $e,be;if(ne.dataKey&&!ne.allowDuplicatedCategory){var yt=typeof ne.dataKey=="function"?Le:"payload.".concat(ne.dataKey.toString());$e=fb(K,yt,G),be=Y&&oe&&fb(oe,yt,G)}else $e=K?.[Z],be=Y&&oe&&oe[Z];if(Se||de){var lt=C.props.activeIndex!==void 0?C.props.activeIndex:Z;return[y.cloneElement(C,Ee(Ee(Ee({},N.props),Ze),{},{activeIndex:lt})),null,null]}if(!Ut($e))return[Ae].concat(Sh(E.renderActivePoints({item:N,activePoint:$e,basePoint:be,childIndex:Z,isRange:Y})))}else{var Nt,yn=(Nt=E.getItemByXY(E.state.activeCoordinate))!==null&&Nt!==void 0?Nt:{graphicalItem:Ae},nn=yn.graphicalItem,ie=nn.item,pe=ie===void 0?C:ie,ye=nn.childIndex,Ue=Ee(Ee(Ee({},N.props),Ze),{},{activeIndex:ye});return[y.cloneElement(pe,Ue),null,null]}return Y?[Ae,null,null]:[Ae,null]}),kt(E,"renderCustomized",function(C,k,M){return y.cloneElement(C,Ee(Ee({key:"recharts-customized-".concat(M)},E.props),E.state))}),kt(E,"renderMap",{CartesianGrid:{handler:Ey,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:Ey},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:Ey},YAxis:{handler:Ey},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:vf("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=kW(E.triggeredAfterMouseMove,(O=x.throttleDelay)!==null&&O!==void 0?O:1e3/60),E.state={},E}return NFe(w,b),RFe(w,[{key:"componentDidMount",value:function(){var S,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,O=S.children,E=S.data,C=S.height,k=S.layout,M=To(O,Js);if(M){var N=M.props.defaultIndex;if(!(typeof N!="number"||N<0||N>this.state.tooltipTicks.length-1)){var z=this.state.tooltipTicks[N]&&this.state.tooltipTicks[N].value,H=X6(this.state,E,N,z),V=this.state.tooltipTicks[N].coordinate,ne=(this.state.offset.top+C)/2,Z=k==="horizontal",G=Z?{x:V,y:ne}:{y:V,x:ne},q=this.state.formattedGraphicalItems.find(function(j){var K=j.item;return K.type.name==="Scatter"});q&&(G=Ee(Ee({},G),q.props.points[N].tooltipPosition),H=q.props.points[N].tooltipPayload);var W={activeTooltipIndex:N,isTooltipActive:!0,activeLabel:z,activePayload:H,activeCoordinate:G};this.setState(W),this.renderCursor(M),this.accessibilityManager.setIndex(N)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var E,C;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){OE([To(S.children,Js)],[To(this.props.children,Js)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=To(this.props.children,Js);if(S&&typeof S.props.shared=="boolean"){var O=S.props.shared?"axis":"item";return s.indexOf(O)>=0?O:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var O=this.container,E=O.getBoundingClientRect(),C=v5e(E),k={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},M=E.width/O.offsetWidth||1,N=this.inRange(k.chartX,k.chartY,M);if(!N)return null;var z=this.state,H=z.xAxisMap,V=z.yAxisMap,ne=this.getTooltipEventType();if(ne!=="axis"&&H&&V){var Z=rl(H).scale,G=rl(V).scale,q=Z&&Z.invert?Z.invert(k.chartX):null,W=G&&G.invert?G.invert(k.chartY):null;return Ee(Ee({},k),{},{xValue:q,yValue:W})}var j=gI(this.state,this.props.data,this.props.layout,N);return j?Ee(Ee({},k),j):null}},{key:"inRange",value:function(S,O){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,k=S/E,M=O/E;if(C==="horizontal"||C==="vertical"){var N=this.state.offset,z=k>=N.left&&k<=N.left+N.width&&M>=N.top&&M<=N.top+N.height;return z?{x:k,y:M}:null}var H=this.state,V=H.angleAxisMap,ne=H.radiusAxisMap;if(V&&ne){var Z=rl(V);return K7({x:k,y:M},Z)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,O=this.getTooltipEventType(),E=To(S,Js),C={};E&&O==="axis"&&(E.props.trigger==="click"?C={onClick:this.handleClick}:C={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 k=db(this.props,this.handleOuterEvent);return Ee(Ee({},k),C)}},{key:"addListener",value:function(){s3.on(u3,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){s3.removeListener(u3,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,O,E){for(var C=this.state.formattedGraphicalItems,k=0,M=C.length;k{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:u="automatic",...l}=e,c=Cm(s),[f,h]=Za({prop:r,onChange:i,defaultProp:o});return I.jsx(eje,{scope:n,baseId:Fo(),value:f,onValueChange:h,orientation:a,dir:c,activationMode:u,children:I.jsx(pt.div,{dir:c,"data-orientation":a,...l,ref:t})})});YK.displayName=NP;var ZK="TabsList",XK=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=LP(ZK,n),a=GK(n);return I.jsx(Wz,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:I.jsx(pt.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});XK.displayName=ZK;var QK="TabsTrigger",JK=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=LP(QK,n),s=GK(n),u=nq(a.baseId,r),l=rq(a.baseId,r),c=r===a.value;return I.jsx(Hz,{asChild:!0,...s,focusable:!i,active:c,children:I.jsx(pt.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":l,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:t,onMouseDown:Ye(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?a.onValueChange(r):f.preventDefault()}),onKeyDown:Ye(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(r)}),onFocus:Ye(e.onFocus,()=>{const f=a.activationMode!=="manual";!c&&!i&&f&&a.onValueChange(r)})})})});JK.displayName=QK;var eq="TabsContent",tq=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,s=LP(eq,n),u=nq(s.baseId,r),l=rq(s.baseId,r),c=r===s.value,f=y.useRef(c);return y.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),I.jsx(Gr,{present:i||c,children:({present:h})=>I.jsx(pt.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:l,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&o})})});tq.displayName=eq;function nq(e,t){return`${e}-trigger-${t}`}function rq(e,t){return`${e}-content-${t}`}var MXe=YK,RXe=XK,DXe=JK,$Xe=tq;function Q6(e,[t,n]){return Math.min(n,Math.max(t,e))}function FP(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var tje=[" ","Enter","ArrowUp","ArrowDown"],nje=[" ","Enter"],Bm="Select",[l2,c2,rje]=nA(Bm),[rp,IXe]=vi(Bm,[rje,zl]),f2=zl(),[ije,ql]=rp(Bm),[oje,aje]=rp(Bm),iq=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:s,onValueChange:u,dir:l,name:c,autoComplete:f,disabled:h,required:p,form:m}=e,v=f2(t),[b,w]=y.useState(null),[x,S]=y.useState(null),[O,E]=y.useState(!1),C=Cm(l),[k=!1,M]=Za({prop:r,defaultProp:i,onChange:o}),[N,z]=Za({prop:a,defaultProp:s,onChange:u}),H=y.useRef(null),V=b?m||!!b.closest("form"):!0,[ne,Z]=y.useState(new Set),G=Array.from(ne).map(q=>q.props.value).join(";");return I.jsx(aw,{...v,children:I.jsxs(ije,{required:p,scope:t,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:O,onValueNodeHasChildrenChange:E,contentId:Fo(),value:N,onValueChange:z,open:k,onOpenChange:M,dir:C,triggerPointerDownPosRef:H,disabled:h,children:[I.jsx(l2.Provider,{scope:t,children:I.jsx(oje,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(q=>{Z(W=>new Set(W).add(q))},[]),onNativeOptionRemove:y.useCallback(q=>{Z(W=>{const j=new Set(W);return j.delete(q),j})},[]),children:n})}),V?I.jsxs(Tq,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:f,value:N,onChange:q=>z(q.target.value),disabled:h,form:m,children:[N===void 0?I.jsx("option",{value:""}):null,Array.from(ne)]},G):null]})})};iq.displayName=Bm;var oq="SelectTrigger",aq=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=f2(n),a=ql(oq,n),s=a.disabled||r,u=Gt(t,a.onTriggerChange),l=c2(n),c=y.useRef("touch"),[f,h,p]=Mq(v=>{const b=l().filter(S=>!S.disabled),w=b.find(S=>S.value===a.value),x=Rq(b,v,w);x!==void 0&&a.onValueChange(x.value)}),m=v=>{s||(a.onOpenChange(!0),p()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return I.jsx(Om,{asChild:!0,...o,children:I.jsx(pt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":kq(a.value)?"":void 0,...i,ref:u,onClick:Ye(i.onClick,v=>{v.currentTarget.focus(),c.current!=="mouse"&&m(v)}),onPointerDown:Ye(i.onPointerDown,v=>{c.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(m(v),v.preventDefault())}),onKeyDown:Ye(i.onKeyDown,v=>{const b=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&h(v.key),!(b&&v.key===" ")&&tje.includes(v.key)&&(m(),v.preventDefault())})})})});aq.displayName=oq;var sq="SelectValue",uq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...s}=e,u=ql(sq,n),{onValueNodeHasChildrenChange:l}=u,c=o!==void 0,f=Gt(t,u.onValueNodeChange);return ii(()=>{l(c)},[l,c]),I.jsx(pt.span,{...s,ref:f,style:{pointerEvents:"none"},children:kq(u.value)?I.jsx(I.Fragment,{children:a}):o})});uq.displayName=sq;var sje="SelectIcon",lq=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return I.jsx(pt.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});lq.displayName=sje;var uje="SelectPortal",cq=e=>I.jsx(Lh,{asChild:!0,...e});cq.displayName=uje;var af="SelectContent",fq=y.forwardRef((e,t)=>{const n=ql(af,e.__scopeSelect),[r,i]=y.useState();if(ii(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Au.createPortal(I.jsx(dq,{scope:e.__scopeSelect,children:I.jsx(l2.Slot,{scope:e.__scopeSelect,children:I.jsx("div",{children:e.children})})}),o):null}return I.jsx(hq,{...e,ref:t})});fq.displayName=af;var Ta=10,[dq,Gl]=rp(af),lje="SelectContentImpl",hq=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b,...w}=e,x=ql(af,n),[S,O]=y.useState(null),[E,C]=y.useState(null),k=Gt(t,me=>O(me)),[M,N]=y.useState(null),[z,H]=y.useState(null),V=c2(n),[ne,Z]=y.useState(!1),G=y.useRef(!1);y.useEffect(()=>{if(S)return Sm(S)},[S]),nw();const q=y.useCallback(me=>{const[Ze,...Ae]=V().map(be=>be.ref.current),[Le]=Ae.slice(-1),$e=document.activeElement;for(const be of me)if(be===$e||(be?.scrollIntoView({block:"nearest"}),be===Ze&&E&&(E.scrollTop=0),be===Le&&E&&(E.scrollTop=E.scrollHeight),be?.focus(),document.activeElement!==$e))return},[V,E]),W=y.useCallback(()=>q([M,S]),[q,M,S]);y.useEffect(()=>{ne&&W()},[ne,W]);const{onOpenChange:j,triggerPointerDownPosRef:K}=x;y.useEffect(()=>{if(S){let me={x:0,y:0};const Ze=Le=>{me={x:Math.abs(Math.round(Le.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(Le.pageY)-(K.current?.y??0))}},Ae=Le=>{me.x<=10&&me.y<=10?Le.preventDefault():S.contains(Le.target)||j(!1),document.removeEventListener("pointermove",Ze),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",Ze),document.addEventListener("pointerup",Ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ze),document.removeEventListener("pointerup",Ae,{capture:!0})}}},[S,j,K]),y.useEffect(()=>{const me=()=>j(!1);return window.addEventListener("blur",me),window.addEventListener("resize",me),()=>{window.removeEventListener("blur",me),window.removeEventListener("resize",me)}},[j]);const[Y,oe]=Mq(me=>{const Ze=V().filter($e=>!$e.disabled),Ae=Ze.find($e=>$e.ref.current===document.activeElement),Le=Rq(Ze,me,Ae);Le&&setTimeout(()=>Le.ref.current.focus())}),Q=y.useCallback((me,Ze,Ae)=>{const Le=!G.current&&!Ae;(x.value!==void 0&&x.value===Ze||Le)&&(N(me),Le&&(G.current=!0))},[x.value]),J=y.useCallback(()=>S?.focus(),[S]),ue=y.useCallback((me,Ze,Ae)=>{const Le=!G.current&&!Ae;(x.value!==void 0&&x.value===Ze||Le)&&H(me)},[x.value]),de=r==="popper"?J6:pq,Se=de===J6?{side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b}:{};return I.jsx(dq,{scope:n,content:S,viewport:E,onViewportChange:C,itemRefCallback:Q,selectedItem:M,onItemLeave:J,itemTextRefCallback:ue,focusSelectedItem:W,selectedItemText:z,position:r,isPositioned:ne,searchRef:Y,children:I.jsx(_m,{as:Al,allowPinchZoom:!0,children:I.jsx(wm,{asChild:!0,trapped:x.open,onMountAutoFocus:me=>{me.preventDefault()},onUnmountAutoFocus:Ye(i,me=>{x.trigger?.focus({preventScroll:!0}),me.preventDefault()}),children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:me=>me.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:I.jsx(de,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:me=>me.preventDefault(),...w,...Se,onPlaced:()=>Z(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ye(w.onKeyDown,me=>{const Ze=me.ctrlKey||me.altKey||me.metaKey;if(me.key==="Tab"&&me.preventDefault(),!Ze&&me.key.length===1&&oe(me.key),["ArrowUp","ArrowDown","Home","End"].includes(me.key)){let Le=V().filter($e=>!$e.disabled).map($e=>$e.ref.current);if(["ArrowUp","End"].includes(me.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(me.key)){const $e=me.target,be=Le.indexOf($e);Le=Le.slice(be+1)}setTimeout(()=>q(Le)),me.preventDefault()}})})})})})})});hq.displayName=lje;var cje="SelectItemAlignedPosition",pq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=ql(af,n),a=Gl(af,n),[s,u]=y.useState(null),[l,c]=y.useState(null),f=Gt(t,k=>c(k)),h=c2(n),p=y.useRef(!1),m=y.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:w,focusSelectedItem:x}=a,S=y.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&l&&v&&b&&w){const k=o.trigger.getBoundingClientRect(),M=l.getBoundingClientRect(),N=o.valueNode.getBoundingClientRect(),z=w.getBoundingClientRect();if(o.dir!=="rtl"){const $e=z.left-M.left,be=N.left-$e,yt=k.left-be,lt=k.width+yt,Nt=Math.max(lt,M.width),yn=window.innerWidth-Ta,nn=Q6(be,[Ta,Math.max(Ta,yn-Nt)]);s.style.minWidth=lt+"px",s.style.left=nn+"px"}else{const $e=M.right-z.right,be=window.innerWidth-N.right-$e,yt=window.innerWidth-k.right-be,lt=k.width+yt,Nt=Math.max(lt,M.width),yn=window.innerWidth-Ta,nn=Q6(be,[Ta,Math.max(Ta,yn-Nt)]);s.style.minWidth=lt+"px",s.style.right=nn+"px"}const H=h(),V=window.innerHeight-Ta*2,ne=v.scrollHeight,Z=window.getComputedStyle(l),G=parseInt(Z.borderTopWidth,10),q=parseInt(Z.paddingTop,10),W=parseInt(Z.borderBottomWidth,10),j=parseInt(Z.paddingBottom,10),K=G+q+ne+j+W,Y=Math.min(b.offsetHeight*5,K),oe=window.getComputedStyle(v),Q=parseInt(oe.paddingTop,10),J=parseInt(oe.paddingBottom,10),ue=k.top+k.height/2-Ta,de=V-ue,Se=b.offsetHeight/2,me=b.offsetTop+Se,Ze=G+q+me,Ae=K-Ze;if(Ze<=ue){const $e=H.length>0&&b===H[H.length-1].ref.current;s.style.bottom="0px";const be=l.clientHeight-v.offsetTop-v.offsetHeight,yt=Math.max(de,Se+($e?J:0)+be+W),lt=Ze+yt;s.style.height=lt+"px"}else{const $e=H.length>0&&b===H[0].ref.current;s.style.top="0px";const yt=Math.max(ue,G+v.offsetTop+($e?Q:0)+Se)+Ae;s.style.height=yt+"px",v.scrollTop=Ze-ue+v.offsetTop}s.style.margin=`${Ta}px 0`,s.style.minHeight=Y+"px",s.style.maxHeight=V+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,s,l,v,b,w,o.dir,r]);ii(()=>S(),[S]);const[O,E]=y.useState();ii(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const C=y.useCallback(k=>{k&&m.current===!0&&(S(),x?.(),m.current=!1)},[S,x]);return I.jsx(dje,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:I.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:I.jsx(pt.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});pq.displayName=cje;var fje="SelectPopperPosition",J6=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ta,...o}=e,a=f2(n);return I.jsx(sw,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.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)"}})});J6.displayName=fje;var[dje,jP]=rp(af,{}),e4="SelectViewport",gq=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Gl(e4,n),a=jP(e4,n),s=Gt(t,o.onViewportChange),u=y.useRef(0);return I.jsxs(I.Fragment,{children:[I.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}),I.jsx(l2.Slot,{scope:n,children:I.jsx(pt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ye(i.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h?.current&&f){const p=Math.abs(u.current-c.scrollTop);if(p>0){const m=window.innerHeight-Ta*2,v=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),w=Math.max(v,b);if(w0?O:0,f.style.justifyContent="flex-end")}}}u.current=c.scrollTop})})})]})});gq.displayName=e4;var mq="SelectGroup",[hje,pje]=rp(mq),vq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Fo();return I.jsx(hje,{scope:n,id:i,children:I.jsx(pt.div,{role:"group","aria-labelledby":i,...r,ref:t})})});vq.displayName=mq;var yq="SelectLabel",bq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=pje(yq,n);return I.jsx(pt.div,{id:i.id,...r,ref:t})});bq.displayName=yq;var dx="SelectItem",[gje,xq]=rp(dx),wq=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,s=ql(dx,n),u=Gl(dx,n),l=s.value===r,[c,f]=y.useState(o??""),[h,p]=y.useState(!1),m=Gt(t,x=>u.itemRefCallback?.(x,r,i)),v=Fo(),b=y.useRef("touch"),w=()=>{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 I.jsx(gje,{scope:n,value:r,disabled:i,textId:v,isSelected:l,onItemTextChange:y.useCallback(x=>{f(S=>S||(x?.textContent??"").trim())},[]),children:I.jsx(l2.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:I.jsx(pt.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:m,onFocus:Ye(a.onFocus,()=>p(!0)),onBlur:Ye(a.onBlur,()=>p(!1)),onClick:Ye(a.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Ye(a.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Ye(a.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:Ye(a.onPointerMove,x=>{b.current=x.pointerType,i?u.onItemLeave?.():b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:Ye(a.onKeyDown,x=>{u.searchRef?.current!==""&&x.key===" "||(nje.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});wq.displayName=dx;var l0="SelectItemText",_q=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=ql(l0,n),s=Gl(l0,n),u=xq(l0,n),l=aje(l0,n),[c,f]=y.useState(null),h=Gt(t,w=>f(w),u.onItemTextChange,w=>s.itemTextRefCallback?.(w,u.value,u.disabled)),p=c?.textContent,m=y.useMemo(()=>I.jsx("option",{value:u.value,disabled:u.disabled,children:p},u.value),[u.disabled,u.value,p]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=l;return ii(()=>(v(m),()=>b(m)),[v,b,m]),I.jsxs(I.Fragment,{children:[I.jsx(pt.span,{id:u.textId,...o,ref:h}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Au.createPortal(o.children,a.valueNode):null]})});_q.displayName=l0;var Sq="SelectItemIndicator",Cq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return xq(Sq,n).isSelected?I.jsx(pt.span,{"aria-hidden":!0,...r,ref:t}):null});Cq.displayName=Sq;var t4="SelectScrollUpButton",Eq=y.forwardRef((e,t)=>{const n=Gl(t4,e.__scopeSelect),r=jP(t4,e.__scopeSelect),[i,o]=y.useState(!1),a=Gt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=u.scrollTop>0;o(l)};const u=n.viewport;return s(),u.addEventListener("scroll",s),()=>u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?I.jsx(Aq,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop-u.offsetHeight)}}):null});Eq.displayName=t4;var n4="SelectScrollDownButton",Oq=y.forwardRef((e,t)=>{const n=Gl(n4,e.__scopeSelect),r=jP(n4,e.__scopeSelect),[i,o]=y.useState(!1),a=Gt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=u.scrollHeight-u.clientHeight,c=Math.ceil(u.scrollTop)u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?I.jsx(Aq,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop+u.offsetHeight)}}):null});Oq.displayName=n4;var Aq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Gl("SelectScrollButton",n),a=y.useRef(null),s=c2(n),u=y.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return y.useEffect(()=>()=>u(),[u]),ii(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),I.jsx(pt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ye(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ye(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ye(i.onPointerLeave,()=>{u()})})}),mje="SelectSeparator",Pq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return I.jsx(pt.div,{"aria-hidden":!0,...r,ref:t})});Pq.displayName=mje;var r4="SelectArrow",vje=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=f2(n),o=ql(r4,n),a=Gl(r4,n);return o.open&&a.position==="popper"?I.jsx(uw,{...i,...r,ref:t}):null});vje.displayName=r4;function kq(e){return e===""||e===void 0}var Tq=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=y.useRef(null),o=Gt(t,i),a=FP(n);return y.useEffect(()=>{const s=i.current,u=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==n&&c){const f=new Event("change",{bubbles:!0});c.call(s,n),s.dispatchEvent(f)}},[a,n]),I.jsx(xA,{asChild:!0,children:I.jsx("select",{...r,ref:o,defaultValue:n})})});Tq.displayName="BubbleSelect";function Mq(e){const t=Vr(e),n=y.useRef(""),r=y.useRef(0),i=y.useCallback(a=>{const s=n.current+a;t(s),function u(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(s)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function Rq(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=yje(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function yje(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var NXe=iq,LXe=aq,FXe=uq,jXe=lq,BXe=cq,zXe=fq,UXe=gq,VXe=vq,WXe=bq,HXe=wq,KXe=_q,qXe=Cq,GXe=Eq,YXe=Oq,ZXe=Pq;const BP=6048e5,bje=864e5,yI=Symbol.for("constructDateFrom");function oi(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&yI in e?e[yI](t):e instanceof Date?new e.constructor(t):new Date(t)}function Dn(e,t){return oi(t||e,e)}function Ui(e,t,n){const r=Dn(e,n?.in);return isNaN(t)?oi(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Qa(e,t,n){const r=Dn(e,n?.in);if(isNaN(t))return oi(n?.in||e,NaN);if(!t)return r;const i=r.getDate(),o=oi(n?.in||e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let xje={};function zm(){return xje}function ba(e,t){const n=zm(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Dn(e,t?.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function hx(e){const t=Dn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function wf(e,...t){const n=oi.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function uf(e,t){const n=Dn(e,t?.in);return n.setHours(0,0,0,0),n}function xs(e,t,n){const[r,i]=wf(n?.in,e,t),o=uf(r),a=uf(i),s=+o-hx(o),u=+a-hx(a);return Math.round((s-u)/bje)}function wje(e,t){const n=Dq(e,t),r=oi(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),sf(r)}function i4(e,t,n){return Ui(e,t*7,n)}function _je(e,t,n){return Qa(e,t*12,n)}function Sje(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Dn(i,r);(!n||n{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Dn(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),oi(r,n||NaN)}function uo(e,t,n){const[r,i]=wf(n?.in,e,t);return+uf(r)==+uf(i)}function zP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Eje(e){return!(!zP(e)&&typeof e!="number"||isNaN(+Dn(e)))}function tm(e,t,n){const[r,i]=wf(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function Oje(e,t,n){const[r,i]=wf(n?.in,e,t),o=ba(r,n),a=ba(i,n),s=+o-hx(o),u=+a-hx(a);return Math.round((s-u)/BP)}function UP(e,t){const n=Dn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function go(e,t){const n=Dn(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function $q(e,t){const n=Dn(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function VP(e,t){const n=zm(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Dn(e,t?.in),o=i.getDay(),a=(o{let r;const i=Aje[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Nd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const kje={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Tje={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Mje={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rje={date:Nd({formats:kje,defaultWidth:"full"}),time:Nd({formats:Tje,defaultWidth:"full"}),dateTime:Nd({formats:Mje,defaultWidth:"full"})},Dje={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$je=(e,t,n,r)=>Dje[e];function ps(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const Ije={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Nje={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Lje={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Fje={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},jje={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Bje={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},zje=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Uje={ordinalNumber:zje,era:ps({values:Ije,defaultWidth:"wide"}),quarter:ps({values:Nje,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ps({values:Lje,defaultWidth:"wide"}),day:ps({values:Fje,defaultWidth:"wide"}),dayPeriod:ps({values:jje,defaultWidth:"wide",formattingValues:Bje,defaultFormattingWidth:"wide"})};function gs(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?Wje(s,f=>f.test(a)):Vje(s,f=>f.test(a));let l;l=e.valueCallback?e.valueCallback(u):u,l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(a.length);return{value:l,rest:c}}}function Vje(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Wje(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const Hje=/^(\d+)(th|st|nd|rd)?/i,Kje=/\d+/i,qje={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Gje={any:[/^b/i,/^(a|c)/i]},Yje={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Zje={any:[/1/i,/2/i,/3/i,/4/i]},Xje={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Qje={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Jje={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},eBe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},tBe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},nBe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},rBe={ordinalNumber:Nq({matchPattern:Hje,parsePattern:Kje,valueCallback:e=>parseInt(e,10)}),era:gs({matchPatterns:qje,defaultMatchWidth:"wide",parsePatterns:Gje,defaultParseWidth:"any"}),quarter:gs({matchPatterns:Yje,defaultMatchWidth:"wide",parsePatterns:Zje,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gs({matchPatterns:Xje,defaultMatchWidth:"wide",parsePatterns:Qje,defaultParseWidth:"any"}),day:gs({matchPatterns:Jje,defaultMatchWidth:"wide",parsePatterns:eBe,defaultParseWidth:"any"}),dayPeriod:gs({matchPatterns:tBe,defaultMatchWidth:"any",parsePatterns:nBe,defaultParseWidth:"any"})},Lq={code:"en-US",formatDistance:Pje,formatLong:Rje,formatRelative:$je,localize:Uje,match:rBe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function iBe(e,t){const n=Dn(e,t?.in);return xs(n,$q(n))+1}function Fq(e,t){const n=Dn(e,t?.in),r=+sf(n)-+wje(n);return Math.round(r/BP)+1}function jq(e,t){const n=Dn(e,t?.in),r=n.getFullYear(),i=zm(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=oi(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=ba(a,t),u=oi(t?.in||e,0);u.setFullYear(r,0,o),u.setHours(0,0,0,0);const l=ba(u,t);return+n>=+s?r+1:+n>=+l?r:r-1}function oBe(e,t){const n=zm(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=jq(e,t),o=oi(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),ba(o,t)}function Bq(e,t){const n=Dn(e,t?.in),r=+ba(n,t)-+oBe(n,t);return Math.round(r/BP)+1}function Mn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ku={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Mn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Mn(n+1,2)},d(e,t){return Mn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Mn(e.getHours()%12||12,t.length)},H(e,t){return Mn(e.getHours(),t.length)},m(e,t){return Mn(e.getMinutes(),t.length)},s(e,t){return Mn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Mn(i,t.length)}},Qf={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bI={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Ku.y(e,t)},Y:function(e,t,n,r){const i=jq(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Mn(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Mn(o,t.length)},R:function(e,t){const n=Dq(e);return Mn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Mn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Mn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Mn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ku.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Mn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Bq(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Mn(i,t.length)},I:function(e,t,n){const r=Fq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Mn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ku.d(e,t)},D:function(e,t,n){const r=iBe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Mn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Mn(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Mn(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Mn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Qf.noon:r===0?i=Qf.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Qf.evening:r>=12?i=Qf.afternoon:r>=4?i=Qf.morning:i=Qf.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ku.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ku.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Mn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Mn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ku.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ku.s(e,t)},S:function(e,t){return Ku.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return wI(r);case"XXXX":case"XX":return pc(r);case"XXXXX":case"XXX":default:return pc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return wI(r);case"xxxx":case"xx":return pc(r);case"xxxxx":case"xxx":default:return pc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+xI(r,":");case"OOOO":default:return"GMT"+pc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+xI(r,":");case"zzzz":default:return"GMT"+pc(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Mn(r,t.length)},T:function(e,t,n){return Mn(+e,t.length)}};function xI(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Mn(o,2)}function wI(e,t){return e%60===0?(e>0?"-":"+")+Mn(Math.abs(e)/60,2):pc(e,t)}function pc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Mn(Math.trunc(r/60),2),o=Mn(r%60,2);return n+i+t+o}const _I=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},zq=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},aBe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return _I(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",_I(r,t)).replace("{{time}}",zq(i,t))},sBe={p:zq,P:aBe},uBe=/^D+$/,lBe=/^Y+$/,cBe=["D","DD","YY","YYYY"];function fBe(e){return uBe.test(e)}function dBe(e){return lBe.test(e)}function hBe(e,t,n){const r=pBe(e,t,n);if(console.warn(r),cBe.includes(e))throw new RangeError(r)}function pBe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const gBe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mBe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vBe=/^'([^]*?)'?$/,yBe=/''/g,bBe=/[a-zA-Z]/;function _f(e,t,n){const r=zm(),i=n?.locale??r.locale??Lq,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Dn(e,n?.in);if(!Eje(s))throw new RangeError("Invalid time value");let u=t.match(mBe).map(c=>{const f=c[0];if(f==="p"||f==="P"){const h=sBe[f];return h(c,i.formatLong)}return c}).join("").match(gBe).map(c=>{if(c==="''")return{isToken:!1,value:"'"};const f=c[0];if(f==="'")return{isToken:!1,value:xBe(c)};if(bI[f])return{isToken:!0,value:c};if(f.match(bBe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:c}});i.localize.preprocessor&&(u=i.localize.preprocessor(s,u));const l={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return u.map(c=>{if(!c.isToken)return c.value;const f=c.value;(!n?.useAdditionalWeekYearTokens&&dBe(f)||!n?.useAdditionalDayOfYearTokens&&fBe(f))&&hBe(f,t,String(e));const h=bI[f[0]];return h(s,f,i.localize,l)}).join("")}function xBe(e){const t=e.match(vBe);return t?t[1].replace(yBe,"'"):e}function wBe(e,t){const n=Dn(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=oi(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function _Be(e){return Math.trunc(+Dn(e)/1e3)}function SBe(e,t){const n=Dn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(0,0,0,0),Dn(n,t?.in)}function CBe(e,t){const n=Dn(e,t?.in);return Oje(SBe(n,t),go(n,t),t)+1}function o4(e,t){return+Dn(e)>+Dn(t)}function Uq(e,t){return+Dn(e)<+Dn(t)}function EBe(e,t,n){const[r,i]=wf(n?.in,e,t);return+ba(r,n)==+ba(i,n)}function WP(e,t,n){const[r,i]=wf(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function OBe(e,t,n){const[r,i]=wf(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function c3(e,t,n){return Ui(e,-t,n)}function f3(e,t,n){const r=Dn(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=oi(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=wBe(a);return r.setMonth(t,Math.min(o,s)),r}function SI(e,t,n){const r=Dn(e,n?.in);return isNaN(+r)?oi(e,NaN):(r.setFullYear(t),r)}function XXe(e){return uf(Date.now(),e)}const ABe={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},PBe=(e,t,n)=>{let r;const i=ABe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},kBe={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},TBe={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},MBe={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},RBe={date:Nd({formats:kBe,defaultWidth:"full"}),time:Nd({formats:TBe,defaultWidth:"full"}),dateTime:Nd({formats:MBe,defaultWidth:"full"})};function CI(e,t,n){const r="eeee p";return EBe(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const DBe={lastWeek:CI,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:CI,other:"PP p"},$Be=(e,t,n,r)=>{const i=DBe[e];return typeof i=="function"?i(t,n,r):i},IBe={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},NBe={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},LBe={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},FBe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},jBe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},BBe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},zBe=(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},UBe={ordinalNumber:zBe,era:ps({values:IBe,defaultWidth:"wide"}),quarter:ps({values:NBe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ps({values:LBe,defaultWidth:"wide"}),day:ps({values:FBe,defaultWidth:"wide"}),dayPeriod:ps({values:jBe,defaultWidth:"wide",formattingValues:BBe,defaultFormattingWidth:"wide"})},VBe=/^(第\s*)?\d+(日|时|分|秒)?/i,WBe=/\d+/i,HBe={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},KBe={any:[/^(前)/i,/^(公元)/i]},qBe={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},GBe={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},YBe={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},ZBe={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},XBe={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},QBe={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},JBe={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},eze={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},tze={ordinalNumber:Nq({matchPattern:VBe,parsePattern:WBe,valueCallback:e=>parseInt(e,10)}),era:gs({matchPatterns:HBe,defaultMatchWidth:"wide",parsePatterns:KBe,defaultParseWidth:"any"}),quarter:gs({matchPatterns:qBe,defaultMatchWidth:"wide",parsePatterns:GBe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gs({matchPatterns:YBe,defaultMatchWidth:"wide",parsePatterns:ZBe,defaultParseWidth:"any"}),day:gs({matchPatterns:XBe,defaultMatchWidth:"wide",parsePatterns:QBe,defaultParseWidth:"any"}),dayPeriod:gs({matchPatterns:JBe,defaultMatchWidth:"any",parsePatterns:eze,defaultParseWidth:"any"})},QXe={code:"zh-CN",formatDistance:PBe,formatLong:RBe,formatRelative:$Be,localize:UBe,match:tze,options:{weekStartsOn:1,firstWeekContainsDate:4}};var Rt=function(){return Rt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r1&&(u||!l),f=t>1&&(l||!u),h=function(){r&&o(r)},p=function(){i&&o(i)};return I.jsx($ze,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:f,nextMonth:i,previousMonth:r,onPreviousClick:h,onNextClick:p})}function Ize(e){var t,n=Kn(),r=n.classNames,i=n.disableNavigation,o=n.styles,a=n.captionLayout,s=n.components,u=(t=s?.CaptionLabel)!==null&&t!==void 0?t:Hq,l;return i?l=I.jsx(u,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?l=I.jsx(EI,{displayMonth:e.displayMonth,id:e.id}):a==="dropdown-buttons"?l=I.jsxs(I.Fragment,{children:[I.jsx(EI,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),I.jsx(OI,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):l=I.jsxs(I.Fragment,{children:[I.jsx(u,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(OI,{displayMonth:e.displayMonth,id:e.id})]}),I.jsx("div",{className:r.caption,style:o.caption,children:l})}function Nze(e){var t=Kn(),n=t.footer,r=t.styles,i=t.classNames.tfoot;return n?I.jsx("tfoot",{className:i,style:r.tfoot,children:I.jsx("tr",{children:I.jsx("td",{colSpan:8,children:n})})}):I.jsx(I.Fragment,{})}function Lze(e,t,n){for(var r=n?sf(new Date):ba(new Date,{locale:e,weekStartsOn:t}),i=[],o=0;o<7;o++){var a=Ui(r,o);i.push(a)}return i}function Fze(){var e=Kn(),t=e.classNames,n=e.styles,r=e.showWeekNumber,i=e.locale,o=e.weekStartsOn,a=e.ISOWeek,s=e.formatters.formatWeekdayName,u=e.labels.labelWeekday,l=Lze(i,o,a);return I.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&I.jsx("td",{style:n.head_cell,className:t.head_cell}),l.map(function(c,f){return I.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":u(c,{locale:i}),children:s(c,{locale:i})},f)})]})}function jze(){var e,t=Kn(),n=t.classNames,r=t.styles,i=t.components,o=(e=i?.HeadRow)!==null&&e!==void 0?e:Fze;return I.jsx("thead",{style:r.head,className:n.head,children:I.jsx(o,{})})}function Bze(e){var t=Kn(),n=t.locale,r=t.formatters.formatDay;return I.jsx(I.Fragment,{children:r(e.date,{locale:n})})}var HP=y.createContext(void 0);function zze(e){if(!Um(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return I.jsx(HP.Provider,{value:t,children:e.children})}return I.jsx(Uze,{initialProps:e.initialProps,children:e.children})}function Uze(e){var t=e.initialProps,n=e.children,r=t.selected,i=t.min,o=t.max,a=function(l,c,f){var h,p;(h=t.onDayClick)===null||h===void 0||h.call(t,l,c,f);var m=!!(c.selected&&i&&r?.length===i);if(!m){var v=!!(!c.selected&&o&&r?.length===o);if(!v){var b=r?Vq([],r):[];if(c.selected){var w=b.findIndex(function(x){return uo(l,x)});b.splice(w,1)}else b.push(l);(p=t.onSelect)===null||p===void 0||p.call(t,b,l,c,f)}}},s={disabled:[]};r&&s.disabled.push(function(l){var c=o&&r.length>o-1,f=r.some(function(h){return uo(h,l)});return!!(c&&!f)});var u={selected:r,onDayClick:a,modifiers:s};return I.jsx(HP.Provider,{value:u,children:n})}function KP(){var e=y.useContext(HP);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function Vze(e,t){var n=t||{},r=n.from,i=n.to;return r&&i?uo(i,e)&&uo(r,e)?void 0:uo(i,e)?{from:i,to:void 0}:uo(r,e)?void 0:o4(r,e)?{from:e,to:i}:{from:r,to:e}:i?o4(e,i)?{from:i,to:e}:{from:e,to:i}:r?Uq(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var qP=y.createContext(void 0);function Wze(e){if(!Vm(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return I.jsx(qP.Provider,{value:t,children:e.children})}return I.jsx(Hze,{initialProps:e.initialProps,children:e.children})}function Hze(e){var t=e.initialProps,n=e.children,r=t.selected,i=r||{},o=i.from,a=i.to,s=t.min,u=t.max,l=function(p,m,v){var b,w;(b=t.onDayClick)===null||b===void 0||b.call(t,p,m,v);var x=Vze(p,r);(w=t.onSelect)===null||w===void 0||w.call(t,x,p,m,v)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(c.range_start=[o],a?(c.range_end=[a],uo(o,a)||(c.range_middle=[{after:o,before:a}])):c.range_end=[o]):a&&(c.range_start=[a],c.range_end=[a]),s&&(o&&!a&&c.disabled.push({after:c3(o,s-1),before:Ui(o,s-1)}),o&&a&&c.disabled.push({after:o,before:Ui(o,s-1)}),!o&&a&&c.disabled.push({after:c3(a,s-1),before:Ui(a,s-1)})),u){if(o&&!a&&(c.disabled.push({before:Ui(o,-u+1)}),c.disabled.push({after:Ui(o,u-1)})),o&&a){var f=xs(a,o)+1,h=u-f;c.disabled.push({before:c3(o,h)}),c.disabled.push({after:Ui(a,h)})}!o&&a&&(c.disabled.push({before:Ui(a,-u+1)}),c.disabled.push({after:Ui(a,u-1)}))}return I.jsx(qP.Provider,{value:{selected:r,onDayClick:l,modifiers:c},children:n})}function GP(){var e=y.useContext(qP);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function n1(e){return Array.isArray(e)?Vq([],e):e!==void 0?[e]:[]}function Kze(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],i=n[1];t[r]=n1(i)}),t}var Ja;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Ja||(Ja={}));var qze=Ja.Selected,Ys=Ja.Disabled,Gze=Ja.Hidden,Yze=Ja.Today,d3=Ja.RangeEnd,h3=Ja.RangeMiddle,p3=Ja.RangeStart,Zze=Ja.Outside;function Xze(e,t,n){var r,i=(r={},r[qze]=n1(e.selected),r[Ys]=n1(e.disabled),r[Gze]=n1(e.hidden),r[Yze]=[e.today],r[d3]=[],r[h3]=[],r[p3]=[],r[Zze]=[],r);return e.fromDate&&i[Ys].push({before:e.fromDate}),e.toDate&&i[Ys].push({after:e.toDate}),Um(e)?i[Ys]=i[Ys].concat(t.modifiers[Ys]):Vm(e)&&(i[Ys]=i[Ys].concat(n.modifiers[Ys]),i[p3]=n.modifiers[p3],i[h3]=n.modifiers[h3],i[d3]=n.modifiers[d3]),i}var Gq=y.createContext(void 0);function Qze(e){var t=Kn(),n=KP(),r=GP(),i=Xze(t,n,r),o=Kze(t.modifiers),a=Rt(Rt({},i),o);return I.jsx(Gq.Provider,{value:a,children:e.children})}function Yq(){var e=y.useContext(Gq);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Jze(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function eUe(e){return!!(e&&typeof e=="object"&&"from"in e)}function tUe(e){return!!(e&&typeof e=="object"&&"after"in e)}function nUe(e){return!!(e&&typeof e=="object"&&"before"in e)}function rUe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function iUe(e,t){var n,r=t.from,i=t.to;if(r&&i){var o=xs(i,r)<0;o&&(n=[i,r],r=n[0],i=n[1]);var a=xs(e,r)>=0&&xs(i,e)>=0;return a}return i?uo(i,e):r?uo(r,e):!1}function oUe(e){return zP(e)}function aUe(e){return Array.isArray(e)&&e.every(zP)}function sUe(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(oUe(n))return uo(e,n);if(aUe(n))return n.includes(e);if(eUe(n))return iUe(e,n);if(rUe(n))return n.dayOfWeek.includes(e.getDay());if(Jze(n)){var r=xs(n.before,e),i=xs(n.after,e),o=r>0,a=i<0,s=o4(n.before,n.after);return s?a&&o:o||a}return tUe(n)?xs(e,n.after)>0:nUe(n)?xs(n.before,e)>0:typeof n=="function"?n(e):!1})}function YP(e,t,n){var r=Object.keys(t).reduce(function(o,a){var s=t[a];return sUe(e,s)&&o.push(a),o},[]),i={};return r.forEach(function(o){return i[o]=!0}),n&&!WP(e,n)&&(i.outside=!0),i}function uUe(e,t){for(var n=go(e[0]),r=UP(e[e.length-1]),i,o,a=n;a<=r;){var s=YP(a,t),u=!s.disabled&&!s.hidden;if(!u){a=Ui(a,1);continue}if(s.selected)return a;s.today&&!o&&(o=a),i||(i=a),a=Ui(a,1)}return o||i}var lUe=365;function Zq(e,t){var n=t.moveBy,r=t.direction,i=t.context,o=t.modifiers,a=t.retry,s=a===void 0?{count:0,lastFocused:e}:a,u=i.weekStartsOn,l=i.fromDate,c=i.toDate,f=i.locale,h={day:Ui,week:i4,month:Qa,year:_je,startOfWeek:function(b){return i.ISOWeek?sf(b):ba(b,{locale:f,weekStartsOn:u})},endOfWeek:function(b){return i.ISOWeek?Iq(b):VP(b,{locale:f,weekStartsOn:u})}},p=h[n](e,r==="after"?1:-1);r==="before"&&l?p=Sje([l,p]):r==="after"&&c&&(p=Cje([c,p]));var m=!0;if(o){var v=YP(p,o);m=!v.disabled&&!v.hidden}return m?p:s.count>lUe?s.lastFocused:Zq(p,{moveBy:n,direction:r,context:i,modifiers:o,retry:Rt(Rt({},s),{count:s.count+1})})}var Xq=y.createContext(void 0);function cUe(e){var t=Wm(),n=Yq(),r=y.useState(),i=r[0],o=r[1],a=y.useState(),s=a[0],u=a[1],l=uUe(t.displayMonths,n),c=i??(s&&t.isDateDisplayed(s))?s:l,f=function(){u(i),o(void 0)},h=function(b){o(b)},p=Kn(),m=function(b,w){if(i){var x=Zq(i,{moveBy:b,direction:w,context:p,modifiers:n});uo(i,x)||(t.goToDate(x,i),h(x))}},v={focusedDay:i,focusTarget:c,blur:f,focus:h,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return I.jsx(Xq.Provider,{value:v,children:e.children})}function ZP(){var e=y.useContext(Xq);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function fUe(e,t){var n=Yq(),r=YP(e,n,t);return r}var XP=y.createContext(void 0);function dUe(e){if(!d2(e.initialProps)){var t={selected:void 0};return I.jsx(XP.Provider,{value:t,children:e.children})}return I.jsx(hUe,{initialProps:e.initialProps,children:e.children})}function hUe(e){var t=e.initialProps,n=e.children,r=function(o,a,s){var u,l,c;if((u=t.onDayClick)===null||u===void 0||u.call(t,o,a,s),a.selected&&!t.required){(l=t.onSelect)===null||l===void 0||l.call(t,void 0,o,a,s);return}(c=t.onSelect)===null||c===void 0||c.call(t,o,o,a,s)},i={selected:t.selected,onDayClick:r};return I.jsx(XP.Provider,{value:i,children:n})}function Qq(){var e=y.useContext(XP);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function pUe(e,t){var n=Kn(),r=Qq(),i=KP(),o=GP(),a=ZP(),s=a.focusDayAfter,u=a.focusDayBefore,l=a.focusWeekAfter,c=a.focusWeekBefore,f=a.blur,h=a.focus,p=a.focusMonthBefore,m=a.focusMonthAfter,v=a.focusYearBefore,b=a.focusYearAfter,w=a.focusStartOfWeek,x=a.focusEndOfWeek,S=function(W){var j,K,Y,oe;d2(n)?(j=r.onDayClick)===null||j===void 0||j.call(r,e,t,W):Um(n)?(K=i.onDayClick)===null||K===void 0||K.call(i,e,t,W):Vm(n)?(Y=o.onDayClick)===null||Y===void 0||Y.call(o,e,t,W):(oe=n.onDayClick)===null||oe===void 0||oe.call(n,e,t,W)},O=function(W){var j;h(e),(j=n.onDayFocus)===null||j===void 0||j.call(n,e,t,W)},E=function(W){var j;f(),(j=n.onDayBlur)===null||j===void 0||j.call(n,e,t,W)},C=function(W){var j;(j=n.onDayMouseEnter)===null||j===void 0||j.call(n,e,t,W)},k=function(W){var j;(j=n.onDayMouseLeave)===null||j===void 0||j.call(n,e,t,W)},M=function(W){var j;(j=n.onDayPointerEnter)===null||j===void 0||j.call(n,e,t,W)},N=function(W){var j;(j=n.onDayPointerLeave)===null||j===void 0||j.call(n,e,t,W)},z=function(W){var j;(j=n.onDayTouchCancel)===null||j===void 0||j.call(n,e,t,W)},H=function(W){var j;(j=n.onDayTouchEnd)===null||j===void 0||j.call(n,e,t,W)},V=function(W){var j;(j=n.onDayTouchMove)===null||j===void 0||j.call(n,e,t,W)},ne=function(W){var j;(j=n.onDayTouchStart)===null||j===void 0||j.call(n,e,t,W)},Z=function(W){var j;(j=n.onDayKeyUp)===null||j===void 0||j.call(n,e,t,W)},G=function(W){var j;switch(W.key){case"ArrowLeft":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?s():u();break;case"ArrowRight":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?u():s();break;case"ArrowDown":W.preventDefault(),W.stopPropagation(),l();break;case"ArrowUp":W.preventDefault(),W.stopPropagation(),c();break;case"PageUp":W.preventDefault(),W.stopPropagation(),W.shiftKey?v():p();break;case"PageDown":W.preventDefault(),W.stopPropagation(),W.shiftKey?b():m();break;case"Home":W.preventDefault(),W.stopPropagation(),w();break;case"End":W.preventDefault(),W.stopPropagation(),x();break}(j=n.onDayKeyDown)===null||j===void 0||j.call(n,e,t,W)},q={onClick:S,onFocus:O,onBlur:E,onKeyDown:G,onKeyUp:Z,onMouseEnter:C,onMouseLeave:k,onPointerEnter:M,onPointerLeave:N,onTouchCancel:z,onTouchEnd:H,onTouchMove:V,onTouchStart:ne};return q}function gUe(){var e=Kn(),t=Qq(),n=KP(),r=GP(),i=d2(e)?t.selected:Um(e)?n.selected:Vm(e)?r.selected:void 0;return i}function mUe(e){return Object.values(Ja).includes(e)}function vUe(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var i=e.modifiersClassNames[r];if(i)n.push(i);else if(mUe(r)){var o=e.classNames["day_".concat(r)];o&&n.push(o)}}),n}function yUe(e,t){var n=Rt({},e.styles.day);return Object.keys(t).forEach(function(r){var i;n=Rt(Rt({},n),(i=e.modifiersStyles)===null||i===void 0?void 0:i[r])}),n}function bUe(e,t,n){var r,i,o,a=Kn(),s=ZP(),u=fUe(e,t),l=pUe(e,u),c=gUe(),f=!!(a.onDayClick||a.mode!=="default");y.useEffect(function(){var C;u.outside||s.focusedDay&&f&&uo(s.focusedDay,e)&&((C=n.current)===null||C===void 0||C.focus())},[s.focusedDay,e,n,f,u.outside]);var h=vUe(a,u).join(" "),p=yUe(a,u),m=!!(u.outside&&!a.showOutsideDays||u.hidden),v=(o=(i=a.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:Bze,b=I.jsx(v,{date:e,displayMonth:t,activeModifiers:u}),w={style:p,className:h,children:b,role:"gridcell"},x=s.focusTarget&&uo(s.focusTarget,e)&&!u.outside,S=s.focusedDay&&uo(s.focusedDay,e),O=Rt(Rt(Rt({},w),(r={disabled:u.disabled,role:"gridcell"},r["aria-selected"]=u.selected,r.tabIndex=S||x?0:-1,r)),l),E={isButton:f,isHidden:m,activeModifiers:u,selectedDays:c,buttonProps:O,divProps:w};return E}function xUe(e){var t=y.useRef(null),n=bUe(e.date,e.displayMonth,t);return n.isHidden?I.jsx("div",{role:"gridcell"}):n.isButton?I.jsx(px,Rt({name:"day",ref:t},n.buttonProps)):I.jsx("div",Rt({},n.divProps))}function wUe(e){var t=e.number,n=e.dates,r=Kn(),i=r.onWeekNumberClick,o=r.styles,a=r.classNames,s=r.locale,u=r.labels.labelWeekNumber,l=r.formatters.formatWeekNumber,c=l(Number(t),{locale:s});if(!i)return I.jsx("span",{className:a.weeknumber,style:o.weeknumber,children:c});var f=u(Number(t),{locale:s}),h=function(p){i(t,n,p)};return I.jsx(px,{name:"week-number","aria-label":f,className:a.weeknumber,style:o.weeknumber,onClick:h,children:c})}function _Ue(e){var t,n,r=Kn(),i=r.styles,o=r.classNames,a=r.showWeekNumber,s=r.components,u=(t=s?.Day)!==null&&t!==void 0?t:xUe,l=(n=s?.WeekNumber)!==null&&n!==void 0?n:wUe,c;return a&&(c=I.jsx("td",{className:o.cell,style:i.cell,children:I.jsx(l,{number:e.weekNumber,dates:e.dates})})),I.jsxs("tr",{className:o.row,style:i.row,children:[c,e.dates.map(function(f){return I.jsx("td",{className:o.cell,style:i.cell,role:"presentation",children:I.jsx(u,{displayMonth:e.displayMonth,date:f})},_Be(f))})]})}function AI(e,t,n){for(var r=n?.ISOWeek?Iq(t):VP(t,n),i=n?.ISOWeek?sf(e):ba(e,n),o=xs(r,i),a=[],s=0;s<=o;s++)a.push(Ui(i,s));var u=a.reduce(function(l,c){var f=n?.ISOWeek?Fq(c):Bq(c,n),h=l.find(function(p){return p.weekNumber===f});return h?(h.dates.push(c),l):(l.push({weekNumber:f,dates:[c]}),l)},[]);return u}function SUe(e,t){var n=AI(go(e),UP(e),t);if(t?.useFixedWeeks){var r=CBe(e,t);if(r<6){var i=n[n.length-1],o=i.dates[i.dates.length-1],a=i4(o,6-r),s=AI(i4(o,1),a,t);n.push.apply(n,s)}}return n}function CUe(e){var t,n,r,i=Kn(),o=i.locale,a=i.classNames,s=i.styles,u=i.hideHead,l=i.fixedWeeks,c=i.components,f=i.weekStartsOn,h=i.firstWeekContainsDate,p=i.ISOWeek,m=SUe(e.displayMonth,{useFixedWeeks:!!l,ISOWeek:p,locale:o,weekStartsOn:f,firstWeekContainsDate:h}),v=(t=c?.Head)!==null&&t!==void 0?t:jze,b=(n=c?.Row)!==null&&n!==void 0?n:_Ue,w=(r=c?.Footer)!==null&&r!==void 0?r:Nze;return I.jsxs("table",{id:e.id,className:a.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!u&&I.jsx(v,{}),I.jsx("tbody",{className:a.tbody,style:s.tbody,children:m.map(function(x){return I.jsx(b,{displayMonth:e.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),I.jsx(w,{displayMonth:e.displayMonth})]})}function EUe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var OUe=EUe()?y.useLayoutEffect:y.useEffect,g3=!1,AUe=0;function PI(){return"react-day-picker-".concat(++AUe)}function PUe(e){var t,n=e??(g3?PI():null),r=y.useState(n),i=r[0],o=r[1];return OUe(function(){i===null&&o(PI())},[]),y.useEffect(function(){g3===!1&&(g3=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function kUe(e){var t,n,r=Kn(),i=r.dir,o=r.classNames,a=r.styles,s=r.components,u=Wm().displayMonths,l=PUe(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,f=[o.month],h=a.month,p=e.displayIndex===0,m=e.displayIndex===u.length-1,v=!p&&!m;i==="rtl"&&(t=[p,m],m=t[0],p=t[1]),p&&(f.push(o.caption_start),h=Rt(Rt({},h),a.caption_start)),m&&(f.push(o.caption_end),h=Rt(Rt({},h),a.caption_end)),v&&(f.push(o.caption_between),h=Rt(Rt({},h),a.caption_between));var b=(n=s?.Caption)!==null&&n!==void 0?n:Ize;return I.jsxs("div",{className:f.join(" "),style:h,children:[I.jsx(b,{id:l,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(CUe,{id:c,"aria-labelledby":l,displayMonth:e.displayMonth})]},e.displayIndex)}function TUe(e){var t=Kn(),n=t.classNames,r=t.styles;return I.jsx("div",{className:n.months,style:r.months,children:e.children})}function MUe(e){var t,n,r=e.initialProps,i=Kn(),o=ZP(),a=Wm(),s=y.useState(!1),u=s[0],l=s[1];y.useEffect(function(){i.initialFocus&&o.focusTarget&&(u||(o.focus(o.focusTarget),l(!0)))},[i.initialFocus,u,o.focus,o.focusTarget,o]);var c=[i.classNames.root,i.className];i.numberOfMonths>1&&c.push(i.classNames.multiple_months),i.showWeekNumber&&c.push(i.classNames.with_weeknumber);var f=Rt(Rt({},i.styles.root),i.style),h=Object.keys(r).filter(function(m){return m.startsWith("data-")}).reduce(function(m,v){var b;return Rt(Rt({},m),(b={},b[v]=r[v],b))},{}),p=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:TUe;return I.jsx("div",Rt({className:c.join(" "),style:f,dir:i.dir,id:i.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:I.jsx(p,{children:a.displayMonths.map(function(m,v){return I.jsx(kUe,{displayIndex:v,displayMonth:m},v)})})}))}function RUe(e){var t=e.children,n=nze(e,["children"]);return I.jsx(wze,{initialProps:n,children:I.jsx(Mze,{children:I.jsx(dUe,{initialProps:n,children:I.jsx(zze,{initialProps:n,children:I.jsx(Wze,{initialProps:n,children:I.jsx(Qze,{children:I.jsx(cUe,{children:t})})})})})})})}function JXe(e){return I.jsx(RUe,Rt({},e,{children:I.jsx(MUe,{initialProps:e})}))}var QP="Popover",[Jq,eQe]=vi(QP,[zl]),Hm=zl(),[DUe,Yl]=Jq(QP),eG=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,s=Hm(t),u=y.useRef(null),[l,c]=y.useState(!1),[f=!1,h]=Za({prop:r,defaultProp:i,onChange:o});return I.jsx(aw,{...s,children:I.jsx(DUe,{scope:t,contentId:Fo(),triggerRef:u,open:f,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:l,onCustomAnchorAdd:y.useCallback(()=>c(!0),[]),onCustomAnchorRemove:y.useCallback(()=>c(!1),[]),modal:a,children:n})})};eG.displayName=QP;var tG="PopoverAnchor",$Ue=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(tG,n),o=Hm(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=i;return y.useEffect(()=>(a(),()=>s()),[a,s]),I.jsx(Om,{...o,...r,ref:t})});$Ue.displayName=tG;var nG="PopoverTrigger",rG=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(nG,n),o=Hm(n),a=Gt(t,i.triggerRef),s=I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":uG(i.open),...r,ref:a,onClick:Ye(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:I.jsx(Om,{asChild:!0,...o,children:s})});rG.displayName=nG;var JP="PopoverPortal",[IUe,NUe]=Jq(JP,{forceMount:void 0}),iG=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Yl(JP,t);return I.jsx(IUe,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};iG.displayName=JP;var Ch="PopoverContent",oG=y.forwardRef((e,t)=>{const n=NUe(Ch,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Yl(Ch,e.__scopePopover);return I.jsx(Gr,{present:r||o.open,children:o.modal?I.jsx(LUe,{...i,ref:t}):I.jsx(FUe,{...i,ref:t})})});oG.displayName=Ch;var LUe=y.forwardRef((e,t)=>{const n=Yl(Ch,e.__scopePopover),r=y.useRef(null),i=Gt(t,r),o=y.useRef(!1);return y.useEffect(()=>{const a=r.current;if(a)return Sm(a)},[]),I.jsx(_m,{as:Al,allowPinchZoom:!0,children:I.jsx(aG,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,a=>{a.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0,l=s.button===2||u;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Ye(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),FUe=y.forwardRef((e,t)=>{const n=Yl(Ch,e.__scopePopover),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(aG,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),aG=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:c,...f}=e,h=Yl(Ch,n),p=Hm(n);return nw(),I.jsx(wm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:I.jsx(sw,{"data-state":uG(h.open),role:"dialog",id:h.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),sG="PopoverClose",jUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(sG,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});jUe.displayName=sG;var BUe="PopoverArrow",zUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Hm(n);return I.jsx(uw,{...i,...r,ref:t})});zUe.displayName=BUe;function uG(e){return e?"open":"closed"}var tQe=eG,nQe=rG,rQe=iG,iQe=oG,gx={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */xx.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",l=500,c="__lodash_placeholder__",f=1,h=2,p=4,m=1,v=2,b=1,w=2,x=4,S=8,O=16,E=32,C=64,k=128,M=256,N=512,q=30,Y="...",W=800,ne=16,Z=1,R=2,B=3,U=1/0,F=9007199254740991,V=17976931348623157e292,G=NaN,oe=4294967295,Q=oe-1,X=oe>>>1,ue=[["ary",k],["bind",b],["bindKey",w],["curry",S],["curryRight",O],["flip",N],["partial",E],["partialRight",C],["rearg",M]],de="[object Arguments]",Se="[object Array]",me="[object AsyncFunction]",Ze="[object Boolean]",Ae="[object Date]",Le="[object DOMException]",$e="[object Error]",be="[object Function]",yt="[object GeneratorFunction]",lt="[object Map]",Nt="[object Number]",yn="[object Null]",nn="[object Object]",ie="[object Promise]",pe="[object Proxy]",ye="[object RegExp]",Ue="[object Set]",je="[object String]",ke="[object Symbol]",nt="[object Undefined]",mt="[object WeakMap]",xn="[object WeakSet]",Wt="[object ArrayBuffer]",wn="[object DataView]",Ii="[object Float32Array]",br="[object Float64Array]",yi="[object Int8Array]",sr="[object Int16Array]",si="[object Int32Array]",bi="[object Uint8Array]",Rr="[object Uint8ClampedArray]",Xi="[object Uint16Array]",bo="[object Uint32Array]",xi=/\b__p \+= '';/g,Dr=/\b(__p \+=) '' \+/g,Sa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,hn=/[&<>"']/g,_n=RegExp(_t.source),Kn=RegExp(hn.source),ur=/<%-([\s\S]+?)%>/g,Xr=/<%([\s\S]+?)%>/g,xo=/<%=([\s\S]+?)%>/g,Xl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ef=/^\w*$/,ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,le=/[\\^$.*+?()[\]{}|]/g,xe=RegExp(le.source),T=/^\s+/,$=/\s/,I=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,A=/\{\n\/\* \[wrapped with (.+)\] \*/,j=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,re=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,Ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Be=/\w*$/,We=/^[-+]0x[0-9a-f]+$/i,ct=/^0b[01]+$/i,Ne=/^\[object .+?Constructor\]$/,rt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,Ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gt=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",wt="\\u0300-\\u036f",Je="\\ufe20-\\ufe2f",ut="\\u20d0-\\u20ff",Qe=wt+Je+ut,Fe="\\u2700-\\u27bf",qe="a-z\\xdf-\\xf6\\xf8-\\xff",Ge="\\xac\\xb1\\xd7\\xf7",ve="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ge="\\u2000-\\u206f",De=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",ze=Ge+ve+ge+De,vt="['’]",Lt="["+xt+"]",Ft="["+ze+"]",$t="["+Qe+"]",te="\\d+",Yt="["+Fe+"]",sn="["+qe+"]",un="[^"+xt+ze+te+Fe+qe+Pe+"]",jt="\\ud83c[\\udffb-\\udfff]",ln="(?:"+$t+"|"+jt+")",rn="[^"+xt+"]",Gn="(?:\\ud83c[\\udde6-\\uddff]){2}",mn="[\\ud800-\\udbff][\\udc00-\\udfff]",kn="["+Pe+"]",Yn="\\u200d",Zn="(?:"+sn+"|"+un+")",xr="(?:"+kn+"|"+un+")",$r="(?:"+vt+"(?:d|ll|m|re|s|t|ve))?",Ir="(?:"+vt+"(?:D|LL|M|RE|S|T|VE))?",Nr=ln+"?",B5="["+Te+"]?",RZ="(?:"+Yn+"(?:"+[rn,Gn,mn].join("|")+")"+B5+Nr+")*",DZ="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",z5=B5+Nr+RZ,IZ="(?:"+[Yt,Gn,mn].join("|")+")"+z5,NZ="(?:"+[rn+$t+"?",$t,Gn,mn,Lt].join("|")+")",LZ=RegExp(vt,"g"),FZ=RegExp($t,"g"),A2=RegExp(jt+"(?="+jt+")|"+NZ+z5,"g"),jZ=RegExp([kn+"?"+sn+"+"+$r+"(?="+[Ft,kn,"$"].join("|")+")",xr+"+"+Ir+"(?="+[Ft,kn+Zn,"$"].join("|")+")",kn+"?"+Zn+"+"+$r,kn+"+"+Ir,$Z,DZ,te,IZ].join("|"),"g"),BZ=RegExp("["+Yn+xt+Qe+Te+"]"),zZ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,UZ=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],HZ=-1,Xn={};Xn[Ii]=Xn[br]=Xn[yi]=Xn[sr]=Xn[si]=Xn[bi]=Xn[Rr]=Xn[Xi]=Xn[bo]=!0,Xn[de]=Xn[Se]=Xn[Wt]=Xn[Ze]=Xn[wn]=Xn[Ae]=Xn[$e]=Xn[be]=Xn[lt]=Xn[Nt]=Xn[nn]=Xn[ye]=Xn[Ue]=Xn[je]=Xn[mt]=!1;var Un={};Un[de]=Un[Se]=Un[Wt]=Un[wn]=Un[Ze]=Un[Ae]=Un[Ii]=Un[br]=Un[yi]=Un[sr]=Un[si]=Un[lt]=Un[Nt]=Un[nn]=Un[ye]=Un[Ue]=Un[je]=Un[ke]=Un[bi]=Un[Rr]=Un[Xi]=Un[bo]=!0,Un[$e]=Un[be]=Un[mt]=!1;var VZ={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},WZ={"&":"&","<":"<",">":">",'"':""","'":"'"},qZ={"&":"&","<":"<",">":">",""":'"',"'":"'"},KZ={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},GZ=parseFloat,YZ=parseInt,U5=typeof ao=="object"&&ao&&ao.Object===Object&&ao,ZZ=typeof self=="object"&&self&&self.Object===Object&&self,ui=U5||ZZ||Function("return this")(),P2=t&&!t.nodeType&&t,Ql=P2&&!0&&e&&!e.nodeType&&e,H5=Ql&&Ql.exports===P2,k2=H5&&U5.process,Go=function(){try{var ce=Ql&&Ql.require&&Ql.require("util").types;return ce||k2&&k2.binding&&k2.binding("util")}catch{}}(),V5=Go&&Go.isArrayBuffer,W5=Go&&Go.isDate,q5=Go&&Go.isMap,K5=Go&&Go.isRegExp,G5=Go&&Go.isSet,Y5=Go&&Go.isTypedArray;function wo(ce,Oe,we){switch(we.length){case 0:return ce.call(Oe);case 1:return ce.call(Oe,we[0]);case 2:return ce.call(Oe,we[0],we[1]);case 3:return ce.call(Oe,we[0],we[1],we[2])}return ce.apply(Oe,we)}function XZ(ce,Oe,we,ot){for(var Bt=-1,Sn=ce==null?0:ce.length;++Bt-1}function T2(ce,Oe,we){for(var ot=-1,Bt=ce==null?0:ce.length;++ot-1;);return we}function r8(ce,Oe){for(var we=ce.length;we--&&Of(Oe,ce[we],0)>-1;);return we}function aX(ce,Oe){for(var we=ce.length,ot=0;we--;)ce[we]===Oe&&++ot;return ot}var sX=$2(VZ),uX=$2(WZ);function lX(ce){return"\\"+KZ[ce]}function cX(ce,Oe){return ce==null?n:ce[Oe]}function Af(ce){return BZ.test(ce)}function fX(ce){return zZ.test(ce)}function dX(ce){for(var Oe,we=[];!(Oe=ce.next()).done;)we.push(Oe.value);return we}function F2(ce){var Oe=-1,we=Array(ce.size);return ce.forEach(function(ot,Bt){we[++Oe]=[Bt,ot]}),we}function i8(ce,Oe){return function(we){return ce(Oe(we))}}function Lu(ce,Oe){for(var we=-1,ot=ce.length,Bt=0,Sn=[];++we-1}function JX(d,g){var _=this.__data__,P=mv(_,d);return P<0?(++this.size,_.push([d,g])):_[P][1]=g,this}Ls.prototype.clear=YX,Ls.prototype.delete=ZX,Ls.prototype.get=XX,Ls.prototype.has=QX,Ls.prototype.set=JX;function Fs(d){var g=-1,_=d==null?0:d.length;for(this.clear();++g<_;){var P=d[g];this.set(P[0],P[1])}}function eQ(){this.size=0,this.__data__={hash:new ec,map:new(cp||Ls),string:new ec}}function tQ(d){var g=Pv(this,d).delete(d);return this.size-=g?1:0,g}function nQ(d){return Pv(this,d).get(d)}function rQ(d){return Pv(this,d).has(d)}function iQ(d,g){var _=Pv(this,d),P=_.size;return _.set(d,g),this.size+=_.size==P?0:1,this}Fs.prototype.clear=eQ,Fs.prototype.delete=tQ,Fs.prototype.get=nQ,Fs.prototype.has=rQ,Fs.prototype.set=iQ;function tc(d){var g=-1,_=d==null?0:d.length;for(this.__data__=new Fs;++g<_;)this.add(d[g])}function oQ(d){return this.__data__.set(d,u),this}function aQ(d){return this.__data__.has(d)}tc.prototype.add=tc.prototype.push=oQ,tc.prototype.has=aQ;function Ea(d){var g=this.__data__=new Ls(d);this.size=g.size}function sQ(){this.__data__=new Ls,this.size=0}function uQ(d){var g=this.__data__,_=g.delete(d);return this.size=g.size,_}function lQ(d){return this.__data__.get(d)}function cQ(d){return this.__data__.has(d)}function fQ(d,g){var _=this.__data__;if(_ instanceof Ls){var P=_.__data__;if(!cp||P.length=g?d:g)),d}function Qo(d,g,_,P,D,K){var J,se=g&f,fe=g&h,Me=g&p;if(_&&(J=D?_(d,P,D,K):_(d)),J!==n)return J;if(!lr(d))return d;var Re=Ht(d);if(Re){if(J=rJ(d),!se)return Qi(d,J)}else{var Ie=_i(d),et=Ie==be||Ie==yt;if(Hu(d))return B8(d,se);if(Ie==nn||Ie==de||et&&!D){if(J=fe||et?{}:ok(d),!se)return fe?qQ(d,gQ(J,d)):WQ(d,m8(J,d))}else{if(!Un[Ie])return D?d:{};J=iJ(d,Ie,se)}}K||(K=new Ea);var ft=K.get(d);if(ft)return ft;K.set(d,J),$k(d)?d.forEach(function(Pt){J.add(Qo(Pt,g,_,Pt,d,K))}):Rk(d)&&d.forEach(function(Pt,on){J.set(on,Qo(Pt,g,_,on,d,K))});var At=Me?fe?c_:l_:fe?eo:Qr,Qt=Re?n:At(d);return Yo(Qt||d,function(Pt,on){Qt&&(on=Pt,Pt=d[on]),pp(J,on,Qo(Pt,g,_,on,d,K))}),J}function mQ(d){var g=Qr(d);return function(_){return v8(_,d,g)}}function v8(d,g,_){var P=_.length;if(d==null)return!P;for(d=jn(d);P--;){var D=_[P],K=g[D],J=d[D];if(J===n&&!(D in d)||!K(J))return!1}return!0}function y8(d,g,_){if(typeof d!="function")throw new Zo(a);return wp(function(){d.apply(n,_)},g)}function gp(d,g,_,P){var D=-1,K=Jm,J=!0,se=d.length,fe=[],Me=g.length;if(!se)return fe;_&&(g=rr(g,_o(_))),P?(K=T2,J=!1):g.length>=i&&(K=up,J=!1,g=new tc(g));e:for(;++DD?0:D+_),P=P===n||P>D?D:Zt(P),P<0&&(P+=D),P=_>P?0:Nk(P);_0&&_(se)?g>1?li(se,g-1,_,P,D):Nu(D,se):P||(D[D.length]=se)}return D}var W2=q8(),w8=q8(!0);function os(d,g){return d&&W2(d,g,Qr)}function q2(d,g){return d&&w8(d,g,Qr)}function yv(d,g){return Iu(g,function(_){return Hs(d[_])})}function rc(d,g){g=zu(g,d);for(var _=0,P=g.length;d!=null&&_g}function bQ(d,g){return d!=null&&Tn.call(d,g)}function xQ(d,g){return d!=null&&g in jn(d)}function wQ(d,g,_){return d>=wi(g,_)&&d=120&&Re.length>=120)?new tc(J&&Re):n}Re=d[0];var Ie=-1,et=se[0];e:for(;++Ie-1;)se!==d&&lv.call(se,fe,1),lv.call(d,fe,1);return d}function R8(d,g){for(var _=d?g.length:0,P=_-1;_--;){var D=g[_];if(_==P||D!==K){var K=D;Us(D)?lv.call(d,D,1):n_(d,D)}}return d}function J2(d,g){return d+dv(d8()*(g-d+1))}function $Q(d,g,_,P){for(var D=-1,K=Fr(fv((g-d)/(_||1)),0),J=we(K);K--;)J[P?K:++D]=d,d+=_;return J}function e_(d,g){var _="";if(!d||g<1||g>F)return _;do g%2&&(_+=d),g=dv(g/2),g&&(d+=d);while(g);return _}function tn(d,g){return v_(uk(d,g,to),d+"")}function IQ(d){return g8(Ff(d))}function NQ(d,g){var _=Ff(d);return kv(_,nc(g,0,_.length))}function yp(d,g,_,P){if(!lr(d))return d;g=zu(g,d);for(var D=-1,K=g.length,J=K-1,se=d;se!=null&&++DD?0:D+g),_=_>D?D:_,_<0&&(_+=D),D=g>_?0:_-g>>>0,g>>>=0;for(var K=we(D);++P>>1,J=d[K];J!==null&&!Co(J)&&(_?J<=g:J=i){var Me=g?null:ZQ(d);if(Me)return tv(Me);J=!1,D=up,fe=new tc}else fe=g?[]:se;e:for(;++P=P?d:Jo(d,g,_)}var j8=AX||function(d){return ui.clearTimeout(d)};function B8(d,g){if(g)return d.slice();var _=d.length,P=s8?s8(_):new d.constructor(_);return d.copy(P),P}function a_(d){var g=new d.constructor(d.byteLength);return new sv(g).set(new sv(d)),g}function zQ(d,g){var _=g?a_(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.byteLength)}function UQ(d){var g=new d.constructor(d.source,Be.exec(d));return g.lastIndex=d.lastIndex,g}function HQ(d){return hp?jn(hp.call(d)):{}}function z8(d,g){var _=g?a_(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.length)}function U8(d,g){if(d!==g){var _=d!==n,P=d===null,D=d===d,K=Co(d),J=g!==n,se=g===null,fe=g===g,Me=Co(g);if(!se&&!Me&&!K&&d>g||K&&J&&fe&&!se&&!Me||P&&J&&fe||!_&&fe||!D)return 1;if(!P&&!K&&!Me&&d=se)return fe;var Me=_[P];return fe*(Me=="desc"?-1:1)}}return d.index-g.index}function H8(d,g,_,P){for(var D=-1,K=d.length,J=_.length,se=-1,fe=g.length,Me=Fr(K-J,0),Re=we(fe+Me),Ie=!P;++se1?_[D-1]:n,J=D>2?_[2]:n;for(K=d.length>3&&typeof K=="function"?(D--,K):n,J&&Li(_[0],_[1],J)&&(K=D<3?n:K,D=1),g=jn(g);++P-1?D[K?g[J]:J]:n}}function Y8(d){return zs(function(g){var _=g.length,P=_,D=Xo.prototype.thru;for(d&&g.reverse();P--;){var K=g[P];if(typeof K!="function")throw new Zo(a);if(D&&!J&&Av(K)=="wrapper")var J=new Xo([],!0)}for(P=J?P:_;++P<_;){K=g[P];var se=Av(K),fe=se=="wrapper"?f_(K):n;fe&&g_(fe[0])&&fe[1]==(k|S|E|M)&&!fe[4].length&&fe[9]==1?J=J[Av(fe[0])].apply(J,fe[3]):J=K.length==1&&g_(K)?J[se]():J.thru(K)}return function(){var Me=arguments,Re=Me[0];if(J&&Me.length==1&&Ht(Re))return J.plant(Re).value();for(var Ie=0,et=_?g[Ie].apply(this,Me):Re;++Ie<_;)et=g[Ie].call(this,et);return et}})}function Sv(d,g,_,P,D,K,J,se,fe,Me){var Re=g&k,Ie=g&b,et=g&w,ft=g&(S|O),At=g&N,Qt=et?n:bp(d);function Pt(){for(var on=arguments.length,pn=we(on),Eo=on;Eo--;)pn[Eo]=arguments[Eo];if(ft)var Fi=Nf(Pt),Oo=aX(pn,Fi);if(P&&(pn=H8(pn,P,D,ft)),K&&(pn=V8(pn,K,J,ft)),on-=Oo,ft&&on1&&pn.reverse(),Re&&fese))return!1;var Me=K.get(d),Re=K.get(g);if(Me&&Re)return Me==g&&Re==d;var Ie=-1,et=!0,ft=_&v?new tc:n;for(K.set(d,g),K.set(g,d);++Ie1?"& ":"")+g[P],g=g.join(_>2?", ":" "),d.replace(I,`{ + */gx.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",l=500,c="__lodash_placeholder__",f=1,h=2,p=4,m=1,v=2,b=1,w=2,x=4,S=8,O=16,E=32,C=64,k=128,M=256,N=512,z=30,H="...",V=800,ne=16,Z=1,G=2,q=3,W=1/0,j=9007199254740991,K=17976931348623157e292,Y=NaN,oe=4294967295,Q=oe-1,J=oe>>>1,ue=[["ary",k],["bind",b],["bindKey",w],["curry",S],["curryRight",O],["flip",N],["partial",E],["partialRight",C],["rearg",M]],de="[object Arguments]",Se="[object Array]",me="[object AsyncFunction]",Ze="[object Boolean]",Ae="[object Date]",Le="[object DOMException]",$e="[object Error]",be="[object Function]",yt="[object GeneratorFunction]",lt="[object Map]",Nt="[object Number]",yn="[object Null]",nn="[object Object]",ie="[object Promise]",pe="[object Proxy]",ye="[object RegExp]",Ue="[object Set]",je="[object String]",ke="[object Symbol]",nt="[object Undefined]",mt="[object WeakMap]",xn="[object WeakSet]",Ht="[object ArrayBuffer]",wn="[object DataView]",Ii="[object Float32Array]",br="[object Float64Array]",yi="[object Int8Array]",sr="[object Int16Array]",si="[object Int32Array]",bi="[object Uint8Array]",Rr="[object Uint8ClampedArray]",Xi="[object Uint16Array]",yo="[object Uint32Array]",xi=/\b__p \+= '';/g,Dr=/\b(__p \+=) '' \+/g,Sa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,hn=/[&<>"']/g,_n=RegExp(_t.source),qn=RegExp(hn.source),ur=/<%-([\s\S]+?)%>/g,Xr=/<%([\s\S]+?)%>/g,bo=/<%=([\s\S]+?)%>/g,Zl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sf=/^\w*$/,ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,le=/[\\^$.*+?()[\]{}|]/g,xe=RegExp(le.source),T=/^\s+/,D=/\s/,$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,A=/\{\n\/\* \[wrapped with (.+)\] \*/,L=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,re=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,Ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Be=/\w*$/,He=/^[-+]0x[0-9a-f]+$/i,ct=/^0b[01]+$/i,Ne=/^\[object .+?Constructor\]$/,rt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,Ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gt=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",wt="\\u0300-\\u036f",Je="\\ufe20-\\ufe2f",ut="\\u20d0-\\u20ff",Qe=wt+Je+ut,Fe="\\u2700-\\u27bf",Ke="a-z\\xdf-\\xf6\\xf8-\\xff",Ge="\\xac\\xb1\\xd7\\xf7",ve="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ge="\\u2000-\\u206f",De=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",ze=Ge+ve+ge+De,vt="['’]",Lt="["+xt+"]",Ft="["+ze+"]",$t="["+Qe+"]",te="\\d+",Yt="["+Fe+"]",sn="["+Ke+"]",un="[^"+xt+ze+te+Fe+Ke+Pe+"]",jt="\\ud83c[\\udffb-\\udfff]",ln="(?:"+$t+"|"+jt+")",rn="[^"+xt+"]",Gn="(?:\\ud83c[\\udde6-\\uddff]){2}",mn="[\\ud800-\\udbff][\\udc00-\\udfff]",kn="["+Pe+"]",Yn="\\u200d",Zn="(?:"+sn+"|"+un+")",xr="(?:"+kn+"|"+un+")",$r="(?:"+vt+"(?:d|ll|m|re|s|t|ve))?",Ir="(?:"+vt+"(?:D|LL|M|RE|S|T|VE))?",Nr=ln+"?",T5="["+Te+"]?",pZ="(?:"+Yn+"(?:"+[rn,Gn,mn].join("|")+")"+T5+Nr+")*",gZ="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mZ="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",M5=T5+Nr+pZ,vZ="(?:"+[Yt,Gn,mn].join("|")+")"+M5,yZ="(?:"+[rn+$t+"?",$t,Gn,mn,Lt].join("|")+")",bZ=RegExp(vt,"g"),xZ=RegExp($t,"g"),_2=RegExp(jt+"(?="+jt+")|"+yZ+M5,"g"),wZ=RegExp([kn+"?"+sn+"+"+$r+"(?="+[Ft,kn,"$"].join("|")+")",xr+"+"+Ir+"(?="+[Ft,kn+Zn,"$"].join("|")+")",kn+"?"+Zn+"+"+$r,kn+"+"+Ir,mZ,gZ,te,vZ].join("|"),"g"),_Z=RegExp("["+Yn+xt+Qe+Te+"]"),SZ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,CZ=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],EZ=-1,Xn={};Xn[Ii]=Xn[br]=Xn[yi]=Xn[sr]=Xn[si]=Xn[bi]=Xn[Rr]=Xn[Xi]=Xn[yo]=!0,Xn[de]=Xn[Se]=Xn[Ht]=Xn[Ze]=Xn[wn]=Xn[Ae]=Xn[$e]=Xn[be]=Xn[lt]=Xn[Nt]=Xn[nn]=Xn[ye]=Xn[Ue]=Xn[je]=Xn[mt]=!1;var Un={};Un[de]=Un[Se]=Un[Ht]=Un[wn]=Un[Ze]=Un[Ae]=Un[Ii]=Un[br]=Un[yi]=Un[sr]=Un[si]=Un[lt]=Un[Nt]=Un[nn]=Un[ye]=Un[Ue]=Un[je]=Un[ke]=Un[bi]=Un[Rr]=Un[Xi]=Un[yo]=!0,Un[$e]=Un[be]=Un[mt]=!1;var OZ={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},AZ={"&":"&","<":"<",">":">",'"':""","'":"'"},PZ={"&":"&","<":"<",">":">",""":'"',"'":"'"},kZ={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},TZ=parseFloat,MZ=parseInt,R5=typeof la=="object"&&la&&la.Object===Object&&la,RZ=typeof self=="object"&&self&&self.Object===Object&&self,ui=R5||RZ||Function("return this")(),S2=t&&!t.nodeType&&t,Xl=S2&&!0&&e&&!e.nodeType&&e,D5=Xl&&Xl.exports===S2,C2=D5&&R5.process,qo=function(){try{var ce=Xl&&Xl.require&&Xl.require("util").types;return ce||C2&&C2.binding&&C2.binding("util")}catch{}}(),$5=qo&&qo.isArrayBuffer,I5=qo&&qo.isDate,N5=qo&&qo.isMap,L5=qo&&qo.isRegExp,F5=qo&&qo.isSet,j5=qo&&qo.isTypedArray;function xo(ce,Oe,we){switch(we.length){case 0:return ce.call(Oe);case 1:return ce.call(Oe,we[0]);case 2:return ce.call(Oe,we[0],we[1]);case 3:return ce.call(Oe,we[0],we[1],we[2])}return ce.apply(Oe,we)}function DZ(ce,Oe,we,ot){for(var Bt=-1,Sn=ce==null?0:ce.length;++Bt-1}function E2(ce,Oe,we){for(var ot=-1,Bt=ce==null?0:ce.length;++ot-1;);return we}function q5(ce,Oe){for(var we=ce.length;we--&&Cf(Oe,ce[we],0)>-1;);return we}function UZ(ce,Oe){for(var we=ce.length,ot=0;we--;)ce[we]===Oe&&++ot;return ot}var VZ=k2(OZ),WZ=k2(AZ);function HZ(ce){return"\\"+kZ[ce]}function KZ(ce,Oe){return ce==null?n:ce[Oe]}function Ef(ce){return _Z.test(ce)}function qZ(ce){return SZ.test(ce)}function GZ(ce){for(var Oe,we=[];!(Oe=ce.next()).done;)we.push(Oe.value);return we}function D2(ce){var Oe=-1,we=Array(ce.size);return ce.forEach(function(ot,Bt){we[++Oe]=[Bt,ot]}),we}function G5(ce,Oe){return function(we){return ce(Oe(we))}}function Nu(ce,Oe){for(var we=-1,ot=ce.length,Bt=0,Sn=[];++we-1}function IX(d,g){var _=this.__data__,P=dv(_,d);return P<0?(++this.size,_.push([d,g])):_[P][1]=g,this}Ls.prototype.clear=MX,Ls.prototype.delete=RX,Ls.prototype.get=DX,Ls.prototype.has=$X,Ls.prototype.set=IX;function Fs(d){var g=-1,_=d==null?0:d.length;for(this.clear();++g<_;){var P=d[g];this.set(P[0],P[1])}}function NX(){this.size=0,this.__data__={hash:new Jl,map:new(sp||Ls),string:new Jl}}function LX(d){var g=Cv(this,d).delete(d);return this.size-=g?1:0,g}function FX(d){return Cv(this,d).get(d)}function jX(d){return Cv(this,d).has(d)}function BX(d,g){var _=Cv(this,d),P=_.size;return _.set(d,g),this.size+=_.size==P?0:1,this}Fs.prototype.clear=NX,Fs.prototype.delete=LX,Fs.prototype.get=FX,Fs.prototype.has=jX,Fs.prototype.set=BX;function ec(d){var g=-1,_=d==null?0:d.length;for(this.__data__=new Fs;++g<_;)this.add(d[g])}function zX(d){return this.__data__.set(d,u),this}function UX(d){return this.__data__.has(d)}ec.prototype.add=ec.prototype.push=zX,ec.prototype.has=UX;function Ea(d){var g=this.__data__=new Ls(d);this.size=g.size}function VX(){this.__data__=new Ls,this.size=0}function WX(d){var g=this.__data__,_=g.delete(d);return this.size=g.size,_}function HX(d){return this.__data__.get(d)}function KX(d){return this.__data__.has(d)}function qX(d,g){var _=this.__data__;if(_ instanceof Ls){var P=_.__data__;if(!sp||P.length=g?d:g)),d}function Xo(d,g,_,P,R,U){var X,se=g&f,fe=g&h,Me=g&p;if(_&&(X=R?_(d,P,R,U):_(d)),X!==n)return X;if(!lr(d))return d;var Re=Vt(d);if(Re){if(X=jQ(d),!se)return Qi(d,X)}else{var Ie=_i(d),et=Ie==be||Ie==yt;if(Uu(d))return T8(d,se);if(Ie==nn||Ie==de||et&&!R){if(X=fe||et?{}:Y8(d),!se)return fe?PQ(d,XX(X,d)):AQ(d,a8(X,d))}else{if(!Un[Ie])return R?d:{};X=BQ(d,Ie,se)}}U||(U=new Ea);var ft=U.get(d);if(ft)return ft;U.set(d,X),Ck(d)?d.forEach(function(Pt){X.add(Xo(Pt,g,_,Pt,d,U))}):_k(d)&&d.forEach(function(Pt,on){X.set(on,Xo(Pt,g,_,on,d,U))});var At=Me?fe?o_:i_:fe?eo:Qr,Qt=Re?n:At(d);return Go(Qt||d,function(Pt,on){Qt&&(on=Pt,Pt=d[on]),fp(X,on,Xo(Pt,g,_,on,d,U))}),X}function QX(d){var g=Qr(d);return function(_){return s8(_,d,g)}}function s8(d,g,_){var P=_.length;if(d==null)return!P;for(d=jn(d);P--;){var R=_[P],U=g[R],X=d[R];if(X===n&&!(R in d)||!U(X))return!1}return!0}function u8(d,g,_){if(typeof d!="function")throw new Yo(a);return yp(function(){d.apply(n,_)},g)}function dp(d,g,_,P){var R=-1,U=Ym,X=!0,se=d.length,fe=[],Me=g.length;if(!se)return fe;_&&(g=rr(g,wo(_))),P?(U=E2,X=!1):g.length>=i&&(U=op,X=!1,g=new ec(g));e:for(;++RR?0:R+_),P=P===n||P>R?R:Zt(P),P<0&&(P+=R),P=_>P?0:Ok(P);_0&&_(se)?g>1?li(se,g-1,_,P,R):Iu(R,se):P||(R[R.length]=se)}return R}var B2=N8(),f8=N8(!0);function os(d,g){return d&&B2(d,g,Qr)}function z2(d,g){return d&&f8(d,g,Qr)}function pv(d,g){return $u(g,function(_){return Vs(d[_])})}function nc(d,g){g=Bu(g,d);for(var _=0,P=g.length;d!=null&&_g}function tQ(d,g){return d!=null&&Tn.call(d,g)}function nQ(d,g){return d!=null&&g in jn(d)}function rQ(d,g,_){return d>=wi(g,_)&&d=120&&Re.length>=120)?new ec(X&&Re):n}Re=d[0];var Ie=-1,et=se[0];e:for(;++Ie-1;)se!==d&&ov.call(se,fe,1),ov.call(d,fe,1);return d}function _8(d,g){for(var _=d?g.length:0,P=_-1;_--;){var R=g[_];if(_==P||R!==U){var U=R;Us(R)?ov.call(d,R,1):X2(d,R)}}return d}function G2(d,g){return d+uv(n8()*(g-d+1))}function mQ(d,g,_,P){for(var R=-1,U=Fr(sv((g-d)/(_||1)),0),X=we(U);U--;)X[P?U:++R]=d,d+=_;return X}function Y2(d,g){var _="";if(!d||g<1||g>j)return _;do g%2&&(_+=d),g=uv(g/2),g&&(d+=d);while(g);return _}function tn(d,g){return d_(Q8(d,g,to),d+"")}function vQ(d){return o8(Nf(d))}function yQ(d,g){var _=Nf(d);return Ev(_,tc(g,0,_.length))}function gp(d,g,_,P){if(!lr(d))return d;g=Bu(g,d);for(var R=-1,U=g.length,X=U-1,se=d;se!=null&&++RR?0:R+g),_=_>R?R:_,_<0&&(_+=R),R=g>_?0:_-g>>>0,g>>>=0;for(var U=we(R);++P>>1,X=d[U];X!==null&&!So(X)&&(_?X<=g:X=i){var Me=g?null:RQ(d);if(Me)return Xm(Me);X=!1,R=op,fe=new ec}else fe=g?[]:se;e:for(;++P=P?d:Qo(d,g,_)}var k8=lX||function(d){return ui.clearTimeout(d)};function T8(d,g){if(g)return d.slice();var _=d.length,P=X5?X5(_):new d.constructor(_);return d.copy(P),P}function t_(d){var g=new d.constructor(d.byteLength);return new rv(g).set(new rv(d)),g}function SQ(d,g){var _=g?t_(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.byteLength)}function CQ(d){var g=new d.constructor(d.source,Be.exec(d));return g.lastIndex=d.lastIndex,g}function EQ(d){return cp?jn(cp.call(d)):{}}function M8(d,g){var _=g?t_(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.length)}function R8(d,g){if(d!==g){var _=d!==n,P=d===null,R=d===d,U=So(d),X=g!==n,se=g===null,fe=g===g,Me=So(g);if(!se&&!Me&&!U&&d>g||U&&X&&fe&&!se&&!Me||P&&X&&fe||!_&&fe||!R)return 1;if(!P&&!U&&!Me&&d=se)return fe;var Me=_[P];return fe*(Me=="desc"?-1:1)}}return d.index-g.index}function D8(d,g,_,P){for(var R=-1,U=d.length,X=_.length,se=-1,fe=g.length,Me=Fr(U-X,0),Re=we(fe+Me),Ie=!P;++se1?_[R-1]:n,X=R>2?_[2]:n;for(U=d.length>3&&typeof U=="function"?(R--,U):n,X&&Li(_[0],_[1],X)&&(U=R<3?n:U,R=1),g=jn(g);++P-1?R[U?g[X]:X]:n}}function j8(d){return zs(function(g){var _=g.length,P=_,R=Zo.prototype.thru;for(d&&g.reverse();P--;){var U=g[P];if(typeof U!="function")throw new Yo(a);if(R&&!X&&Sv(U)=="wrapper")var X=new Zo([],!0)}for(P=X?P:_;++P<_;){U=g[P];var se=Sv(U),fe=se=="wrapper"?a_(U):n;fe&&c_(fe[0])&&fe[1]==(k|S|E|M)&&!fe[4].length&&fe[9]==1?X=X[Sv(fe[0])].apply(X,fe[3]):X=U.length==1&&c_(U)?X[se]():X.thru(U)}return function(){var Me=arguments,Re=Me[0];if(X&&Me.length==1&&Vt(Re))return X.plant(Re).value();for(var Ie=0,et=_?g[Ie].apply(this,Me):Re;++Ie<_;)et=g[Ie].call(this,et);return et}})}function bv(d,g,_,P,R,U,X,se,fe,Me){var Re=g&k,Ie=g&b,et=g&w,ft=g&(S|O),At=g&N,Qt=et?n:mp(d);function Pt(){for(var on=arguments.length,pn=we(on),Co=on;Co--;)pn[Co]=arguments[Co];if(ft)var Fi=$f(Pt),Eo=UZ(pn,Fi);if(P&&(pn=D8(pn,P,R,ft)),U&&(pn=$8(pn,U,X,ft)),on-=Eo,ft&&on1&&pn.reverse(),Re&&fese))return!1;var Me=U.get(d),Re=U.get(g);if(Me&&Re)return Me==g&&Re==d;var Ie=-1,et=!0,ft=_&v?new ec:n;for(U.set(d,g),U.set(g,d);++Ie1?"& ":"")+g[P],g=g.join(_>2?", ":" "),d.replace($,`{ /* [wrapped with `+g+`] */ -`)}function aJ(d){return Ht(d)||ac(d)||!!(c8&&d&&d[c8])}function Us(d,g){var _=typeof d;return g=g??F,!!g&&(_=="number"||_!="symbol"&&bt.test(d))&&d>-1&&d%1==0&&d0){if(++g>=W)return arguments[0]}else g=0;return d.apply(n,arguments)}}function kv(d,g){var _=-1,P=d.length,D=P-1;for(g=g===n?P:g;++_1?d[g-1]:n;return _=typeof _=="function"?(d.pop(),_):n,xk(d,_)});function wk(d){var g=H(d);return g.__chain__=!0,g}function vee(d,g){return g(d),d}function Tv(d,g){return g(d)}var yee=zs(function(d){var g=d.length,_=g?d[0]:0,P=this.__wrapped__,D=function(K){return V2(K,d)};return g>1||this.__actions__.length||!(P instanceof cn)||!Us(_)?this.thru(D):(P=P.slice(_,+_+(g?1:0)),P.__actions__.push({func:Tv,args:[D],thisArg:n}),new Xo(P,this.__chain__).thru(function(K){return g&&!K.length&&K.push(n),K}))});function bee(){return wk(this)}function xee(){return new Xo(this.value(),this.__chain__)}function wee(){this.__values__===n&&(this.__values__=Ik(this.value()));var d=this.__index__>=this.__values__.length,g=d?n:this.__values__[this.__index__++];return{done:d,value:g}}function _ee(){return this}function See(d){for(var g,_=this;_ instanceof gv;){var P=pk(_);P.__index__=0,P.__values__=n,g?D.__wrapped__=P:g=P;var D=P;_=_.__wrapped__}return D.__wrapped__=d,g}function Cee(){var d=this.__wrapped__;if(d instanceof cn){var g=d;return this.__actions__.length&&(g=new cn(this)),g=g.reverse(),g.__actions__.push({func:Tv,args:[y_],thisArg:n}),new Xo(g,this.__chain__)}return this.thru(y_)}function Eee(){return L8(this.__wrapped__,this.__actions__)}var Oee=_v(function(d,g,_){Tn.call(d,_)?++d[_]:js(d,_,1)});function Aee(d,g,_){var P=Ht(d)?Z5:vQ;return _&&Li(d,g,_)&&(g=n),P(d,Et(g,3))}function Pee(d,g){var _=Ht(d)?Iu:x8;return _(d,Et(g,3))}var kee=G8(gk),Tee=G8(mk);function Mee(d,g){return li(Mv(d,g),1)}function Ree(d,g){return li(Mv(d,g),U)}function Dee(d,g,_){return _=_===n?1:Zt(_),li(Mv(d,g),_)}function _k(d,g){var _=Ht(d)?Yo:ju;return _(d,Et(g,3))}function Sk(d,g){var _=Ht(d)?QZ:b8;return _(d,Et(g,3))}var $ee=_v(function(d,g,_){Tn.call(d,_)?d[_].push(g):js(d,_,[g])});function Iee(d,g,_,P){d=Ji(d)?d:Ff(d),_=_&&!P?Zt(_):0;var D=d.length;return _<0&&(_=Fr(D+_,0)),Nv(d)?_<=D&&d.indexOf(g,_)>-1:!!D&&Of(d,g,_)>-1}var Nee=tn(function(d,g,_){var P=-1,D=typeof g=="function",K=Ji(d)?we(d.length):[];return ju(d,function(J){K[++P]=D?wo(g,J,_):mp(J,g,_)}),K}),Lee=_v(function(d,g,_){js(d,_,g)});function Mv(d,g){var _=Ht(d)?rr:O8;return _(d,Et(g,3))}function Fee(d,g,_,P){return d==null?[]:(Ht(g)||(g=g==null?[]:[g]),_=P?n:_,Ht(_)||(_=_==null?[]:[_]),T8(d,g,_))}var jee=_v(function(d,g,_){d[_?0:1].push(g)},function(){return[[],[]]});function Bee(d,g,_){var P=Ht(d)?M2:e8,D=arguments.length<3;return P(d,Et(g,4),_,D,ju)}function zee(d,g,_){var P=Ht(d)?JZ:e8,D=arguments.length<3;return P(d,Et(g,4),_,D,b8)}function Uee(d,g){var _=Ht(d)?Iu:x8;return _(d,$v(Et(g,3)))}function Hee(d){var g=Ht(d)?g8:IQ;return g(d)}function Vee(d,g,_){(_?Li(d,g,_):g===n)?g=1:g=Zt(g);var P=Ht(d)?dQ:NQ;return P(d,g)}function Wee(d){var g=Ht(d)?hQ:FQ;return g(d)}function qee(d){if(d==null)return 0;if(Ji(d))return Nv(d)?Pf(d):d.length;var g=_i(d);return g==lt||g==Ue?d.size:Z2(d).length}function Kee(d,g,_){var P=Ht(d)?R2:jQ;return _&&Li(d,g,_)&&(g=n),P(d,Et(g,3))}var Gee=tn(function(d,g){if(d==null)return[];var _=g.length;return _>1&&Li(d,g[0],g[1])?g=[]:_>2&&Li(g[0],g[1],g[2])&&(g=[g[0]]),T8(d,li(g,1),[])}),Rv=PX||function(){return ui.Date.now()};function Yee(d,g){if(typeof g!="function")throw new Zo(a);return d=Zt(d),function(){if(--d<1)return g.apply(this,arguments)}}function Ck(d,g,_){return g=_?n:g,g=d&&g==null?d.length:g,Bs(d,k,n,n,n,n,g)}function Ek(d,g){var _;if(typeof g!="function")throw new Zo(a);return d=Zt(d),function(){return--d>0&&(_=g.apply(this,arguments)),d<=1&&(g=n),_}}var x_=tn(function(d,g,_){var P=b;if(_.length){var D=Lu(_,Nf(x_));P|=E}return Bs(d,P,g,_,D)}),Ok=tn(function(d,g,_){var P=b|w;if(_.length){var D=Lu(_,Nf(Ok));P|=E}return Bs(g,P,d,_,D)});function Ak(d,g,_){g=_?n:g;var P=Bs(d,S,n,n,n,n,n,g);return P.placeholder=Ak.placeholder,P}function Pk(d,g,_){g=_?n:g;var P=Bs(d,O,n,n,n,n,n,g);return P.placeholder=Pk.placeholder,P}function kk(d,g,_){var P,D,K,J,se,fe,Me=0,Re=!1,Ie=!1,et=!0;if(typeof d!="function")throw new Zo(a);g=ta(g)||0,lr(_)&&(Re=!!_.leading,Ie="maxWait"in _,K=Ie?Fr(ta(_.maxWait)||0,g):K,et="trailing"in _?!!_.trailing:et);function ft(_r){var Aa=P,Ws=D;return P=D=n,Me=_r,J=d.apply(Ws,Aa),J}function At(_r){return Me=_r,se=wp(on,g),Re?ft(_r):J}function Qt(_r){var Aa=_r-fe,Ws=_r-Me,Gk=g-Aa;return Ie?wi(Gk,K-Ws):Gk}function Pt(_r){var Aa=_r-fe,Ws=_r-Me;return fe===n||Aa>=g||Aa<0||Ie&&Ws>=K}function on(){var _r=Rv();if(Pt(_r))return pn(_r);se=wp(on,Qt(_r))}function pn(_r){return se=n,et&&P?ft(_r):(P=D=n,J)}function Eo(){se!==n&&j8(se),Me=0,P=fe=D=se=n}function Fi(){return se===n?J:pn(Rv())}function Oo(){var _r=Rv(),Aa=Pt(_r);if(P=arguments,D=this,fe=_r,Aa){if(se===n)return At(fe);if(Ie)return j8(se),se=wp(on,g),ft(fe)}return se===n&&(se=wp(on,g)),J}return Oo.cancel=Eo,Oo.flush=Fi,Oo}var Zee=tn(function(d,g){return y8(d,1,g)}),Xee=tn(function(d,g,_){return y8(d,ta(g)||0,_)});function Qee(d){return Bs(d,N)}function Dv(d,g){if(typeof d!="function"||g!=null&&typeof g!="function")throw new Zo(a);var _=function(){var P=arguments,D=g?g.apply(this,P):P[0],K=_.cache;if(K.has(D))return K.get(D);var J=d.apply(this,P);return _.cache=K.set(D,J)||K,J};return _.cache=new(Dv.Cache||Fs),_}Dv.Cache=Fs;function $v(d){if(typeof d!="function")throw new Zo(a);return function(){var g=arguments;switch(g.length){case 0:return!d.call(this);case 1:return!d.call(this,g[0]);case 2:return!d.call(this,g[0],g[1]);case 3:return!d.call(this,g[0],g[1],g[2])}return!d.apply(this,g)}}function Jee(d){return Ek(2,d)}var ete=BQ(function(d,g){g=g.length==1&&Ht(g[0])?rr(g[0],_o(Et())):rr(li(g,1),_o(Et()));var _=g.length;return tn(function(P){for(var D=-1,K=wi(P.length,_);++D=g}),ac=S8(function(){return arguments}())?S8:function(d){return pr(d)&&Tn.call(d,"callee")&&!l8.call(d,"callee")},Ht=we.isArray,gte=V5?_o(V5):SQ;function Ji(d){return d!=null&&Iv(d.length)&&!Hs(d)}function wr(d){return pr(d)&&Ji(d)}function mte(d){return d===!0||d===!1||pr(d)&&Ni(d)==Ze}var Hu=TX||R_,vte=W5?_o(W5):CQ;function yte(d){return pr(d)&&d.nodeType===1&&!_p(d)}function bte(d){if(d==null)return!0;if(Ji(d)&&(Ht(d)||typeof d=="string"||typeof d.splice=="function"||Hu(d)||Lf(d)||ac(d)))return!d.length;var g=_i(d);if(g==lt||g==Ue)return!d.size;if(xp(d))return!Z2(d).length;for(var _ in d)if(Tn.call(d,_))return!1;return!0}function xte(d,g){return vp(d,g)}function wte(d,g,_){_=typeof _=="function"?_:n;var P=_?_(d,g):n;return P===n?vp(d,g,n,_):!!P}function __(d){if(!pr(d))return!1;var g=Ni(d);return g==$e||g==Le||typeof d.message=="string"&&typeof d.name=="string"&&!_p(d)}function _te(d){return typeof d=="number"&&f8(d)}function Hs(d){if(!lr(d))return!1;var g=Ni(d);return g==be||g==yt||g==me||g==pe}function Mk(d){return typeof d=="number"&&d==Zt(d)}function Iv(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=F}function lr(d){var g=typeof d;return d!=null&&(g=="object"||g=="function")}function pr(d){return d!=null&&typeof d=="object"}var Rk=q5?_o(q5):OQ;function Ste(d,g){return d===g||Y2(d,g,d_(g))}function Cte(d,g,_){return _=typeof _=="function"?_:n,Y2(d,g,d_(g),_)}function Ete(d){return Dk(d)&&d!=+d}function Ote(d){if(lJ(d))throw new Bt(o);return C8(d)}function Ate(d){return d===null}function Pte(d){return d==null}function Dk(d){return typeof d=="number"||pr(d)&&Ni(d)==Nt}function _p(d){if(!pr(d)||Ni(d)!=nn)return!1;var g=uv(d);if(g===null)return!0;var _=Tn.call(g,"constructor")&&g.constructor;return typeof _=="function"&&_ instanceof _&&iv.call(_)==CX}var S_=K5?_o(K5):AQ;function kte(d){return Mk(d)&&d>=-F&&d<=F}var $k=G5?_o(G5):PQ;function Nv(d){return typeof d=="string"||!Ht(d)&&pr(d)&&Ni(d)==je}function Co(d){return typeof d=="symbol"||pr(d)&&Ni(d)==ke}var Lf=Y5?_o(Y5):kQ;function Tte(d){return d===n}function Mte(d){return pr(d)&&_i(d)==mt}function Rte(d){return pr(d)&&Ni(d)==xn}var Dte=Ov(X2),$te=Ov(function(d,g){return d<=g});function Ik(d){if(!d)return[];if(Ji(d))return Nv(d)?Ca(d):Qi(d);if(lp&&d[lp])return dX(d[lp]());var g=_i(d),_=g==lt?F2:g==Ue?tv:Ff;return _(d)}function Vs(d){if(!d)return d===0?d:0;if(d=ta(d),d===U||d===-U){var g=d<0?-1:1;return g*V}return d===d?d:0}function Zt(d){var g=Vs(d),_=g%1;return g===g?_?g-_:g:0}function Nk(d){return d?nc(Zt(d),0,oe):0}function ta(d){if(typeof d=="number")return d;if(Co(d))return G;if(lr(d)){var g=typeof d.valueOf=="function"?d.valueOf():d;d=lr(g)?g+"":g}if(typeof d!="string")return d===0?d:+d;d=t8(d);var _=ct.test(d);return _||rt.test(d)?YZ(d.slice(2),_?2:8):We.test(d)?G:+d}function Lk(d){return as(d,eo(d))}function Ite(d){return d?nc(Zt(d),-F,F):d===0?d:0}function An(d){return d==null?"":So(d)}var Nte=$f(function(d,g){if(xp(g)||Ji(g)){as(g,Qr(g),d);return}for(var _ in g)Tn.call(g,_)&&pp(d,_,g[_])}),Fk=$f(function(d,g){as(g,eo(g),d)}),Lv=$f(function(d,g,_,P){as(g,eo(g),d,P)}),Lte=$f(function(d,g,_,P){as(g,Qr(g),d,P)}),Fte=zs(V2);function jte(d,g){var _=Df(d);return g==null?_:m8(_,g)}var Bte=tn(function(d,g){d=jn(d);var _=-1,P=g.length,D=P>2?g[2]:n;for(D&&Li(g[0],g[1],D)&&(P=1);++_1),K}),as(d,c_(d),_),P&&(_=Qo(_,f|h|p,XQ));for(var D=g.length;D--;)n_(_,g[D]);return _});function ine(d,g){return Bk(d,$v(Et(g)))}var one=zs(function(d,g){return d==null?{}:RQ(d,g)});function Bk(d,g){if(d==null)return{};var _=rr(c_(d),function(P){return[P]});return g=Et(g),M8(d,_,function(P,D){return g(P,D[0])})}function ane(d,g,_){g=zu(g,d);var P=-1,D=g.length;for(D||(D=1,d=n);++Pg){var P=d;d=g,g=P}if(_||d%1||g%1){var D=d8();return wi(d+D*(g-d+GZ("1e-"+((D+"").length-1))),g)}return J2(d,g)}var vne=If(function(d,g,_){return g=g.toLowerCase(),d+(_?Hk(g):g)});function Hk(d){return O_(An(d).toLowerCase())}function Vk(d){return d=An(d),d&&d.replace(Ot,sX).replace(FZ,"")}function yne(d,g,_){d=An(d),g=So(g);var P=d.length;_=_===n?P:nc(Zt(_),0,P);var D=_;return _-=g.length,_>=0&&d.slice(_,D)==g}function bne(d){return d=An(d),d&&Kn.test(d)?d.replace(hn,uX):d}function xne(d){return d=An(d),d&&xe.test(d)?d.replace(le,"\\$&"):d}var wne=If(function(d,g,_){return d+(_?"-":"")+g.toLowerCase()}),_ne=If(function(d,g,_){return d+(_?" ":"")+g.toLowerCase()}),Sne=K8("toLowerCase");function Cne(d,g,_){d=An(d),g=Zt(g);var P=g?Pf(d):0;if(!g||P>=g)return d;var D=(g-P)/2;return Ev(dv(D),_)+d+Ev(fv(D),_)}function Ene(d,g,_){d=An(d),g=Zt(g);var P=g?Pf(d):0;return g&&P>>0,_?(d=An(d),d&&(typeof g=="string"||g!=null&&!S_(g))&&(g=So(g),!g&&Af(d))?Uu(Ca(d),0,_):d.split(g,_)):[]}var Rne=If(function(d,g,_){return d+(_?" ":"")+O_(g)});function Dne(d,g,_){return d=An(d),_=_==null?0:nc(Zt(_),0,d.length),g=So(g),d.slice(_,_+g.length)==g}function $ne(d,g,_){var P=H.templateSettings;_&&Li(d,g,_)&&(g=n),d=An(d),g=Lv({},g,P,ek);var D=Lv({},g.imports,P.imports,ek),K=Qr(D),J=L2(D,K),se,fe,Me=0,Re=g.interpolate||gt,Ie="__p += '",et=j2((g.escape||gt).source+"|"+Re.source+"|"+(Re===xo?Ce:gt).source+"|"+(g.evaluate||gt).source+"|$","g"),ft="//# sourceURL="+(Tn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++HZ+"]")+` -`;d.replace(et,function(Pt,on,pn,Eo,Fi,Oo){return pn||(pn=Eo),Ie+=d.slice(Me,Oo).replace(ht,lX),on&&(se=!0,Ie+=`' + +`)}function UQ(d){return Vt(d)||oc(d)||!!(e8&&d&&d[e8])}function Us(d,g){var _=typeof d;return g=g??j,!!g&&(_=="number"||_!="symbol"&&bt.test(d))&&d>-1&&d%1==0&&d0){if(++g>=V)return arguments[0]}else g=0;return d.apply(n,arguments)}}function Ev(d,g){var _=-1,P=d.length,R=P-1;for(g=g===n?P:g;++_1?d[g-1]:n;return _=typeof _=="function"?(d.pop(),_):n,ck(d,_)});function fk(d){var g=B(d);return g.__chain__=!0,g}function JJ(d,g){return g(d),d}function Ov(d,g){return g(d)}var eee=zs(function(d){var g=d.length,_=g?d[0]:0,P=this.__wrapped__,R=function(U){return j2(U,d)};return g>1||this.__actions__.length||!(P instanceof cn)||!Us(_)?this.thru(R):(P=P.slice(_,+_+(g?1:0)),P.__actions__.push({func:Ov,args:[R],thisArg:n}),new Zo(P,this.__chain__).thru(function(U){return g&&!U.length&&U.push(n),U}))});function tee(){return fk(this)}function nee(){return new Zo(this.value(),this.__chain__)}function ree(){this.__values__===n&&(this.__values__=Ek(this.value()));var d=this.__index__>=this.__values__.length,g=d?n:this.__values__[this.__index__++];return{done:d,value:g}}function iee(){return this}function oee(d){for(var g,_=this;_ instanceof fv;){var P=ik(_);P.__index__=0,P.__values__=n,g?R.__wrapped__=P:g=P;var R=P;_=_.__wrapped__}return R.__wrapped__=d,g}function aee(){var d=this.__wrapped__;if(d instanceof cn){var g=d;return this.__actions__.length&&(g=new cn(this)),g=g.reverse(),g.__actions__.push({func:Ov,args:[h_],thisArg:n}),new Zo(g,this.__chain__)}return this.thru(h_)}function see(){return A8(this.__wrapped__,this.__actions__)}var uee=yv(function(d,g,_){Tn.call(d,_)?++d[_]:js(d,_,1)});function lee(d,g,_){var P=Vt(d)?B5:JX;return _&&Li(d,g,_)&&(g=n),P(d,Et(g,3))}function cee(d,g){var _=Vt(d)?$u:c8;return _(d,Et(g,3))}var fee=F8(ok),dee=F8(ak);function hee(d,g){return li(Av(d,g),1)}function pee(d,g){return li(Av(d,g),W)}function gee(d,g,_){return _=_===n?1:Zt(_),li(Av(d,g),_)}function dk(d,g){var _=Vt(d)?Go:Fu;return _(d,Et(g,3))}function hk(d,g){var _=Vt(d)?$Z:l8;return _(d,Et(g,3))}var mee=yv(function(d,g,_){Tn.call(d,_)?d[_].push(g):js(d,_,[g])});function vee(d,g,_,P){d=Ji(d)?d:Nf(d),_=_&&!P?Zt(_):0;var R=d.length;return _<0&&(_=Fr(R+_,0)),Rv(d)?_<=R&&d.indexOf(g,_)>-1:!!R&&Cf(d,g,_)>-1}var yee=tn(function(d,g,_){var P=-1,R=typeof g=="function",U=Ji(d)?we(d.length):[];return Fu(d,function(X){U[++P]=R?xo(g,X,_):hp(X,g,_)}),U}),bee=yv(function(d,g,_){js(d,_,g)});function Av(d,g){var _=Vt(d)?rr:m8;return _(d,Et(g,3))}function xee(d,g,_,P){return d==null?[]:(Vt(g)||(g=g==null?[]:[g]),_=P?n:_,Vt(_)||(_=_==null?[]:[_]),x8(d,g,_))}var wee=yv(function(d,g,_){d[_?0:1].push(g)},function(){return[[],[]]});function _ee(d,g,_){var P=Vt(d)?O2:W5,R=arguments.length<3;return P(d,Et(g,4),_,R,Fu)}function See(d,g,_){var P=Vt(d)?IZ:W5,R=arguments.length<3;return P(d,Et(g,4),_,R,l8)}function Cee(d,g){var _=Vt(d)?$u:c8;return _(d,Tv(Et(g,3)))}function Eee(d){var g=Vt(d)?o8:vQ;return g(d)}function Oee(d,g,_){(_?Li(d,g,_):g===n)?g=1:g=Zt(g);var P=Vt(d)?GX:yQ;return P(d,g)}function Aee(d){var g=Vt(d)?YX:xQ;return g(d)}function Pee(d){if(d==null)return 0;if(Ji(d))return Rv(d)?Of(d):d.length;var g=_i(d);return g==lt||g==Ue?d.size:H2(d).length}function kee(d,g,_){var P=Vt(d)?A2:wQ;return _&&Li(d,g,_)&&(g=n),P(d,Et(g,3))}var Tee=tn(function(d,g){if(d==null)return[];var _=g.length;return _>1&&Li(d,g[0],g[1])?g=[]:_>2&&Li(g[0],g[1],g[2])&&(g=[g[0]]),x8(d,li(g,1),[])}),Pv=cX||function(){return ui.Date.now()};function Mee(d,g){if(typeof g!="function")throw new Yo(a);return d=Zt(d),function(){if(--d<1)return g.apply(this,arguments)}}function pk(d,g,_){return g=_?n:g,g=d&&g==null?d.length:g,Bs(d,k,n,n,n,n,g)}function gk(d,g){var _;if(typeof g!="function")throw new Yo(a);return d=Zt(d),function(){return--d>0&&(_=g.apply(this,arguments)),d<=1&&(g=n),_}}var g_=tn(function(d,g,_){var P=b;if(_.length){var R=Nu(_,$f(g_));P|=E}return Bs(d,P,g,_,R)}),mk=tn(function(d,g,_){var P=b|w;if(_.length){var R=Nu(_,$f(mk));P|=E}return Bs(g,P,d,_,R)});function vk(d,g,_){g=_?n:g;var P=Bs(d,S,n,n,n,n,n,g);return P.placeholder=vk.placeholder,P}function yk(d,g,_){g=_?n:g;var P=Bs(d,O,n,n,n,n,n,g);return P.placeholder=yk.placeholder,P}function bk(d,g,_){var P,R,U,X,se,fe,Me=0,Re=!1,Ie=!1,et=!0;if(typeof d!="function")throw new Yo(a);g=ea(g)||0,lr(_)&&(Re=!!_.leading,Ie="maxWait"in _,U=Ie?Fr(ea(_.maxWait)||0,g):U,et="trailing"in _?!!_.trailing:et);function ft(_r){var Aa=P,Hs=R;return P=R=n,Me=_r,X=d.apply(Hs,Aa),X}function At(_r){return Me=_r,se=yp(on,g),Re?ft(_r):X}function Qt(_r){var Aa=_r-fe,Hs=_r-Me,Fk=g-Aa;return Ie?wi(Fk,U-Hs):Fk}function Pt(_r){var Aa=_r-fe,Hs=_r-Me;return fe===n||Aa>=g||Aa<0||Ie&&Hs>=U}function on(){var _r=Pv();if(Pt(_r))return pn(_r);se=yp(on,Qt(_r))}function pn(_r){return se=n,et&&P?ft(_r):(P=R=n,X)}function Co(){se!==n&&k8(se),Me=0,P=fe=R=se=n}function Fi(){return se===n?X:pn(Pv())}function Eo(){var _r=Pv(),Aa=Pt(_r);if(P=arguments,R=this,fe=_r,Aa){if(se===n)return At(fe);if(Ie)return k8(se),se=yp(on,g),ft(fe)}return se===n&&(se=yp(on,g)),X}return Eo.cancel=Co,Eo.flush=Fi,Eo}var Ree=tn(function(d,g){return u8(d,1,g)}),Dee=tn(function(d,g,_){return u8(d,ea(g)||0,_)});function $ee(d){return Bs(d,N)}function kv(d,g){if(typeof d!="function"||g!=null&&typeof g!="function")throw new Yo(a);var _=function(){var P=arguments,R=g?g.apply(this,P):P[0],U=_.cache;if(U.has(R))return U.get(R);var X=d.apply(this,P);return _.cache=U.set(R,X)||U,X};return _.cache=new(kv.Cache||Fs),_}kv.Cache=Fs;function Tv(d){if(typeof d!="function")throw new Yo(a);return function(){var g=arguments;switch(g.length){case 0:return!d.call(this);case 1:return!d.call(this,g[0]);case 2:return!d.call(this,g[0],g[1]);case 3:return!d.call(this,g[0],g[1],g[2])}return!d.apply(this,g)}}function Iee(d){return gk(2,d)}var Nee=_Q(function(d,g){g=g.length==1&&Vt(g[0])?rr(g[0],wo(Et())):rr(li(g,1),wo(Et()));var _=g.length;return tn(function(P){for(var R=-1,U=wi(P.length,_);++R=g}),oc=h8(function(){return arguments}())?h8:function(d){return pr(d)&&Tn.call(d,"callee")&&!J5.call(d,"callee")},Vt=we.isArray,Xee=$5?wo($5):oQ;function Ji(d){return d!=null&&Mv(d.length)&&!Vs(d)}function wr(d){return pr(d)&&Ji(d)}function Qee(d){return d===!0||d===!1||pr(d)&&Ni(d)==Ze}var Uu=dX||A_,Jee=I5?wo(I5):aQ;function ete(d){return pr(d)&&d.nodeType===1&&!bp(d)}function tte(d){if(d==null)return!0;if(Ji(d)&&(Vt(d)||typeof d=="string"||typeof d.splice=="function"||Uu(d)||If(d)||oc(d)))return!d.length;var g=_i(d);if(g==lt||g==Ue)return!d.size;if(vp(d))return!H2(d).length;for(var _ in d)if(Tn.call(d,_))return!1;return!0}function nte(d,g){return pp(d,g)}function rte(d,g,_){_=typeof _=="function"?_:n;var P=_?_(d,g):n;return P===n?pp(d,g,n,_):!!P}function v_(d){if(!pr(d))return!1;var g=Ni(d);return g==$e||g==Le||typeof d.message=="string"&&typeof d.name=="string"&&!bp(d)}function ite(d){return typeof d=="number"&&t8(d)}function Vs(d){if(!lr(d))return!1;var g=Ni(d);return g==be||g==yt||g==me||g==pe}function wk(d){return typeof d=="number"&&d==Zt(d)}function Mv(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=j}function lr(d){var g=typeof d;return d!=null&&(g=="object"||g=="function")}function pr(d){return d!=null&&typeof d=="object"}var _k=N5?wo(N5):uQ;function ote(d,g){return d===g||W2(d,g,s_(g))}function ate(d,g,_){return _=typeof _=="function"?_:n,W2(d,g,s_(g),_)}function ste(d){return Sk(d)&&d!=+d}function ute(d){if(HQ(d))throw new Bt(o);return p8(d)}function lte(d){return d===null}function cte(d){return d==null}function Sk(d){return typeof d=="number"||pr(d)&&Ni(d)==Nt}function bp(d){if(!pr(d)||Ni(d)!=nn)return!1;var g=iv(d);if(g===null)return!0;var _=Tn.call(g,"constructor")&&g.constructor;return typeof _=="function"&&_ instanceof _&&ev.call(_)==aX}var y_=L5?wo(L5):lQ;function fte(d){return wk(d)&&d>=-j&&d<=j}var Ck=F5?wo(F5):cQ;function Rv(d){return typeof d=="string"||!Vt(d)&&pr(d)&&Ni(d)==je}function So(d){return typeof d=="symbol"||pr(d)&&Ni(d)==ke}var If=j5?wo(j5):fQ;function dte(d){return d===n}function hte(d){return pr(d)&&_i(d)==mt}function pte(d){return pr(d)&&Ni(d)==xn}var gte=_v(K2),mte=_v(function(d,g){return d<=g});function Ek(d){if(!d)return[];if(Ji(d))return Rv(d)?Ca(d):Qi(d);if(ap&&d[ap])return GZ(d[ap]());var g=_i(d),_=g==lt?D2:g==Ue?Xm:Nf;return _(d)}function Ws(d){if(!d)return d===0?d:0;if(d=ea(d),d===W||d===-W){var g=d<0?-1:1;return g*K}return d===d?d:0}function Zt(d){var g=Ws(d),_=g%1;return g===g?_?g-_:g:0}function Ok(d){return d?tc(Zt(d),0,oe):0}function ea(d){if(typeof d=="number")return d;if(So(d))return Y;if(lr(d)){var g=typeof d.valueOf=="function"?d.valueOf():d;d=lr(g)?g+"":g}if(typeof d!="string")return d===0?d:+d;d=H5(d);var _=ct.test(d);return _||rt.test(d)?MZ(d.slice(2),_?2:8):He.test(d)?Y:+d}function Ak(d){return as(d,eo(d))}function vte(d){return d?tc(Zt(d),-j,j):d===0?d:0}function On(d){return d==null?"":_o(d)}var yte=Rf(function(d,g){if(vp(g)||Ji(g)){as(g,Qr(g),d);return}for(var _ in g)Tn.call(g,_)&&fp(d,_,g[_])}),Pk=Rf(function(d,g){as(g,eo(g),d)}),Dv=Rf(function(d,g,_,P){as(g,eo(g),d,P)}),bte=Rf(function(d,g,_,P){as(g,Qr(g),d,P)}),xte=zs(j2);function wte(d,g){var _=Mf(d);return g==null?_:a8(_,g)}var _te=tn(function(d,g){d=jn(d);var _=-1,P=g.length,R=P>2?g[2]:n;for(R&&Li(g[0],g[1],R)&&(P=1);++_1),U}),as(d,o_(d),_),P&&(_=Xo(_,f|h|p,DQ));for(var R=g.length;R--;)X2(_,g[R]);return _});function Bte(d,g){return Tk(d,Tv(Et(g)))}var zte=zs(function(d,g){return d==null?{}:pQ(d,g)});function Tk(d,g){if(d==null)return{};var _=rr(o_(d),function(P){return[P]});return g=Et(g),w8(d,_,function(P,R){return g(P,R[0])})}function Ute(d,g,_){g=Bu(g,d);var P=-1,R=g.length;for(R||(R=1,d=n);++Pg){var P=d;d=g,g=P}if(_||d%1||g%1){var R=n8();return wi(d+R*(g-d+TZ("1e-"+((R+"").length-1))),g)}return G2(d,g)}var Jte=Df(function(d,g,_){return g=g.toLowerCase(),d+(_?Dk(g):g)});function Dk(d){return w_(On(d).toLowerCase())}function $k(d){return d=On(d),d&&d.replace(Ot,VZ).replace(xZ,"")}function ene(d,g,_){d=On(d),g=_o(g);var P=d.length;_=_===n?P:tc(Zt(_),0,P);var R=_;return _-=g.length,_>=0&&d.slice(_,R)==g}function tne(d){return d=On(d),d&&qn.test(d)?d.replace(hn,WZ):d}function nne(d){return d=On(d),d&&xe.test(d)?d.replace(le,"\\$&"):d}var rne=Df(function(d,g,_){return d+(_?"-":"")+g.toLowerCase()}),ine=Df(function(d,g,_){return d+(_?" ":"")+g.toLowerCase()}),one=L8("toLowerCase");function ane(d,g,_){d=On(d),g=Zt(g);var P=g?Of(d):0;if(!g||P>=g)return d;var R=(g-P)/2;return wv(uv(R),_)+d+wv(sv(R),_)}function sne(d,g,_){d=On(d),g=Zt(g);var P=g?Of(d):0;return g&&P>>0,_?(d=On(d),d&&(typeof g=="string"||g!=null&&!y_(g))&&(g=_o(g),!g&&Ef(d))?zu(Ca(d),0,_):d.split(g,_)):[]}var pne=Df(function(d,g,_){return d+(_?" ":"")+w_(g)});function gne(d,g,_){return d=On(d),_=_==null?0:tc(Zt(_),0,d.length),g=_o(g),d.slice(_,_+g.length)==g}function mne(d,g,_){var P=B.templateSettings;_&&Li(d,g,_)&&(g=n),d=On(d),g=Dv({},g,P,W8);var R=Dv({},g.imports,P.imports,W8),U=Qr(R),X=R2(R,U),se,fe,Me=0,Re=g.interpolate||gt,Ie="__p += '",et=$2((g.escape||gt).source+"|"+Re.source+"|"+(Re===bo?Ce:gt).source+"|"+(g.evaluate||gt).source+"|$","g"),ft="//# sourceURL="+(Tn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++EZ+"]")+` +`;d.replace(et,function(Pt,on,pn,Co,Fi,Eo){return pn||(pn=Co),Ie+=d.slice(Me,Eo).replace(ht,HZ),on&&(se=!0,Ie+=`' + __e(`+on+`) + '`),Fi&&(fe=!0,Ie+=`'; `+Fi+`; __p += '`),pn&&(Ie+=`' + ((__t = (`+pn+`)) == null ? '' : __t) + -'`),Me=Oo+Pt.length,Pt}),Ie+=`'; +'`),Me=Eo+Pt.length,Pt}),Ie+=`'; `;var At=Tn.call(g,"variable")&&g.variable;if(!At)Ie=`with (obj) { `+Ie+` } @@ -482,12 +482,12 @@ __p += '`),pn&&(Ie+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Ie+`return __p -}`;var Qt=qk(function(){return Sn(K,ft+"return "+Ie).apply(n,J)});if(Qt.source=Ie,__(Qt))throw Qt;return Qt}function Ine(d){return An(d).toLowerCase()}function Nne(d){return An(d).toUpperCase()}function Lne(d,g,_){if(d=An(d),d&&(_||g===n))return t8(d);if(!d||!(g=So(g)))return d;var P=Ca(d),D=Ca(g),K=n8(P,D),J=r8(P,D)+1;return Uu(P,K,J).join("")}function Fne(d,g,_){if(d=An(d),d&&(_||g===n))return d.slice(0,o8(d)+1);if(!d||!(g=So(g)))return d;var P=Ca(d),D=r8(P,Ca(g))+1;return Uu(P,0,D).join("")}function jne(d,g,_){if(d=An(d),d&&(_||g===n))return d.replace(T,"");if(!d||!(g=So(g)))return d;var P=Ca(d),D=n8(P,Ca(g));return Uu(P,D).join("")}function Bne(d,g){var _=q,P=Y;if(lr(g)){var D="separator"in g?g.separator:D;_="length"in g?Zt(g.length):_,P="omission"in g?So(g.omission):P}d=An(d);var K=d.length;if(Af(d)){var J=Ca(d);K=J.length}if(_>=K)return d;var se=_-Pf(P);if(se<1)return P;var fe=J?Uu(J,0,se).join(""):d.slice(0,se);if(D===n)return fe+P;if(J&&(se+=fe.length-se),S_(D)){if(d.slice(se).search(D)){var Me,Re=fe;for(D.global||(D=j2(D.source,An(Be.exec(D))+"g")),D.lastIndex=0;Me=D.exec(Re);)var Ie=Me.index;fe=fe.slice(0,Ie===n?se:Ie)}}else if(d.indexOf(So(D),se)!=se){var et=fe.lastIndexOf(D);et>-1&&(fe=fe.slice(0,et))}return fe+P}function zne(d){return d=An(d),d&&_n.test(d)?d.replace(_t,mX):d}var Une=If(function(d,g,_){return d+(_?" ":"")+g.toUpperCase()}),O_=K8("toUpperCase");function Wk(d,g,_){return d=An(d),g=_?n:g,g===n?fX(d)?bX(d):nX(d):d.match(g)||[]}var qk=tn(function(d,g){try{return wo(d,n,g)}catch(_){return __(_)?_:new Bt(_)}}),Hne=zs(function(d,g){return Yo(g,function(_){_=ss(_),js(d,_,x_(d[_],d))}),d});function Vne(d){var g=d==null?0:d.length,_=Et();return d=g?rr(d,function(P){if(typeof P[1]!="function")throw new Zo(a);return[_(P[0]),P[1]]}):[],tn(function(P){for(var D=-1;++DF)return[];var _=oe,P=wi(d,oe);g=Et(g),d-=oe;for(var D=N2(P,g);++_0||g<0)?new cn(_):(d<0?_=_.takeRight(-d):d&&(_=_.drop(d)),g!==n&&(g=Zt(g),_=g<0?_.dropRight(-g):_.take(g-d)),_)},cn.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},cn.prototype.toArray=function(){return this.take(oe)},os(cn.prototype,function(d,g){var _=/^(?:filter|find|map|reject)|While$/.test(g),P=/^(?:head|last)$/.test(g),D=H[P?"take"+(g=="last"?"Right":""):g],K=P||/^find/.test(g);D&&(H.prototype[g]=function(){var J=this.__wrapped__,se=P?[1]:arguments,fe=J instanceof cn,Me=se[0],Re=fe||Ht(J),Ie=function(on){var pn=D.apply(H,Nu([on],se));return P&&et?pn[0]:pn};Re&&_&&typeof Me=="function"&&Me.length!=1&&(fe=Re=!1);var et=this.__chain__,ft=!!this.__actions__.length,At=K&&!et,Qt=fe&&!ft;if(!K&&Re){J=Qt?J:new cn(this);var Pt=d.apply(J,se);return Pt.__actions__.push({func:Tv,args:[Ie],thisArg:n}),new Xo(Pt,et)}return At&&Qt?d.apply(this,se):(Pt=this.thru(Ie),At?P?Pt.value()[0]:Pt.value():Pt)})}),Yo(["pop","push","shift","sort","splice","unshift"],function(d){var g=nv[d],_=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",P=/^(?:pop|shift)$/.test(d);H.prototype[d]=function(){var D=arguments;if(P&&!this.__chain__){var K=this.value();return g.apply(Ht(K)?K:[],D)}return this[_](function(J){return g.apply(Ht(J)?J:[],D)})}}),os(cn.prototype,function(d,g){var _=H[g];if(_){var P=_.name+"";Tn.call(Rf,P)||(Rf[P]=[]),Rf[P].push({name:g,func:_})}}),Rf[Sv(n,w).name]=[{name:"wrapper",func:n}],cn.prototype.clone=zX,cn.prototype.reverse=UX,cn.prototype.value=HX,H.prototype.at=yee,H.prototype.chain=bee,H.prototype.commit=xee,H.prototype.next=wee,H.prototype.plant=See,H.prototype.reverse=Cee,H.prototype.toJSON=H.prototype.valueOf=H.prototype.value=Eee,H.prototype.first=H.prototype.head,lp&&(H.prototype[lp]=_ee),H},kf=xX();Ql?((Ql.exports=kf)._=kf,P2._=kf):ui._=kf}).call(ao)})(xx,xx.exports);var BQe=xx.exports;function wHe(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var c5="ScrollArea",[OG,zQe]=vi(c5),[_He,_a]=OG(c5),AG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,u]=y.useState(null),[l,c]=y.useState(null),[f,h]=y.useState(null),[p,m]=y.useState(null),[v,b]=y.useState(null),[w,x]=y.useState(0),[S,O]=y.useState(0),[E,C]=y.useState(!1),[k,M]=y.useState(!1),N=Gt(t,Y=>u(Y)),q=Pm(i);return L.jsx(_He,{scope:n,type:r,dir:q,scrollHideDelay:o,scrollArea:s,viewport:l,onViewportChange:c,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:E,onScrollbarXEnabledChange:C,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:k,onScrollbarYEnabledChange:M,onCornerWidthChange:x,onCornerHeightChange:O,children:L.jsx(pt.div,{dir:q,...a,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});AG.displayName=c5;var PG="ScrollAreaViewport",kG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,a=_a(PG,n),s=y.useRef(null),u=Gt(t,s,a.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(pt.div,{"data-radix-scroll-area-viewport":"",...o,ref:u,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:L.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});kG.displayName=PG;var $s="ScrollAreaScrollbar",SHe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_a($s,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return y.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?L.jsx(CHe,{...r,ref:t,forceMount:n}):i.type==="scroll"?L.jsx(EHe,{...r,ref:t,forceMount:n}):i.type==="auto"?L.jsx(TG,{...r,ref:t,forceMount:n}):i.type==="always"?L.jsx(f5,{...r,ref:t}):null});SHe.displayName=$s;var CHe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_a($s,e.__scopeScrollArea),[o,a]=y.useState(!1);return y.useEffect(()=>{const s=i.scrollArea;let u=0;if(s){const l=()=>{window.clearTimeout(u),a(!0)},c=()=>{u=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",l),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(u),s.removeEventListener("pointerenter",l),s.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),L.jsx(Gr,{present:n||o,children:L.jsx(TG,{"data-state":o?"visible":"hidden",...r,ref:t})})}),EHe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_a($s,e.__scopeScrollArea),o=e.orientation==="horizontal",a=b2(()=>u("SCROLL_END"),100),[s,u]=wHe("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 y.useEffect(()=>{if(s==="idle"){const l=window.setTimeout(()=>u("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(l)}},[s,i.scrollHideDelay,u]),y.useEffect(()=>{const l=i.viewport,c=o?"scrollLeft":"scrollTop";if(l){let f=l[c];const h=()=>{const p=l[c];f!==p&&(u("SCROLL"),a()),f=p};return l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[i.viewport,o,u,a]),L.jsx(Gr,{present:n||s!=="hidden",children:L.jsx(f5,{"data-state":s==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),TG=y.forwardRef((e,t)=>{const n=_a($s,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=y.useState(!1),s=e.orientation==="horizontal",u=b2(()=>{if(n.viewport){const l=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,i=_a($s,e.__scopeScrollArea),o=y.useRef(null),a=y.useRef(0),[s,u]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=$G(s.viewport,s.content),c={...r,sizes:s,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function f(h,p){return RHe(h,a.current,s,p)}return n==="horizontal"?L.jsx(OHe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollLeft,p=VI(h,s,i.dir);o.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(AHe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollTop,p=VI(h,s);o.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}),OHe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=_a($s,e.__scopeScrollArea),[a,s]=y.useState(),u=y.useRef(null),l=Gt(t,u,o.onScrollbarXChange);return y.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),L.jsx(RG,{"data-orientation":"horizontal",...i,ref:l,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":y2(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,f)=>{if(o.viewport){const h=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(h),NG(h,f)&&c.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:_x(a.paddingLeft),paddingEnd:_x(a.paddingRight)}})}})}),AHe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=_a($s,e.__scopeScrollArea),[a,s]=y.useState(),u=y.useRef(null),l=Gt(t,u,o.onScrollbarYChange);return y.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),L.jsx(RG,{"data-orientation":"vertical",...i,ref:l,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":y2(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,f)=>{if(o.viewport){const h=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(h),NG(h,f)&&c.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:_x(a.paddingTop),paddingEnd:_x(a.paddingBottom)}})}})}),[PHe,MG]=OG($s),RG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:c,onResize:f,...h}=e,p=_a($s,n),[m,v]=y.useState(null),b=Gt(t,N=>v(N)),w=y.useRef(null),x=y.useRef(""),S=p.viewport,O=r.content-r.viewport,E=Hr(c),C=Hr(u),k=b2(f,10);function M(N){if(w.current){const q=N.clientX-w.current.left,Y=N.clientY-w.current.top;l({x:q,y:Y})}}return y.useEffect(()=>{const N=q=>{const Y=q.target;m?.contains(Y)&&E(q,O)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[S,m,O,E]),y.useEffect(C,[r,C]),Ph(m,k),Ph(p.content,k),L.jsx(PHe,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:Hr(o),onThumbPointerUp:Hr(a),onThumbPositionChange:C,onThumbPointerDown:Hr(s),children:L.jsx(pt.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:Ye(e.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),w.current=m.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),M(N))}),onPointerMove:Ye(e.onPointerMove,M),onPointerUp:Ye(e.onPointerUp,N=>{const q=N.target;q.hasPointerCapture(N.pointerId)&&q.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),w.current=null})})})}),wx="ScrollAreaThumb",kHe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=MG(wx,e.__scopeScrollArea);return L.jsx(Gr,{present:n||i.hasThumb,children:L.jsx(THe,{ref:t,...r})})}),THe=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=_a(wx,n),a=MG(wx,n),{onThumbPositionChange:s}=a,u=Gt(t,f=>a.onThumbChange(f)),l=y.useRef(void 0),c=b2(()=>{l.current&&(l.current(),l.current=void 0)},100);return y.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(c(),!l.current){const p=DHe(f,s);l.current=p,s()}};return s(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,c,s]),L.jsx(pt.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),m=f.clientX-p.left,v=f.clientY-p.top;a.onThumbPointerDown({x:m,y:v})}),onPointerUp:Ye(e.onPointerUp,a.onThumbPointerUp)})});kHe.displayName=wx;var d5="ScrollAreaCorner",DG=y.forwardRef((e,t)=>{const n=_a(d5,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?L.jsx(MHe,{...e,ref:t}):null});DG.displayName=d5;var MHe=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=_a(d5,n),[o,a]=y.useState(0),[s,u]=y.useState(0),l=!!(o&&s);return Ph(i.scrollbarX,()=>{const c=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(c),u(c)}),Ph(i.scrollbarY,()=>{const c=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(c),a(c)}),l?L.jsx(pt.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function _x(e){return e?parseInt(e,10):0}function $G(e,t){const n=e/t;return isNaN(n)?0:n}function y2(e){const t=$G(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function RHe(e,t,n,r="ltr"){const i=y2(n),o=i/2,a=t||o,s=i-a,u=n.scrollbar.paddingStart+a,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,f=r==="ltr"?[0,c]:[c*-1,0];return IG([u,l],f)(e)}function VI(e,t,n="ltr"){const r=y2(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=o-r,u=n==="ltr"?[0,a]:[a*-1,0],l=a4(e,u);return IG([0,a],[0,s])(l)}function IG(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 NG(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,s=n.top!==o.top;(a||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function b2(e,t){const n=Hr(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ph(e,t){const n=Hr(t);ii(()=>{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 UQe=AG,HQe=kG,VQe=DG,h5="Progress",p5=100,[$He,WQe]=vi(h5),[IHe,NHe]=$He(h5),LG=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=LHe,...a}=e;(i||i===0)&&!WI(i)&&console.error(FHe(`${i}`,"Progress"));const s=WI(i)?i:p5;r!==null&&!qI(r,s)&&console.error(jHe(`${r}`,"Progress"));const u=qI(r,s)?r:null,l=Sx(u)?o(u,s):void 0;return L.jsx(IHe,{scope:n,value:u,max:s,children:L.jsx(pt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Sx(u)?u:void 0,"aria-valuetext":l,role:"progressbar","data-state":BG(u,s),"data-value":u??void 0,"data-max":s,...a,ref:t})})});LG.displayName=h5;var FG="ProgressIndicator",jG=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=NHe(FG,n);return L.jsx(pt.div,{"data-state":BG(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});jG.displayName=FG;function LHe(e,t){return`${Math.round(e/t*100)}%`}function BG(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Sx(e){return typeof e=="number"}function WI(e){return Sx(e)&&!isNaN(e)&&e>0}function qI(e,t){return Sx(e)&&!isNaN(e)&&e<=t&&e>=0}function FHe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${p5}\`.`}function jHe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: +}`;var Qt=Nk(function(){return Sn(U,ft+"return "+Ie).apply(n,X)});if(Qt.source=Ie,v_(Qt))throw Qt;return Qt}function vne(d){return On(d).toLowerCase()}function yne(d){return On(d).toUpperCase()}function bne(d,g,_){if(d=On(d),d&&(_||g===n))return H5(d);if(!d||!(g=_o(g)))return d;var P=Ca(d),R=Ca(g),U=K5(P,R),X=q5(P,R)+1;return zu(P,U,X).join("")}function xne(d,g,_){if(d=On(d),d&&(_||g===n))return d.slice(0,Y5(d)+1);if(!d||!(g=_o(g)))return d;var P=Ca(d),R=q5(P,Ca(g))+1;return zu(P,0,R).join("")}function wne(d,g,_){if(d=On(d),d&&(_||g===n))return d.replace(T,"");if(!d||!(g=_o(g)))return d;var P=Ca(d),R=K5(P,Ca(g));return zu(P,R).join("")}function _ne(d,g){var _=z,P=H;if(lr(g)){var R="separator"in g?g.separator:R;_="length"in g?Zt(g.length):_,P="omission"in g?_o(g.omission):P}d=On(d);var U=d.length;if(Ef(d)){var X=Ca(d);U=X.length}if(_>=U)return d;var se=_-Of(P);if(se<1)return P;var fe=X?zu(X,0,se).join(""):d.slice(0,se);if(R===n)return fe+P;if(X&&(se+=fe.length-se),y_(R)){if(d.slice(se).search(R)){var Me,Re=fe;for(R.global||(R=$2(R.source,On(Be.exec(R))+"g")),R.lastIndex=0;Me=R.exec(Re);)var Ie=Me.index;fe=fe.slice(0,Ie===n?se:Ie)}}else if(d.indexOf(_o(R),se)!=se){var et=fe.lastIndexOf(R);et>-1&&(fe=fe.slice(0,et))}return fe+P}function Sne(d){return d=On(d),d&&_n.test(d)?d.replace(_t,QZ):d}var Cne=Df(function(d,g,_){return d+(_?" ":"")+g.toUpperCase()}),w_=L8("toUpperCase");function Ik(d,g,_){return d=On(d),g=_?n:g,g===n?qZ(d)?tX(d):FZ(d):d.match(g)||[]}var Nk=tn(function(d,g){try{return xo(d,n,g)}catch(_){return v_(_)?_:new Bt(_)}}),Ene=zs(function(d,g){return Go(g,function(_){_=ss(_),js(d,_,g_(d[_],d))}),d});function One(d){var g=d==null?0:d.length,_=Et();return d=g?rr(d,function(P){if(typeof P[1]!="function")throw new Yo(a);return[_(P[0]),P[1]]}):[],tn(function(P){for(var R=-1;++Rj)return[];var _=oe,P=wi(d,oe);g=Et(g),d-=oe;for(var R=M2(P,g);++_0||g<0)?new cn(_):(d<0?_=_.takeRight(-d):d&&(_=_.drop(d)),g!==n&&(g=Zt(g),_=g<0?_.dropRight(-g):_.take(g-d)),_)},cn.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},cn.prototype.toArray=function(){return this.take(oe)},os(cn.prototype,function(d,g){var _=/^(?:filter|find|map|reject)|While$/.test(g),P=/^(?:head|last)$/.test(g),R=B[P?"take"+(g=="last"?"Right":""):g],U=P||/^find/.test(g);R&&(B.prototype[g]=function(){var X=this.__wrapped__,se=P?[1]:arguments,fe=X instanceof cn,Me=se[0],Re=fe||Vt(X),Ie=function(on){var pn=R.apply(B,Iu([on],se));return P&&et?pn[0]:pn};Re&&_&&typeof Me=="function"&&Me.length!=1&&(fe=Re=!1);var et=this.__chain__,ft=!!this.__actions__.length,At=U&&!et,Qt=fe&&!ft;if(!U&&Re){X=Qt?X:new cn(this);var Pt=d.apply(X,se);return Pt.__actions__.push({func:Ov,args:[Ie],thisArg:n}),new Zo(Pt,et)}return At&&Qt?d.apply(this,se):(Pt=this.thru(Ie),At?P?Pt.value()[0]:Pt.value():Pt)})}),Go(["pop","push","shift","sort","splice","unshift"],function(d){var g=Qm[d],_=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",P=/^(?:pop|shift)$/.test(d);B.prototype[d]=function(){var R=arguments;if(P&&!this.__chain__){var U=this.value();return g.apply(Vt(U)?U:[],R)}return this[_](function(X){return g.apply(Vt(X)?X:[],R)})}}),os(cn.prototype,function(d,g){var _=B[g];if(_){var P=_.name+"";Tn.call(Tf,P)||(Tf[P]=[]),Tf[P].push({name:g,func:_})}}),Tf[bv(n,w).name]=[{name:"wrapper",func:n}],cn.prototype.clone=SX,cn.prototype.reverse=CX,cn.prototype.value=EX,B.prototype.at=eee,B.prototype.chain=tee,B.prototype.commit=nee,B.prototype.next=ree,B.prototype.plant=oee,B.prototype.reverse=aee,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=see,B.prototype.first=B.prototype.head,ap&&(B.prototype[ap]=iee),B},Af=nX();Xl?((Xl.exports=Af)._=Af,S2._=Af):ui._=Af}).call(la)})(gx,gx.exports);var oQe=gx.exports;function UUe(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var e5="ScrollArea",[lG,aQe]=vi(e5),[VUe,_a]=lG(e5),cG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,u]=y.useState(null),[l,c]=y.useState(null),[f,h]=y.useState(null),[p,m]=y.useState(null),[v,b]=y.useState(null),[w,x]=y.useState(0),[S,O]=y.useState(0),[E,C]=y.useState(!1),[k,M]=y.useState(!1),N=Gt(t,H=>u(H)),z=Cm(i);return I.jsx(VUe,{scope:n,type:r,dir:z,scrollHideDelay:o,scrollArea:s,viewport:l,onViewportChange:c,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:E,onScrollbarXEnabledChange:C,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:k,onScrollbarYEnabledChange:M,onCornerWidthChange:x,onCornerHeightChange:O,children:I.jsx(pt.div,{dir:z,...a,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});cG.displayName=e5;var fG="ScrollAreaViewport",dG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,a=_a(fG,n),s=y.useRef(null),u=Gt(t,s,a.onViewportChange);return I.jsxs(I.Fragment,{children:[I.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}),I.jsx(pt.div,{"data-radix-scroll-area-viewport":"",...o,ref:u,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:I.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});dG.displayName=fG;var $s="ScrollAreaScrollbar",WUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_a($s,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return y.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?I.jsx(HUe,{...r,ref:t,forceMount:n}):i.type==="scroll"?I.jsx(KUe,{...r,ref:t,forceMount:n}):i.type==="auto"?I.jsx(hG,{...r,ref:t,forceMount:n}):i.type==="always"?I.jsx(t5,{...r,ref:t}):null});WUe.displayName=$s;var HUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_a($s,e.__scopeScrollArea),[o,a]=y.useState(!1);return y.useEffect(()=>{const s=i.scrollArea;let u=0;if(s){const l=()=>{window.clearTimeout(u),a(!0)},c=()=>{u=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",l),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(u),s.removeEventListener("pointerenter",l),s.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),I.jsx(Gr,{present:n||o,children:I.jsx(hG,{"data-state":o?"visible":"hidden",...r,ref:t})})}),KUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_a($s,e.__scopeScrollArea),o=e.orientation==="horizontal",a=p2(()=>u("SCROLL_END"),100),[s,u]=UUe("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 y.useEffect(()=>{if(s==="idle"){const l=window.setTimeout(()=>u("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(l)}},[s,i.scrollHideDelay,u]),y.useEffect(()=>{const l=i.viewport,c=o?"scrollLeft":"scrollTop";if(l){let f=l[c];const h=()=>{const p=l[c];f!==p&&(u("SCROLL"),a()),f=p};return l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[i.viewport,o,u,a]),I.jsx(Gr,{present:n||s!=="hidden",children:I.jsx(t5,{"data-state":s==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),hG=y.forwardRef((e,t)=>{const n=_a($s,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=y.useState(!1),s=e.orientation==="horizontal",u=p2(()=>{if(n.viewport){const l=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,i=_a($s,e.__scopeScrollArea),o=y.useRef(null),a=y.useRef(0),[s,u]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=vG(s.viewport,s.content),c={...r,sizes:s,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function f(h,p){return JUe(h,a.current,s,p)}return n==="horizontal"?I.jsx(qUe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollLeft,p=kI(h,s,i.dir);o.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"?I.jsx(GUe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollTop,p=kI(h,s);o.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}),qUe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=_a($s,e.__scopeScrollArea),[a,s]=y.useState(),u=y.useRef(null),l=Gt(t,u,o.onScrollbarXChange);return y.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),I.jsx(gG,{"data-orientation":"horizontal",...i,ref:l,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":h2(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,f)=>{if(o.viewport){const h=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(h),bG(h,f)&&c.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:vx(a.paddingLeft),paddingEnd:vx(a.paddingRight)}})}})}),GUe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=_a($s,e.__scopeScrollArea),[a,s]=y.useState(),u=y.useRef(null),l=Gt(t,u,o.onScrollbarYChange);return y.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),I.jsx(gG,{"data-orientation":"vertical",...i,ref:l,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":h2(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,f)=>{if(o.viewport){const h=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(h),bG(h,f)&&c.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:vx(a.paddingTop),paddingEnd:vx(a.paddingBottom)}})}})}),[YUe,pG]=lG($s),gG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:c,onResize:f,...h}=e,p=_a($s,n),[m,v]=y.useState(null),b=Gt(t,N=>v(N)),w=y.useRef(null),x=y.useRef(""),S=p.viewport,O=r.content-r.viewport,E=Vr(c),C=Vr(u),k=p2(f,10);function M(N){if(w.current){const z=N.clientX-w.current.left,H=N.clientY-w.current.top;l({x:z,y:H})}}return y.useEffect(()=>{const N=z=>{const H=z.target;m?.contains(H)&&E(z,O)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[S,m,O,E]),y.useEffect(C,[r,C]),Eh(m,k),Eh(p.content,k),I.jsx(YUe,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:Vr(o),onThumbPointerUp:Vr(a),onThumbPositionChange:C,onThumbPointerDown:Vr(s),children:I.jsx(pt.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:Ye(e.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),w.current=m.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),M(N))}),onPointerMove:Ye(e.onPointerMove,M),onPointerUp:Ye(e.onPointerUp,N=>{const z=N.target;z.hasPointerCapture(N.pointerId)&&z.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),w.current=null})})})}),mx="ScrollAreaThumb",ZUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pG(mx,e.__scopeScrollArea);return I.jsx(Gr,{present:n||i.hasThumb,children:I.jsx(XUe,{ref:t,...r})})}),XUe=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=_a(mx,n),a=pG(mx,n),{onThumbPositionChange:s}=a,u=Gt(t,f=>a.onThumbChange(f)),l=y.useRef(void 0),c=p2(()=>{l.current&&(l.current(),l.current=void 0)},100);return y.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(c(),!l.current){const p=eVe(f,s);l.current=p,s()}};return s(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,c,s]),I.jsx(pt.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),m=f.clientX-p.left,v=f.clientY-p.top;a.onThumbPointerDown({x:m,y:v})}),onPointerUp:Ye(e.onPointerUp,a.onThumbPointerUp)})});ZUe.displayName=mx;var n5="ScrollAreaCorner",mG=y.forwardRef((e,t)=>{const n=_a(n5,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?I.jsx(QUe,{...e,ref:t}):null});mG.displayName=n5;var QUe=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=_a(n5,n),[o,a]=y.useState(0),[s,u]=y.useState(0),l=!!(o&&s);return Eh(i.scrollbarX,()=>{const c=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(c),u(c)}),Eh(i.scrollbarY,()=>{const c=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(c),a(c)}),l?I.jsx(pt.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function vx(e){return e?parseInt(e,10):0}function vG(e,t){const n=e/t;return isNaN(n)?0:n}function h2(e){const t=vG(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function JUe(e,t,n,r="ltr"){const i=h2(n),o=i/2,a=t||o,s=i-a,u=n.scrollbar.paddingStart+a,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,f=r==="ltr"?[0,c]:[c*-1,0];return yG([u,l],f)(e)}function kI(e,t,n="ltr"){const r=h2(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=o-r,u=n==="ltr"?[0,a]:[a*-1,0],l=Q6(e,u);return yG([0,a],[0,s])(l)}function yG(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 bG(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,s=n.top!==o.top;(a||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function p2(e,t){const n=Vr(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Eh(e,t){const n=Vr(t);ii(()=>{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 sQe=cG,uQe=dG,lQe=mG,r5="Progress",i5=100,[tVe,cQe]=vi(r5),[nVe,rVe]=tVe(r5),xG=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=iVe,...a}=e;(i||i===0)&&!TI(i)&&console.error(oVe(`${i}`,"Progress"));const s=TI(i)?i:i5;r!==null&&!MI(r,s)&&console.error(aVe(`${r}`,"Progress"));const u=MI(r,s)?r:null,l=yx(u)?o(u,s):void 0;return I.jsx(nVe,{scope:n,value:u,max:s,children:I.jsx(pt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":yx(u)?u:void 0,"aria-valuetext":l,role:"progressbar","data-state":SG(u,s),"data-value":u??void 0,"data-max":s,...a,ref:t})})});xG.displayName=r5;var wG="ProgressIndicator",_G=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=rVe(wG,n);return I.jsx(pt.div,{"data-state":SG(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});_G.displayName=wG;function iVe(e,t){return`${Math.round(e/t*100)}%`}function SG(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function yx(e){return typeof e=="number"}function TI(e){return yx(e)&&!isNaN(e)&&e>0}function MI(e,t){return yx(e)&&!isNaN(e)&&e<=t&&e>=0}function oVe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${i5}\`.`}function aVe(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 ${p5} if no \`max\` prop is set) + - less than the value passed to \`max\` (or ${i5} if no \`max\` prop is set) - \`null\` or \`undefined\` if the progress is indeterminate. -Defaulting to \`null\`.`}var qQe=LG,KQe=jG,BHe="Separator",KI="horizontal",zHe=["horizontal","vertical"],zG=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=KI,...i}=e,o=UHe(r)?r:KI,s=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return L.jsx(pt.div,{"data-orientation":o,...s,...i,ref:t})});zG.displayName=BHe;function UHe(e){return zHe.includes(e)}var GQe=zG,g5="Switch",[HHe,YQe]=vi(g5),[VHe,WHe]=HHe(g5),UG=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:l,form:c,...f}=e,[h,p]=y.useState(null),m=Gt(t,S=>p(S)),v=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Za({prop:i,defaultProp:o,onChange:l});return L.jsxs(VHe,{scope:n,checked:w,disabled:s,children:[L.jsx(pt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":WG(w),"data-disabled":s?"":void 0,disabled:s,value:u,...f,ref:m,onClick:Ye(e.onClick,S=>{x(O=>!O),b&&(v.current=S.isPropagationStopped(),v.current||S.stopPropagation())})}),b&&L.jsx(qHe,{control:h,bubbles:!v.current,name:r,value:u,checked:w,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});UG.displayName=g5;var HG="SwitchThumb",VG=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=WHe(HG,n);return L.jsx(pt.span,{"data-state":WG(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});VG.displayName=HG;var qHe=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=y.useRef(null),a=GP(n),s=bA(t);return y.useEffect(()=>{const u=o.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&f){const h=new Event("click",{bubbles:r});f.call(u,n),u.dispatchEvent(h)}},[a,n,r]),L.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function WG(e){return e?"checked":"unchecked"}var ZQe=UG,XQe=VG;/** +Defaulting to \`null\`.`}var fQe=xG,dQe=_G,sVe="Separator",RI="horizontal",uVe=["horizontal","vertical"],CG=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=RI,...i}=e,o=lVe(r)?r:RI,s=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return I.jsx(pt.div,{"data-orientation":o,...s,...i,ref:t})});CG.displayName=sVe;function lVe(e){return uVe.includes(e)}var hQe=CG,o5="Switch",[cVe,pQe]=vi(o5),[fVe,dVe]=cVe(o5),EG=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:l,form:c,...f}=e,[h,p]=y.useState(null),m=Gt(t,S=>p(S)),v=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Za({prop:i,defaultProp:o,onChange:l});return I.jsxs(fVe,{scope:n,checked:w,disabled:s,children:[I.jsx(pt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":PG(w),"data-disabled":s?"":void 0,disabled:s,value:u,...f,ref:m,onClick:Ye(e.onClick,S=>{x(O=>!O),b&&(v.current=S.isPropagationStopped(),v.current||S.stopPropagation())})}),b&&I.jsx(hVe,{control:h,bubbles:!v.current,name:r,value:u,checked:w,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});EG.displayName=o5;var OG="SwitchThumb",AG=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=dVe(OG,n);return I.jsx(pt.span,{"data-state":PG(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});AG.displayName=OG;var hVe=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=y.useRef(null),a=FP(n),s=lA(t);return y.useEffect(()=>{const u=o.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&f){const h=new Event("click",{bubbles:r});f.call(u,n),u.dispatchEvent(h)}},[a,n,r]),I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function PG(e){return e?"checked":"unchecked"}var gQe=EG,mQe=AG;/** * table-core * * Copyright (c) TanStack @@ -496,10 +496,10 @@ Defaulting to \`null\`.`}var qQe=LG,KQe=jG,BHe="Separator",KI="horizontal",zHe=[ * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function dl(e,t){return typeof e=="function"?e(t):e}function Vo(e,t){return n=>{t.setState(r=>({...r,[e]:dl(n,r[e])}))}}function x2(e){return e instanceof Function}function KHe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function GHe(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function St(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(o);if(!(s.length!==r.length||s.some((c,f)=>r[f]!==c)))return i;r=s;let l;if(n.key&&n.debug&&(l=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-l)*100)/100,h=f/16,p=(m,v)=>{for(m=String(m);m.length{t.setState(r=>({...r,[e]:fl(n,r[e])}))}}function g2(e){return e instanceof Function}function pVe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function gVe(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function St(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(o);if(!(s.length!==r.length||s.some((c,f)=>r[f]!==c)))return i;r=s;let l;if(n.key&&n.debug&&(l=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-l)*100)/100,h=f/16,p=(m,v)=>{for(m=String(m);m.length{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function YHe(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:St(()=>[e,n,t,o],(a,s,u,l)=>({table:a,column:s,row:u,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Ct(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function ZHe(e,t,n,r){var i,o;const s={...e._getDefaultColumnDef(),...t},u=s.accessorKey;let l=(i=(o=s.id)!=null?o:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:u&&(u.includes(".")?c=h=>{let p=h;for(const v of u.split(".")){var m;p=(m=p)==null?void 0:m[v]}return p}:c=h=>h[s.accessorKey]),!l)throw new Error;let f={id:`${String(l)}`,accessorFn:c,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:St(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},Ct(e.options,"debugColumns")),getLeafColumns:St(()=>[e._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let m=f.columns.flatMap(v=>v.getLeafColumns());return h(m)}return[f]},Ct(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(f,e);return f}const Ei="debugHeaders";function GI(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),a.push(u)};return s(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const XHe={createTable:e=>{e.getHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const s=(o=r?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?o:[],u=(a=i?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?a:[],l=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(i!=null&&i.includes(f.id)));return Ty(t,[...s,...l,...u],e)},Ct(e.options,Ei)),e.getCenterHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Ty(t,n,e,"center")),Ct(e.options,Ei)),e.getLeftHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Ty(t,o,e,"left")},Ct(e.options,Ei)),e.getRightHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Ty(t,o,e,"right")},Ct(e.options,Ei)),e.getFooterGroups=St(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getLeftFooterGroups=St(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getCenterFooterGroups=St(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getRightFooterGroups=St(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getFlatHeaders=St(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getLeftFlatHeaders=St(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterFlatHeaders=St(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getRightFlatHeaders=St(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterLeafHeaders=St(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeftLeafHeaders=St(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getRightLeafHeaders=St(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeafHeaders=St(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,s,u,l;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(u=(l=r[0])==null?void 0:l.headers)!=null?u:[]].map(c=>c.getLeafHeaders()).flat()},Ct(e.options,Ei))}};function Ty(e,t,n,r){var i,o;let a=0;const s=function(h,p){p===void 0&&(p=1),a=Math.max(a,p),h.filter(m=>m.getIsVisible()).forEach(m=>{var v;(v=m.columns)!=null&&v.length&&s(m.columns,p+1)},0)};s(e);let u=[];const l=(h,p)=>{const m={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},v=[];h.forEach(b=>{const w=[...v].reverse()[0],x=b.column.depth===m.depth;let S,O=!1;if(x&&b.column.parent?S=b.column.parent:(S=b.column,O=!0),w&&w?.column===S)w.subHeaders.push(b);else{const E=GI(n,S,{id:[r,p,S.id,b?.id].filter(Boolean).join("_"),isPlaceholder:O,placeholderId:O?`${v.filter(C=>C.column===S).length}`:void 0,depth:p,index:v.length});E.subHeaders.push(b),v.push(E)}m.headers.push(b),b.headerGroup=m}),u.push(m),p>0&&l(v,p-1)},c=t.map((h,p)=>GI(n,h,{depth:a,index:p}));l(c,a-1),u.reverse();const f=h=>h.filter(m=>m.column.getIsVisible()).map(m=>{let v=0,b=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],f(m.subHeaders).forEach(S=>{let{colSpan:O,rowSpan:E}=S;v+=O,w.push(E)})):v=1;const x=Math.min(...w);return b=b+x,m.colSpan=v,m.rowSpan=b,{colSpan:v,rowSpan:b}});return f((i=(o=u[0])==null?void 0:o.headers)!=null?i:[]),u}const m5=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const l=e.getColumn(u);if(l!=null&&l.accessorFn)return s._valuesCache[u]=l.accessorFn(s.original,r),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const l=e.getColumn(u);if(l!=null&&l.accessorFn)return l.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=l.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var l;return(l=s.getValue(u))!=null?l:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>GHe(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],l=s;for(;;){const c=l.getParentRow();if(!c)break;u.push(c),l=c}return u.reverse()},getAllCells:St(()=>[e.getAllLeafColumns()],u=>u.map(l=>YHe(e,s,l,l.id)),Ct(e.options,"debugRows")),_getAllCellsByColumnId:St(()=>[s.getAllCells()],u=>u.reduce((l,c)=>(l[c.column.id]=c,l),{}),Ct(e.options,"debugRows"))};for(let u=0;u{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},qG=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};qG.autoRemove=e=>Ka(e);const KG=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};KG.autoRemove=e=>Ka(e);const GG=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};GG.autoRemove=e=>Ka(e);const YG=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};YG.autoRemove=e=>Ka(e)||!(e!=null&&e.length);const ZG=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});ZG.autoRemove=e=>Ka(e)||!(e!=null&&e.length);const XG=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});XG.autoRemove=e=>Ka(e)||!(e!=null&&e.length);const QG=(e,t,n)=>e.getValue(t)===n;QG.autoRemove=e=>Ka(e);const JG=(e,t,n)=>e.getValue(t)==n;JG.autoRemove=e=>Ka(e);const v5=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};v5.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const s=o;o=a,a=s}return[o,a]};v5.autoRemove=e=>Ka(e)||Ka(e[0])&&Ka(e[1]);const eu={includesString:qG,includesStringSensitive:KG,equalsString:GG,arrIncludes:YG,arrIncludesAll:ZG,arrIncludesSome:XG,equals:QG,weakEquals:JG,inNumberRange:v5};function Ka(e){return e==null||e===""}const JHe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Vo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?eu.includesString:typeof r=="number"?eu.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?eu.equals:Array.isArray(r)?eu.arrIncludes:eu.weakEquals},e.getFilterFn=()=>{var n,r;return x2(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:eu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(c=>c.id===e.id),a=dl(n,o?o.value:void 0);if(YI(i,a,e)){var s;return(s=r?.filter(c=>c.id!==e.id))!=null?s:[]}const u={id:e.id,value:a};if(o){var l;return(l=r?.map(c=>c.id===e.id?u:c))!=null?l:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=dl(t,i))==null?void 0:o.filter(a=>{const s=n.find(u=>u.id===a.id);if(s){const u=s.getFilterFn();if(YI(u,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function YI(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const eVe=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),tVe=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},nVe=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r=o)&&(r=o)}),r},rVe=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},oVe=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!KHe(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},aVe=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),sVe=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,uVe=(e,t)=>t.length,_3={sum:eVe,min:tVe,max:nVe,extent:rVe,mean:iVe,median:oVe,unique:aVe,uniqueCount:sVe,count:uVe},lVe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Vo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return _3.sum;if(Object.prototype.toString.call(r)==="[object Date]")return _3.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return x2(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:_3[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function cVe(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const fVe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Vo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=St(n=>[D0(t,n)],n=>n.findIndex(r=>r.id===e.id),Ct(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=D0(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=D0(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=St(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],s=[...i];for(;s.length&&a.length;){const u=a.shift(),l=s.findIndex(c=>c.id===u);l>-1&&o.push(s.splice(l,1)[0])}o=[...o,...s]}return cVe(o,n,r)},Ct(e.options,"debugTable"))}},S3=()=>({left:[],right:[]}),dVe={getInitialState:e=>({columnPinning:S3(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Vo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var s,u;return{left:((s=i?.left)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((u=i?.right)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var l,c;return{left:[...((l=i?.left)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((c=i?.right)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((o=i?.left)!=null?o:[]).filter(f=>!(r!=null&&r.includes(f))),right:((a=i?.right)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Ct(t.options,"debugRows")),e.getLeftVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ct(t.options,"debugRows")),e.getRightVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ct(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?S3():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:S3())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getRightLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getCenterLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Ct(e.options,"debugColumns"))}},My={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},C3=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),hVe={getDefaultColumnDef:()=>My,getInitialState:e=>({columnSizing:{},columnSizingInfo:C3(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Vo("columnSizing",e),onColumnSizingInfoChange:Vo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:My.minSize,(r=o??e.columnDef.size)!=null?r:My.size),(i=e.columnDef.maxSize)!=null?i:My.maxSize)},e.getStart=St(n=>[n,D0(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.getAfter=St(n=>[n,D0(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),E3(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],u=E3(o)?Math.round(o.touches[0].clientX):o.clientX,l={},c=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(S=>{var O,E;const C=t.options.columnResizeDirection==="rtl"?-1:1,k=(x-((O=S?.startOffset)!=null?O:0))*C,M=Math.max(k/((E=S?.startSize)!=null?E:0),-.999999);return S.columnSizingStart.forEach(N=>{let[q,Y]=N;l[q]=Math.round(Math.max(Y+Y*M,0)*100)/100}),{...S,deltaOffset:k,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(S=>({...S,...l})))},f=w=>c("move",w),h=w=>{c("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||typeof document<"u"?document:null,m={moveHandler:w=>f(w.clientX),upHandler:w=>{p?.removeEventListener("mousemove",m.moveHandler),p?.removeEventListener("mouseup",m.upHandler),h(w.clientX)}},v={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),f(w.touches[0].clientX),!1),upHandler:w=>{var x;p?.removeEventListener("touchmove",v.moveHandler),p?.removeEventListener("touchend",v.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((x=w.touches[0])==null?void 0:x.clientX)}},b=pVe()?{passive:!1}:!1;E3(o)?(p?.addEventListener("touchmove",v.moveHandler,b),p?.addEventListener("touchend",v.upHandler,b)):(p?.addEventListener("mousemove",m.moveHandler,b),p?.addEventListener("mouseup",m.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:u,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?C3():(n=e.initialState.columnSizingInfo)!=null?n:C3())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let Ry=null;function pVe(){if(typeof Ry=="boolean")return Ry;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Ry=e,Ry}function E3(e){return e.type==="touchstart"}const gVe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Vo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=St(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ct(t.options,"debugRows")),e.getVisibleCells=St(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Ct(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>St(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ct(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function D0(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const mVe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},vVe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Vo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>eu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return x2(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:eu[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},yVe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Vo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:s,...u}=a;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},p4=0,g4=10,O3=()=>({pageIndex:p4,pageSize:g4}),bVe={getInitialState:e=>({...e,pagination:{...O3(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Vo("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>dl(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?O3():(i=e.initialState.pagination)!=null?i:O3())},e.setPageIndex=r=>{e.setPagination(i=>{let o=dl(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?p4:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:p4)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?g4:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:g4)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,dl(r,i.pageSize)),a=i.pageSize*i.pageIndex,s=Math.floor(a/o);return{...i,pageIndex:s,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=dl(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=St(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Ct(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},A3=()=>({top:[],bottom:[]}),xVe={getInitialState:e=>({rowPinning:A3(),...e}),getDefaultOptions:e=>({onRowPinningChange:Vo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(u=>{let{id:l}=u;return l}):[],a=i?e.getParentRows().map(u=>{let{id:l}=u;return l}):[],s=new Set([...a,e.id,...o]);t.setRowPinning(u=>{var l,c;if(n==="bottom"){var f,h;return{top:((f=u?.top)!=null?f:[]).filter(v=>!(s!=null&&s.has(v))),bottom:[...((h=u?.bottom)!=null?h:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)]}}if(n==="top"){var p,m;return{top:[...((p=u?.top)!=null?p:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)],bottom:((m=u?.bottom)!=null?m:[]).filter(v=>!(s!=null&&s.has(v)))}}return{top:((l=u?.top)!=null?l:[]).filter(v=>!(s!=null&&s.has(v))),bottom:((c=u?.bottom)!=null?c:[]).filter(v=>!(s!=null&&s.has(v)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?A3():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:A3())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ct(e.options,"debugRows")),e.getBottomRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ct(e.options,"debugRows")),e.getCenterRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Ct(e.options,"debugRows"))}},wVe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Vo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{m4(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=St(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?P3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getFilteredSelectedRowModel=St(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?P3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getGroupedSelectedRowModel=St(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?P3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const s={...o};return m4(s,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return y5(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return v4(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return v4(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},m4=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>m4(e,s.id,n,r,i))};function P3(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,s){return a.map(u=>{var l;const c=y5(u,n);if(c&&(r.push(u),i[u.id]=u),(l=u.subRows)!=null&&l.length&&(u={...u,subRows:o(u.subRows)}),c)return u}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function y5(e,t){var n;return(n=t[e.id])!=null?n:!1}function v4(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(y5(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=v4(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const y4=/([0-9]+)/gm,_Ve=(e,t,n)=>eY(Nl(e.getValue(n)).toLowerCase(),Nl(t.getValue(n)).toLowerCase()),SVe=(e,t,n)=>eY(Nl(e.getValue(n)),Nl(t.getValue(n))),CVe=(e,t,n)=>b5(Nl(e.getValue(n)).toLowerCase(),Nl(t.getValue(n)).toLowerCase()),EVe=(e,t,n)=>b5(Nl(e.getValue(n)),Nl(t.getValue(n))),OVe=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:rb5(e.getValue(n),t.getValue(n));function b5(e,t){return e===t?0:e>t?1:-1}function Nl(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function eY(e,t){const n=e.split(y4).filter(Boolean),r=t.split(y4).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),s=parseInt(o,10),u=[a,s].sort();if(isNaN(u[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const Jp={alphanumeric:_Ve,alphanumericCaseSensitive:SVe,text:CVe,textCaseSensitive:EVe,datetime:OVe,basic:AVe},PVe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Vo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Jp.datetime;if(typeof o=="string"&&(r=!0,o.split(y4).length>1))return Jp.alphanumeric}return r?Jp.text:Jp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return x2(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Jp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a?.find(p=>p.id===e.id),u=a?.findIndex(p=>p.id===e.id);let l=[],c,f=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?c="toggle":c="add":a!=null&&a.length&&u!==a.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(o||i||(c="remove")),c==="add"){var h;l=[...a,{id:e.id,desc:f}],l.splice(0,l.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?l=a.map(p=>p.id===e.id?{...p,desc:f}:p):c==="remove"?l=a.filter(p=>p.id!==e.id):l=[{id:e.id,desc:f}];return l})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},kVe=[XHe,gVe,fVe,dVe,QHe,JHe,mVe,vVe,PVe,lVe,yVe,bVe,xVe,wVe,hVe];function TVe(e){var t,n;const r=[...kVe,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let u={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var p;u=(p=h.getInitialState==null?void 0:h.getInitialState(u))!=null?p:u});const l=[];let c=!1;const f={_features:r,options:{...o,...e},initialState:u,_queue:h=>{l.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const p=dl(h,i.options);i.options=a(p)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,p,m)=>{var v;return(v=i.options.getRowId==null?void 0:i.options.getRowId(h,p,m))!=null?v:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,p)=>{let m=(p?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!m&&(m=i.getCoreRowModel().rowsById[h],!m))throw new Error;return m},_getDefaultColumnDef:St(()=>[i.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:m=>{const v=m.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:m=>{var v,b;return(v=(b=m.renderValue())==null||b.toString==null?void 0:b.toString())!=null?v:null},...i._features.reduce((m,v)=>Object.assign(m,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...h}},Ct(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:St(()=>[i._getColumnDefs()],h=>{const p=function(m,v,b){return b===void 0&&(b=0),m.map(w=>{const x=ZHe(i,w,b,v),S=w;return x.columns=S.columns?p(S.columns,x,b+1):[],x})};return p(h)},Ct(e,"debugColumns")),getAllFlatColumns:St(()=>[i.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),Ct(e,"debugColumns")),_getAllFlatColumnsById:St(()=>[i.getAllFlatColumns()],h=>h.reduce((p,m)=>(p[m.id]=m,p),{}),Ct(e,"debugColumns")),getAllLeafColumns:St(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,p)=>{let m=h.flatMap(v=>v.getLeafColumns());return p(m)},Ct(e,"debugColumns")),getColumn:h=>i._getAllFlatColumnsById()[h]};Object.assign(i,f);for(let h=0;hSt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const s=[];for(let l=0;le._autoResetPageIndex()))}function MVe(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function tY(e,t,n){return n.options.filterFromLeafRows?RVe(e,t,n):DVe(e,t,n)}function RVe(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,l){l===void 0&&(l=0);const c=[];for(let h=0;hSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const o=[...r.map(s=>s.id).filter(s=>s!==t),i?"__global__":void 0].filter(Boolean),a=s=>{for(let u=0;uSt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let o=0;oSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h{var p;const m=e.getColumn(h.id);if(!m)return;const v=m.getFilterFn();v&&i.push({id:h.id,filterFn:v,resolvedValue:(p=v.resolveFilterValue==null?void 0:v.resolveFilterValue(h.value))!=null?p:h.value})});const a=(n??[]).map(h=>h.id),s=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&s&&u.length&&(a.push("__global__"),u.forEach(h=>{var p;o.push({id:h.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let l,c;for(let h=0;h{p.columnFiltersMeta[v]=b})}if(o.length){for(let m=0;m{p.columnFiltersMeta[v]=b})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;pe._autoResetPageIndex()))}function nJe(e){return t=>St(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:s,rowsById:u}=r;const l=i*o,c=l+i;a=a.slice(l,c);let f;t.options.paginateExpandedRows?f={rows:a,flatRows:s,rowsById:u}:f=MVe({rows:a,flatRows:s,rowsById:u}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},Ct(t.options,"debugTable"))}function rJe(){return e=>St(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(u=>{var l;return(l=e.getColumn(u.id))==null?void 0:l.getCanSort()}),a={};o.forEach(u=>{const l=e.getColumn(u.id);l&&(a[u.id]={sortUndefined:l.columnDef.sortUndefined,invertSorting:l.columnDef.invertSorting,sortingFn:l.getSortingFn()})});const s=u=>{const l=u.map(c=>({...c}));return l.sort((c,f)=>{for(let p=0;p{var f;i.push(c),(f=c.subRows)!=null&&f.length&&(c.subRows=s(c.subRows))}),l};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},Ct(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** + color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n?.key)}return i}}function Ct(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function mVe(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:St(()=>[e,n,t,o],(a,s,u,l)=>({table:a,column:s,row:u,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Ct(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function vVe(e,t,n,r){var i,o;const s={...e._getDefaultColumnDef(),...t},u=s.accessorKey;let l=(i=(o=s.id)!=null?o:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:u&&(u.includes(".")?c=h=>{let p=h;for(const v of u.split(".")){var m;p=(m=p)==null?void 0:m[v]}return p}:c=h=>h[s.accessorKey]),!l)throw new Error;let f={id:`${String(l)}`,accessorFn:c,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:St(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},Ct(e.options,"debugColumns")),getLeafColumns:St(()=>[e._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let m=f.columns.flatMap(v=>v.getLeafColumns());return h(m)}return[f]},Ct(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(f,e);return f}const Ei="debugHeaders";function DI(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),a.push(u)};return s(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const yVe={createTable:e=>{e.getHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const s=(o=r?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?o:[],u=(a=i?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?a:[],l=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(i!=null&&i.includes(f.id)));return Oy(t,[...s,...l,...u],e)},Ct(e.options,Ei)),e.getCenterHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Oy(t,n,e,"center")),Ct(e.options,Ei)),e.getLeftHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Oy(t,o,e,"left")},Ct(e.options,Ei)),e.getRightHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Oy(t,o,e,"right")},Ct(e.options,Ei)),e.getFooterGroups=St(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getLeftFooterGroups=St(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getCenterFooterGroups=St(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getRightFooterGroups=St(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getFlatHeaders=St(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getLeftFlatHeaders=St(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterFlatHeaders=St(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getRightFlatHeaders=St(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterLeafHeaders=St(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeftLeafHeaders=St(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getRightLeafHeaders=St(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeafHeaders=St(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,s,u,l;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(u=(l=r[0])==null?void 0:l.headers)!=null?u:[]].map(c=>c.getLeafHeaders()).flat()},Ct(e.options,Ei))}};function Oy(e,t,n,r){var i,o;let a=0;const s=function(h,p){p===void 0&&(p=1),a=Math.max(a,p),h.filter(m=>m.getIsVisible()).forEach(m=>{var v;(v=m.columns)!=null&&v.length&&s(m.columns,p+1)},0)};s(e);let u=[];const l=(h,p)=>{const m={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},v=[];h.forEach(b=>{const w=[...v].reverse()[0],x=b.column.depth===m.depth;let S,O=!1;if(x&&b.column.parent?S=b.column.parent:(S=b.column,O=!0),w&&w?.column===S)w.subHeaders.push(b);else{const E=DI(n,S,{id:[r,p,S.id,b?.id].filter(Boolean).join("_"),isPlaceholder:O,placeholderId:O?`${v.filter(C=>C.column===S).length}`:void 0,depth:p,index:v.length});E.subHeaders.push(b),v.push(E)}m.headers.push(b),b.headerGroup=m}),u.push(m),p>0&&l(v,p-1)},c=t.map((h,p)=>DI(n,h,{depth:a,index:p}));l(c,a-1),u.reverse();const f=h=>h.filter(m=>m.column.getIsVisible()).map(m=>{let v=0,b=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],f(m.subHeaders).forEach(S=>{let{colSpan:O,rowSpan:E}=S;v+=O,w.push(E)})):v=1;const x=Math.min(...w);return b=b+x,m.colSpan=v,m.rowSpan=b,{colSpan:v,rowSpan:b}});return f((i=(o=u[0])==null?void 0:o.headers)!=null?i:[]),u}const a5=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const l=e.getColumn(u);if(l!=null&&l.accessorFn)return s._valuesCache[u]=l.accessorFn(s.original,r),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const l=e.getColumn(u);if(l!=null&&l.accessorFn)return l.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=l.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var l;return(l=s.getValue(u))!=null?l:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>gVe(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],l=s;for(;;){const c=l.getParentRow();if(!c)break;u.push(c),l=c}return u.reverse()},getAllCells:St(()=>[e.getAllLeafColumns()],u=>u.map(l=>mVe(e,s,l,l.id)),Ct(e.options,"debugRows")),_getAllCellsByColumnId:St(()=>[s.getAllCells()],u=>u.reduce((l,c)=>(l[c.column.id]=c,l),{}),Ct(e.options,"debugRows"))};for(let u=0;u{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},kG=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};kG.autoRemove=e=>qa(e);const TG=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};TG.autoRemove=e=>qa(e);const MG=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};MG.autoRemove=e=>qa(e);const RG=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};RG.autoRemove=e=>qa(e)||!(e!=null&&e.length);const DG=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});DG.autoRemove=e=>qa(e)||!(e!=null&&e.length);const $G=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});$G.autoRemove=e=>qa(e)||!(e!=null&&e.length);const IG=(e,t,n)=>e.getValue(t)===n;IG.autoRemove=e=>qa(e);const NG=(e,t,n)=>e.getValue(t)==n;NG.autoRemove=e=>qa(e);const s5=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};s5.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const s=o;o=a,a=s}return[o,a]};s5.autoRemove=e=>qa(e)||qa(e[0])&&qa(e[1]);const eu={includesString:kG,includesStringSensitive:TG,equalsString:MG,arrIncludes:RG,arrIncludesAll:DG,arrIncludesSome:$G,equals:IG,weakEquals:NG,inNumberRange:s5};function qa(e){return e==null||e===""}const xVe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Vo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?eu.includesString:typeof r=="number"?eu.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?eu.equals:Array.isArray(r)?eu.arrIncludes:eu.weakEquals},e.getFilterFn=()=>{var n,r;return g2(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:eu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(c=>c.id===e.id),a=fl(n,o?o.value:void 0);if($I(i,a,e)){var s;return(s=r?.filter(c=>c.id!==e.id))!=null?s:[]}const u={id:e.id,value:a};if(o){var l;return(l=r?.map(c=>c.id===e.id?u:c))!=null?l:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=fl(t,i))==null?void 0:o.filter(a=>{const s=n.find(u=>u.id===a.id);if(s){const u=s.getFilterFn();if($I(u,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function $I(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const wVe=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),_Ve=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},SVe=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r=o)&&(r=o)}),r},CVe=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},OVe=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!pVe(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},AVe=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),PVe=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,kVe=(e,t)=>t.length,m3={sum:wVe,min:_Ve,max:SVe,extent:CVe,mean:EVe,median:OVe,unique:AVe,uniqueCount:PVe,count:kVe},TVe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Vo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return m3.sum;if(Object.prototype.toString.call(r)==="[object Date]")return m3.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return g2(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:m3[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function MVe(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const RVe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Vo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=St(n=>[T0(t,n)],n=>n.findIndex(r=>r.id===e.id),Ct(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=T0(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=T0(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=St(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],s=[...i];for(;s.length&&a.length;){const u=a.shift(),l=s.findIndex(c=>c.id===u);l>-1&&o.push(s.splice(l,1)[0])}o=[...o,...s]}return MVe(o,n,r)},Ct(e.options,"debugTable"))}},v3=()=>({left:[],right:[]}),DVe={getInitialState:e=>({columnPinning:v3(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Vo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var s,u;return{left:((s=i?.left)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((u=i?.right)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var l,c;return{left:[...((l=i?.left)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((c=i?.right)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((o=i?.left)!=null?o:[]).filter(f=>!(r!=null&&r.includes(f))),right:((a=i?.right)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Ct(t.options,"debugRows")),e.getLeftVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ct(t.options,"debugRows")),e.getRightVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ct(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?v3():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:v3())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getRightLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getCenterLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Ct(e.options,"debugColumns"))}},Ay={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},y3=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),$Ve={getDefaultColumnDef:()=>Ay,getInitialState:e=>({columnSizing:{},columnSizingInfo:y3(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Vo("columnSizing",e),onColumnSizingInfoChange:Vo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Ay.minSize,(r=o??e.columnDef.size)!=null?r:Ay.size),(i=e.columnDef.maxSize)!=null?i:Ay.maxSize)},e.getStart=St(n=>[n,T0(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.getAfter=St(n=>[n,T0(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),b3(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],u=b3(o)?Math.round(o.touches[0].clientX):o.clientX,l={},c=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(S=>{var O,E;const C=t.options.columnResizeDirection==="rtl"?-1:1,k=(x-((O=S?.startOffset)!=null?O:0))*C,M=Math.max(k/((E=S?.startSize)!=null?E:0),-.999999);return S.columnSizingStart.forEach(N=>{let[z,H]=N;l[z]=Math.round(Math.max(H+H*M,0)*100)/100}),{...S,deltaOffset:k,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(S=>({...S,...l})))},f=w=>c("move",w),h=w=>{c("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||typeof document<"u"?document:null,m={moveHandler:w=>f(w.clientX),upHandler:w=>{p?.removeEventListener("mousemove",m.moveHandler),p?.removeEventListener("mouseup",m.upHandler),h(w.clientX)}},v={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),f(w.touches[0].clientX),!1),upHandler:w=>{var x;p?.removeEventListener("touchmove",v.moveHandler),p?.removeEventListener("touchend",v.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((x=w.touches[0])==null?void 0:x.clientX)}},b=IVe()?{passive:!1}:!1;b3(o)?(p?.addEventListener("touchmove",v.moveHandler,b),p?.addEventListener("touchend",v.upHandler,b)):(p?.addEventListener("mousemove",m.moveHandler,b),p?.addEventListener("mouseup",m.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:u,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?y3():(n=e.initialState.columnSizingInfo)!=null?n:y3())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let Py=null;function IVe(){if(typeof Py=="boolean")return Py;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Py=e,Py}function b3(e){return e.type==="touchstart"}const NVe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Vo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=St(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ct(t.options,"debugRows")),e.getVisibleCells=St(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Ct(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>St(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ct(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function T0(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const LVe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},FVe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Vo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>eu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return g2(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:eu[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},jVe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Vo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:s,...u}=a;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},a4=0,s4=10,x3=()=>({pageIndex:a4,pageSize:s4}),BVe={getInitialState:e=>({...e,pagination:{...x3(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Vo("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>fl(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?x3():(i=e.initialState.pagination)!=null?i:x3())},e.setPageIndex=r=>{e.setPagination(i=>{let o=fl(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?a4:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:a4)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?s4:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:s4)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,fl(r,i.pageSize)),a=i.pageSize*i.pageIndex,s=Math.floor(a/o);return{...i,pageIndex:s,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=fl(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=St(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Ct(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},w3=()=>({top:[],bottom:[]}),zVe={getInitialState:e=>({rowPinning:w3(),...e}),getDefaultOptions:e=>({onRowPinningChange:Vo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(u=>{let{id:l}=u;return l}):[],a=i?e.getParentRows().map(u=>{let{id:l}=u;return l}):[],s=new Set([...a,e.id,...o]);t.setRowPinning(u=>{var l,c;if(n==="bottom"){var f,h;return{top:((f=u?.top)!=null?f:[]).filter(v=>!(s!=null&&s.has(v))),bottom:[...((h=u?.bottom)!=null?h:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)]}}if(n==="top"){var p,m;return{top:[...((p=u?.top)!=null?p:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)],bottom:((m=u?.bottom)!=null?m:[]).filter(v=>!(s!=null&&s.has(v)))}}return{top:((l=u?.top)!=null?l:[]).filter(v=>!(s!=null&&s.has(v))),bottom:((c=u?.bottom)!=null?c:[]).filter(v=>!(s!=null&&s.has(v)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?w3():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:w3())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ct(e.options,"debugRows")),e.getBottomRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ct(e.options,"debugRows")),e.getCenterRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Ct(e.options,"debugRows"))}},UVe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Vo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{u4(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=St(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getFilteredSelectedRowModel=St(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getGroupedSelectedRowModel=St(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const s={...o};return u4(s,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return u5(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return l4(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return l4(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},u4=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>u4(e,s.id,n,r,i))};function _3(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,s){return a.map(u=>{var l;const c=u5(u,n);if(c&&(r.push(u),i[u.id]=u),(l=u.subRows)!=null&&l.length&&(u={...u,subRows:o(u.subRows)}),c)return u}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function u5(e,t){var n;return(n=t[e.id])!=null?n:!1}function l4(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(u5(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=l4(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const c4=/([0-9]+)/gm,VVe=(e,t,n)=>LG(Il(e.getValue(n)).toLowerCase(),Il(t.getValue(n)).toLowerCase()),WVe=(e,t,n)=>LG(Il(e.getValue(n)),Il(t.getValue(n))),HVe=(e,t,n)=>l5(Il(e.getValue(n)).toLowerCase(),Il(t.getValue(n)).toLowerCase()),KVe=(e,t,n)=>l5(Il(e.getValue(n)),Il(t.getValue(n))),qVe=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:rl5(e.getValue(n),t.getValue(n));function l5(e,t){return e===t?0:e>t?1:-1}function Il(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function LG(e,t){const n=e.split(c4).filter(Boolean),r=t.split(c4).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),s=parseInt(o,10),u=[a,s].sort();if(isNaN(u[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const Zp={alphanumeric:VVe,alphanumericCaseSensitive:WVe,text:HVe,textCaseSensitive:KVe,datetime:qVe,basic:GVe},YVe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Vo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Zp.datetime;if(typeof o=="string"&&(r=!0,o.split(c4).length>1))return Zp.alphanumeric}return r?Zp.text:Zp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return g2(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Zp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a?.find(p=>p.id===e.id),u=a?.findIndex(p=>p.id===e.id);let l=[],c,f=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?c="toggle":c="add":a!=null&&a.length&&u!==a.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(o||i||(c="remove")),c==="add"){var h;l=[...a,{id:e.id,desc:f}],l.splice(0,l.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?l=a.map(p=>p.id===e.id?{...p,desc:f}:p):c==="remove"?l=a.filter(p=>p.id!==e.id):l=[{id:e.id,desc:f}];return l})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},ZVe=[yVe,NVe,RVe,DVe,bVe,xVe,LVe,FVe,YVe,TVe,jVe,BVe,zVe,UVe,$Ve];function XVe(e){var t,n;const r=[...ZVe,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let u={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var p;u=(p=h.getInitialState==null?void 0:h.getInitialState(u))!=null?p:u});const l=[];let c=!1;const f={_features:r,options:{...o,...e},initialState:u,_queue:h=>{l.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const p=fl(h,i.options);i.options=a(p)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,p,m)=>{var v;return(v=i.options.getRowId==null?void 0:i.options.getRowId(h,p,m))!=null?v:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,p)=>{let m=(p?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!m&&(m=i.getCoreRowModel().rowsById[h],!m))throw new Error;return m},_getDefaultColumnDef:St(()=>[i.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:m=>{const v=m.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:m=>{var v,b;return(v=(b=m.renderValue())==null||b.toString==null?void 0:b.toString())!=null?v:null},...i._features.reduce((m,v)=>Object.assign(m,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...h}},Ct(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:St(()=>[i._getColumnDefs()],h=>{const p=function(m,v,b){return b===void 0&&(b=0),m.map(w=>{const x=vVe(i,w,b,v),S=w;return x.columns=S.columns?p(S.columns,x,b+1):[],x})};return p(h)},Ct(e,"debugColumns")),getAllFlatColumns:St(()=>[i.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),Ct(e,"debugColumns")),_getAllFlatColumnsById:St(()=>[i.getAllFlatColumns()],h=>h.reduce((p,m)=>(p[m.id]=m,p),{}),Ct(e,"debugColumns")),getAllLeafColumns:St(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,p)=>{let m=h.flatMap(v=>v.getLeafColumns());return p(m)},Ct(e,"debugColumns")),getColumn:h=>i._getAllFlatColumnsById()[h]};Object.assign(i,f);for(let h=0;hSt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const s=[];for(let l=0;le._autoResetPageIndex()))}function QVe(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function FG(e,t,n){return n.options.filterFromLeafRows?JVe(e,t,n):eWe(e,t,n)}function JVe(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,l){l===void 0&&(l=0);const c=[];for(let h=0;hSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const o=[...r.map(s=>s.id).filter(s=>s!==t),i?"__global__":void 0].filter(Boolean),a=s=>{for(let u=0;uSt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let o=0;oSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h{var p;const m=e.getColumn(h.id);if(!m)return;const v=m.getFilterFn();v&&i.push({id:h.id,filterFn:v,resolvedValue:(p=v.resolveFilterValue==null?void 0:v.resolveFilterValue(h.value))!=null?p:h.value})});const a=(n??[]).map(h=>h.id),s=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&s&&u.length&&(a.push("__global__"),u.forEach(h=>{var p;o.push({id:h.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let l,c;for(let h=0;h{p.columnFiltersMeta[v]=b})}if(o.length){for(let m=0;m{p.columnFiltersMeta[v]=b})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;pe._autoResetPageIndex()))}function wQe(e){return t=>St(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:s,rowsById:u}=r;const l=i*o,c=l+i;a=a.slice(l,c);let f;t.options.paginateExpandedRows?f={rows:a,flatRows:s,rowsById:u}:f=QVe({rows:a,flatRows:s,rowsById:u}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},Ct(t.options,"debugTable"))}function _Qe(){return e=>St(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(u=>{var l;return(l=e.getColumn(u.id))==null?void 0:l.getCanSort()}),a={};o.forEach(u=>{const l=e.getColumn(u.id);l&&(a[u.id]={sortUndefined:l.columnDef.sortUndefined,invertSorting:l.columnDef.invertSorting,sortingFn:l.getSortingFn()})});const s=u=>{const l=u.map(c=>({...c}));return l.sort((c,f)=>{for(let p=0;p{var f;i.push(c),(f=c.subRows)!=null&&f.length&&(c.subRows=s(c.subRows))}),l};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},Ct(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** * react-table * * Copyright (c) TanStack @@ -508,46 +508,46 @@ Defaulting to \`null\`.`}var qQe=LG,KQe=jG,BHe="Separator",KI="horizontal",zHe=[ * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function iJe(e,t){return e?$Ve(e)?y.createElement(e,t):e:null}function $Ve(e){return IVe(e)||typeof e=="function"||NVe(e)}function IVe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function NVe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function oJe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=y.useState(()=>({current:TVe(t)})),[r,i]=y.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const nY=Object.freeze({left:0,top:0,width:16,height:16}),Cx=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),x5=Object.freeze({...nY,...Cx}),b4=Object.freeze({...x5,body:"",hidden:!1});function LVe(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function ZI(e,t){const n=LVe(e,t);for(const r in b4)r in Cx?r in e&&!(r in n)&&(n[r]=Cx[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function FVe(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=r[a]&&r[a].parent,u=s&&o(s);u&&(i[a]=[s].concat(u))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function jVe(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=ZI(r[s]||i[s],o)}return a(t),n.forEach(a),ZI(e,o)}function rY(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=FVe(e);for(const i in r){const o=r[i];o&&(t(i,jVe(e,i,o)),n.push(i))}return n}const BVe={provider:"",aliases:{},not_found:{},...nY};function k3(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function iY(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!k3(e,BVe))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!k3(o,b4))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],a=o.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!k3(o,b4))return null}return t}const oY=/^[a-z0-9]+(-[a-z0-9]+)*$/,w2=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),u=i.pop(),l={provider:i.length>0?i[0]:r,prefix:u,name:s};return t&&!s1(l)?null:l}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!s1(s)?null:s}if(n&&r===""){const s={provider:r,prefix:"",name:o};return t&&!s1(s,n)?null:s}return null},s1=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,XI=Object.create(null);function zVe(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ff(e,t){const n=XI[e]||(XI[e]=Object.create(null));return n[t]||(n[t]=zVe(e,t))}function w5(e,t){return iY(t)?rY(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function UVe(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let am=!1;function aY(e){return typeof e=="boolean"&&(am=e),am}function QI(e){const t=typeof e=="string"?w2(e,!0,am):e;if(t){const n=ff(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function HVe(e,t){const n=w2(e,!0,am);if(!n)return!1;const r=ff(n.provider,n.prefix);return t?UVe(r,n.name,t):(r.missing.add(n.name),!0)}function VVe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),am&&!t&&!e.prefix){let i=!1;return iY(e)&&(e.prefix="",rY(e,(o,a)=>{HVe(o,a)&&(i=!0)})),i}const n=e.prefix;if(!s1({provider:t,prefix:n,name:"a"}))return!1;const r=ff(t,n);return!!w5(r,e)}const sY=Object.freeze({width:null,height:null}),uY=Object.freeze({...sY,...Cx}),WVe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,qVe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function JI(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(WVe);if(r===null||!r.length)return e;const i=[];let o=r.shift(),a=qVe.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");a=!a}}function KVe(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("",o);if(a===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function GVe(e,t){return e?""+e+""+t:t}function YVe(e,t,n){const r=KVe(e);return GVe(r.defs,t+r.content+n)}const ZVe=e=>e==="unset"||e==="undefined"||e==="none";function XVe(e,t){const n={...x5,...e},r={...uY,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(v=>{const b=[],w=v.hFlip,x=v.vFlip;let S=v.rotate;w?x?S+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):x&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let O;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:O=i.height/2+i.top,b.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:O=i.width/2+i.left,b.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}S%2===1&&(i.left!==i.top&&(O=i.left,i.left=i.top,i.top=O),i.width!==i.height&&(O=i.width,i.width=i.height,i.height=O)),b.length&&(o=YVe(o,'',""))});const a=r.width,s=r.height,u=i.width,l=i.height;let c,f;a===null?(f=s===null?"1em":s==="auto"?l:s,c=JI(f,u/l)):(c=a==="auto"?u:a,f=s===null?JI(c,l/u):s==="auto"?l:s);const h={},p=(v,b)=>{ZVe(b)||(h[v]=b.toString())};p("width",c),p("height",f);const m=[i.left,i.top,u,l];return h.viewBox=m.join(" "),{attributes:h,viewBox:m,body:o}}const QVe=/\sid="(\S+)"/g,JVe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let eWe=0;function tWe(e,t=JVe){const n=[];let r;for(;r=QVe.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const a=typeof t=="function"?t(o):t+(eWe++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const x4=Object.create(null);function nWe(e,t){x4[e]=t}function w4(e){return x4[e]||x4[""]}function _5(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const S5=Object.create(null),e0=["https://api.simplesvg.com","https://api.unisvg.com"],u1=[];for(;e0.length>0;)e0.length===1||Math.random()>.5?u1.push(e0.shift()):u1.push(e0.pop());S5[""]=_5({resources:["https://api.iconify.design"].concat(u1)});function rWe(e,t){const n=_5(t);return n===null?!1:(S5[e]=n,!0)}function C5(e){return S5[e]}const iWe=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let eN=iWe();function oWe(e,t){const n=C5(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function aWe(e){return e===404}const sWe=(e,t,n)=>{const r=[],i=oWe(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},s=0;return n.forEach((u,l)=>{s+=u.length+1,s>=i&&l>0&&(r.push(a),a={type:o,provider:e,prefix:t,icons:[]},s=u.length),a.icons.push(u)}),r.push(a),r};function uWe(e){if(typeof e=="string"){const t=C5(e);if(t)return t.path}return"/"}const lWe=(e,t,n)=>{if(!eN){n("abort",424);return}let r=uWe(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),u=new URLSearchParams({icons:s});r+=o+".json?"+u.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;eN(e+r).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(aWe(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},cWe={prepare:sWe,send:lWe};function fWe(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,a=i.prefix,s=i.name,u=n[o]||(n[o]=Object.create(null)),l=u[a]||(u[a]=ff(o,a));let c;s in l.icons?c=t.loaded:a===""||l.missing.has(s)?c=t.missing:c=t.pending;const f={provider:o,prefix:a,name:s};c.push(f)}),t}function lY(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function dWe(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(u=>{if(u.prefix!==i)return!0;const l=u.name;if(e.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else if(e.missing.has(l))a.missing.push({provider:r,prefix:i,name:l});else return n=!0,!0;return!1}),a.pending.length!==s&&(n||lY([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let hWe=0;function pWe(e,t,n){const r=hWe++,i=lY.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function gWe(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?w2(i,t,n):i;o&&r.push(o)}),r}var mWe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function vWe(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let C=e.resources.slice(0);for(a=[];C.length>1;){const k=Math.floor(Math.random()*C.length);a.push(C[k]),C=C.slice(0,k).concat(C.slice(k+1))}a=a.concat(C)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let u="pending",l=0,c,f=null,h=[],p=[];typeof r=="function"&&p.push(r);function m(){f&&(clearTimeout(f),f=null)}function v(){u==="pending"&&(u="aborted"),m(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function b(C,k){k&&(p=[]),typeof C=="function"&&p.push(C)}function w(){return{startTime:s,payload:t,status:u,queriesSent:l,queriesPending:h.length,subscribe:b,abort:v}}function x(){u="failed",p.forEach(C=>{C(void 0,c)})}function S(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function O(C,k,M){const N=k!=="success";switch(h=h.filter(q=>q!==C),u){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){c=M,x();return}if(N){c=M,h.length||(a.length?E():x());return}if(m(),S(),!e.random){const q=e.resources.indexOf(C.resource);q!==-1&&q!==e.index&&(e.index=q)}u="completed",p.forEach(q=>{q(M)})}function E(){if(u!=="pending")return;m();const C=a.shift();if(C===void 0){if(h.length){f=setTimeout(()=>{m(),u==="pending"&&(S(),x())},e.timeout);return}x();return}const k={status:"pending",resource:C,callback:(M,N)=>{O(k,M,N)}};h.push(k),l++,f=setTimeout(E,e.rotate),n(C,t,k.callback)}return setTimeout(E),w}function cY(e){const t={...mWe,...e};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function i(s,u,l){const c=vWe(t,s,u,(f,h)=>{r(),l&&l(f,h)});return n.push(c),c}function o(s){return n.find(u=>s(u))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:r}}function tN(){}const T3=Object.create(null);function yWe(e){if(!T3[e]){const t=C5(e);if(!t)return;const n=cY(t),r={config:t,redundancy:n};T3[e]=r}return T3[e]}function bWe(e,t,n){let r,i;if(typeof e=="string"){const o=w4(e);if(!o)return n(void 0,424),tN;i=o.send;const a=yWe(e);a&&(r=a.redundancy)}else{const o=_5(e);if(o){r=cY(o);const a=e.resources?e.resources[0]:"",s=w4(a);s&&(i=s.send)}}return!r||!i?(n(void 0,424),tN):r.query(t,i,n)().abort}const nN="iconify2",sm="iconify",fY=sm+"-count",rN=sm+"-version",dY=36e5,xWe=168,wWe=50;function _4(e,t){try{return e.getItem(t)}catch{}}function E5(e,t,n){try{return e.setItem(t,n),!0}catch{}}function iN(e,t){try{e.removeItem(t)}catch{}}function S4(e,t){return E5(e,fY,t.toString())}function C4(e){return parseInt(_4(e,fY))||0}const _2={local:!0,session:!0},hY={local:new Set,session:new Set};let O5=!1;function _We(e){O5=e}let Dy=typeof window>"u"?{}:window;function pY(e){const t=e+"Storage";try{if(Dy&&Dy[t]&&typeof Dy[t].length=="number")return Dy[t]}catch{}_2[e]=!1}function gY(e,t){const n=pY(e);if(!n)return;const r=_4(n,rN);if(r!==nN){if(r){const s=C4(n);for(let u=0;u{const u=sm+s.toString(),l=_4(n,u);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,s))return!0}catch{}iN(n,u)}};let a=C4(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,S4(n,a)):hY[e].add(s))}function mY(){if(!O5){_We(!0);for(const e in _2)gY(e,t=>{const n=t.data,r=t.provider,i=n.prefix,o=ff(r,i);if(!w5(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function SWe(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in _2)gY(r,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function CWe(e,t){O5||mY();function n(r){let i;if(!_2[r]||!(i=pY(r)))return;const o=hY[r];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=C4(i),a>=wWe||!S4(i,a+1))return;const s={cached:Math.floor(Date.now()/dY),provider:e.provider,data:t};return E5(i,sm+a.toString(),JSON.stringify(s))}t.lastModified&&!SWe(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function EWe(){}function OWe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,dWe(e)}))}function AWe(e){const t=[],n=[];return e.forEach(r=>{(r.match(oY)?t:n).push(r)}),{valid:t,invalid:n}}function t0(e,t,n,r){function i(){const o=e.pendingIcons;t.forEach(a=>{o&&o.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!w5(e,n).length){i();return}r&&CWe(e,n)}catch(o){console.error(o)}i(),OWe(e)}function oN(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function PWe(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){oN(e.loadIcons(i,r,n),c=>{t0(e,i,c,!1)});return}if(o){i.forEach(c=>{const f=o(c,r,n);oN(f,h=>{const p=h?{prefix:r,icons:{[c]:h}}:null;t0(e,[c],p,!1)})});return}const{valid:a,invalid:s}=AWe(i);if(s.length&&t0(e,s,null,!1),!a.length)return;const u=r.match(oY)?w4(n):null;if(!u){t0(e,a,null,!1);return}u.prepare(n,r,a).forEach(c=>{bWe(n,c,f=>{t0(e,c.icons,f,!0)})})}))}const kWe=(e,t)=>{const n=gWe(e,!0,aY()),r=fWe(n);if(!r.pending.length){let u=!0;return setTimeout(()=>{u&&t(r.loaded,r.missing,r.pending,EWe)}),()=>{u=!1}}const i=Object.create(null),o=[];let a,s;return r.pending.forEach(u=>{const{provider:l,prefix:c}=u;if(c===s&&l===a)return;a=l,s=c,o.push(ff(l,c));const f=i[l]||(i[l]=Object.create(null));f[c]||(f[c]=[])}),r.pending.forEach(u=>{const{provider:l,prefix:c,name:f}=u,h=ff(l,c),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),i[l][c].push(f))}),o.forEach(u=>{const l=i[u.provider][u.prefix];l.length&&PWe(u,l)}),pWe(t,r,o)};function TWe(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in sY?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const MWe=/[\s,]+/;function RWe(e,t){t.split(MWe).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function DWe(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function $We(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function IWe(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function NWe(e){return"data:image/svg+xml,"+IWe(e)}function LWe(e){return'url("'+NWe(e)+'")'}let $0;function FWe(){try{$0=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{$0=null}}function jWe(e){return $0===void 0&&FWe(),$0?$0.createHTML(e):e}const vY={...uY,inline:!1},BWe={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},zWe={display:"inline-block"},E4={backgroundColor:"currentColor"},yY={backgroundColor:"transparent"},aN={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},sN={WebkitMask:E4,mask:E4,background:yY};for(const e in sN){const t=sN[e];for(const n in aN)t[e+n]=aN[n]}const UWe={...vY,inline:!0};function uN(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const HWe=(e,t,n)=>{const r=t.inline?UWe:vY,i=TWe(r,t),o=t.mode||"svg",a={},s=t.style||{},u={...o==="svg"?BWe:{}};if(n){const b=w2(n,!1,!0);if(b){const w=["iconify"],x=["provider","prefix"];for(const S of x)b[S]&&w.push("iconify--"+b[S]);u.className=w.join(" ")}}for(let b in t){const w=t[b];if(w!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":u.ref=w;break;case"className":u[b]=(u[b]?u[b]+" ":"")+w;break;case"inline":case"hFlip":case"vFlip":i[b]=w===!0||w==="true"||w===1;break;case"flip":typeof w=="string"&&RWe(i,w);break;case"color":a.color=w;break;case"rotate":typeof w=="string"?i[b]=DWe(w):typeof w=="number"&&(i[b]=w);break;case"ariaHidden":case"aria-hidden":w!==!0&&w!=="true"&&delete u["aria-hidden"];break;default:r[b]===void 0&&(u[b]=w)}}const l=XVe(e,i),c=l.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),o==="svg"){u.style={...a,...s},Object.assign(u,c);let b=0,w=t.id;return typeof w=="string"&&(w=w.replace(/-/g,"_")),u.dangerouslySetInnerHTML={__html:jWe(tWe(l.body,w?()=>w+"ID"+b++:"iconifyReact"))},y.createElement("svg",u)}const{body:f,width:h,height:p}=e,m=o==="mask"||(o==="bg"?!1:f.indexOf("currentColor")!==-1),v=$We(f,{...c,width:h+"",height:p+""});return u.style={...a,"--svg":LWe(v),width:uN(c.width),height:uN(c.height),...zWe,...m?E4:yY,...s},y.createElement("span",u)};aY(!0);nWe("",cWe);if(typeof document<"u"&&typeof window<"u"){mY();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!VVe(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;rWe(n,i)||console.error(r)}catch{console.error(r)}}}}function bY(e){const[t,n]=y.useState(!!e.ssr),[r,i]=y.useState({});function o(p){if(p){const m=e.icon;if(typeof m=="object")return{name:"",data:m};const v=QI(m);if(v)return{name:m,data:v}}return{name:""}}const[a,s]=y.useState(o(!!e.ssr));function u(){const p=r.callback;p&&(p(),i({}))}function l(p){if(JSON.stringify(a)!==JSON.stringify(p))return u(),s(p),!0}function c(){var p;const m=e.icon;if(typeof m=="object"){l({name:"",data:m});return}const v=QI(m);if(l({name:m,data:v}))if(v===void 0){const b=kWe([m],c);i({callback:b})}else v&&((p=e.onLoad)===null||p===void 0||p.call(e,m))}y.useEffect(()=>(n(!0),u),[]),y.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:h}=a;return h?HWe({...x5,...h},e,f):e.children?e.children:y.createElement("span",{})}const aJe=y.forwardRef((e,t)=>bY({...e,_ref:t}));y.forwardRef((e,t)=>bY({inline:!0,...e,_ref:t}));var xY="AlertDialog",[VWe,sJe]=vi(xY,[vz]),$u=vz(),wY=e=>{const{__scopeAlertDialog:t,...n}=e,r=$u(t);return L.jsx($ge,{...r,...n,modal:!0})};wY.displayName=xY;var WWe="AlertDialogTrigger",_Y=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$u(n);return L.jsx(Ige,{...i,...r,ref:t})});_Y.displayName=WWe;var qWe="AlertDialogPortal",SY=e=>{const{__scopeAlertDialog:t,...n}=e,r=$u(t);return L.jsx(Nge,{...r,...n})};SY.displayName=qWe;var KWe="AlertDialogOverlay",CY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$u(n);return L.jsx(Lge,{...i,...r,ref:t})});CY.displayName=KWe;var jd="AlertDialogContent",[GWe,YWe]=VWe(jd),EY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=$u(n),a=y.useRef(null),s=Gt(t,a),u=y.useRef(null);return L.jsx(Tge,{contentName:jd,titleName:OY,docsSlug:"alert-dialog",children:L.jsx(GWe,{scope:n,cancelRef:u,children:L.jsxs(Fge,{role:"alertdialog",...o,...i,ref:s,onOpenAutoFocus:Ye(i.onOpenAutoFocus,l=>{l.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[L.jsx(NO,{children:r}),L.jsx(XWe,{contentRef:a})]})})})});EY.displayName=jd;var OY="AlertDialogTitle",AY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$u(n);return L.jsx(jge,{...i,...r,ref:t})});AY.displayName=OY;var PY="AlertDialogDescription",kY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$u(n);return L.jsx(Bge,{...i,...r,ref:t})});kY.displayName=PY;var ZWe="AlertDialogAction",TY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$u(n);return L.jsx(Dz,{...i,...r,ref:t})});TY.displayName=ZWe;var MY="AlertDialogCancel",RY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=YWe(MY,n),o=$u(n),a=Gt(t,i);return L.jsx(Dz,{...o,...r,ref:a})});RY.displayName=MY;var XWe=({contentRef:e})=>{const t=`\`${jd}\` requires a description for the component to be accessible for screen reader users. + */function SQe(e,t){return e?tWe(e)?y.createElement(e,t):e:null}function tWe(e){return nWe(e)||typeof e=="function"||rWe(e)}function nWe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function rWe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function CQe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=y.useState(()=>({current:XVe(t)})),[r,i]=y.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const jG=Object.freeze({left:0,top:0,width:16,height:16}),bx=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),c5=Object.freeze({...jG,...bx}),f4=Object.freeze({...c5,body:"",hidden:!1});function iWe(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function II(e,t){const n=iWe(e,t);for(const r in f4)r in bx?r in e&&!(r in n)&&(n[r]=bx[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function oWe(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=r[a]&&r[a].parent,u=s&&o(s);u&&(i[a]=[s].concat(u))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function aWe(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=II(r[s]||i[s],o)}return a(t),n.forEach(a),II(e,o)}function BG(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=oWe(e);for(const i in r){const o=r[i];o&&(t(i,aWe(e,i,o)),n.push(i))}return n}const sWe={provider:"",aliases:{},not_found:{},...jG};function S3(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function zG(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!S3(e,sWe))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!S3(o,f4))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],a=o.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!S3(o,f4))return null}return t}const UG=/^[a-z0-9]+(-[a-z0-9]+)*$/,m2=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),u=i.pop(),l={provider:i.length>0?i[0]:r,prefix:u,name:s};return t&&!r1(l)?null:l}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!r1(s)?null:s}if(n&&r===""){const s={provider:r,prefix:"",name:o};return t&&!r1(s,n)?null:s}return null},r1=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,NI=Object.create(null);function uWe(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function lf(e,t){const n=NI[e]||(NI[e]=Object.create(null));return n[t]||(n[t]=uWe(e,t))}function f5(e,t){return zG(t)?BG(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function lWe(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let nm=!1;function VG(e){return typeof e=="boolean"&&(nm=e),nm}function LI(e){const t=typeof e=="string"?m2(e,!0,nm):e;if(t){const n=lf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function cWe(e,t){const n=m2(e,!0,nm);if(!n)return!1;const r=lf(n.provider,n.prefix);return t?lWe(r,n.name,t):(r.missing.add(n.name),!0)}function fWe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),nm&&!t&&!e.prefix){let i=!1;return zG(e)&&(e.prefix="",BG(e,(o,a)=>{cWe(o,a)&&(i=!0)})),i}const n=e.prefix;if(!r1({provider:t,prefix:n,name:"a"}))return!1;const r=lf(t,n);return!!f5(r,e)}const WG=Object.freeze({width:null,height:null}),HG=Object.freeze({...WG,...bx}),dWe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,hWe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function FI(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(dWe);if(r===null||!r.length)return e;const i=[];let o=r.shift(),a=hWe.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");a=!a}}function pWe(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("",o);if(a===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function gWe(e,t){return e?""+e+""+t:t}function mWe(e,t,n){const r=pWe(e);return gWe(r.defs,t+r.content+n)}const vWe=e=>e==="unset"||e==="undefined"||e==="none";function yWe(e,t){const n={...c5,...e},r={...HG,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(v=>{const b=[],w=v.hFlip,x=v.vFlip;let S=v.rotate;w?x?S+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):x&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let O;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:O=i.height/2+i.top,b.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:O=i.width/2+i.left,b.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}S%2===1&&(i.left!==i.top&&(O=i.left,i.left=i.top,i.top=O),i.width!==i.height&&(O=i.width,i.width=i.height,i.height=O)),b.length&&(o=mWe(o,'',""))});const a=r.width,s=r.height,u=i.width,l=i.height;let c,f;a===null?(f=s===null?"1em":s==="auto"?l:s,c=FI(f,u/l)):(c=a==="auto"?u:a,f=s===null?FI(c,l/u):s==="auto"?l:s);const h={},p=(v,b)=>{vWe(b)||(h[v]=b.toString())};p("width",c),p("height",f);const m=[i.left,i.top,u,l];return h.viewBox=m.join(" "),{attributes:h,viewBox:m,body:o}}const bWe=/\sid="(\S+)"/g,xWe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let wWe=0;function _We(e,t=xWe){const n=[];let r;for(;r=bWe.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const a=typeof t=="function"?t(o):t+(wWe++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const d4=Object.create(null);function SWe(e,t){d4[e]=t}function h4(e){return d4[e]||d4[""]}function d5(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const h5=Object.create(null),Xp=["https://api.simplesvg.com","https://api.unisvg.com"],i1=[];for(;Xp.length>0;)Xp.length===1||Math.random()>.5?i1.push(Xp.shift()):i1.push(Xp.pop());h5[""]=d5({resources:["https://api.iconify.design"].concat(i1)});function CWe(e,t){const n=d5(t);return n===null?!1:(h5[e]=n,!0)}function p5(e){return h5[e]}const EWe=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let jI=EWe();function OWe(e,t){const n=p5(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function AWe(e){return e===404}const PWe=(e,t,n)=>{const r=[],i=OWe(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},s=0;return n.forEach((u,l)=>{s+=u.length+1,s>=i&&l>0&&(r.push(a),a={type:o,provider:e,prefix:t,icons:[]},s=u.length),a.icons.push(u)}),r.push(a),r};function kWe(e){if(typeof e=="string"){const t=p5(e);if(t)return t.path}return"/"}const TWe=(e,t,n)=>{if(!jI){n("abort",424);return}let r=kWe(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),u=new URLSearchParams({icons:s});r+=o+".json?"+u.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;jI(e+r).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(AWe(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},MWe={prepare:PWe,send:TWe};function RWe(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,a=i.prefix,s=i.name,u=n[o]||(n[o]=Object.create(null)),l=u[a]||(u[a]=lf(o,a));let c;s in l.icons?c=t.loaded:a===""||l.missing.has(s)?c=t.missing:c=t.pending;const f={provider:o,prefix:a,name:s};c.push(f)}),t}function KG(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function DWe(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(u=>{if(u.prefix!==i)return!0;const l=u.name;if(e.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else if(e.missing.has(l))a.missing.push({provider:r,prefix:i,name:l});else return n=!0,!0;return!1}),a.pending.length!==s&&(n||KG([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let $We=0;function IWe(e,t,n){const r=$We++,i=KG.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function NWe(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?m2(i,t,n):i;o&&r.push(o)}),r}var LWe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function FWe(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let C=e.resources.slice(0);for(a=[];C.length>1;){const k=Math.floor(Math.random()*C.length);a.push(C[k]),C=C.slice(0,k).concat(C.slice(k+1))}a=a.concat(C)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let u="pending",l=0,c,f=null,h=[],p=[];typeof r=="function"&&p.push(r);function m(){f&&(clearTimeout(f),f=null)}function v(){u==="pending"&&(u="aborted"),m(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function b(C,k){k&&(p=[]),typeof C=="function"&&p.push(C)}function w(){return{startTime:s,payload:t,status:u,queriesSent:l,queriesPending:h.length,subscribe:b,abort:v}}function x(){u="failed",p.forEach(C=>{C(void 0,c)})}function S(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function O(C,k,M){const N=k!=="success";switch(h=h.filter(z=>z!==C),u){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){c=M,x();return}if(N){c=M,h.length||(a.length?E():x());return}if(m(),S(),!e.random){const z=e.resources.indexOf(C.resource);z!==-1&&z!==e.index&&(e.index=z)}u="completed",p.forEach(z=>{z(M)})}function E(){if(u!=="pending")return;m();const C=a.shift();if(C===void 0){if(h.length){f=setTimeout(()=>{m(),u==="pending"&&(S(),x())},e.timeout);return}x();return}const k={status:"pending",resource:C,callback:(M,N)=>{O(k,M,N)}};h.push(k),l++,f=setTimeout(E,e.rotate),n(C,t,k.callback)}return setTimeout(E),w}function qG(e){const t={...LWe,...e};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function i(s,u,l){const c=FWe(t,s,u,(f,h)=>{r(),l&&l(f,h)});return n.push(c),c}function o(s){return n.find(u=>s(u))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:r}}function BI(){}const C3=Object.create(null);function jWe(e){if(!C3[e]){const t=p5(e);if(!t)return;const n=qG(t),r={config:t,redundancy:n};C3[e]=r}return C3[e]}function BWe(e,t,n){let r,i;if(typeof e=="string"){const o=h4(e);if(!o)return n(void 0,424),BI;i=o.send;const a=jWe(e);a&&(r=a.redundancy)}else{const o=d5(e);if(o){r=qG(o);const a=e.resources?e.resources[0]:"",s=h4(a);s&&(i=s.send)}}return!r||!i?(n(void 0,424),BI):r.query(t,i,n)().abort}const zI="iconify2",rm="iconify",GG=rm+"-count",UI=rm+"-version",YG=36e5,zWe=168,UWe=50;function p4(e,t){try{return e.getItem(t)}catch{}}function g5(e,t,n){try{return e.setItem(t,n),!0}catch{}}function VI(e,t){try{e.removeItem(t)}catch{}}function g4(e,t){return g5(e,GG,t.toString())}function m4(e){return parseInt(p4(e,GG))||0}const v2={local:!0,session:!0},ZG={local:new Set,session:new Set};let m5=!1;function VWe(e){m5=e}let ky=typeof window>"u"?{}:window;function XG(e){const t=e+"Storage";try{if(ky&&ky[t]&&typeof ky[t].length=="number")return ky[t]}catch{}v2[e]=!1}function QG(e,t){const n=XG(e);if(!n)return;const r=p4(n,UI);if(r!==zI){if(r){const s=m4(n);for(let u=0;u{const u=rm+s.toString(),l=p4(n,u);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,s))return!0}catch{}VI(n,u)}};let a=m4(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,g4(n,a)):ZG[e].add(s))}function JG(){if(!m5){VWe(!0);for(const e in v2)QG(e,t=>{const n=t.data,r=t.provider,i=n.prefix,o=lf(r,i);if(!f5(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function WWe(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in v2)QG(r,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function HWe(e,t){m5||JG();function n(r){let i;if(!v2[r]||!(i=XG(r)))return;const o=ZG[r];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=m4(i),a>=UWe||!g4(i,a+1))return;const s={cached:Math.floor(Date.now()/YG),provider:e.provider,data:t};return g5(i,rm+a.toString(),JSON.stringify(s))}t.lastModified&&!WWe(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function KWe(){}function qWe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,DWe(e)}))}function GWe(e){const t=[],n=[];return e.forEach(r=>{(r.match(UG)?t:n).push(r)}),{valid:t,invalid:n}}function Qp(e,t,n,r){function i(){const o=e.pendingIcons;t.forEach(a=>{o&&o.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!f5(e,n).length){i();return}r&&HWe(e,n)}catch(o){console.error(o)}i(),qWe(e)}function WI(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function YWe(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){WI(e.loadIcons(i,r,n),c=>{Qp(e,i,c,!1)});return}if(o){i.forEach(c=>{const f=o(c,r,n);WI(f,h=>{const p=h?{prefix:r,icons:{[c]:h}}:null;Qp(e,[c],p,!1)})});return}const{valid:a,invalid:s}=GWe(i);if(s.length&&Qp(e,s,null,!1),!a.length)return;const u=r.match(UG)?h4(n):null;if(!u){Qp(e,a,null,!1);return}u.prepare(n,r,a).forEach(c=>{BWe(n,c,f=>{Qp(e,c.icons,f,!0)})})}))}const ZWe=(e,t)=>{const n=NWe(e,!0,VG()),r=RWe(n);if(!r.pending.length){let u=!0;return setTimeout(()=>{u&&t(r.loaded,r.missing,r.pending,KWe)}),()=>{u=!1}}const i=Object.create(null),o=[];let a,s;return r.pending.forEach(u=>{const{provider:l,prefix:c}=u;if(c===s&&l===a)return;a=l,s=c,o.push(lf(l,c));const f=i[l]||(i[l]=Object.create(null));f[c]||(f[c]=[])}),r.pending.forEach(u=>{const{provider:l,prefix:c,name:f}=u,h=lf(l,c),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),i[l][c].push(f))}),o.forEach(u=>{const l=i[u.provider][u.prefix];l.length&&YWe(u,l)}),IWe(t,r,o)};function XWe(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in WG?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const QWe=/[\s,]+/;function JWe(e,t){t.split(QWe).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function eHe(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function tHe(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function nHe(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function rHe(e){return"data:image/svg+xml,"+nHe(e)}function iHe(e){return'url("'+rHe(e)+'")'}let M0;function oHe(){try{M0=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{M0=null}}function aHe(e){return M0===void 0&&oHe(),M0?M0.createHTML(e):e}const eY={...HG,inline:!1},sHe={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},uHe={display:"inline-block"},v4={backgroundColor:"currentColor"},tY={backgroundColor:"transparent"},HI={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},KI={WebkitMask:v4,mask:v4,background:tY};for(const e in KI){const t=KI[e];for(const n in HI)t[e+n]=HI[n]}const lHe={...eY,inline:!0};function qI(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const cHe=(e,t,n)=>{const r=t.inline?lHe:eY,i=XWe(r,t),o=t.mode||"svg",a={},s=t.style||{},u={...o==="svg"?sHe:{}};if(n){const b=m2(n,!1,!0);if(b){const w=["iconify"],x=["provider","prefix"];for(const S of x)b[S]&&w.push("iconify--"+b[S]);u.className=w.join(" ")}}for(let b in t){const w=t[b];if(w!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":u.ref=w;break;case"className":u[b]=(u[b]?u[b]+" ":"")+w;break;case"inline":case"hFlip":case"vFlip":i[b]=w===!0||w==="true"||w===1;break;case"flip":typeof w=="string"&&JWe(i,w);break;case"color":a.color=w;break;case"rotate":typeof w=="string"?i[b]=eHe(w):typeof w=="number"&&(i[b]=w);break;case"ariaHidden":case"aria-hidden":w!==!0&&w!=="true"&&delete u["aria-hidden"];break;default:r[b]===void 0&&(u[b]=w)}}const l=yWe(e,i),c=l.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),o==="svg"){u.style={...a,...s},Object.assign(u,c);let b=0,w=t.id;return typeof w=="string"&&(w=w.replace(/-/g,"_")),u.dangerouslySetInnerHTML={__html:aHe(_We(l.body,w?()=>w+"ID"+b++:"iconifyReact"))},y.createElement("svg",u)}const{body:f,width:h,height:p}=e,m=o==="mask"||(o==="bg"?!1:f.indexOf("currentColor")!==-1),v=tHe(f,{...c,width:h+"",height:p+""});return u.style={...a,"--svg":iHe(v),width:qI(c.width),height:qI(c.height),...uHe,...m?v4:tY,...s},y.createElement("span",u)};VG(!0);SWe("",MWe);if(typeof document<"u"&&typeof window<"u"){JG();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!fWe(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;CWe(n,i)||console.error(r)}catch{console.error(r)}}}}function nY(e){const[t,n]=y.useState(!!e.ssr),[r,i]=y.useState({});function o(p){if(p){const m=e.icon;if(typeof m=="object")return{name:"",data:m};const v=LI(m);if(v)return{name:m,data:v}}return{name:""}}const[a,s]=y.useState(o(!!e.ssr));function u(){const p=r.callback;p&&(p(),i({}))}function l(p){if(JSON.stringify(a)!==JSON.stringify(p))return u(),s(p),!0}function c(){var p;const m=e.icon;if(typeof m=="object"){l({name:"",data:m});return}const v=LI(m);if(l({name:m,data:v}))if(v===void 0){const b=ZWe([m],c);i({callback:b})}else v&&((p=e.onLoad)===null||p===void 0||p.call(e,m))}y.useEffect(()=>(n(!0),u),[]),y.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:h}=a;return h?cHe({...c5,...h},e,f):e.children?e.children:y.createElement("span",{})}const EQe=y.forwardRef((e,t)=>nY({...e,_ref:t}));y.forwardRef((e,t)=>nY({inline:!0,...e,_ref:t}));var rY="AlertDialog",[fHe,OQe]=vi(rY,[ez]),Du=ez(),iY=e=>{const{__scopeAlertDialog:t,...n}=e,r=Du(t);return I.jsx(tge,{...r,...n,modal:!0})};iY.displayName=rY;var dHe="AlertDialogTrigger",oY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(nge,{...i,...r,ref:t})});oY.displayName=dHe;var hHe="AlertDialogPortal",aY=e=>{const{__scopeAlertDialog:t,...n}=e,r=Du(t);return I.jsx(rge,{...r,...n})};aY.displayName=hHe;var pHe="AlertDialogOverlay",sY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(ige,{...i,...r,ref:t})});sY.displayName=pHe;var Ld="AlertDialogContent",[gHe,mHe]=fHe(Ld),uY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=Du(n),a=y.useRef(null),s=Gt(t,a),u=y.useRef(null);return I.jsx(X0e,{contentName:Ld,titleName:lY,docsSlug:"alert-dialog",children:I.jsx(gHe,{scope:n,cancelRef:u,children:I.jsxs(oge,{role:"alertdialog",...o,...i,ref:s,onOpenAutoFocus:Ye(i.onOpenAutoFocus,l=>{l.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[I.jsx(OO,{children:r}),I.jsx(yHe,{contentRef:a})]})})})});uY.displayName=Ld;var lY="AlertDialogTitle",cY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(age,{...i,...r,ref:t})});cY.displayName=lY;var fY="AlertDialogDescription",dY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(sge,{...i,...r,ref:t})});dY.displayName=fY;var vHe="AlertDialogAction",hY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(mz,{...i,...r,ref:t})});hY.displayName=vHe;var pY="AlertDialogCancel",gY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=mHe(pY,n),o=Du(n),a=Gt(t,i);return I.jsx(mz,{...o,...r,ref:a})});gY.displayName=pY;var yHe=({contentRef:e})=>{const t=`\`${Ld}\` requires a description for the component to be accessible for screen reader users. -You can add a description to the \`${jd}\` by passing a \`${PY}\` component as a child, which also benefits sighted users by adding visible context to the dialog. +You can add a description to the \`${Ld}\` by passing a \`${fY}\` 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 \`${jd}\`. 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. +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 \`${Ld}\`. 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 y.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},uJe=wY,lJe=_Y,cJe=SY,fJe=CY,dJe=EY,hJe=TY,pJe=RY,gJe=AY,mJe=kY;function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:0,n=(ci[e[t+0]]+ci[e[t+1]]+ci[e[t+2]]+ci[e[t+3]]+"-"+ci[e[t+4]]+ci[e[t+5]]+"-"+ci[e[t+6]]+ci[e[t+7]]+"-"+ci[e[t+8]]+ci[e[t+9]]+"-"+ci[e[t+10]]+ci[e[t+11]]+ci[e[t+12]]+ci[e[t+13]]+ci[e[t+14]]+ci[e[t+15]]).toLowerCase();if(!tqe(n))throw TypeError("Stringified UUID is invalid");return n}function DY(e,t,n){e=e||{};var r=e.random||(e.rng||JWe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,nqe(r)}function Ar(e){return y.createElement("i",{className:"rmel-iconfont rmel-icon-"+e.type})}function rqe(e){return y.createElement("div",{className:"rc-md-navigation "+(e.visible?"visible":"in-visible")},y.createElement("div",{className:"navigation-nav left"},y.createElement("div",{className:"button-wrap"},e.left)),y.createElement("div",{className:"navigation-nav right"},y.createElement("div",{className:"button-wrap"},e.right)))}function iqe(e){return y.createElement("div",{className:"tool-bar",style:e.style},e.children)}var $Y=function(e){Fn(t,e);function t(){for(var n,r=arguments.length,i=new Array(r),o=0;o"u")){var r="enUS";if(navigator.language){var i=navigator.language.split("-");r=i[0],i.length!==1&&(r+=i[i.length-1].toUpperCase())}if(navigator.browserLanguage){var o=navigator.browserLanguage.split("-");r=o[0],o[1]&&(r+=o[1].toUpperCase())}this.current!==r&&this.isAvailable(r)&&(this.current=r,hl.emit(hl.EVENT_LANG_CHANGE,this,r,this.langs[r]))}},t.isAvailable=function(r){return typeof this.langs[r]<"u"},t.add=function(r,i){this.langs[r]=i},t.setCurrent=function(r){if(!this.isAvailable(r))throw new Error("Language "+r+" is not exists");this.current!==r&&(this.current=r,hl.emit(hl.EVENT_LANG_CHANGE,this,r,this.langs[r]))},t.get=function(r,i){var o=this.langs[this.current][r]||"";return i&&Object.keys(i).forEach(function(a){o=o.replace(new RegExp("\\{"+a+"\\}","g"),i[a])}),o},t.getCurrent=function(){return this.current},e}(),Ln=new sqe;function um(e){"@babel/helpers - typeof";return um=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},um(e)}function uqe(e,t){if(um(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(um(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function lqe(e){var t=uqe(e,"string");return um(t)=="symbol"?t:t+""}function cqe(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hqe(e,t){if(e){if(typeof e=="string")return lN(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 lN(e,t)}}function lN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)for(var s=dqe(n),u;!(u=s()).done;){var l=u.value;if(typeof a[l]<"u"&&!a[l])return!1}else if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey)return!1;return a.key?a.key===i:a.keyCode===r}function R3(e,t){var n=e.split(` +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},AQe=iY,PQe=oY,kQe=aY,TQe=sY,MQe=uY,RQe=hY,DQe=gY,$Qe=cY,IQe=dY;function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:0,n=(ci[e[t+0]]+ci[e[t+1]]+ci[e[t+2]]+ci[e[t+3]]+"-"+ci[e[t+4]]+ci[e[t+5]]+"-"+ci[e[t+6]]+ci[e[t+7]]+"-"+ci[e[t+8]]+ci[e[t+9]]+"-"+ci[e[t+10]]+ci[e[t+11]]+ci[e[t+12]]+ci[e[t+13]]+ci[e[t+14]]+ci[e[t+15]]).toLowerCase();if(!_He(n))throw TypeError("Stringified UUID is invalid");return n}function mY(e,t,n){e=e||{};var r=e.random||(e.rng||xHe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,SHe(r)}function Ar(e){return y.createElement("i",{className:"rmel-iconfont rmel-icon-"+e.type})}function CHe(e){return y.createElement("div",{className:"rc-md-navigation "+(e.visible?"visible":"in-visible")},y.createElement("div",{className:"navigation-nav left"},y.createElement("div",{className:"button-wrap"},e.left)),y.createElement("div",{className:"navigation-nav right"},y.createElement("div",{className:"button-wrap"},e.right)))}function EHe(e){return y.createElement("div",{className:"tool-bar",style:e.style},e.children)}var vY=function(e){Fn(t,e);function t(){for(var n,r=arguments.length,i=new Array(r),o=0;o"u")){var r="enUS";if(navigator.language){var i=navigator.language.split("-");r=i[0],i.length!==1&&(r+=i[i.length-1].toUpperCase())}if(navigator.browserLanguage){var o=navigator.browserLanguage.split("-");r=o[0],o[1]&&(r+=o[1].toUpperCase())}this.current!==r&&this.isAvailable(r)&&(this.current=r,dl.emit(dl.EVENT_LANG_CHANGE,this,r,this.langs[r]))}},t.isAvailable=function(r){return typeof this.langs[r]<"u"},t.add=function(r,i){this.langs[r]=i},t.setCurrent=function(r){if(!this.isAvailable(r))throw new Error("Language "+r+" is not exists");this.current!==r&&(this.current=r,dl.emit(dl.EVENT_LANG_CHANGE,this,r,this.langs[r]))},t.get=function(r,i){var o=this.langs[this.current][r]||"";return i&&Object.keys(i).forEach(function(a){o=o.replace(new RegExp("\\{"+a+"\\}","g"),i[a])}),o},t.getCurrent=function(){return this.current},e}(),Ln=new PHe;function im(e){"@babel/helpers - typeof";return im=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},im(e)}function kHe(e,t){if(im(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(im(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function THe(e){var t=kHe(e,"string");return im(t)=="symbol"?t:t+""}function MHe(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $He(e,t){if(e){if(typeof e=="string")return GI(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 GI(e,t)}}function GI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)for(var s=DHe(n),u;!(u=s()).done;){var l=u.value;if(typeof a[l]<"u"&&!a[l])return!1}else if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey)return!1;return a.key?a.key===i:a.keyCode===r}function O3(e,t){var n=e.split(` `),r=e.substr(0,t).split(` -`),i=r.length,o=r[r.length-1].length,a=n[r.length-1],s=r.length>1?r[r.length-2]:null,u=n.length>r.length?n[r.length]:null;return{line:i,col:o,beforeText:e.substr(0,t),afterText:e.substr(t),curLine:a,prevLine:s,nextLine:u}}var id={bold:["**","**"],italic:["*","*"],underline:["++","++"],strikethrough:["~~","~~"],quote:[` +`),i=r.length,o=r[r.length-1].length,a=n[r.length-1],s=r.length>1?r[r.length-2]:null,u=n.length>r.length?n[r.length]:null;return{line:i,col:o,beforeText:e.substr(0,t),afterText:e.substr(t),curLine:a,prevLine:s,nextLine:u}}var nd={bold:["**","**"],italic:["*","*"],underline:["++","++"],strikethrough:["~~","~~"],quote:[` > `,` -`],inlinecode:["`","`"],code:["\n```\n","\n```\n"]};for(var Iy=1;Iy<=6;Iy++)id["h"+Iy]=[` -`+pqe("#",Iy)+" ",` -`];function mqe(e){for(var t=e.row,n=t===void 0?2:t,r=e.col,i=r===void 0?2:r,o=["|"],a=["|"],s=["|"],u="",l=1;l<=i;l++)o.push(" Head |"),s.push(" --- |"),a.push(" Data |");for(var c=1;c<=n;c++)u+=` +`],inlinecode:["`","`"],code:["\n```\n","\n```\n"]};for(var My=1;My<=6;My++)nd["h"+My]=[` +`+IHe("#",My)+" ",` +`];function LHe(e){for(var t=e.row,n=t===void 0?2:t,r=e.col,i=r===void 0?2:r,o=["|"],a=["|"],s=["|"],u="",l=1;l<=i;l++)o.push(" Head |"),s.push(" --- |"),a.push(" Data |");for(var c=1;c<=n;c++)u+=` `+a.join("");return o.join("")+` -`+s.join("")+u}function cN(e,t){var n=t;if(n.substr(0,1)!==` +`+s.join("")+u}function YI(e,t){var n=t;if(n.substr(0,1)!==` `&&(n=` `+n),e==="unordered")return n.length>1?n.replace(/\n/g,` * `).trim():"* ";var r=1;return n.length>1?n.replace(/\n/g,function(){return` -`+r+++". "}).trim():"1. "}function D3(e,t){return{text:e,newBlock:t,selection:{start:e.length,end:e.length}}}function P4(e,t,n){if(typeof id[t]<"u")return{text:""+id[t][0]+e+id[t][1],selection:{start:id[t][0].length,end:id[t][0].length+e.length}};switch(t){case"tab":var r=n.tabMapValue===1?" ":" ".repeat(n.tabMapValue),i=r+e.replace(/\n/g,` +`+r+++". "}).trim():"1. "}function A3(e,t){return{text:e,newBlock:t,selection:{start:e.length,end:e.length}}}function x4(e,t,n){if(typeof nd[t]<"u")return{text:""+nd[t][0]+e+nd[t][1],selection:{start:nd[t][0].length,end:nd[t][0].length+e.length}};switch(t){case"tab":var r=n.tabMapValue===1?" ":" ".repeat(n.tabMapValue),i=r+e.replace(/\n/g,` `+r),o=e.includes(` -`)?e.match(/\n/g).length:0;return{text:i,selection:{start:n.tabMapValue,end:n.tabMapValue*(o+1)+e.length}};case"unordered":return D3(cN("unordered",e),!0);case"order":return D3(cN("order",e),!0);case"hr":return D3("---",!0);case"table":return{text:mqe(n),newBlock:!0};case"image":return{text:"!["+(e||n.target)+"]("+(n.imageUrl||"")+")",selection:{start:2,end:e.length+2}};case"link":return{text:"["+e+"]("+(n.linkUrl||"")+")",selection:{start:1,end:e.length+1}}}return{text:e,selection:{start:0,end:e.length}}}function NY(e,t){var n={};return Object.keys(e).forEach(function(r){if(typeof t[r]>"u"){n[r]=e[r];return}if(typeof t[r]=="object"){Array.isArray(t[r])?n[r]=[].concat(t[r]):n[r]=NY(e[r],t[r]);return}n[r]=t[r]}),n}function vqe(e){for(var t=fs({},e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xqe(e,t){if(e){if(typeof e=="string")return dN(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 dN(e,t)}}function dN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"&&(c[f.comp.align]=[]);var h=f.comp.pluginName==="divider"?DY():f.comp.pluginName;c[f.comp.align].push(y.createElement(f.comp,{editor:i,editorConfig:i.config,config:fs({},f.comp.defaultConfig||{},f.config||{}),key:h}))}),c},n.handleSyncScroll=function(i,o){var a=this;if(i===this.shouldSyncScroll){this.props.onScroll&&this.props.onScroll(o,i),this.emitter.emit(this.emitter.EVENT_SCROLL,o,i);var s=this.config.syncScrollMode,u=s===void 0?[]:s;u.includes(i==="md"?"rightFollowLeft":"leftFollowRight")&&(this.hasContentChanged&&this.nodeMdText.current&&this.nodeMdPreviewWrapper.current&&(this.scrollScale=this.nodeMdText.current.scrollHeight/this.nodeMdPreviewWrapper.current.scrollHeight,this.hasContentChanged=!1),this.isSyncingScroll||(this.isSyncingScroll=!0,requestAnimationFrame(function(){a.nodeMdText.current&&a.nodeMdPreviewWrapper.current&&(i==="md"?a.nodeMdPreviewWrapper.current.scrollTop=a.nodeMdText.current.scrollTop/a.scrollScale:a.nodeMdText.current.scrollTop=a.nodeMdPreviewWrapper.current.scrollTop*a.scrollScale),a.isSyncingScroll=!1})))}},n.renderHTML=function(i){var o=this;if(!this.props.renderHTML)return console.error("renderHTML props is required!"),Promise.resolve();var a=this.props.renderHTML(i);return A5(a)?a.then(function(s){return o.setHtml(s)}):typeof a=="function"?this.setHtml(a()):this.setHtml(a)},n.setHtml=function(i){var o=this;return new Promise(function(a){o.setState({html:i},a)})},n.handleToggleMenu=function(){this.setView({menu:!this.state.view.menu})},n.handleFocus=function(i){var o=this.props.onFocus;o&&o(i),this.emitter.emit(this.emitter.EVENT_FOCUS,i)},n.handleBlur=function(i){var o=this.props.onBlur;o&&o(i),this.emitter.emit(this.emitter.EVENT_BLUR,i)},n.handleChange=function(i){i.persist();var o=i.target.value;this.setText(o,i)},n.handlePaste=function(i){if(!(!this.config.allowPasteImage||!this.config.onImageUpload)){var o=i.nativeEvent,a=(o.clipboardData||window.clipboardData).items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}},n.handleDrop=function(i){if(this.config.onImageUpload){var o=i.nativeEvent;if(o.dataTransfer){var a=o.dataTransfer.items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}}},n.handleEditorKeyDown=function(i){var o=this,a=i.keyCode,s=i.key,u=i.currentTarget;if((a===13||s==="Enter")&&this.composing===!1){var l=u.value,c=u.selectionStart,f=R3(l,c),h=function(){var x=u.value.substr(0,c-f.curLine.length)+u.value.substr(c);o.setText(x,void 0,{start:c-f.curLine.length,end:c-f.curLine.length}),i.preventDefault()},p=function(x){o.insertText(` -`+x,!1,{start:x.length+1,end:x.length+1}),i.preventDefault()},m=f.curLine.match(/^(\s*?)\* /);if(m){if(/^(\s*?)\* $/.test(f.curLine)){h();return}p(m[0]);return}var v=f.curLine.match(/^(\s*?)(\d+)\. /);if(v){if(/^(\s*?)(\d+)\. $/.test(f.curLine)){h();return}var b=""+v[1]+(parseInt(v[2],10)+1)+". ";p(b);return}}this.emitter.emit(this.emitter.EVENT_EDITOR_KEY_DOWN,i)},n.handleLocaleUpdate=function(){this.forceUpdate()},n.getMdElement=function(){return this.nodeMdText.current},n.getHtmlElement=function(){return this.nodeMdPreviewWrapper.current},n.clearSelection=function(){this.nodeMdText.current&&this.nodeMdText.current.setSelectionRange(0,0,"none")},n.getSelection=function(){var i=this.nodeMdText.current;if(!i)return fs({},fqe);var o=i.selectionStart,a=i.selectionEnd,s=(i.value||"").slice(o,a);return{start:o,end:a,text:s}},n.setSelection=function(i){this.nodeMdText.current&&(this.nodeMdText.current.setSelectionRange(i.start,i.end,"forward"),this.nodeMdText.current.focus())},n.insertMarkdown=function(i,o){o===void 0&&(o={});var a=this.getSelection(),s=o?fs({},o):{};if(i==="image"&&(s=fs({},s,{target:o.target||a.text||"",imageUrl:o.imageUrl||this.config.imageUrl})),i==="link"&&(s=fs({},s,{linkUrl:this.config.linkUrl})),i==="tab"&&a.start!==a.end){var u=this.getMdValue().slice(0,a.start).lastIndexOf(` -`)+1;this.setSelection({start:u,end:a.end})}var l=P4(a.text,i,s),c=l.text,f=l.selection;if(l.newBlock){var h=R3(this.getMdValue(),a.start),p=h.col,m=h.curLine;p>0&&m.length>0&&(c=` -`+c,f&&(f.start++,f.end++));var v=h.afterText;a.start!==a.end&&(v=R3(this.getMdValue(),a.end).afterText),v.trim()!==""&&v.substr(0,2)!==` +`)?e.match(/\n/g).length:0;return{text:i,selection:{start:n.tabMapValue,end:n.tabMapValue*(o+1)+e.length}};case"unordered":return A3(YI("unordered",e),!0);case"order":return A3(YI("order",e),!0);case"hr":return A3("---",!0);case"table":return{text:LHe(n),newBlock:!0};case"image":return{text:"!["+(e||n.target)+"]("+(n.imageUrl||"")+")",selection:{start:2,end:e.length+2}};case"link":return{text:"["+e+"]("+(n.linkUrl||"")+")",selection:{start:1,end:e.length+1}}}return{text:e,selection:{start:0,end:e.length}}}function bY(e,t){var n={};return Object.keys(e).forEach(function(r){if(typeof t[r]>"u"){n[r]=e[r];return}if(typeof t[r]=="object"){Array.isArray(t[r])?n[r]=[].concat(t[r]):n[r]=bY(e[r],t[r]);return}n[r]=t[r]}),n}function FHe(e){for(var t=fs({},e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zHe(e,t){if(e){if(typeof e=="string")return XI(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 XI(e,t)}}function XI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"&&(c[f.comp.align]=[]);var h=f.comp.pluginName==="divider"?mY():f.comp.pluginName;c[f.comp.align].push(y.createElement(f.comp,{editor:i,editorConfig:i.config,config:fs({},f.comp.defaultConfig||{},f.config||{}),key:h}))}),c},n.handleSyncScroll=function(i,o){var a=this;if(i===this.shouldSyncScroll){this.props.onScroll&&this.props.onScroll(o,i),this.emitter.emit(this.emitter.EVENT_SCROLL,o,i);var s=this.config.syncScrollMode,u=s===void 0?[]:s;u.includes(i==="md"?"rightFollowLeft":"leftFollowRight")&&(this.hasContentChanged&&this.nodeMdText.current&&this.nodeMdPreviewWrapper.current&&(this.scrollScale=this.nodeMdText.current.scrollHeight/this.nodeMdPreviewWrapper.current.scrollHeight,this.hasContentChanged=!1),this.isSyncingScroll||(this.isSyncingScroll=!0,requestAnimationFrame(function(){a.nodeMdText.current&&a.nodeMdPreviewWrapper.current&&(i==="md"?a.nodeMdPreviewWrapper.current.scrollTop=a.nodeMdText.current.scrollTop/a.scrollScale:a.nodeMdText.current.scrollTop=a.nodeMdPreviewWrapper.current.scrollTop*a.scrollScale),a.isSyncingScroll=!1})))}},n.renderHTML=function(i){var o=this;if(!this.props.renderHTML)return console.error("renderHTML props is required!"),Promise.resolve();var a=this.props.renderHTML(i);return v5(a)?a.then(function(s){return o.setHtml(s)}):typeof a=="function"?this.setHtml(a()):this.setHtml(a)},n.setHtml=function(i){var o=this;return new Promise(function(a){o.setState({html:i},a)})},n.handleToggleMenu=function(){this.setView({menu:!this.state.view.menu})},n.handleFocus=function(i){var o=this.props.onFocus;o&&o(i),this.emitter.emit(this.emitter.EVENT_FOCUS,i)},n.handleBlur=function(i){var o=this.props.onBlur;o&&o(i),this.emitter.emit(this.emitter.EVENT_BLUR,i)},n.handleChange=function(i){i.persist();var o=i.target.value;this.setText(o,i)},n.handlePaste=function(i){if(!(!this.config.allowPasteImage||!this.config.onImageUpload)){var o=i.nativeEvent,a=(o.clipboardData||window.clipboardData).items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}},n.handleDrop=function(i){if(this.config.onImageUpload){var o=i.nativeEvent;if(o.dataTransfer){var a=o.dataTransfer.items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}}},n.handleEditorKeyDown=function(i){var o=this,a=i.keyCode,s=i.key,u=i.currentTarget;if((a===13||s==="Enter")&&this.composing===!1){var l=u.value,c=u.selectionStart,f=O3(l,c),h=function(){var x=u.value.substr(0,c-f.curLine.length)+u.value.substr(c);o.setText(x,void 0,{start:c-f.curLine.length,end:c-f.curLine.length}),i.preventDefault()},p=function(x){o.insertText(` +`+x,!1,{start:x.length+1,end:x.length+1}),i.preventDefault()},m=f.curLine.match(/^(\s*?)\* /);if(m){if(/^(\s*?)\* $/.test(f.curLine)){h();return}p(m[0]);return}var v=f.curLine.match(/^(\s*?)(\d+)\. /);if(v){if(/^(\s*?)(\d+)\. $/.test(f.curLine)){h();return}var b=""+v[1]+(parseInt(v[2],10)+1)+". ";p(b);return}}this.emitter.emit(this.emitter.EVENT_EDITOR_KEY_DOWN,i)},n.handleLocaleUpdate=function(){this.forceUpdate()},n.getMdElement=function(){return this.nodeMdText.current},n.getHtmlElement=function(){return this.nodeMdPreviewWrapper.current},n.clearSelection=function(){this.nodeMdText.current&&this.nodeMdText.current.setSelectionRange(0,0,"none")},n.getSelection=function(){var i=this.nodeMdText.current;if(!i)return fs({},RHe);var o=i.selectionStart,a=i.selectionEnd,s=(i.value||"").slice(o,a);return{start:o,end:a,text:s}},n.setSelection=function(i){this.nodeMdText.current&&(this.nodeMdText.current.setSelectionRange(i.start,i.end,"forward"),this.nodeMdText.current.focus())},n.insertMarkdown=function(i,o){o===void 0&&(o={});var a=this.getSelection(),s=o?fs({},o):{};if(i==="image"&&(s=fs({},s,{target:o.target||a.text||"",imageUrl:o.imageUrl||this.config.imageUrl})),i==="link"&&(s=fs({},s,{linkUrl:this.config.linkUrl})),i==="tab"&&a.start!==a.end){var u=this.getMdValue().slice(0,a.start).lastIndexOf(` +`)+1;this.setSelection({start:u,end:a.end})}var l=x4(a.text,i,s),c=l.text,f=l.selection;if(l.newBlock){var h=O3(this.getMdValue(),a.start),p=h.col,m=h.curLine;p>0&&m.length>0&&(c=` +`+c,f&&(f.start++,f.end++));var v=h.afterText;a.start!==a.end&&(v=O3(this.getMdValue(),a.end).afterText),v.trim()!==""&&v.substr(0,2)!==` `&&(v.substr(0,1)!==` `&&(c+=` `),c+=` `)}this.insertText(c,!0,f)},n.insertPlaceholder=function(i,o){var a=this;this.insertText(i,!0),o.then(function(s){var u=a.getMdValue().replace(i,s);a.setText(u)})},n.insertText=function(i,o,a){i===void 0&&(i=""),o===void 0&&(o=!1);var s=this.state.text,u=this.getSelection(),l=s.slice(0,u.start),c=s.slice(o?u.end:u.start,s.length);this.setText(l+i+c,void 0,a?{start:a.start+l.length,end:a.end+l.length}:{start:u.start,end:u.start})},n.setText=function(i,o,a){var s=this;i===void 0&&(i="");var u=this.config.onChangeTrigger,l=u===void 0?"both":u,c=i.replace(/↵/g,` -`);if(this.state.text!==i){this.setState({text:c}),this.props.onChange&&(l==="both"||l==="beforeRender")&&this.props.onChange({text:c,html:this.getHtmlValue()},o),this.emitter.emit(this.emitter.EVENT_CHANGE,i,o,typeof o>"u"),a&&setTimeout(function(){return s.setSelection(a)}),this.hasContentChanged||(this.hasContentChanged=!0);var f=this.renderHTML(c);(l==="both"||l==="afterRender")&&f.then(function(){s.props.onChange&&s.props.onChange({text:s.state.text,html:s.getHtmlValue()},o)})}},n.getMdValue=function(){return this.state.text},n.getHtmlValue=function(){return typeof this.state.html=="string"?this.state.html:this.nodeMdPreview.current?this.nodeMdPreview.current.getHtml():""},n.onKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(a){return o.onKeyboard(a)});return}this.keyboardListeners.includes(i)||this.keyboardListeners.push(i)},n.offKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(s){return o.offKeyboard(s)});return}var a=this.keyboardListeners.indexOf(i);a>=0&&this.keyboardListeners.splice(a,1)},n.handleKeyDown=function(i){for(var o=$3(this.keyboardListeners),a;!(a=o()).done;){var s=a.value;if(gqe(i,s)){i.preventDefault(),s.callback(i);return}}this.emitter.emit(this.emitter.EVENT_KEY_DOWN,i)},n.getEventType=function(i){switch(i){case"change":return this.emitter.EVENT_CHANGE;case"fullscreen":return this.emitter.EVENT_FULL_SCREEN;case"viewchange":return this.emitter.EVENT_VIEW_CHANGE;case"keydown":return this.emitter.EVENT_KEY_DOWN;case"editor_keydown":return this.emitter.EVENT_EDITOR_KEY_DOWN;case"blur":return this.emitter.EVENT_BLUR;case"focus":return this.emitter.EVENT_FOCUS;case"scroll":return this.emitter.EVENT_SCROLL}},n.on=function(i,o){var a=this.getEventType(i);a&&this.emitter.on(a,o)},n.off=function(i,o){var a=this.getEventType(i);a&&this.emitter.off(a,o)},n.setView=function(i){var o=this,a=fs({},this.state.view,i);this.setState({view:a},function(){o.emitter.emit(o.emitter.EVENT_VIEW_CHANGE,a)})},n.getView=function(){return fs({},this.state.view)},n.fullScreen=function(i){var o=this;this.state.fullScreen!==i&&this.setState({fullScreen:i},function(){o.emitter.emit(o.emitter.EVENT_FULL_SCREEN,i)})},n.registerPluginApi=function(i,o){this.pluginApis.set(i,o)},n.unregisterPluginApi=function(i){this.pluginApis.delete(i)},n.callPluginApi=function(i){var o=this.pluginApis.get(i);if(!o)throw new Error("API "+i+" not found");for(var a=arguments.length,s=new Array(a>1?a-1:0),u=1;u0&&i.onImageChanged(s.target.files[0])}}))},t}(vr);YY.pluginName="image";var ZY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"k",keyCode:75,aliasCommand:!0,withKey:["ctrlKey"],callback:function(){return i.editor.insertMarkdown("link")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-link",title:Ln.get("btnLink"),onClick:function(){return i.editor.insertMarkdown("link")}},y.createElement(Ar,{type:"link"}))},t}(vr);ZY.pluginName="link";var XY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"7",keyCode:55,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("order")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-ordered",title:Ln.get("btnOrdered"),onClick:function(){return i.editor.insertMarkdown("order")}},y.createElement(Ar,{type:"list-ordered"}))},t}(vr);XY.pluginName="list-ordered";var QY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"8",keyCode:56,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("unordered")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-unordered",title:Ln.get("btnUnordered"),onClick:function(){return i.editor.insertMarkdown("unordered")}},y.createElement(Ar,{type:"list-unordered"}))},t}(vr);QY.pluginName="list-unordered";var Sqe=100,Cqe=function(){function e(n){n===void 0&&(n={}),this.record=[],this.recycle=[],this.initValue="";var r=n,i=r.maxSize,o=i===void 0?Sqe:i;this.maxSize=o}var t=e.prototype;return t.push=function(r){for(var i=this.record.push(r);this.record.length>this.maxSize;)this.record.shift();return i},t.get=function(){return this.record},t.getLast=function(){var r=this.record.length;return this.record[r-1]},t.undo=function(r){var i=this.record.pop();if(typeof i>"u")return this.initValue;if(i!==r)return this.recycle.push(i),i;var o=this.record.pop();return typeof o>"u"?(this.recycle.push(i),this.initValue):(this.recycle.push(i),o)},t.redo=function(){var r=this.recycle.pop();if(typeof r<"u")return this.push(r),r},t.cleanRedo=function(){this.recycle=[]},t.getUndoCount=function(){return this.undo.length},t.getRedoCount=function(){return this.recycle.length},e}(),JY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboards=[],i.lastPop=null,i.handleChange=i.handleChange.bind(Bn(i)),i.handleRedo=i.handleRedo.bind(Bn(i)),i.handleUndo=i.handleUndo.bind(Bn(i)),i.handleKeyboards=[{key:"y",keyCode:89,withKey:["ctrlKey"],callback:i.handleRedo},{key:"z",keyCode:90,withKey:["metaKey","shiftKey"],callback:i.handleRedo},{key:"z",keyCode:90,aliasCommand:!0,withKey:["ctrlKey"],callback:i.handleUndo}],i.logger=new Cqe({maxSize:i.editorConfig.loggerMaxSize}),i.editor.registerPluginApi("undo",i.handleUndo),i.editor.registerPluginApi("redo",i.handleRedo),i}var n=t.prototype;return n.handleUndo=function(){var i=this.logger.undo(this.editor.getMdValue());typeof i<"u"&&(this.pause(),this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleRedo=function(){var i=this.logger.redo();typeof i<"u"&&(this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleChange=function(i,o,a){var s=this;if(!(this.logger.getLast()===i||this.lastPop!==null&&this.lastPop===i)){if(this.logger.cleanRedo(),a){this.logger.push(i),this.lastPop=null,this.forceUpdate();return}this.timerId&&(window.clearTimeout(this.timerId),this.timerId=0),this.timerId=window.setTimeout(function(){s.logger.getLast()!==i&&(s.logger.push(i),s.lastPop=null,s.forceUpdate()),window.clearTimeout(s.timerId),s.timerId=0},this.editorConfig.loggerInterval)}},n.componentDidMount=function(){var i=this;this.editor.on("change",this.handleChange),this.handleKeyboards.forEach(function(o){return i.editor.onKeyboard(o)}),this.logger.initValue=this.editor.getMdValue(),this.forceUpdate()},n.componentWillUnmount=function(){var i=this;this.timerId&&window.clearTimeout(this.timerId),this.editor.off("change",this.handleChange),this.editor.unregisterPluginApi("undo"),this.editor.unregisterPluginApi("redo"),this.handleKeyboards.forEach(function(o){return i.editor.offKeyboard(o)})},n.pause=function(){this.timerId&&(window.clearTimeout(this.timerId),this.timerId=void 0)},n.render=function(){var i=this.logger.getUndoCount()>1||this.logger.initValue!==this.editor.getMdValue(),o=this.logger.getRedoCount()>0;return y.createElement(y.Fragment,null,y.createElement("span",{className:"button button-type-undo "+(i?"":"disabled"),title:Ln.get("btnUndo"),onClick:this.handleUndo},y.createElement(Ar,{type:"undo"})),y.createElement("span",{className:"button button-type-redo "+(o?"":"disabled"),title:Ln.get("btnRedo"),onClick:this.handleRedo},y.createElement(Ar,{type:"redo"})))},t}(vr);JY.pluginName="logger";var Oi;(function(e){e[e.SHOW_ALL=0]="SHOW_ALL",e[e.SHOW_MD=1]="SHOW_MD",e[e.SHOW_HTML=2]="SHOW_HTML"})(Oi||(Oi={}));var k5=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleClick=i.handleClick.bind(Bn(i)),i.handleChange=i.handleChange.bind(Bn(i)),i.state={view:i.editor.getView()},i}var n=t.prototype;return n.handleClick=function(){switch(this.next){case Oi.SHOW_ALL:this.editor.setView({html:!0,md:!0});break;case Oi.SHOW_HTML:this.editor.setView({html:!0,md:!1});break;case Oi.SHOW_MD:this.editor.setView({html:!1,md:!0});break}},n.handleChange=function(i){this.setState({view:i})},n.componentDidMount=function(){this.editor.on("viewchange",this.handleChange)},n.componentWillUnmount=function(){this.editor.off("viewchange",this.handleChange)},n.getDisplayInfo=function(){var i=this.next;switch(i){case Oi.SHOW_ALL:return{icon:"view-split",title:"All"};case Oi.SHOW_HTML:return{icon:"visibility",title:"Preview"};default:return{icon:"keyboard",title:"Editor"}}},n.render=function(){if(this.isDisplay){var i=this.getDisplayInfo();return y.createElement("span",{className:"button button-type-mode",title:Ln.get("btnMode"+i.title),onClick:this.handleClick},y.createElement(Ar,{type:i.icon}))}return null},IY(t,[{key:"isDisplay",get:function(){var i=this.editorConfig.canView;return i?[i.html,i.md,i.both].filter(function(o){return o}).length>=2:!1}},{key:"next",get:function(){var i=this.editorConfig.canView,o=this.state.view,a=[Oi.SHOW_ALL,Oi.SHOW_MD,Oi.SHOW_HTML];i&&(i.both||a.splice(a.indexOf(Oi.SHOW_ALL),1),i.md||a.splice(a.indexOf(Oi.SHOW_MD),1),i.html||a.splice(a.indexOf(Oi.SHOW_HTML),1));var s=Oi.SHOW_MD;if(o.html&&(s=Oi.SHOW_HTML),o.html&&o.md&&(s=Oi.SHOW_ALL),a.length===0)return s;if(a.length===1)return a[0];var u=a.indexOf(s);return u"u"),a&&setTimeout(function(){return s.setSelection(a)}),this.hasContentChanged||(this.hasContentChanged=!0);var f=this.renderHTML(c);(l==="both"||l==="afterRender")&&f.then(function(){s.props.onChange&&s.props.onChange({text:s.state.text,html:s.getHtmlValue()},o)})}},n.getMdValue=function(){return this.state.text},n.getHtmlValue=function(){return typeof this.state.html=="string"?this.state.html:this.nodeMdPreview.current?this.nodeMdPreview.current.getHtml():""},n.onKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(a){return o.onKeyboard(a)});return}this.keyboardListeners.includes(i)||this.keyboardListeners.push(i)},n.offKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(s){return o.offKeyboard(s)});return}var a=this.keyboardListeners.indexOf(i);a>=0&&this.keyboardListeners.splice(a,1)},n.handleKeyDown=function(i){for(var o=P3(this.keyboardListeners),a;!(a=o()).done;){var s=a.value;if(NHe(i,s)){i.preventDefault(),s.callback(i);return}}this.emitter.emit(this.emitter.EVENT_KEY_DOWN,i)},n.getEventType=function(i){switch(i){case"change":return this.emitter.EVENT_CHANGE;case"fullscreen":return this.emitter.EVENT_FULL_SCREEN;case"viewchange":return this.emitter.EVENT_VIEW_CHANGE;case"keydown":return this.emitter.EVENT_KEY_DOWN;case"editor_keydown":return this.emitter.EVENT_EDITOR_KEY_DOWN;case"blur":return this.emitter.EVENT_BLUR;case"focus":return this.emitter.EVENT_FOCUS;case"scroll":return this.emitter.EVENT_SCROLL}},n.on=function(i,o){var a=this.getEventType(i);a&&this.emitter.on(a,o)},n.off=function(i,o){var a=this.getEventType(i);a&&this.emitter.off(a,o)},n.setView=function(i){var o=this,a=fs({},this.state.view,i);this.setState({view:a},function(){o.emitter.emit(o.emitter.EVENT_VIEW_CHANGE,a)})},n.getView=function(){return fs({},this.state.view)},n.fullScreen=function(i){var o=this;this.state.fullScreen!==i&&this.setState({fullScreen:i},function(){o.emitter.emit(o.emitter.EVENT_FULL_SCREEN,i)})},n.registerPluginApi=function(i,o){this.pluginApis.set(i,o)},n.unregisterPluginApi=function(i){this.pluginApis.delete(i)},n.callPluginApi=function(i){var o=this.pluginApis.get(i);if(!o)throw new Error("API "+i+" not found");for(var a=arguments.length,s=new Array(a>1?a-1:0),u=1;u0&&i.onImageChanged(s.target.files[0])}}))},t}(vr);RY.pluginName="image";var DY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"k",keyCode:75,aliasCommand:!0,withKey:["ctrlKey"],callback:function(){return i.editor.insertMarkdown("link")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-link",title:Ln.get("btnLink"),onClick:function(){return i.editor.insertMarkdown("link")}},y.createElement(Ar,{type:"link"}))},t}(vr);DY.pluginName="link";var $Y=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"7",keyCode:55,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("order")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-ordered",title:Ln.get("btnOrdered"),onClick:function(){return i.editor.insertMarkdown("order")}},y.createElement(Ar,{type:"list-ordered"}))},t}(vr);$Y.pluginName="list-ordered";var IY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"8",keyCode:56,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("unordered")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-unordered",title:Ln.get("btnUnordered"),onClick:function(){return i.editor.insertMarkdown("unordered")}},y.createElement(Ar,{type:"list-unordered"}))},t}(vr);IY.pluginName="list-unordered";var WHe=100,HHe=function(){function e(n){n===void 0&&(n={}),this.record=[],this.recycle=[],this.initValue="";var r=n,i=r.maxSize,o=i===void 0?WHe:i;this.maxSize=o}var t=e.prototype;return t.push=function(r){for(var i=this.record.push(r);this.record.length>this.maxSize;)this.record.shift();return i},t.get=function(){return this.record},t.getLast=function(){var r=this.record.length;return this.record[r-1]},t.undo=function(r){var i=this.record.pop();if(typeof i>"u")return this.initValue;if(i!==r)return this.recycle.push(i),i;var o=this.record.pop();return typeof o>"u"?(this.recycle.push(i),this.initValue):(this.recycle.push(i),o)},t.redo=function(){var r=this.recycle.pop();if(typeof r<"u")return this.push(r),r},t.cleanRedo=function(){this.recycle=[]},t.getUndoCount=function(){return this.undo.length},t.getRedoCount=function(){return this.recycle.length},e}(),NY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboards=[],i.lastPop=null,i.handleChange=i.handleChange.bind(Bn(i)),i.handleRedo=i.handleRedo.bind(Bn(i)),i.handleUndo=i.handleUndo.bind(Bn(i)),i.handleKeyboards=[{key:"y",keyCode:89,withKey:["ctrlKey"],callback:i.handleRedo},{key:"z",keyCode:90,withKey:["metaKey","shiftKey"],callback:i.handleRedo},{key:"z",keyCode:90,aliasCommand:!0,withKey:["ctrlKey"],callback:i.handleUndo}],i.logger=new HHe({maxSize:i.editorConfig.loggerMaxSize}),i.editor.registerPluginApi("undo",i.handleUndo),i.editor.registerPluginApi("redo",i.handleRedo),i}var n=t.prototype;return n.handleUndo=function(){var i=this.logger.undo(this.editor.getMdValue());typeof i<"u"&&(this.pause(),this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleRedo=function(){var i=this.logger.redo();typeof i<"u"&&(this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleChange=function(i,o,a){var s=this;if(!(this.logger.getLast()===i||this.lastPop!==null&&this.lastPop===i)){if(this.logger.cleanRedo(),a){this.logger.push(i),this.lastPop=null,this.forceUpdate();return}this.timerId&&(window.clearTimeout(this.timerId),this.timerId=0),this.timerId=window.setTimeout(function(){s.logger.getLast()!==i&&(s.logger.push(i),s.lastPop=null,s.forceUpdate()),window.clearTimeout(s.timerId),s.timerId=0},this.editorConfig.loggerInterval)}},n.componentDidMount=function(){var i=this;this.editor.on("change",this.handleChange),this.handleKeyboards.forEach(function(o){return i.editor.onKeyboard(o)}),this.logger.initValue=this.editor.getMdValue(),this.forceUpdate()},n.componentWillUnmount=function(){var i=this;this.timerId&&window.clearTimeout(this.timerId),this.editor.off("change",this.handleChange),this.editor.unregisterPluginApi("undo"),this.editor.unregisterPluginApi("redo"),this.handleKeyboards.forEach(function(o){return i.editor.offKeyboard(o)})},n.pause=function(){this.timerId&&(window.clearTimeout(this.timerId),this.timerId=void 0)},n.render=function(){var i=this.logger.getUndoCount()>1||this.logger.initValue!==this.editor.getMdValue(),o=this.logger.getRedoCount()>0;return y.createElement(y.Fragment,null,y.createElement("span",{className:"button button-type-undo "+(i?"":"disabled"),title:Ln.get("btnUndo"),onClick:this.handleUndo},y.createElement(Ar,{type:"undo"})),y.createElement("span",{className:"button button-type-redo "+(o?"":"disabled"),title:Ln.get("btnRedo"),onClick:this.handleRedo},y.createElement(Ar,{type:"redo"})))},t}(vr);NY.pluginName="logger";var Oi;(function(e){e[e.SHOW_ALL=0]="SHOW_ALL",e[e.SHOW_MD=1]="SHOW_MD",e[e.SHOW_HTML=2]="SHOW_HTML"})(Oi||(Oi={}));var b5=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleClick=i.handleClick.bind(Bn(i)),i.handleChange=i.handleChange.bind(Bn(i)),i.state={view:i.editor.getView()},i}var n=t.prototype;return n.handleClick=function(){switch(this.next){case Oi.SHOW_ALL:this.editor.setView({html:!0,md:!0});break;case Oi.SHOW_HTML:this.editor.setView({html:!0,md:!1});break;case Oi.SHOW_MD:this.editor.setView({html:!1,md:!0});break}},n.handleChange=function(i){this.setState({view:i})},n.componentDidMount=function(){this.editor.on("viewchange",this.handleChange)},n.componentWillUnmount=function(){this.editor.off("viewchange",this.handleChange)},n.getDisplayInfo=function(){var i=this.next;switch(i){case Oi.SHOW_ALL:return{icon:"view-split",title:"All"};case Oi.SHOW_HTML:return{icon:"visibility",title:"Preview"};default:return{icon:"keyboard",title:"Editor"}}},n.render=function(){if(this.isDisplay){var i=this.getDisplayInfo();return y.createElement("span",{className:"button button-type-mode",title:Ln.get("btnMode"+i.title),onClick:this.handleClick},y.createElement(Ar,{type:i.icon}))}return null},yY(t,[{key:"isDisplay",get:function(){var i=this.editorConfig.canView;return i?[i.html,i.md,i.both].filter(function(o){return o}).length>=2:!1}},{key:"next",get:function(){var i=this.editorConfig.canView,o=this.state.view,a=[Oi.SHOW_ALL,Oi.SHOW_MD,Oi.SHOW_HTML];i&&(i.both||a.splice(a.indexOf(Oi.SHOW_ALL),1),i.md||a.splice(a.indexOf(Oi.SHOW_MD),1),i.html||a.splice(a.indexOf(Oi.SHOW_HTML),1));var s=Oi.SHOW_MD;if(o.html&&(s=Oi.SHOW_HTML),o.html&&o.md&&(s=Oi.SHOW_ALL),a.length===0)return s;if(a.length===1)return a[0];var u=a.indexOf(s);return u=55296&&c<=57343?i+="���":i+=String.fromCharCode(c),o+=6;continue}}if((s&248)===240&&o+91114111?i+="����":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}i+="�"}return i})}kh.defaultChars=";/?:@&=+$,#";kh.componentChars="";const pN={};function Pqe(e){let t=pN[e];if(t)return t;t=pN[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const r=Pqe(t);let i="";for(let o=0,a=e.length;o=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1=56320&&u<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}Zm.defaultChars=";/?:@&=+$,-_.!~*'()#";Zm.componentChars="-_.!~*'()";function M5(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Ex(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const kqe=/^([a-z0-9.+-]+:)/i,Tqe=/:[0-9]*$/,Mqe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Rqe=["<",">",'"',"`"," ","\r",` -`," "],Dqe=["{","}","|","\\","^","`"].concat(Rqe),$qe=["'"].concat(Dqe),gN=["%","/","?",";","#"].concat($qe),mN=["/","?","#"],Iqe=255,vN=/^[+a-z0-9A-Z_-]{0,63}$/,Nqe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,yN={javascript:!0,"javascript:":!0},bN={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function R5(e,t){if(e&&e instanceof Ex)return e;const n=new Ex;return n.parse(e,t),n}Ex.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const l=Mqe.exec(o);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let a=kqe.exec(o);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&yN[a])&&(o=o.substr(2),this.slashes=!0)),!yN[a]&&(i||a&&!bN[a])){let l=-1;for(let m=0;m127?x+="x":x+=w[S];if(!x.match(vN)){const S=m.slice(0,v),O=m.slice(v+1),E=w.match(Nqe);E&&(S.push(E[1]),O.unshift(E[2])),O.length&&(o=O.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>Iqe&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));const u=o.indexOf("?");return u!==-1&&(this.search=o.substr(u),o=o.slice(0,u)),o&&(this.pathname=o),bN[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Ex.prototype.parseHost=function(e){let t=Tqe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const Lqe=Object.freeze(Object.defineProperty({__proto__:null,decode:kh,encode:Zm,format:M5,parse:R5},Symbol.toStringTag,{value:"Module"})),eZ=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,tZ=/[\0-\x1F\x7F-\x9F]/,Fqe=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,D5=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,nZ=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,rZ=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,jqe=Object.freeze(Object.defineProperty({__proto__:null,Any:eZ,Cc:tZ,Cf:Fqe,P:D5,S:nZ,Z:rZ},Symbol.toStringTag,{value:"Module"})),Bqe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),zqe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var I3;const Uqe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Hqe=(I3=String.fromCodePoint)!==null&&I3!==void 0?I3:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Vqe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Uqe.get(e))!==null&&t!==void 0?t:e}var ni;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ni||(ni={}));const Wqe=32;var pl;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(pl||(pl={}));function k4(e){return e>=ni.ZERO&&e<=ni.NINE}function qqe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_F||e>=ni.LOWER_A&&e<=ni.LOWER_F}function Kqe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_Z||e>=ni.LOWER_A&&e<=ni.LOWER_Z||k4(e)}function Gqe(e){return e===ni.EQUALS||Kqe(e)}var Jr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Jr||(Jr={}));var ol;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ol||(ol={}));class Yqe{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Jr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ol.Strict}startEntity(t){this.decodeMode=t,this.state=Jr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Jr.EntityStart:return t.charCodeAt(n)===ni.NUM?(this.state=Jr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Jr.NamedEntity,this.stateNamedEntity(t,n));case Jr.NumericStart:return this.stateNumericStart(t,n);case Jr.NumericDecimal:return this.stateNumericDecimal(t,n);case Jr.NumericHex:return this.stateNumericHex(t,n);case Jr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Wqe)===ni.LOWER_X?(this.state=Jr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Jr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n>14;for(;n>14,o!==0){if(a===ni.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==ol.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&pl.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~pl.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Jr.NamedEntity:return this.result!==0&&(this.decodeMode!==ol.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Jr.NumericDecimal:return this.emitNumericEntity(0,2);case Jr.NumericHex:return this.emitNumericEntity(0,3);case Jr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Jr.EntityStart:return 0}}}function iZ(e){let t="";const n=new Yqe(e,r=>t+=Hqe(r));return function(i,o){let a=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(a,s),n.startEntity(o);const l=n.write(i,s+1);if(l<0){a=s+n.end();break}a=s+l,s=l===0?a+1:a}const u=t+i.slice(a);return t="",u}}function Zqe(e,t,n,r){const i=(t&pl.BRANCH_LENGTH)>>7,o=t&pl.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const u=r-o;return u<0||u>=i?-1:e[n+u]-1}let a=n,s=a+i-1;for(;a<=s;){const u=a+s>>>1,l=e[u];if(lr)s=u-1;else return e[u+i]}return-1}const Xqe=iZ(Bqe);iZ(zqe);function oZ(e,t=ol.Legacy){return Xqe(e,t)}function Qqe(e){return Object.prototype.toString.call(e)}function $5(e){return Qqe(e)==="[object String]"}const Jqe=Object.prototype.hasOwnProperty;function eKe(e,t){return Jqe.call(e,t)}function S2(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function aZ(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function I5(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Ox(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const sZ=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,tKe=/&([a-z#][a-z0-9]{1,31});/gi,nKe=new RegExp(sZ.source+"|"+tKe.source,"gi"),rKe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function iKe(e,t){if(t.charCodeAt(0)===35&&rKe.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return I5(r)?Ox(r):e}const n=oZ(e);return n!==e?n:e}function oKe(e){return e.indexOf("\\")<0?e:e.replace(sZ,"$1")}function Th(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(nKe,function(t,n,r){return n||iKe(t,r)})}const aKe=/[&<>"]/,sKe=/[&<>"]/g,uKe={"&":"&","<":"<",">":">",'"':"""};function lKe(e){return uKe[e]}function Ll(e){return aKe.test(e)?e.replace(sKe,lKe):e}const cKe=/[.?*+^$[\]\\(){}|-]/g;function fKe(e){return e.replace(cKe,"\\$&")}function Wn(e){switch(e){case 9:case 32:return!0}return!1}function lm(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function cm(e){return D5.test(e)||nZ.test(e)}function fm(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function C2(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const dKe={mdurl:Lqe,ucmicro:jqe},hKe=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:aZ,assign:S2,escapeHtml:Ll,escapeRE:fKe,fromCodePoint:Ox,has:eKe,isMdAsciiPunct:fm,isPunctChar:cm,isSpace:Wn,isString:$5,isValidEntityCode:I5,isWhiteSpace:lm,lib:dKe,normalizeReference:C2,unescapeAll:Th,unescapeMd:oKe},Symbol.toStringTag,{value:"Module"}));function pKe(e,t,n){let r,i,o,a;const s=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos32))return o;if(r===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=Th(e.slice(t,i)),o.pos=i,o.ok=!0),o}function mKe(e,t,n,r){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(o>=n)return a;let s=e.charCodeAt(o);if(s!==34&&s!==39&&s!==40)return a;t++,o++,s===40&&(s=41),a.marker=s}for(;o"+Ll(o.content)+""};Is.code_block=function(e,t,n,r,i){const o=e[t];return""+Ll(e[t].content)+` -`};Is.fence=function(e,t,n,r,i){const o=e[t],a=o.info?Th(o.info).trim():"";let s="",u="";if(a){const c=a.split(/(\s+)/g);s=c[0],u=c.slice(2).join("")}let l;if(n.highlight?l=n.highlight(o.content,s,u)||Ll(o.content):l=Ll(o.content),l.indexOf("=55296&&c<=57343?i+="���":i+=String.fromCharCode(c),o+=6;continue}}if((s&248)===240&&o+91114111?i+="����":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}i+="�"}return i})}Oh.defaultChars=";/?:@&=+$,#";Oh.componentChars="";const JI={};function YHe(e){let t=JI[e];if(t)return t;t=JI[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const r=YHe(t);let i="";for(let o=0,a=e.length;o=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1=56320&&u<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}Km.defaultChars=";/?:@&=+$,-_.!~*'()#";Km.componentChars="-_.!~*'()";function w5(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function xx(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const ZHe=/^([a-z0-9.+-]+:)/i,XHe=/:[0-9]*$/,QHe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,JHe=["<",">",'"',"`"," ","\r",` +`," "],eKe=["{","}","|","\\","^","`"].concat(JHe),tKe=["'"].concat(eKe),eN=["%","/","?",";","#"].concat(tKe),tN=["/","?","#"],nKe=255,nN=/^[+a-z0-9A-Z_-]{0,63}$/,rKe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,rN={javascript:!0,"javascript:":!0},iN={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function _5(e,t){if(e&&e instanceof xx)return e;const n=new xx;return n.parse(e,t),n}xx.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const l=QHe.exec(o);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let a=ZHe.exec(o);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&rN[a])&&(o=o.substr(2),this.slashes=!0)),!rN[a]&&(i||a&&!iN[a])){let l=-1;for(let m=0;m127?x+="x":x+=w[S];if(!x.match(nN)){const S=m.slice(0,v),O=m.slice(v+1),E=w.match(rKe);E&&(S.push(E[1]),O.unshift(E[2])),O.length&&(o=O.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>nKe&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));const u=o.indexOf("?");return u!==-1&&(this.search=o.substr(u),o=o.slice(0,u)),o&&(this.pathname=o),iN[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};xx.prototype.parseHost=function(e){let t=XHe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const iKe=Object.freeze(Object.defineProperty({__proto__:null,decode:Oh,encode:Km,format:w5,parse:_5},Symbol.toStringTag,{value:"Module"})),LY=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,FY=/[\0-\x1F\x7F-\x9F]/,oKe=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,S5=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,jY=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,BY=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,aKe=Object.freeze(Object.defineProperty({__proto__:null,Any:LY,Cc:FY,Cf:oKe,P:S5,S:jY,Z:BY},Symbol.toStringTag,{value:"Module"})),sKe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),uKe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var k3;const lKe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),cKe=(k3=String.fromCodePoint)!==null&&k3!==void 0?k3:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function fKe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=lKe.get(e))!==null&&t!==void 0?t:e}var ni;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ni||(ni={}));const dKe=32;var hl;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(hl||(hl={}));function w4(e){return e>=ni.ZERO&&e<=ni.NINE}function hKe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_F||e>=ni.LOWER_A&&e<=ni.LOWER_F}function pKe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_Z||e>=ni.LOWER_A&&e<=ni.LOWER_Z||w4(e)}function gKe(e){return e===ni.EQUALS||pKe(e)}var Jr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Jr||(Jr={}));var il;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(il||(il={}));class mKe{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Jr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=il.Strict}startEntity(t){this.decodeMode=t,this.state=Jr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Jr.EntityStart:return t.charCodeAt(n)===ni.NUM?(this.state=Jr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Jr.NamedEntity,this.stateNamedEntity(t,n));case Jr.NumericStart:return this.stateNumericStart(t,n);case Jr.NumericDecimal:return this.stateNumericDecimal(t,n);case Jr.NumericHex:return this.stateNumericHex(t,n);case Jr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|dKe)===ni.LOWER_X?(this.state=Jr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Jr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n>14;for(;n>14,o!==0){if(a===ni.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==il.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&hl.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~hl.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Jr.NamedEntity:return this.result!==0&&(this.decodeMode!==il.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Jr.NumericDecimal:return this.emitNumericEntity(0,2);case Jr.NumericHex:return this.emitNumericEntity(0,3);case Jr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Jr.EntityStart:return 0}}}function zY(e){let t="";const n=new mKe(e,r=>t+=cKe(r));return function(i,o){let a=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(a,s),n.startEntity(o);const l=n.write(i,s+1);if(l<0){a=s+n.end();break}a=s+l,s=l===0?a+1:a}const u=t+i.slice(a);return t="",u}}function vKe(e,t,n,r){const i=(t&hl.BRANCH_LENGTH)>>7,o=t&hl.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const u=r-o;return u<0||u>=i?-1:e[n+u]-1}let a=n,s=a+i-1;for(;a<=s;){const u=a+s>>>1,l=e[u];if(lr)s=u-1;else return e[u+i]}return-1}const yKe=zY(sKe);zY(uKe);function UY(e,t=il.Legacy){return yKe(e,t)}function bKe(e){return Object.prototype.toString.call(e)}function C5(e){return bKe(e)==="[object String]"}const xKe=Object.prototype.hasOwnProperty;function wKe(e,t){return xKe.call(e,t)}function y2(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function VY(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function E5(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function wx(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const WY=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,_Ke=/&([a-z#][a-z0-9]{1,31});/gi,SKe=new RegExp(WY.source+"|"+_Ke.source,"gi"),CKe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function EKe(e,t){if(t.charCodeAt(0)===35&&CKe.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return E5(r)?wx(r):e}const n=UY(e);return n!==e?n:e}function OKe(e){return e.indexOf("\\")<0?e:e.replace(WY,"$1")}function Ah(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(SKe,function(t,n,r){return n||EKe(t,r)})}const AKe=/[&<>"]/,PKe=/[&<>"]/g,kKe={"&":"&","<":"<",">":">",'"':"""};function TKe(e){return kKe[e]}function Nl(e){return AKe.test(e)?e.replace(PKe,TKe):e}const MKe=/[.?*+^$[\]\\(){}|-]/g;function RKe(e){return e.replace(MKe,"\\$&")}function Hn(e){switch(e){case 9:case 32:return!0}return!1}function om(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function am(e){return S5.test(e)||jY.test(e)}function sm(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function b2(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const DKe={mdurl:iKe,ucmicro:aKe},$Ke=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:VY,assign:y2,escapeHtml:Nl,escapeRE:RKe,fromCodePoint:wx,has:wKe,isMdAsciiPunct:sm,isPunctChar:am,isSpace:Hn,isString:C5,isValidEntityCode:E5,isWhiteSpace:om,lib:DKe,normalizeReference:b2,unescapeAll:Ah,unescapeMd:OKe},Symbol.toStringTag,{value:"Module"}));function IKe(e,t,n){let r,i,o,a;const s=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos32))return o;if(r===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=Ah(e.slice(t,i)),o.pos=i,o.ok=!0),o}function LKe(e,t,n,r){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(o>=n)return a;let s=e.charCodeAt(o);if(s!==34&&s!==39&&s!==40)return a;t++,o++,s===40&&(s=41),a.marker=s}for(;o"+Nl(o.content)+""};Is.code_block=function(e,t,n,r,i){const o=e[t];return""+Nl(e[t].content)+` +`};Is.fence=function(e,t,n,r,i){const o=e[t],a=o.info?Ah(o.info).trim():"";let s="",u="";if(a){const c=a.split(/(\s+)/g);s=c[0],u=c.slice(2).join("")}let l;if(n.highlight?l=n.highlight(o.content,s,u)||Nl(o.content):l=Nl(o.content),l.indexOf("${l} `}return`
${l}
`};Is.image=function(e,t,n,r,i){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)};Is.hardbreak=function(e,t,n){return n.xhtmlOut?`
@@ -555,10 +555,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `};Is.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`
`:`
`:` -`};Is.text=function(e,t){return Ll(e[t].content)};Is.html_block=function(e,t){return e[t].content};Is.html_inline=function(e,t){return e[t].content};function sp(){this.rules=S2({},Is)}sp.prototype.renderAttrs=function(t){let n,r,i;if(!t.attrs)return"";for(i="",n=0,r=t.attrs.length;n -`:">",o};sp.prototype.renderInline=function(e,t,n){let r="";const i=this.rules;for(let o=0,a=e.length;o=0&&(r=this.attrs[n][1]),r};is.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function uZ(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}uZ.prototype.Token=is;const yKe=/\r\n?|\n/g,bKe=/\0/g;function xKe(e){let t;t=e.src.replace(yKe,` -`),t=t.replace(bKe,"�"),e.src=t}function wKe(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function _Ke(e){const t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function CKe(e){return/^<\/a\s*>/i.test(e)}function EKe(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;a--){const s=i[a];if(s.type==="link_close"){for(a--;i[a].level!==s.level&&i[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(SKe(s.content)&&o>0&&o--,CKe(s.content)&&o++),!(o>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const u=s.content;let l=e.md.linkify.match(u);const c=[];let f=s.level,h=0;l.length>0&&l[0].index===0&&a>0&&i[a-1].type==="text_special"&&(l=l.slice(1));for(let p=0;ph){const E=new e.Token("text","",0);E.content=u.slice(h,w),E.level=f,c.push(E)}const x=new e.Token("link_open","a",1);x.attrs=[["href",v]],x.level=f++,x.markup="linkify",x.info="auto",c.push(x);const S=new e.Token("text","",0);S.content=b,S.level=f,c.push(S);const O=new e.Token("link_close","a",-1);O.level=--f,O.markup="linkify",O.info="auto",c.push(O),h=l[p].lastIndex}if(h=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(AKe,kKe)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function MKe(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&lZ.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function RKe(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(OKe.test(e.tokens[t].content)&&TKe(e.tokens[t].children),lZ.test(e.tokens[t].content)&&MKe(e.tokens[t].children))}const DKe=/['"]/,xN=/['"]/g,wN="’";function Ny(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function $Ke(e,t){let n;const r=[];for(let i=0;i=0&&!(r[n].level<=a);n--);if(r.length=n+1,o.type!=="text")continue;let s=o.content,u=0,l=s.length;e:for(;u=0)m=s.charCodeAt(c.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let v=32;if(u=48&&m<=57&&(h=f=!1),f&&h&&(f=b,h=w),!f&&!h){p&&(o.content=Ny(o.content,c.index,wN));continue}if(h)for(n=r.length-1;n>=0;n--){let O=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!DKe.test(e.tokens[t].content)||$Ke(e.tokens[t].children,e)}function NKe(e){let t,n;const r=e.tokens,i=r.length;for(let o=0;o0&&this.level++,this.tokens.push(r),r};Ns.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Ns.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!Wn(this.src.charCodeAt(--t)))return t+1;return t};Ns.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Ns.prototype.getLines=function(t,n,r,i){if(t>=n)return"";const o=new Array(n-t);for(let a=0,s=t;sr?o[a]=new Array(u-r+1).join(" ")+this.src.slice(c,f):o[a]=this.src.slice(c,f)}return o.join("")};Ns.prototype.Token=is;const LKe=65536;function L3(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function _N(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),o=!1,a=0,s="";for(;rn)return!1;let i=t+1;if(e.sCount[i]=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58&&!Wn(s)||a===45&&Wn(s))return!1;for(;o=4)return!1;l=_N(u),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const f=l.length;if(f===0||f!==c.length)return!1;if(r)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),v=[t,0];m.map=v;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let O=0;O=4||(l=_N(u),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),S+=f-l.length,S>LKe))break;if(i===t+2){const C=e.push("tbody_open","tbody",1);C.map=x=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[i,i+1];for(let C=0;C=4){r++,i=r;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+` -`,o.map=[t,e.line],!0}function BKe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let s=i;i=e.skipChars(i,a);let u=i-s;if(u<3)return!1;const l=e.src.slice(s,i),c=e.src.slice(i,o);if(a===96&&c.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let f=t,h=!1;for(;f++,!(f>=n||(i=s=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i=4)&&(i=e.skipChars(i,a),!(i-s=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const s=[],u=[],l=[],c=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m=o)break;if(e.src.charCodeAt(i++)===62&&!S){let E=e.sCount[m]+1,C,k;e.src.charCodeAt(i)===32?(i++,E++,k=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[m]+E)%4===3?(i++,E++,k=!1):k=!0):C=!1;let M=E;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i=o,u.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(C?1:0),l.push(e.sCount[m]),e.sCount[m]=M-E,c.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let O=!1;for(let E=0,C=f.length;E";const w=[t,0];b.map=w,e.md.block.tokenize(e,t,m);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=a,e.parentType=h,w[1]=e.line;for(let S=0;S=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;o=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]=e.blkIndent&&(c=!0);let f,h,p;if((p=CN(e,u))>=0){if(f=!0,a=e.bMarks[u]+e.tShift[u],h=Number(e.src.slice(a,p-1)),c&&h!==1)return!1}else if((p=SN(e,u))>=0)f=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[u])return!1;if(r)return!0;const m=e.src.charCodeAt(p-1),v=e.tokens.length;f?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const b=[u,0];s.map=b,s.markup=String.fromCharCode(m);let w=!1;const x=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";u=i?k=1:k=E-O,k>4&&(k=1);const M=O+k;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const N=[u,0];s.map=N,f&&(s.info=e.src.slice(a,p-1));const q=e.tight,Y=e.tShift[u],W=e.sCount[u],ne=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[u]=C-e.bMarks[u],e.sCount[u]=E,C>=i&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||w)&&(l=!1),w=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ne,e.tShift[u]=Y,e.sCount[u]=W,e.tight=q,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),u=e.line,N[1]=u,u>=n||e.sCount[u]=4)break;let Z=!1;for(let R=0,B=x.length;R=4||e.src.charCodeAt(i)!==91)return!1;function s(x){const S=e.lineMax;if(x>=S||e.isEmpty(x))return null;let O=!1;if(e.sCount[x]-e.blkIndent>3&&(O=!0),e.sCount[x]<0&&(O=!0),!O){const k=e.md.block.ruler.getRules("reference"),M=e.parentType;e.parentType="reference";let N=!1;for(let q=0,Y=k.length;q"u"&&(e.env.references={}),typeof e.env.references[w]>"u"&&(e.env.references[w]={title:b,href:f}),e.line=a),!0):!1}const qKe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],KKe="[a-zA-Z_:][a-zA-Z0-9:._-]*",GKe="[^\"'=<>`\\x00-\\x20]+",YKe="'[^']*'",ZKe='"[^"]*"',XKe="(?:"+GKe+"|"+YKe+"|"+ZKe+")",QKe="(?:\\s+"+KKe+"(?:\\s*=\\s*"+XKe+")?)",cZ="<[A-Za-z][A-Za-z0-9\\-]*"+QKe+"*\\s*\\/?>",fZ="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",JKe="",eGe="<[?][\\s\\S]*?[?]>",tGe="]*>",nGe="",rGe=new RegExp("^(?:"+cZ+"|"+fZ+"|"+JKe+"|"+eGe+"|"+tGe+"|"+nGe+")"),iGe=new RegExp("^(?:"+cZ+"|"+fZ+")"),td=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(iGe.source+"\\s*$"),/^$/,!1]];function oGe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),s=0;for(;s=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let s=1;for(a=e.src.charCodeAt(++i);a===35&&i6||ii&&Wn(e.src.charCodeAt(u-1))&&(o=u),e.line=t+1;const l=e.push("heading_open","h"+String(s),1);l.markup="########".slice(0,s),l.map=[t,e.line];const c=e.push("inline","",0);c.content=e.src.slice(i,o).trim(),c.map=[t,e.line],c.children=[];const f=e.push("heading_close","h"+String(s),-1);return f.markup="########".slice(0,s),!0}function sGe(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,s=t+1;for(;s3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s];const m=e.eMarks[s];if(p=m))){o=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=r.length;p3||e.sCount[o]<0)continue;let l=!1;for(let c=0,f=r.length;c=n||e.sCount[a]=o){e.line=n;break}const u=e.line;let l=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};Xm.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(fGe);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let s=a.url;if(s.length<=o.length)return!1;s=s.replace(/\*+$/,"");const u=e.md.normalizeLink(s);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const l=e.push("link_open","a",1);l.attrs=[["href",u]],l.markup="linkify",l.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=s.length-o.length,!0}function hGe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let o=r-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){L5[e.charCodeAt(0)]=1});function pGe(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&s<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const s=e.push("text_special","",0);i<256&&L5[i]!==0?s.content=o:s.content=a,s.markup=a,s.info="escape"}return e.pos=n+1,!0}function gGe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n=0;r--){const i=t[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===o.token+1,s=String.fromCharCode(i.marker),u=e.tokens[i.token];u.type=a?"strong_open":"em_open",u.tag=a?"strong":"em",u.nesting=1,u.markup=a?s+s:s,u.content="";const l=e.tokens[o.token];l.type=a?"strong_close":"em_close",l.tag=a?"strong":"em",l.nesting=-1,l.markup=a?s+s:s,l.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--)}}function bGe(e){const t=e.tokens_meta,n=e.tokens_meta.length;ON(e,e.delimiters);for(let r=0;r=f)return!1;if(u=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?m=i.pos:a="",u=m;m=f||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(typeof e.env.references>"u")return!1;if(m=0?r=e.src.slice(u,m++):m=p+1):m=p+1,r||(r=e.src.slice(h,p)),o=e.env.references[C2(r)],!o)return e.pos=c,!1;a=o.href,s=o.title}if(!t){e.pos=h,e.posMax=p;const v=e.push("link_open","a",1),b=[["href",a]];v.attrs=b,s&&b.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=f,!0}function wGe(e,t){let n,r,i,o,a,s,u,l,c="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(o=m+1,o=h)return!1;for(l=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(c=e.md.normalizeLink(s.str),e.md.validateLink(c)?o=s.pos:c=""),l=o;o=h||e.src.charCodeAt(o)!==41)return e.pos=f,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?i=e.src.slice(l,o++):o=m+1):o=m+1,i||(i=e.src.slice(p,m)),a=e.env.references[C2(i)],!a)return e.pos=f,!1;c=a.href,u=a.title}if(!t){r=e.src.slice(p,m);const v=[];e.md.inline.parse(r,e.md,e.env,v);const b=e.push("image","img",0),w=[["src",c],["alt",""]];b.attrs=w,b.children=v,b.content=r,u&&w.push(["title",u])}return e.pos=o,e.posMax=h,!0}const _Ge=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,SGe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function CGe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(r+1,n);if(SGe.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}if(_Ge.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}return!1}function EGe(e){return/^\s]/i.test(e)}function OGe(e){return/^<\/a\s*>/i.test(e)}function AGe(e){const t=e|32;return t>=97&&t<=122}function PGe(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!AGe(i))return!1;const o=e.src.slice(r).match(rGe);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],EGe(a.content)&&e.linkLevel++,OGe(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const kGe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,TGe=/^&([a-z][a-z0-9]{1,31});/i;function MGe(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(kGe);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0);s.content=I5(a)?Ox(a):Ox(65533),s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(TGe);if(o){const a=oZ(o[0]);if(a!==o[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function AN(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let a=0;au;l-=o[l]+1){const f=e[l];if(f.marker===s.marker&&f.open&&f.end<0){let h=!1;if((f.close||s.open)&&(f.length+s.length)%3===0&&(f.length%3!==0||s.length%3!==0)&&(h=!0),!h){const p=l>0&&!e[l-1].open?o[l-1]+1:0;o[a]=a-l+p,o[l]=p,s.open=!1,f.end=a,f.close=!1,c=-1,i=-2;break}}}c!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=c)}}function RGe(e){const t=e.tokens_meta,n=e.tokens_meta.length;AN(e.delimiters);for(let r=0;r0&&r++,i[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};Qm.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Qm.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let s=0;s|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function T4(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function O2(e){return Object.prototype.toString.call(e)}function IGe(e){return O2(e)==="[object String]"}function NGe(e){return O2(e)==="[object Object]"}function LGe(e){return O2(e)==="[object RegExp]"}function PN(e){return O2(e)==="[object Function]"}function FGe(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const pZ={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function jGe(e){return Object.keys(e||{}).reduce(function(t,n){return t||pZ.hasOwnProperty(n)},!1)}const BGe={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},zGe="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",UGe="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function HGe(e){e.__index__=-1,e.__text_cache__=""}function VGe(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function kN(){return function(e,t){t.normalize(e)}}function Ax(e){const t=e.re=$Ge(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(zGe),n.push(t.src_xn),t.src_tlds=n.join("|");function r(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(s,u){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+u)}Object.keys(e.__schemas__).forEach(function(s){const u=e.__schemas__[s];if(u===null)return;const l={validate:null,link:null};if(e.__compiled__[s]=l,NGe(u)){LGe(u.validate)?l.validate=VGe(u.validate):PN(u.validate)?l.validate=u.validate:o(s,u),PN(u.normalize)?l.normalize=u.normalize:u.normalize?o(s,u):l.normalize=kN();return}if(IGe(u)){i.push(s);return}o(s,u)}),i.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:kN()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(FGe).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),HGe(e)}function WGe(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function M4(e,t){const n=new WGe(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Wo(e,t){if(!(this instanceof Wo))return new Wo(e,t);t||jGe(e)&&(t=e,e={}),this.__opts__=T4({},pZ,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=T4({},BGe,e),this.__compiled__={},this.__tlds__=UGe,this.__tlds_replaced__=!1,this.re={},Ax(this)}Wo.prototype.add=function(t,n){return this.__schemas__[t]=n,Ax(this),this};Wo.prototype.set=function(t){return this.__opts__=T4(this.__opts__,t),this};Wo.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,i,o,a,s,u,l,c;if(this.re.schema_test.test(t)){for(u=this.re.schema_search,u.lastIndex=0;(n=u.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],u.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=t.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,s=i.index+i[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=s))),this.__index__>=0};Wo.prototype.pretest=function(t){return this.re.pretest.test(t)};Wo.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Wo.prototype.match=function(t){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(M4(this,r)),r=this.__last_index__);let i=r?t.slice(r):t;for(;this.test(i);)n.push(M4(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};Wo.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,M4(this,0)):null};Wo.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),Ax(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Ax(this),this)};Wo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Wo.prototype.onCompile=function(){};const Bd=2147483647,ws=36,F5=1,dm=26,qGe=38,KGe=700,gZ=72,mZ=128,vZ="-",GGe=/^xn--/,YGe=/[^\0-\x7F]/,ZGe=/[\x2E\u3002\uFF0E\uFF61]/g,XGe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B3=ws-F5,_s=Math.floor,z3=String.fromCharCode;function el(e){throw new RangeError(XGe[e])}function QGe(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function yZ(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(ZGe,".");const i=e.split("."),o=QGe(i,t).join(".");return r+o}function bZ(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),eYe=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ws},TN=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},xZ=function(e,t,n){let r=0;for(e=n?_s(e/KGe):e>>1,e+=_s(e/t);e>B3*dm>>1;r+=ws)e=_s(e/B3);return _s(r+(B3+1)*e/(e+qGe))},wZ=function(e){const t=[],n=e.length;let r=0,i=mZ,o=gZ,a=e.lastIndexOf(vZ);a<0&&(a=0);for(let s=0;s=128&&el("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s=n&&el("invalid-input");const h=eYe(e.charCodeAt(s++));h>=ws&&el("invalid-input"),h>_s((Bd-r)/c)&&el("overflow"),r+=h*c;const p=f<=o?F5:f>=o+dm?dm:f-o;if(h_s(Bd/m)&&el("overflow"),c*=m}const l=t.length+1;o=xZ(r-u,l,u==0),_s(r/l)>Bd-i&&el("overflow"),i+=_s(r/l),r%=l,t.splice(r++,0,i)}return String.fromCodePoint(...t)},_Z=function(e){const t=[];e=bZ(e);const n=e.length;let r=mZ,i=0,o=gZ;for(const u of e)u<128&&t.push(z3(u));const a=t.length;let s=a;for(a&&t.push(vZ);s=r&&c_s((Bd-i)/l)&&el("overflow"),i+=(u-r)*l,r=u;for(const c of e)if(cBd&&el("overflow"),c===r){let f=i;for(let h=ws;;h+=ws){const p=h<=o?F5:h>=o+dm?dm:h-o;if(f=0))try{t.hostname=SZ.toASCII(t.hostname)}catch{}return Zm(M5(t))}function fYe(e){const t=R5(e,!0);if(t.hostname&&(!t.protocol||CZ.indexOf(t.protocol)>=0))try{t.hostname=SZ.toUnicode(t.hostname)}catch{}return kh(M5(t),kh.defaultChars+"%")}function es(e,t){if(!(this instanceof es))return new es(e,t);t||$5(e)||(t=e||{},e="default"),this.inline=new Qm,this.block=new E2,this.core=new N5,this.renderer=new sp,this.linkify=new Wo,this.validateLink=lYe,this.normalizeLink=cYe,this.normalizeLinkText=fYe,this.utils=hKe,this.helpers=S2({},vKe),this.options={},this.configure(e),t&&this.set(t)}es.prototype.set=function(e){return S2(this.options,e),this};es.prototype.configure=function(e){const t=this;if($5(e)){const n=e;if(e=aYe[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};es.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};es.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};es.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};es.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};es.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};es.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};es.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var EZ={exports:{}};(function(e){(function(t){var n=function(T){var $,I=new Float64Array(16);if(T)for($=0;$>24&255,T[$+1]=I>>16&255,T[$+2]=I>>8&255,T[$+3]=I&255,T[$+4]=A>>24&255,T[$+5]=A>>16&255,T[$+6]=A>>8&255,T[$+7]=A&255}function v(T,$,I,A,j){var ee,re=0;for(ee=0;ee>>8)-1}function b(T,$,I,A){return v(T,$,I,A,16)}function w(T,$,I,A){return v(T,$,I,A,32)}function x(T,$,I,A){for(var j=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,ee=I[0]&255|(I[1]&255)<<8|(I[2]&255)<<16|(I[3]&255)<<24,re=I[4]&255|(I[5]&255)<<8|(I[6]&255)<<16|(I[7]&255)<<24,he=I[8]&255|(I[9]&255)<<8|(I[10]&255)<<16|(I[11]&255)<<24,Ce=I[12]&255|(I[13]&255)<<8|(I[14]&255)<<16|(I[15]&255)<<24,Be=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,We=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,ct=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,Ne=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,rt=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,bt=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ot=I[16]&255|(I[17]&255)<<8|(I[18]&255)<<16|(I[19]&255)<<24,gt=I[20]&255|(I[21]&255)<<8|(I[22]&255)<<16|(I[23]&255)<<24,ht=I[24]&255|(I[25]&255)<<8|(I[26]&255)<<16|(I[27]&255)<<24,xt=I[28]&255|(I[29]&255)<<8|(I[30]&255)<<16|(I[31]&255)<<24,wt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Je=j,ut=ee,Qe=re,Fe=he,qe=Ce,Ge=Be,ve=We,ge=ct,De=Ne,Pe=rt,Te=bt,ze=Ot,vt=gt,Lt=ht,Ft=xt,$t=wt,te,Yt=0;Yt<20;Yt+=2)te=Je+vt|0,qe^=te<<7|te>>>25,te=qe+Je|0,De^=te<<9|te>>>23,te=De+qe|0,vt^=te<<13|te>>>19,te=vt+De|0,Je^=te<<18|te>>>14,te=Ge+ut|0,Pe^=te<<7|te>>>25,te=Pe+Ge|0,Lt^=te<<9|te>>>23,te=Lt+Pe|0,ut^=te<<13|te>>>19,te=ut+Lt|0,Ge^=te<<18|te>>>14,te=Te+ve|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,ve^=te<<13|te>>>19,te=ve+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Fe^=te<<7|te>>>25,te=Fe+$t|0,ge^=te<<9|te>>>23,te=ge+Fe|0,ze^=te<<13|te>>>19,te=ze+ge|0,$t^=te<<18|te>>>14,te=Je+Fe|0,ut^=te<<7|te>>>25,te=ut+Je|0,Qe^=te<<9|te>>>23,te=Qe+ut|0,Fe^=te<<13|te>>>19,te=Fe+Qe|0,Je^=te<<18|te>>>14,te=Ge+qe|0,ve^=te<<7|te>>>25,te=ve+Ge|0,ge^=te<<9|te>>>23,te=ge+ve|0,qe^=te<<13|te>>>19,te=qe+ge|0,Ge^=te<<18|te>>>14,te=Te+Pe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Pe^=te<<13|te>>>19,te=Pe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,vt^=te<<7|te>>>25,te=vt+$t|0,Lt^=te<<9|te>>>23,te=Lt+vt|0,Ft^=te<<13|te>>>19,te=Ft+Lt|0,$t^=te<<18|te>>>14;Je=Je+j|0,ut=ut+ee|0,Qe=Qe+re|0,Fe=Fe+he|0,qe=qe+Ce|0,Ge=Ge+Be|0,ve=ve+We|0,ge=ge+ct|0,De=De+Ne|0,Pe=Pe+rt|0,Te=Te+bt|0,ze=ze+Ot|0,vt=vt+gt|0,Lt=Lt+ht|0,Ft=Ft+xt|0,$t=$t+wt|0,T[0]=Je>>>0&255,T[1]=Je>>>8&255,T[2]=Je>>>16&255,T[3]=Je>>>24&255,T[4]=ut>>>0&255,T[5]=ut>>>8&255,T[6]=ut>>>16&255,T[7]=ut>>>24&255,T[8]=Qe>>>0&255,T[9]=Qe>>>8&255,T[10]=Qe>>>16&255,T[11]=Qe>>>24&255,T[12]=Fe>>>0&255,T[13]=Fe>>>8&255,T[14]=Fe>>>16&255,T[15]=Fe>>>24&255,T[16]=qe>>>0&255,T[17]=qe>>>8&255,T[18]=qe>>>16&255,T[19]=qe>>>24&255,T[20]=Ge>>>0&255,T[21]=Ge>>>8&255,T[22]=Ge>>>16&255,T[23]=Ge>>>24&255,T[24]=ve>>>0&255,T[25]=ve>>>8&255,T[26]=ve>>>16&255,T[27]=ve>>>24&255,T[28]=ge>>>0&255,T[29]=ge>>>8&255,T[30]=ge>>>16&255,T[31]=ge>>>24&255,T[32]=De>>>0&255,T[33]=De>>>8&255,T[34]=De>>>16&255,T[35]=De>>>24&255,T[36]=Pe>>>0&255,T[37]=Pe>>>8&255,T[38]=Pe>>>16&255,T[39]=Pe>>>24&255,T[40]=Te>>>0&255,T[41]=Te>>>8&255,T[42]=Te>>>16&255,T[43]=Te>>>24&255,T[44]=ze>>>0&255,T[45]=ze>>>8&255,T[46]=ze>>>16&255,T[47]=ze>>>24&255,T[48]=vt>>>0&255,T[49]=vt>>>8&255,T[50]=vt>>>16&255,T[51]=vt>>>24&255,T[52]=Lt>>>0&255,T[53]=Lt>>>8&255,T[54]=Lt>>>16&255,T[55]=Lt>>>24&255,T[56]=Ft>>>0&255,T[57]=Ft>>>8&255,T[58]=Ft>>>16&255,T[59]=Ft>>>24&255,T[60]=$t>>>0&255,T[61]=$t>>>8&255,T[62]=$t>>>16&255,T[63]=$t>>>24&255}function S(T,$,I,A){for(var j=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,ee=I[0]&255|(I[1]&255)<<8|(I[2]&255)<<16|(I[3]&255)<<24,re=I[4]&255|(I[5]&255)<<8|(I[6]&255)<<16|(I[7]&255)<<24,he=I[8]&255|(I[9]&255)<<8|(I[10]&255)<<16|(I[11]&255)<<24,Ce=I[12]&255|(I[13]&255)<<8|(I[14]&255)<<16|(I[15]&255)<<24,Be=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,We=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,ct=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,Ne=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,rt=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,bt=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ot=I[16]&255|(I[17]&255)<<8|(I[18]&255)<<16|(I[19]&255)<<24,gt=I[20]&255|(I[21]&255)<<8|(I[22]&255)<<16|(I[23]&255)<<24,ht=I[24]&255|(I[25]&255)<<8|(I[26]&255)<<16|(I[27]&255)<<24,xt=I[28]&255|(I[29]&255)<<8|(I[30]&255)<<16|(I[31]&255)<<24,wt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Je=j,ut=ee,Qe=re,Fe=he,qe=Ce,Ge=Be,ve=We,ge=ct,De=Ne,Pe=rt,Te=bt,ze=Ot,vt=gt,Lt=ht,Ft=xt,$t=wt,te,Yt=0;Yt<20;Yt+=2)te=Je+vt|0,qe^=te<<7|te>>>25,te=qe+Je|0,De^=te<<9|te>>>23,te=De+qe|0,vt^=te<<13|te>>>19,te=vt+De|0,Je^=te<<18|te>>>14,te=Ge+ut|0,Pe^=te<<7|te>>>25,te=Pe+Ge|0,Lt^=te<<9|te>>>23,te=Lt+Pe|0,ut^=te<<13|te>>>19,te=ut+Lt|0,Ge^=te<<18|te>>>14,te=Te+ve|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,ve^=te<<13|te>>>19,te=ve+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Fe^=te<<7|te>>>25,te=Fe+$t|0,ge^=te<<9|te>>>23,te=ge+Fe|0,ze^=te<<13|te>>>19,te=ze+ge|0,$t^=te<<18|te>>>14,te=Je+Fe|0,ut^=te<<7|te>>>25,te=ut+Je|0,Qe^=te<<9|te>>>23,te=Qe+ut|0,Fe^=te<<13|te>>>19,te=Fe+Qe|0,Je^=te<<18|te>>>14,te=Ge+qe|0,ve^=te<<7|te>>>25,te=ve+Ge|0,ge^=te<<9|te>>>23,te=ge+ve|0,qe^=te<<13|te>>>19,te=qe+ge|0,Ge^=te<<18|te>>>14,te=Te+Pe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Pe^=te<<13|te>>>19,te=Pe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,vt^=te<<7|te>>>25,te=vt+$t|0,Lt^=te<<9|te>>>23,te=Lt+vt|0,Ft^=te<<13|te>>>19,te=Ft+Lt|0,$t^=te<<18|te>>>14;T[0]=Je>>>0&255,T[1]=Je>>>8&255,T[2]=Je>>>16&255,T[3]=Je>>>24&255,T[4]=Ge>>>0&255,T[5]=Ge>>>8&255,T[6]=Ge>>>16&255,T[7]=Ge>>>24&255,T[8]=Te>>>0&255,T[9]=Te>>>8&255,T[10]=Te>>>16&255,T[11]=Te>>>24&255,T[12]=$t>>>0&255,T[13]=$t>>>8&255,T[14]=$t>>>16&255,T[15]=$t>>>24&255,T[16]=ve>>>0&255,T[17]=ve>>>8&255,T[18]=ve>>>16&255,T[19]=ve>>>24&255,T[20]=ge>>>0&255,T[21]=ge>>>8&255,T[22]=ge>>>16&255,T[23]=ge>>>24&255,T[24]=De>>>0&255,T[25]=De>>>8&255,T[26]=De>>>16&255,T[27]=De>>>24&255,T[28]=Pe>>>0&255,T[29]=Pe>>>8&255,T[30]=Pe>>>16&255,T[31]=Pe>>>24&255}function O(T,$,I,A){x(T,$,I,A)}function E(T,$,I,A){S(T,$,I,A)}var C=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function k(T,$,I,A,j,ee,re){var he=new Uint8Array(16),Ce=new Uint8Array(64),Be,We;for(We=0;We<16;We++)he[We]=0;for(We=0;We<8;We++)he[We]=ee[We];for(;j>=64;){for(O(Ce,he,re,C),We=0;We<64;We++)T[$+We]=I[A+We]^Ce[We];for(Be=1,We=8;We<16;We++)Be=Be+(he[We]&255)|0,he[We]=Be&255,Be>>>=8;j-=64,$+=64,A+=64}if(j>0)for(O(Ce,he,re,C),We=0;We=64;){for(O(re,ee,j,C),Ce=0;Ce<64;Ce++)T[$+Ce]=re[Ce];for(he=1,Ce=8;Ce<16;Ce++)he=he+(ee[Ce]&255)|0,ee[Ce]=he&255,he>>>=8;I-=64,$+=64}if(I>0)for(O(re,ee,j,C),Ce=0;Ce>>13|I<<3)&8191,A=T[4]&255|(T[5]&255)<<8,this.r[2]=(I>>>10|A<<6)&7939,j=T[6]&255|(T[7]&255)<<8,this.r[3]=(A>>>7|j<<9)&8191,ee=T[8]&255|(T[9]&255)<<8,this.r[4]=(j>>>4|ee<<12)&255,this.r[5]=ee>>>1&8190,re=T[10]&255|(T[11]&255)<<8,this.r[6]=(ee>>>14|re<<2)&8191,he=T[12]&255|(T[13]&255)<<8,this.r[7]=(re>>>11|he<<5)&8065,Ce=T[14]&255|(T[15]&255)<<8,this.r[8]=(he>>>8|Ce<<8)&8191,this.r[9]=Ce>>>5&127,this.pad[0]=T[16]&255|(T[17]&255)<<8,this.pad[1]=T[18]&255|(T[19]&255)<<8,this.pad[2]=T[20]&255|(T[21]&255)<<8,this.pad[3]=T[22]&255|(T[23]&255)<<8,this.pad[4]=T[24]&255|(T[25]&255)<<8,this.pad[5]=T[26]&255|(T[27]&255)<<8,this.pad[6]=T[28]&255|(T[29]&255)<<8,this.pad[7]=T[30]&255|(T[31]&255)<<8};Y.prototype.blocks=function(T,$,I){for(var A=this.fin?0:2048,j,ee,re,he,Ce,Be,We,ct,Ne,rt,bt,Ot,gt,ht,xt,wt,Je,ut,Qe,Fe=this.h[0],qe=this.h[1],Ge=this.h[2],ve=this.h[3],ge=this.h[4],De=this.h[5],Pe=this.h[6],Te=this.h[7],ze=this.h[8],vt=this.h[9],Lt=this.r[0],Ft=this.r[1],$t=this.r[2],te=this.r[3],Yt=this.r[4],sn=this.r[5],un=this.r[6],jt=this.r[7],ln=this.r[8],rn=this.r[9];I>=16;)j=T[$+0]&255|(T[$+1]&255)<<8,Fe+=j&8191,ee=T[$+2]&255|(T[$+3]&255)<<8,qe+=(j>>>13|ee<<3)&8191,re=T[$+4]&255|(T[$+5]&255)<<8,Ge+=(ee>>>10|re<<6)&8191,he=T[$+6]&255|(T[$+7]&255)<<8,ve+=(re>>>7|he<<9)&8191,Ce=T[$+8]&255|(T[$+9]&255)<<8,ge+=(he>>>4|Ce<<12)&8191,De+=Ce>>>1&8191,Be=T[$+10]&255|(T[$+11]&255)<<8,Pe+=(Ce>>>14|Be<<2)&8191,We=T[$+12]&255|(T[$+13]&255)<<8,Te+=(Be>>>11|We<<5)&8191,ct=T[$+14]&255|(T[$+15]&255)<<8,ze+=(We>>>8|ct<<8)&8191,vt+=ct>>>5|A,Ne=0,rt=Ne,rt+=Fe*Lt,rt+=qe*(5*rn),rt+=Ge*(5*ln),rt+=ve*(5*jt),rt+=ge*(5*un),Ne=rt>>>13,rt&=8191,rt+=De*(5*sn),rt+=Pe*(5*Yt),rt+=Te*(5*te),rt+=ze*(5*$t),rt+=vt*(5*Ft),Ne+=rt>>>13,rt&=8191,bt=Ne,bt+=Fe*Ft,bt+=qe*Lt,bt+=Ge*(5*rn),bt+=ve*(5*ln),bt+=ge*(5*jt),Ne=bt>>>13,bt&=8191,bt+=De*(5*un),bt+=Pe*(5*sn),bt+=Te*(5*Yt),bt+=ze*(5*te),bt+=vt*(5*$t),Ne+=bt>>>13,bt&=8191,Ot=Ne,Ot+=Fe*$t,Ot+=qe*Ft,Ot+=Ge*Lt,Ot+=ve*(5*rn),Ot+=ge*(5*ln),Ne=Ot>>>13,Ot&=8191,Ot+=De*(5*jt),Ot+=Pe*(5*un),Ot+=Te*(5*sn),Ot+=ze*(5*Yt),Ot+=vt*(5*te),Ne+=Ot>>>13,Ot&=8191,gt=Ne,gt+=Fe*te,gt+=qe*$t,gt+=Ge*Ft,gt+=ve*Lt,gt+=ge*(5*rn),Ne=gt>>>13,gt&=8191,gt+=De*(5*ln),gt+=Pe*(5*jt),gt+=Te*(5*un),gt+=ze*(5*sn),gt+=vt*(5*Yt),Ne+=gt>>>13,gt&=8191,ht=Ne,ht+=Fe*Yt,ht+=qe*te,ht+=Ge*$t,ht+=ve*Ft,ht+=ge*Lt,Ne=ht>>>13,ht&=8191,ht+=De*(5*rn),ht+=Pe*(5*ln),ht+=Te*(5*jt),ht+=ze*(5*un),ht+=vt*(5*sn),Ne+=ht>>>13,ht&=8191,xt=Ne,xt+=Fe*sn,xt+=qe*Yt,xt+=Ge*te,xt+=ve*$t,xt+=ge*Ft,Ne=xt>>>13,xt&=8191,xt+=De*Lt,xt+=Pe*(5*rn),xt+=Te*(5*ln),xt+=ze*(5*jt),xt+=vt*(5*un),Ne+=xt>>>13,xt&=8191,wt=Ne,wt+=Fe*un,wt+=qe*sn,wt+=Ge*Yt,wt+=ve*te,wt+=ge*$t,Ne=wt>>>13,wt&=8191,wt+=De*Ft,wt+=Pe*Lt,wt+=Te*(5*rn),wt+=ze*(5*ln),wt+=vt*(5*jt),Ne+=wt>>>13,wt&=8191,Je=Ne,Je+=Fe*jt,Je+=qe*un,Je+=Ge*sn,Je+=ve*Yt,Je+=ge*te,Ne=Je>>>13,Je&=8191,Je+=De*$t,Je+=Pe*Ft,Je+=Te*Lt,Je+=ze*(5*rn),Je+=vt*(5*ln),Ne+=Je>>>13,Je&=8191,ut=Ne,ut+=Fe*ln,ut+=qe*jt,ut+=Ge*un,ut+=ve*sn,ut+=ge*Yt,Ne=ut>>>13,ut&=8191,ut+=De*te,ut+=Pe*$t,ut+=Te*Ft,ut+=ze*Lt,ut+=vt*(5*rn),Ne+=ut>>>13,ut&=8191,Qe=Ne,Qe+=Fe*rn,Qe+=qe*ln,Qe+=Ge*jt,Qe+=ve*un,Qe+=ge*sn,Ne=Qe>>>13,Qe&=8191,Qe+=De*Yt,Qe+=Pe*te,Qe+=Te*$t,Qe+=ze*Ft,Qe+=vt*Lt,Ne+=Qe>>>13,Qe&=8191,Ne=(Ne<<2)+Ne|0,Ne=Ne+rt|0,rt=Ne&8191,Ne=Ne>>>13,bt+=Ne,Fe=rt,qe=bt,Ge=Ot,ve=gt,ge=ht,De=xt,Pe=wt,Te=Je,ze=ut,vt=Qe,$+=16,I-=16;this.h[0]=Fe,this.h[1]=qe,this.h[2]=Ge,this.h[3]=ve,this.h[4]=ge,this.h[5]=De,this.h[6]=Pe,this.h[7]=Te,this.h[8]=ze,this.h[9]=vt},Y.prototype.finish=function(T,$){var I=new Uint16Array(10),A,j,ee,re;if(this.leftover){for(re=this.leftover,this.buffer[re++]=1;re<16;re++)this.buffer[re]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(A=this.h[1]>>>13,this.h[1]&=8191,re=2;re<10;re++)this.h[re]+=A,A=this.h[re]>>>13,this.h[re]&=8191;for(this.h[0]+=A*5,A=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=A,A=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=A,I[0]=this.h[0]+5,A=I[0]>>>13,I[0]&=8191,re=1;re<10;re++)I[re]=this.h[re]+A,A=I[re]>>>13,I[re]&=8191;for(I[9]-=8192,j=(A^1)-1,re=0;re<10;re++)I[re]&=j;for(j=~j,re=0;re<10;re++)this.h[re]=this.h[re]&j|I[re];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,ee=this.h[0]+this.pad[0],this.h[0]=ee&65535,re=1;re<8;re++)ee=(this.h[re]+this.pad[re]|0)+(ee>>>16)|0,this.h[re]=ee&65535;T[$+0]=this.h[0]>>>0&255,T[$+1]=this.h[0]>>>8&255,T[$+2]=this.h[1]>>>0&255,T[$+3]=this.h[1]>>>8&255,T[$+4]=this.h[2]>>>0&255,T[$+5]=this.h[2]>>>8&255,T[$+6]=this.h[3]>>>0&255,T[$+7]=this.h[3]>>>8&255,T[$+8]=this.h[4]>>>0&255,T[$+9]=this.h[4]>>>8&255,T[$+10]=this.h[5]>>>0&255,T[$+11]=this.h[5]>>>8&255,T[$+12]=this.h[6]>>>0&255,T[$+13]=this.h[6]>>>8&255,T[$+14]=this.h[7]>>>0&255,T[$+15]=this.h[7]>>>8&255},Y.prototype.update=function(T,$,I){var A,j;if(this.leftover){for(j=16-this.leftover,j>I&&(j=I),A=0;A=16&&(j=I-I%16,this.blocks(T,$,j),$+=j,I-=j),I){for(A=0;A>16&1),ee[I-1]&=65535;ee[15]=re[15]-32767-(ee[14]>>16&1),j=ee[15]>>16&1,ee[14]&=65535,F(re,ee,1-j)}for(I=0;I<16;I++)T[2*I]=re[I]&255,T[2*I+1]=re[I]>>8}function G(T,$){var I=new Uint8Array(32),A=new Uint8Array(32);return V(I,T),V(A,$),w(I,0,A,0)}function oe(T){var $=new Uint8Array(32);return V($,T),$[0]&1}function Q(T,$){var I;for(I=0;I<16;I++)T[I]=$[2*I]+($[2*I+1]<<8);T[15]&=32767}function X(T,$,I){for(var A=0;A<16;A++)T[A]=$[A]+I[A]}function ue(T,$,I){for(var A=0;A<16;A++)T[A]=$[A]-I[A]}function de(T,$,I){var A,j,ee=0,re=0,he=0,Ce=0,Be=0,We=0,ct=0,Ne=0,rt=0,bt=0,Ot=0,gt=0,ht=0,xt=0,wt=0,Je=0,ut=0,Qe=0,Fe=0,qe=0,Ge=0,ve=0,ge=0,De=0,Pe=0,Te=0,ze=0,vt=0,Lt=0,Ft=0,$t=0,te=I[0],Yt=I[1],sn=I[2],un=I[3],jt=I[4],ln=I[5],rn=I[6],Gn=I[7],mn=I[8],kn=I[9],Yn=I[10],Zn=I[11],xr=I[12],$r=I[13],Ir=I[14],Nr=I[15];A=$[0],ee+=A*te,re+=A*Yt,he+=A*sn,Ce+=A*un,Be+=A*jt,We+=A*ln,ct+=A*rn,Ne+=A*Gn,rt+=A*mn,bt+=A*kn,Ot+=A*Yn,gt+=A*Zn,ht+=A*xr,xt+=A*$r,wt+=A*Ir,Je+=A*Nr,A=$[1],re+=A*te,he+=A*Yt,Ce+=A*sn,Be+=A*un,We+=A*jt,ct+=A*ln,Ne+=A*rn,rt+=A*Gn,bt+=A*mn,Ot+=A*kn,gt+=A*Yn,ht+=A*Zn,xt+=A*xr,wt+=A*$r,Je+=A*Ir,ut+=A*Nr,A=$[2],he+=A*te,Ce+=A*Yt,Be+=A*sn,We+=A*un,ct+=A*jt,Ne+=A*ln,rt+=A*rn,bt+=A*Gn,Ot+=A*mn,gt+=A*kn,ht+=A*Yn,xt+=A*Zn,wt+=A*xr,Je+=A*$r,ut+=A*Ir,Qe+=A*Nr,A=$[3],Ce+=A*te,Be+=A*Yt,We+=A*sn,ct+=A*un,Ne+=A*jt,rt+=A*ln,bt+=A*rn,Ot+=A*Gn,gt+=A*mn,ht+=A*kn,xt+=A*Yn,wt+=A*Zn,Je+=A*xr,ut+=A*$r,Qe+=A*Ir,Fe+=A*Nr,A=$[4],Be+=A*te,We+=A*Yt,ct+=A*sn,Ne+=A*un,rt+=A*jt,bt+=A*ln,Ot+=A*rn,gt+=A*Gn,ht+=A*mn,xt+=A*kn,wt+=A*Yn,Je+=A*Zn,ut+=A*xr,Qe+=A*$r,Fe+=A*Ir,qe+=A*Nr,A=$[5],We+=A*te,ct+=A*Yt,Ne+=A*sn,rt+=A*un,bt+=A*jt,Ot+=A*ln,gt+=A*rn,ht+=A*Gn,xt+=A*mn,wt+=A*kn,Je+=A*Yn,ut+=A*Zn,Qe+=A*xr,Fe+=A*$r,qe+=A*Ir,Ge+=A*Nr,A=$[6],ct+=A*te,Ne+=A*Yt,rt+=A*sn,bt+=A*un,Ot+=A*jt,gt+=A*ln,ht+=A*rn,xt+=A*Gn,wt+=A*mn,Je+=A*kn,ut+=A*Yn,Qe+=A*Zn,Fe+=A*xr,qe+=A*$r,Ge+=A*Ir,ve+=A*Nr,A=$[7],Ne+=A*te,rt+=A*Yt,bt+=A*sn,Ot+=A*un,gt+=A*jt,ht+=A*ln,xt+=A*rn,wt+=A*Gn,Je+=A*mn,ut+=A*kn,Qe+=A*Yn,Fe+=A*Zn,qe+=A*xr,Ge+=A*$r,ve+=A*Ir,ge+=A*Nr,A=$[8],rt+=A*te,bt+=A*Yt,Ot+=A*sn,gt+=A*un,ht+=A*jt,xt+=A*ln,wt+=A*rn,Je+=A*Gn,ut+=A*mn,Qe+=A*kn,Fe+=A*Yn,qe+=A*Zn,Ge+=A*xr,ve+=A*$r,ge+=A*Ir,De+=A*Nr,A=$[9],bt+=A*te,Ot+=A*Yt,gt+=A*sn,ht+=A*un,xt+=A*jt,wt+=A*ln,Je+=A*rn,ut+=A*Gn,Qe+=A*mn,Fe+=A*kn,qe+=A*Yn,Ge+=A*Zn,ve+=A*xr,ge+=A*$r,De+=A*Ir,Pe+=A*Nr,A=$[10],Ot+=A*te,gt+=A*Yt,ht+=A*sn,xt+=A*un,wt+=A*jt,Je+=A*ln,ut+=A*rn,Qe+=A*Gn,Fe+=A*mn,qe+=A*kn,Ge+=A*Yn,ve+=A*Zn,ge+=A*xr,De+=A*$r,Pe+=A*Ir,Te+=A*Nr,A=$[11],gt+=A*te,ht+=A*Yt,xt+=A*sn,wt+=A*un,Je+=A*jt,ut+=A*ln,Qe+=A*rn,Fe+=A*Gn,qe+=A*mn,Ge+=A*kn,ve+=A*Yn,ge+=A*Zn,De+=A*xr,Pe+=A*$r,Te+=A*Ir,ze+=A*Nr,A=$[12],ht+=A*te,xt+=A*Yt,wt+=A*sn,Je+=A*un,ut+=A*jt,Qe+=A*ln,Fe+=A*rn,qe+=A*Gn,Ge+=A*mn,ve+=A*kn,ge+=A*Yn,De+=A*Zn,Pe+=A*xr,Te+=A*$r,ze+=A*Ir,vt+=A*Nr,A=$[13],xt+=A*te,wt+=A*Yt,Je+=A*sn,ut+=A*un,Qe+=A*jt,Fe+=A*ln,qe+=A*rn,Ge+=A*Gn,ve+=A*mn,ge+=A*kn,De+=A*Yn,Pe+=A*Zn,Te+=A*xr,ze+=A*$r,vt+=A*Ir,Lt+=A*Nr,A=$[14],wt+=A*te,Je+=A*Yt,ut+=A*sn,Qe+=A*un,Fe+=A*jt,qe+=A*ln,Ge+=A*rn,ve+=A*Gn,ge+=A*mn,De+=A*kn,Pe+=A*Yn,Te+=A*Zn,ze+=A*xr,vt+=A*$r,Lt+=A*Ir,Ft+=A*Nr,A=$[15],Je+=A*te,ut+=A*Yt,Qe+=A*sn,Fe+=A*un,qe+=A*jt,Ge+=A*ln,ve+=A*rn,ge+=A*Gn,De+=A*mn,Pe+=A*kn,Te+=A*Yn,ze+=A*Zn,vt+=A*xr,Lt+=A*$r,Ft+=A*Ir,$t+=A*Nr,ee+=38*ut,re+=38*Qe,he+=38*Fe,Ce+=38*qe,Be+=38*Ge,We+=38*ve,ct+=38*ge,Ne+=38*De,rt+=38*Pe,bt+=38*Te,Ot+=38*ze,gt+=38*vt,ht+=38*Lt,xt+=38*Ft,wt+=38*$t,j=1,A=ee+j+65535,j=Math.floor(A/65536),ee=A-j*65536,A=re+j+65535,j=Math.floor(A/65536),re=A-j*65536,A=he+j+65535,j=Math.floor(A/65536),he=A-j*65536,A=Ce+j+65535,j=Math.floor(A/65536),Ce=A-j*65536,A=Be+j+65535,j=Math.floor(A/65536),Be=A-j*65536,A=We+j+65535,j=Math.floor(A/65536),We=A-j*65536,A=ct+j+65535,j=Math.floor(A/65536),ct=A-j*65536,A=Ne+j+65535,j=Math.floor(A/65536),Ne=A-j*65536,A=rt+j+65535,j=Math.floor(A/65536),rt=A-j*65536,A=bt+j+65535,j=Math.floor(A/65536),bt=A-j*65536,A=Ot+j+65535,j=Math.floor(A/65536),Ot=A-j*65536,A=gt+j+65535,j=Math.floor(A/65536),gt=A-j*65536,A=ht+j+65535,j=Math.floor(A/65536),ht=A-j*65536,A=xt+j+65535,j=Math.floor(A/65536),xt=A-j*65536,A=wt+j+65535,j=Math.floor(A/65536),wt=A-j*65536,A=Je+j+65535,j=Math.floor(A/65536),Je=A-j*65536,ee+=j-1+37*(j-1),j=1,A=ee+j+65535,j=Math.floor(A/65536),ee=A-j*65536,A=re+j+65535,j=Math.floor(A/65536),re=A-j*65536,A=he+j+65535,j=Math.floor(A/65536),he=A-j*65536,A=Ce+j+65535,j=Math.floor(A/65536),Ce=A-j*65536,A=Be+j+65535,j=Math.floor(A/65536),Be=A-j*65536,A=We+j+65535,j=Math.floor(A/65536),We=A-j*65536,A=ct+j+65535,j=Math.floor(A/65536),ct=A-j*65536,A=Ne+j+65535,j=Math.floor(A/65536),Ne=A-j*65536,A=rt+j+65535,j=Math.floor(A/65536),rt=A-j*65536,A=bt+j+65535,j=Math.floor(A/65536),bt=A-j*65536,A=Ot+j+65535,j=Math.floor(A/65536),Ot=A-j*65536,A=gt+j+65535,j=Math.floor(A/65536),gt=A-j*65536,A=ht+j+65535,j=Math.floor(A/65536),ht=A-j*65536,A=xt+j+65535,j=Math.floor(A/65536),xt=A-j*65536,A=wt+j+65535,j=Math.floor(A/65536),wt=A-j*65536,A=Je+j+65535,j=Math.floor(A/65536),Je=A-j*65536,ee+=j-1+37*(j-1),T[0]=ee,T[1]=re,T[2]=he,T[3]=Ce,T[4]=Be,T[5]=We,T[6]=ct,T[7]=Ne,T[8]=rt,T[9]=bt,T[10]=Ot,T[11]=gt,T[12]=ht,T[13]=xt,T[14]=wt,T[15]=Je}function Se(T,$){de(T,$,$)}function me(T,$){var I=n(),A;for(A=0;A<16;A++)I[A]=$[A];for(A=253;A>=0;A--)Se(I,I),A!==2&&A!==4&&de(I,I,$);for(A=0;A<16;A++)T[A]=I[A]}function Ze(T,$){var I=n(),A;for(A=0;A<16;A++)I[A]=$[A];for(A=250;A>=0;A--)Se(I,I),A!==1&&de(I,I,$);for(A=0;A<16;A++)T[A]=I[A]}function Ae(T,$,I){var A=new Uint8Array(32),j=new Float64Array(80),ee,re,he=n(),Ce=n(),Be=n(),We=n(),ct=n(),Ne=n();for(re=0;re<31;re++)A[re]=$[re];for(A[31]=$[31]&127|64,A[0]&=248,Q(j,I),re=0;re<16;re++)Ce[re]=j[re],We[re]=he[re]=Be[re]=0;for(he[0]=We[0]=1,re=254;re>=0;--re)ee=A[re>>>3]>>>(re&7)&1,F(he,Ce,ee),F(Be,We,ee),X(ct,he,Be),ue(he,he,Be),X(Be,Ce,We),ue(Ce,Ce,We),Se(We,ct),Se(Ne,he),de(he,Be,he),de(Be,Ce,ct),X(ct,he,Be),ue(he,he,Be),Se(Ce,he),ue(Be,We,Ne),de(he,Be,u),X(he,he,We),de(Be,Be,he),de(he,We,Ne),de(We,Ce,j),Se(Ce,ct),F(he,Ce,ee),F(Be,We,ee);for(re=0;re<16;re++)j[re+16]=he[re],j[re+32]=Be[re],j[re+48]=Ce[re],j[re+64]=We[re];var rt=j.subarray(32),bt=j.subarray(16);return me(rt,rt),de(bt,bt,rt),V(T,bt),0}function Le(T,$){return Ae(T,$,o)}function $e(T,$){return r($,32),Le(T,$)}function be(T,$,I){var A=new Uint8Array(32);return Ae(A,I,$),E(T,i,A,C)}var yt=Z,lt=R;function Nt(T,$,I,A,j,ee){var re=new Uint8Array(32);return be(re,j,ee),yt(T,$,I,A,re)}function yn(T,$,I,A,j,ee){var re=new Uint8Array(32);return be(re,j,ee),lt(T,$,I,A,re)}var nn=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ie(T,$,I,A){for(var j=new Int32Array(16),ee=new Int32Array(16),re,he,Ce,Be,We,ct,Ne,rt,bt,Ot,gt,ht,xt,wt,Je,ut,Qe,Fe,qe,Ge,ve,ge,De,Pe,Te,ze,vt=T[0],Lt=T[1],Ft=T[2],$t=T[3],te=T[4],Yt=T[5],sn=T[6],un=T[7],jt=$[0],ln=$[1],rn=$[2],Gn=$[3],mn=$[4],kn=$[5],Yn=$[6],Zn=$[7],xr=0;A>=128;){for(qe=0;qe<16;qe++)Ge=8*qe+xr,j[qe]=I[Ge+0]<<24|I[Ge+1]<<16|I[Ge+2]<<8|I[Ge+3],ee[qe]=I[Ge+4]<<24|I[Ge+5]<<16|I[Ge+6]<<8|I[Ge+7];for(qe=0;qe<80;qe++)if(re=vt,he=Lt,Ce=Ft,Be=$t,We=te,ct=Yt,Ne=sn,rt=un,bt=jt,Ot=ln,gt=rn,ht=Gn,xt=mn,wt=kn,Je=Yn,ut=Zn,ve=un,ge=Zn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=(te>>>14|mn<<18)^(te>>>18|mn<<14)^(mn>>>9|te<<23),ge=(mn>>>14|te<<18)^(mn>>>18|te<<14)^(te>>>9|mn<<23),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=te&Yt^~te&sn,ge=mn&kn^~mn&Yn,De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=nn[qe*2],ge=nn[qe*2+1],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=j[qe%16],ge=ee[qe%16],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,Qe=Te&65535|ze<<16,Fe=De&65535|Pe<<16,ve=Qe,ge=Fe,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=(vt>>>28|jt<<4)^(jt>>>2|vt<<30)^(jt>>>7|vt<<25),ge=(jt>>>28|vt<<4)^(vt>>>2|jt<<30)^(vt>>>7|jt<<25),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=vt&Lt^vt&Ft^Lt&Ft,ge=jt&ln^jt&rn^ln&rn,De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,rt=Te&65535|ze<<16,ut=De&65535|Pe<<16,ve=Be,ge=ht,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=Qe,ge=Fe,De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,Be=Te&65535|ze<<16,ht=De&65535|Pe<<16,Lt=re,Ft=he,$t=Ce,te=Be,Yt=We,sn=ct,un=Ne,vt=rt,ln=bt,rn=Ot,Gn=gt,mn=ht,kn=xt,Yn=wt,Zn=Je,jt=ut,qe%16===15)for(Ge=0;Ge<16;Ge++)ve=j[Ge],ge=ee[Ge],De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=j[(Ge+9)%16],ge=ee[(Ge+9)%16],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Qe=j[(Ge+1)%16],Fe=ee[(Ge+1)%16],ve=(Qe>>>1|Fe<<31)^(Qe>>>8|Fe<<24)^Qe>>>7,ge=(Fe>>>1|Qe<<31)^(Fe>>>8|Qe<<24)^(Fe>>>7|Qe<<25),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Qe=j[(Ge+14)%16],Fe=ee[(Ge+14)%16],ve=(Qe>>>19|Fe<<13)^(Fe>>>29|Qe<<3)^Qe>>>6,ge=(Fe>>>19|Qe<<13)^(Qe>>>29|Fe<<3)^(Fe>>>6|Qe<<26),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,j[Ge]=Te&65535|ze<<16,ee[Ge]=De&65535|Pe<<16;ve=vt,ge=jt,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[0],ge=$[0],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[0]=vt=Te&65535|ze<<16,$[0]=jt=De&65535|Pe<<16,ve=Lt,ge=ln,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[1],ge=$[1],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[1]=Lt=Te&65535|ze<<16,$[1]=ln=De&65535|Pe<<16,ve=Ft,ge=rn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[2],ge=$[2],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[2]=Ft=Te&65535|ze<<16,$[2]=rn=De&65535|Pe<<16,ve=$t,ge=Gn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[3],ge=$[3],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[3]=$t=Te&65535|ze<<16,$[3]=Gn=De&65535|Pe<<16,ve=te,ge=mn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[4],ge=$[4],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[4]=te=Te&65535|ze<<16,$[4]=mn=De&65535|Pe<<16,ve=Yt,ge=kn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[5],ge=$[5],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[5]=Yt=Te&65535|ze<<16,$[5]=kn=De&65535|Pe<<16,ve=sn,ge=Yn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[6],ge=$[6],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[6]=sn=Te&65535|ze<<16,$[6]=Yn=De&65535|Pe<<16,ve=un,ge=Zn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[7],ge=$[7],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[7]=un=Te&65535|ze<<16,$[7]=Zn=De&65535|Pe<<16,xr+=128,A-=128}return A}function pe(T,$,I){var A=new Int32Array(8),j=new Int32Array(8),ee=new Uint8Array(256),re,he=I;for(A[0]=1779033703,A[1]=3144134277,A[2]=1013904242,A[3]=2773480762,A[4]=1359893119,A[5]=2600822924,A[6]=528734635,A[7]=1541459225,j[0]=4089235720,j[1]=2227873595,j[2]=4271175723,j[3]=1595750129,j[4]=2917565137,j[5]=725511199,j[6]=4215389547,j[7]=327033209,ie(A,j,$,I),I%=128,re=0;re=0;--j)A=I[j/8|0]>>(j&7)&1,Ue(T,$,A),ye($,T),ye(T,T),Ue(T,$,A)}function nt(T,$){var I=[n(),n(),n(),n()];B(I[0],f),B(I[1],h),B(I[2],s),de(I[3],f,h),ke(T,I,$)}function mt(T,$,I){var A=new Uint8Array(64),j=[n(),n(),n(),n()],ee;for(I||r($,32),pe(A,$,32),A[0]&=248,A[31]&=127,A[31]|=64,nt(j,A),je(T,j),ee=0;ee<32;ee++)$[ee+32]=T[ee];return 0}var xn=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Wt(T,$){var I,A,j,ee;for(A=63;A>=32;--A){for(I=0,j=A-32,ee=A-12;j>4)*xn[j],I=$[j]>>8,$[j]&=255;for(j=0;j<32;j++)$[j]-=I*xn[j];for(A=0;A<32;A++)$[A+1]+=$[A]>>8,T[A]=$[A]&255}function wn(T){var $=new Float64Array(64),I;for(I=0;I<64;I++)$[I]=T[I];for(I=0;I<64;I++)T[I]=0;Wt(T,$)}function Ii(T,$,I,A){var j=new Uint8Array(64),ee=new Uint8Array(64),re=new Uint8Array(64),he,Ce,Be=new Float64Array(64),We=[n(),n(),n(),n()];pe(j,A,32),j[0]&=248,j[31]&=127,j[31]|=64;var ct=I+64;for(he=0;he>7&&ue(T[0],a,T[0]),de(T[3],T[0],T[1]),0)}function yi(T,$,I,A){var j,ee=new Uint8Array(32),re=new Uint8Array(64),he=[n(),n(),n(),n()],Ce=[n(),n(),n(),n()];if(I<64||br(Ce,A))return-1;for(j=0;j=0},t.sign.keyPair=function(){var T=new Uint8Array(ur),$=new Uint8Array(Xr);return mt(T,$),{publicKey:T,secretKey:$}},t.sign.keyPair.fromSecretKey=function(T){if(le(T),T.length!==Xr)throw new Error("bad secret key size");for(var $=new Uint8Array(ur),I=0;I<$.length;I++)$[I]=T[32+I];return{publicKey:$,secretKey:new Uint8Array(T)}},t.sign.keyPair.fromSeed=function(T){if(le(T),T.length!==xo)throw new Error("bad seed size");for(var $=new Uint8Array(ur),I=new Uint8Array(Xr),A=0;A<32;A++)I[A]=T[A];return mt($,I,!0),{publicKey:$,secretKey:I}},t.sign.publicKeyLength=ur,t.sign.secretKeyLength=Xr,t.sign.seedLength=xo,t.sign.signatureLength=Kn,t.hash=function(T){le(T);var $=new Uint8Array(Xl);return pe($,T,T.length),$},t.hash.hashLength=Xl,t.verify=function(T,$){return le(T,$),T.length===0||$.length===0||T.length!==$.length?!1:v(T,0,$,0,T.length)===0},t.setPRNG=function(T){r=T},function(){var T=typeof self<"u"?self.crypto||self.msCrypto:null;if(T&&T.getRandomValues){var $=65536;t.setPRNG(function(I,A){var j,ee=new Uint8Array(A);for(j=0;j"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(r){return Buffer.from(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(Buffer.from(r,"base64"),0))}):(t.encodeBase64=function(r){return new Buffer(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0))}):(t.encodeBase64=function(r){var i,o=[],a=r.length;for(i=0;i{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:l,form:c,...f}=e,[h,p]=y.useState(null),m=Gt(t,O=>p(O)),v=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Za({prop:i,defaultProp:o,onChange:l}),S=y.useRef(w);return y.useEffect(()=>{const O=h?.form;if(O){const E=()=>x(S.current);return O.addEventListener("reset",E),()=>O.removeEventListener("reset",E)}},[h,x]),L.jsxs(hYe,{scope:n,state:w,disabled:s,children:[L.jsx(pt.button,{type:"button",role:"checkbox","aria-checked":Cl(w)?"mixed":w,"aria-required":a,"data-state":TZ(w),"data-disabled":s?"":void 0,disabled:s,value:u,...f,ref:m,onKeyDown:Ye(e.onKeyDown,O=>{O.key==="Enter"&&O.preventDefault()}),onClick:Ye(e.onClick,O=>{x(E=>Cl(E)?!0:!E),b&&(v.current=O.isPropagationStopped(),v.current||O.stopPropagation())})}),b&&L.jsx(gYe,{control:h,bubbles:!v.current,name:r,value:u,checked:w,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"},defaultChecked:Cl(o)?!1:o})]})});AZ.displayName=j5;var PZ="CheckboxIndicator",kZ=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=pYe(PZ,n);return L.jsx(Gr,{present:r||Cl(o.state)||o.state===!0,children:L.jsx(pt.span,{"data-state":TZ(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});kZ.displayName=PZ;var gYe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,a=y.useRef(null),s=GP(n),u=bA(t);y.useEffect(()=>{const c=a.current,f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&p){const m=new Event("click",{bubbles:r});c.indeterminate=Cl(n),p.call(c,Cl(n)?!1:n),c.dispatchEvent(m)}},[s,n,r]);const l=y.useRef(Cl(n)?!1:n);return L.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??l.current,...o,tabIndex:-1,ref:a,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Cl(e){return e==="indeterminate"}function TZ(e){return Cl(e)?"indeterminate":e?"checked":"unchecked"}var xJe=AZ,wJe=kZ,R4={exports:{}};(function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof ao<"u"&&ao,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s=typeof o<"u"&&o||typeof self<"u"&&self||typeof s<"u"&&s,u={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function l(R){return R&&DataView.prototype.isPrototypeOf(R)}if(u.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(R){return R&&c.indexOf(Object.prototype.toString.call(R))>-1};function h(R){if(typeof R!="string"&&(R=String(R)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(R)||R==="")throw new TypeError('Invalid character in header field name: "'+R+'"');return R.toLowerCase()}function p(R){return typeof R!="string"&&(R=String(R)),R}function m(R){var B={next:function(){var U=R.shift();return{done:U===void 0,value:U}}};return u.iterable&&(B[Symbol.iterator]=function(){return B}),B}function v(R){this.map={},R instanceof v?R.forEach(function(B,U){this.append(U,B)},this):Array.isArray(R)?R.forEach(function(B){this.append(B[0],B[1])},this):R&&Object.getOwnPropertyNames(R).forEach(function(B){this.append(B,R[B])},this)}v.prototype.append=function(R,B){R=h(R),B=p(B);var U=this.map[R];this.map[R]=U?U+", "+B:B},v.prototype.delete=function(R){delete this.map[h(R)]},v.prototype.get=function(R){return R=h(R),this.has(R)?this.map[R]:null},v.prototype.has=function(R){return this.map.hasOwnProperty(h(R))},v.prototype.set=function(R,B){this.map[h(R)]=p(B)},v.prototype.forEach=function(R,B){for(var U in this.map)this.map.hasOwnProperty(U)&&R.call(B,this.map[U],U,this)},v.prototype.keys=function(){var R=[];return this.forEach(function(B,U){R.push(U)}),m(R)},v.prototype.values=function(){var R=[];return this.forEach(function(B){R.push(B)}),m(R)},v.prototype.entries=function(){var R=[];return this.forEach(function(B,U){R.push([U,B])}),m(R)},u.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function b(R){if(R.bodyUsed)return Promise.reject(new TypeError("Already read"));R.bodyUsed=!0}function w(R){return new Promise(function(B,U){R.onload=function(){B(R.result)},R.onerror=function(){U(R.error)}})}function x(R){var B=new FileReader,U=w(B);return B.readAsArrayBuffer(R),U}function S(R){var B=new FileReader,U=w(B);return B.readAsText(R),U}function O(R){for(var B=new Uint8Array(R),U=new Array(B.length),F=0;F-1?B:R}function N(R,B){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');B=B||{};var U=B.body;if(R instanceof N){if(R.bodyUsed)throw new TypeError("Already read");this.url=R.url,this.credentials=R.credentials,B.headers||(this.headers=new v(R.headers)),this.method=R.method,this.mode=R.mode,this.signal=R.signal,!U&&R._bodyInit!=null&&(U=R._bodyInit,R.bodyUsed=!0)}else this.url=String(R);if(this.credentials=B.credentials||this.credentials||"same-origin",(B.headers||!this.headers)&&(this.headers=new v(B.headers)),this.method=M(B.method||this.method||"GET"),this.mode=B.mode||this.mode||null,this.signal=B.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&U)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(U),(this.method==="GET"||this.method==="HEAD")&&(B.cache==="no-store"||B.cache==="no-cache")){var F=/([?&])_=[^&]*/;if(F.test(this.url))this.url=this.url.replace(F,"$1_="+new Date().getTime());else{var V=/\?/;this.url+=(V.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}N.prototype.clone=function(){return new N(this,{body:this._bodyInit})};function q(R){var B=new FormData;return R.trim().split("&").forEach(function(U){if(U){var F=U.split("="),V=F.shift().replace(/\+/g," "),G=F.join("=").replace(/\+/g," ");B.append(decodeURIComponent(V),decodeURIComponent(G))}}),B}function Y(R){var B=new v,U=R.replace(/\r?\n[\t ]+/g," ");return U.split("\r").map(function(F){return F.indexOf(` -`)===0?F.substr(1,F.length):F}).forEach(function(F){var V=F.split(":"),G=V.shift().trim();if(G){var oe=V.join(":").trim();B.append(G,oe)}}),B}C.call(N.prototype);function W(R,B){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');B||(B={}),this.type="default",this.status=B.status===void 0?200:B.status,this.ok=this.status>=200&&this.status<300,this.statusText=B.statusText===void 0?"":""+B.statusText,this.headers=new v(B.headers),this.url=B.url||"",this._initBody(R)}C.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},W.error=function(){var R=new W(null,{status:0,statusText:""});return R.type="error",R};var ne=[301,302,303,307,308];W.redirect=function(R,B){if(ne.indexOf(B)===-1)throw new RangeError("Invalid status code");return new W(null,{status:B,headers:{location:R}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(B,U){this.message=B,this.name=U;var F=Error(B);this.stack=F.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function Z(R,B){return new Promise(function(U,F){var V=new N(R,B);if(V.signal&&V.signal.aborted)return F(new a.DOMException("Aborted","AbortError"));var G=new XMLHttpRequest;function oe(){G.abort()}G.onload=function(){var X={status:G.status,statusText:G.statusText,headers:Y(G.getAllResponseHeaders()||"")};X.url="responseURL"in G?G.responseURL:X.headers.get("X-Request-URL");var ue="response"in G?G.response:G.responseText;setTimeout(function(){U(new W(ue,X))},0)},G.onerror=function(){setTimeout(function(){F(new TypeError("Network request failed"))},0)},G.ontimeout=function(){setTimeout(function(){F(new TypeError("Network request failed"))},0)},G.onabort=function(){setTimeout(function(){F(new a.DOMException("Aborted","AbortError"))},0)};function Q(X){try{return X===""&&s.location.href?s.location.href:X}catch{return X}}G.open(V.method,Q(V.url),!0),V.credentials==="include"?G.withCredentials=!0:V.credentials==="omit"&&(G.withCredentials=!1),"responseType"in G&&(u.blob?G.responseType="blob":u.arrayBuffer&&V.headers.get("Content-Type")&&V.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(G.responseType="arraybuffer")),B&&typeof B.headers=="object"&&!(B.headers instanceof v)?Object.getOwnPropertyNames(B.headers).forEach(function(X){G.setRequestHeader(X,p(B.headers[X]))}):V.headers.forEach(function(X,ue){G.setRequestHeader(ue,X)}),V.signal&&(V.signal.addEventListener("abort",oe),G.onreadystatechange=function(){G.readyState===4&&V.signal.removeEventListener("abort",oe)}),G.send(typeof V._bodyInit>"u"?null:V._bodyInit)})}return Z.polyfill=!0,s.fetch||(s.fetch=Z,s.Headers=v,s.Request=N,s.Response=W),a.Headers=v,a.Request=N,a.Response=W,a.fetch=Z,a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(R4,R4.exports);var MZ=R4.exports;const mYe=En(MZ),vYe=D4({__proto__:null,default:mYe},[MZ]);export{MZe as $,_Ze as A,xhe as B,xZe as C,EYe as D,wZe as E,bZe as F,SZe as G,$ge as H,VYe as I,Lge as J,Fge as K,Dz as L,$Ze as M,Bge as N,bYe as O,CYe as P,fZe as Q,z as R,Pl as S,jge as T,Ige as U,Nge as V,NYe as W,KZe as X,ume as Y,lme as Z,sXe as _,AYe as a,TQe as a$,uXe as a0,QZe as a1,JZe as a2,nXe as a3,rXe as a4,oXe as a5,AZe as a6,iXe as a7,NZe as a8,tXe as a9,rZe as aA,tZe as aB,oZe as aC,KYe as aD,IYe as aE,mXe as aF,BZe as aG,GXe as aH,iQe as aI,rQe as aJ,GYe as aK,eZe as aL,aQe as aM,sQe as aN,uQe as aO,OYe as aP,hQe as aQ,pQe as aR,gQe as aS,dQe as aT,vQe as aU,bQe as aV,yQe as aW,xQe as aX,kZe as aY,kQe as aZ,RZe as a_,aXe as aa,ZZe as ab,XZe as ac,eXe as ad,cXe as ae,pXe as af,fXe as ag,dXe as ah,yZe as ai,_Ye as aj,$Ye as ak,FYe as al,JYe as am,kYe as an,jYe as ao,YYe as ap,LYe as aq,HYe as ar,QYe as as,XYe as at,WYe as au,ZYe as av,DYe as aw,MYe as ax,BYe as ay,iZe as az,bm as b,gZe as b$,wQe as b0,_Qe as b1,SQe as b2,EQe as b3,OQe as b4,PQe as b5,AQe as b6,MQe as b7,CQe as b8,$Qe as b9,UQe as bA,HQe as bB,VQe as bC,SHe as bD,kHe as bE,BQe as bF,VXe as bG,vXe as bH,wXe as bI,bXe as bJ,RQe as bK,Ui as bL,qQe as bM,KQe as bN,UXe as bO,XXe as bP,KXe as bQ,IXe as bR,TXe as bS,kXe as bT,GQe as bU,RYe as bV,nZe as bW,qYe as bX,TYe as bY,ZQe as bZ,XQe as b_,TZe as ba,FQe as bb,jQe as bc,NQe as bd,LQe as be,m3 as bf,pZe as bg,Cf as bh,CXe as bi,lQe as bj,cQe as bk,VP as bl,WP as bm,RLe as bn,Js as bo,_f as bp,ip as bq,DQe as br,yXe as bs,_Xe as bt,HXe as bu,SXe as bv,tQe as bw,eQe as bx,NXe as by,JXe as bz,dn as c,qXe as c0,LZe as c1,FZe as c2,iJe as c3,aJe as c4,MXe as c5,xXe as c6,fJe as c7,dJe as c8,gJe as c9,vJe as cA,yJe as cB,YXe as cC,DXe as cD,LXe as cE,WXe as cF,$Xe as cG,ZXe as cH,jXe as cI,xJe as cJ,wJe as cK,DZe as cL,WZe as cM,PZe as cN,IZe as cO,VZe as cP,FXe as cQ,SYe as cR,OXe as cS,yHe as cT,zZe as cU,RXe as cV,EXe as cW,mJe as ca,hJe as cb,pJe as cc,uJe as cd,lJe as ce,cJe as cf,jZe as cg,UZe as ch,QXe as ci,oJe as cj,QQe as ck,tJe as cl,nJe as cm,rJe as cn,zXe as co,AXe as cp,PXe as cq,nQe as cr,es as cs,yr as ct,BXe as cu,JQe as cv,eJe as cw,HZe as cx,tf as cy,hXe as cz,xYe as d,Kr as e,lZe as f,sZe as g,uZe as h,aZe as i,L as j,Yi as k,$he as l,vZe as m,Qk as n,hZe as o,wYe as p,cZe as q,y as r,CZe as s,PYe as t,tj as u,XO as v,UYe as w,zYe as x,OZe as y,EZe as z}; +`:">",o};ip.prototype.renderInline=function(e,t,n){let r="";const i=this.rules;for(let o=0,a=e.length;o=0&&(r=this.attrs[n][1]),r};is.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function HY(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}HY.prototype.Token=is;const jKe=/\r\n?|\n/g,BKe=/\0/g;function zKe(e){let t;t=e.src.replace(jKe,` +`),t=t.replace(BKe,"�"),e.src=t}function UKe(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function VKe(e){const t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function HKe(e){return/^<\/a\s*>/i.test(e)}function KKe(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;a--){const s=i[a];if(s.type==="link_close"){for(a--;i[a].level!==s.level&&i[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(WKe(s.content)&&o>0&&o--,HKe(s.content)&&o++),!(o>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const u=s.content;let l=e.md.linkify.match(u);const c=[];let f=s.level,h=0;l.length>0&&l[0].index===0&&a>0&&i[a-1].type==="text_special"&&(l=l.slice(1));for(let p=0;ph){const E=new e.Token("text","",0);E.content=u.slice(h,w),E.level=f,c.push(E)}const x=new e.Token("link_open","a",1);x.attrs=[["href",v]],x.level=f++,x.markup="linkify",x.info="auto",c.push(x);const S=new e.Token("text","",0);S.content=b,S.level=f,c.push(S);const O=new e.Token("link_close","a",-1);O.level=--f,O.markup="linkify",O.info="auto",c.push(O),h=l[p].lastIndex}if(h=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(GKe,ZKe)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function QKe(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&KY.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function JKe(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(qKe.test(e.tokens[t].content)&&XKe(e.tokens[t].children),KY.test(e.tokens[t].content)&&QKe(e.tokens[t].children))}const eqe=/['"]/,oN=/['"]/g,aN="’";function Ry(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function tqe(e,t){let n;const r=[];for(let i=0;i=0&&!(r[n].level<=a);n--);if(r.length=n+1,o.type!=="text")continue;let s=o.content,u=0,l=s.length;e:for(;u=0)m=s.charCodeAt(c.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let v=32;if(u=48&&m<=57&&(h=f=!1),f&&h&&(f=b,h=w),!f&&!h){p&&(o.content=Ry(o.content,c.index,aN));continue}if(h)for(n=r.length-1;n>=0;n--){let O=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!eqe.test(e.tokens[t].content)||tqe(e.tokens[t].children,e)}function rqe(e){let t,n;const r=e.tokens,i=r.length;for(let o=0;o0&&this.level++,this.tokens.push(r),r};Ns.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Ns.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!Hn(this.src.charCodeAt(--t)))return t+1;return t};Ns.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Ns.prototype.getLines=function(t,n,r,i){if(t>=n)return"";const o=new Array(n-t);for(let a=0,s=t;sr?o[a]=new Array(u-r+1).join(" ")+this.src.slice(c,f):o[a]=this.src.slice(c,f)}return o.join("")};Ns.prototype.Token=is;const iqe=65536;function M3(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function sN(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),o=!1,a=0,s="";for(;rn)return!1;let i=t+1;if(e.sCount[i]=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58&&!Hn(s)||a===45&&Hn(s))return!1;for(;o=4)return!1;l=sN(u),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const f=l.length;if(f===0||f!==c.length)return!1;if(r)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),v=[t,0];m.map=v;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let O=0;O=4||(l=sN(u),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),S+=f-l.length,S>iqe))break;if(i===t+2){const C=e.push("tbody_open","tbody",1);C.map=x=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[i,i+1];for(let C=0;C=4){r++,i=r;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+` +`,o.map=[t,e.line],!0}function sqe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let s=i;i=e.skipChars(i,a);let u=i-s;if(u<3)return!1;const l=e.src.slice(s,i),c=e.src.slice(i,o);if(a===96&&c.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let f=t,h=!1;for(;f++,!(f>=n||(i=s=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i=4)&&(i=e.skipChars(i,a),!(i-s=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const s=[],u=[],l=[],c=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m=o)break;if(e.src.charCodeAt(i++)===62&&!S){let E=e.sCount[m]+1,C,k;e.src.charCodeAt(i)===32?(i++,E++,k=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[m]+E)%4===3?(i++,E++,k=!1):k=!0):C=!1;let M=E;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i=o,u.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(C?1:0),l.push(e.sCount[m]),e.sCount[m]=M-E,c.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let O=!1;for(let E=0,C=f.length;E";const w=[t,0];b.map=w,e.md.block.tokenize(e,t,m);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=a,e.parentType=h,w[1]=e.line;for(let S=0;S=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;o=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]=e.blkIndent&&(c=!0);let f,h,p;if((p=lN(e,u))>=0){if(f=!0,a=e.bMarks[u]+e.tShift[u],h=Number(e.src.slice(a,p-1)),c&&h!==1)return!1}else if((p=uN(e,u))>=0)f=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[u])return!1;if(r)return!0;const m=e.src.charCodeAt(p-1),v=e.tokens.length;f?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const b=[u,0];s.map=b,s.markup=String.fromCharCode(m);let w=!1;const x=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";u=i?k=1:k=E-O,k>4&&(k=1);const M=O+k;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const N=[u,0];s.map=N,f&&(s.info=e.src.slice(a,p-1));const z=e.tight,H=e.tShift[u],V=e.sCount[u],ne=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[u]=C-e.bMarks[u],e.sCount[u]=E,C>=i&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||w)&&(l=!1),w=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ne,e.tShift[u]=H,e.sCount[u]=V,e.tight=z,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),u=e.line,N[1]=u,u>=n||e.sCount[u]=4)break;let Z=!1;for(let G=0,q=x.length;G=4||e.src.charCodeAt(i)!==91)return!1;function s(x){const S=e.lineMax;if(x>=S||e.isEmpty(x))return null;let O=!1;if(e.sCount[x]-e.blkIndent>3&&(O=!0),e.sCount[x]<0&&(O=!0),!O){const k=e.md.block.ruler.getRules("reference"),M=e.parentType;e.parentType="reference";let N=!1;for(let z=0,H=k.length;z"u"&&(e.env.references={}),typeof e.env.references[w]>"u"&&(e.env.references[w]={title:b,href:f}),e.line=a),!0):!1}const hqe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],pqe="[a-zA-Z_:][a-zA-Z0-9:._-]*",gqe="[^\"'=<>`\\x00-\\x20]+",mqe="'[^']*'",vqe='"[^"]*"',yqe="(?:"+gqe+"|"+mqe+"|"+vqe+")",bqe="(?:\\s+"+pqe+"(?:\\s*=\\s*"+yqe+")?)",qY="<[A-Za-z][A-Za-z0-9\\-]*"+bqe+"*\\s*\\/?>",GY="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",xqe="",wqe="<[?][\\s\\S]*?[?]>",_qe="]*>",Sqe="",Cqe=new RegExp("^(?:"+qY+"|"+GY+"|"+xqe+"|"+wqe+"|"+_qe+"|"+Sqe+")"),Eqe=new RegExp("^(?:"+qY+"|"+GY+")"),Jf=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Eqe.source+"\\s*$"),/^$/,!1]];function Oqe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),s=0;for(;s=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let s=1;for(a=e.src.charCodeAt(++i);a===35&&i6||ii&&Hn(e.src.charCodeAt(u-1))&&(o=u),e.line=t+1;const l=e.push("heading_open","h"+String(s),1);l.markup="########".slice(0,s),l.map=[t,e.line];const c=e.push("inline","",0);c.content=e.src.slice(i,o).trim(),c.map=[t,e.line],c.children=[];const f=e.push("heading_close","h"+String(s),-1);return f.markup="########".slice(0,s),!0}function Pqe(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,s=t+1;for(;s3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s];const m=e.eMarks[s];if(p=m))){o=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=r.length;p3||e.sCount[o]<0)continue;let l=!1;for(let c=0,f=r.length;c=n||e.sCount[a]=o){e.line=n;break}const u=e.line;let l=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};qm.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(Rqe);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let s=a.url;if(s.length<=o.length)return!1;s=s.replace(/\*+$/,"");const u=e.md.normalizeLink(s);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const l=e.push("link_open","a",1);l.attrs=[["href",u]],l.markup="linkify",l.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=s.length-o.length,!0}function $qe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let o=r-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){A5[e.charCodeAt(0)]=1});function Iqe(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&s<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const s=e.push("text_special","",0);i<256&&A5[i]!==0?s.content=o:s.content=a,s.markup=a,s.info="escape"}return e.pos=n+1,!0}function Nqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n=0;r--){const i=t[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===o.token+1,s=String.fromCharCode(i.marker),u=e.tokens[i.token];u.type=a?"strong_open":"em_open",u.tag=a?"strong":"em",u.nesting=1,u.markup=a?s+s:s,u.content="";const l=e.tokens[o.token];l.type=a?"strong_close":"em_close",l.tag=a?"strong":"em",l.nesting=-1,l.markup=a?s+s:s,l.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--)}}function Bqe(e){const t=e.tokens_meta,n=e.tokens_meta.length;fN(e,e.delimiters);for(let r=0;r=f)return!1;if(u=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?m=i.pos:a="",u=m;m=f||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(typeof e.env.references>"u")return!1;if(m=0?r=e.src.slice(u,m++):m=p+1):m=p+1,r||(r=e.src.slice(h,p)),o=e.env.references[b2(r)],!o)return e.pos=c,!1;a=o.href,s=o.title}if(!t){e.pos=h,e.posMax=p;const v=e.push("link_open","a",1),b=[["href",a]];v.attrs=b,s&&b.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=f,!0}function Uqe(e,t){let n,r,i,o,a,s,u,l,c="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(o=m+1,o=h)return!1;for(l=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(c=e.md.normalizeLink(s.str),e.md.validateLink(c)?o=s.pos:c=""),l=o;o=h||e.src.charCodeAt(o)!==41)return e.pos=f,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?i=e.src.slice(l,o++):o=m+1):o=m+1,i||(i=e.src.slice(p,m)),a=e.env.references[b2(i)],!a)return e.pos=f,!1;c=a.href,u=a.title}if(!t){r=e.src.slice(p,m);const v=[];e.md.inline.parse(r,e.md,e.env,v);const b=e.push("image","img",0),w=[["src",c],["alt",""]];b.attrs=w,b.children=v,b.content=r,u&&w.push(["title",u])}return e.pos=o,e.posMax=h,!0}const Vqe=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Wqe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Hqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(r+1,n);if(Wqe.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}if(Vqe.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}return!1}function Kqe(e){return/^\s]/i.test(e)}function qqe(e){return/^<\/a\s*>/i.test(e)}function Gqe(e){const t=e|32;return t>=97&&t<=122}function Yqe(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!Gqe(i))return!1;const o=e.src.slice(r).match(Cqe);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],Kqe(a.content)&&e.linkLevel++,qqe(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const Zqe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Xqe=/^&([a-z][a-z0-9]{1,31});/i;function Qqe(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(Zqe);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0);s.content=E5(a)?wx(a):wx(65533),s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(Xqe);if(o){const a=UY(o[0]);if(a!==o[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function dN(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let a=0;au;l-=o[l]+1){const f=e[l];if(f.marker===s.marker&&f.open&&f.end<0){let h=!1;if((f.close||s.open)&&(f.length+s.length)%3===0&&(f.length%3!==0||s.length%3!==0)&&(h=!0),!h){const p=l>0&&!e[l-1].open?o[l-1]+1:0;o[a]=a-l+p,o[l]=p,s.open=!1,f.end=a,f.close=!1,c=-1,i=-2;break}}}c!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=c)}}function Jqe(e){const t=e.tokens_meta,n=e.tokens_meta.length;dN(e.delimiters);for(let r=0;r0&&r++,i[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};Gm.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Gm.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let s=0;s|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function _4(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function w2(e){return Object.prototype.toString.call(e)}function nGe(e){return w2(e)==="[object String]"}function rGe(e){return w2(e)==="[object Object]"}function iGe(e){return w2(e)==="[object RegExp]"}function hN(e){return w2(e)==="[object Function]"}function oGe(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const XY={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function aGe(e){return Object.keys(e||{}).reduce(function(t,n){return t||XY.hasOwnProperty(n)},!1)}const sGe={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},uGe="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",lGe="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function cGe(e){e.__index__=-1,e.__text_cache__=""}function fGe(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function pN(){return function(e,t){t.normalize(e)}}function _x(e){const t=e.re=tGe(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(uGe),n.push(t.src_xn),t.src_tlds=n.join("|");function r(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(s,u){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+u)}Object.keys(e.__schemas__).forEach(function(s){const u=e.__schemas__[s];if(u===null)return;const l={validate:null,link:null};if(e.__compiled__[s]=l,rGe(u)){iGe(u.validate)?l.validate=fGe(u.validate):hN(u.validate)?l.validate=u.validate:o(s,u),hN(u.normalize)?l.normalize=u.normalize:u.normalize?o(s,u):l.normalize=pN();return}if(nGe(u)){i.push(s);return}o(s,u)}),i.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:pN()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(oGe).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),cGe(e)}function dGe(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function S4(e,t){const n=new dGe(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Wo(e,t){if(!(this instanceof Wo))return new Wo(e,t);t||aGe(e)&&(t=e,e={}),this.__opts__=_4({},XY,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=_4({},sGe,e),this.__compiled__={},this.__tlds__=lGe,this.__tlds_replaced__=!1,this.re={},_x(this)}Wo.prototype.add=function(t,n){return this.__schemas__[t]=n,_x(this),this};Wo.prototype.set=function(t){return this.__opts__=_4(this.__opts__,t),this};Wo.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,i,o,a,s,u,l,c;if(this.re.schema_test.test(t)){for(u=this.re.schema_search,u.lastIndex=0;(n=u.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],u.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=t.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,s=i.index+i[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=s))),this.__index__>=0};Wo.prototype.pretest=function(t){return this.re.pretest.test(t)};Wo.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Wo.prototype.match=function(t){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(S4(this,r)),r=this.__last_index__);let i=r?t.slice(r):t;for(;this.test(i);)n.push(S4(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};Wo.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,S4(this,0)):null};Wo.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),_x(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,_x(this),this)};Wo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Wo.prototype.onCompile=function(){};const Fd=2147483647,ws=36,P5=1,um=26,hGe=38,pGe=700,QY=72,JY=128,eZ="-",gGe=/^xn--/,mGe=/[^\0-\x7F]/,vGe=/[\x2E\u3002\uFF0E\uFF61]/g,yGe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$3=ws-P5,_s=Math.floor,I3=String.fromCharCode;function Ju(e){throw new RangeError(yGe[e])}function bGe(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function tZ(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(vGe,".");const i=e.split("."),o=bGe(i,t).join(".");return r+o}function nZ(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),wGe=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ws},gN=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},rZ=function(e,t,n){let r=0;for(e=n?_s(e/pGe):e>>1,e+=_s(e/t);e>$3*um>>1;r+=ws)e=_s(e/$3);return _s(r+($3+1)*e/(e+hGe))},iZ=function(e){const t=[],n=e.length;let r=0,i=JY,o=QY,a=e.lastIndexOf(eZ);a<0&&(a=0);for(let s=0;s=128&&Ju("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s=n&&Ju("invalid-input");const h=wGe(e.charCodeAt(s++));h>=ws&&Ju("invalid-input"),h>_s((Fd-r)/c)&&Ju("overflow"),r+=h*c;const p=f<=o?P5:f>=o+um?um:f-o;if(h_s(Fd/m)&&Ju("overflow"),c*=m}const l=t.length+1;o=rZ(r-u,l,u==0),_s(r/l)>Fd-i&&Ju("overflow"),i+=_s(r/l),r%=l,t.splice(r++,0,i)}return String.fromCodePoint(...t)},oZ=function(e){const t=[];e=nZ(e);const n=e.length;let r=JY,i=0,o=QY;for(const u of e)u<128&&t.push(I3(u));const a=t.length;let s=a;for(a&&t.push(eZ);s=r&&c_s((Fd-i)/l)&&Ju("overflow"),i+=(u-r)*l,r=u;for(const c of e)if(cFd&&Ju("overflow"),c===r){let f=i;for(let h=ws;;h+=ws){const p=h<=o?P5:h>=o+um?um:h-o;if(f=0))try{t.hostname=aZ.toASCII(t.hostname)}catch{}return Km(w5(t))}function RGe(e){const t=_5(e,!0);if(t.hostname&&(!t.protocol||sZ.indexOf(t.protocol)>=0))try{t.hostname=aZ.toUnicode(t.hostname)}catch{}return Oh(w5(t),Oh.defaultChars+"%")}function es(e,t){if(!(this instanceof es))return new es(e,t);t||C5(e)||(t=e||{},e="default"),this.inline=new Gm,this.block=new x2,this.core=new O5,this.renderer=new ip,this.linkify=new Wo,this.validateLink=TGe,this.normalizeLink=MGe,this.normalizeLinkText=RGe,this.utils=$Ke,this.helpers=y2({},FKe),this.options={},this.configure(e),t&&this.set(t)}es.prototype.set=function(e){return y2(this.options,e),this};es.prototype.configure=function(e){const t=this;if(C5(e)){const n=e;if(e=AGe[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};es.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};es.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};es.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};es.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};es.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};es.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};es.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var uZ={exports:{}};(function(e){(function(t){var n=function(T){var D,$=new Float64Array(16);if(T)for(D=0;D>24&255,T[D+1]=$>>16&255,T[D+2]=$>>8&255,T[D+3]=$&255,T[D+4]=A>>24&255,T[D+5]=A>>16&255,T[D+6]=A>>8&255,T[D+7]=A&255}function v(T,D,$,A,L){var ee,re=0;for(ee=0;ee>>8)-1}function b(T,D,$,A){return v(T,D,$,A,16)}function w(T,D,$,A){return v(T,D,$,A,32)}function x(T,D,$,A){for(var L=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,ee=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,re=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,he=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,Ce=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,Be=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,He=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ne=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,rt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ot=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,gt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Je=L,ut=ee,Qe=re,Fe=he,Ke=Ce,Ge=Be,ve=He,ge=ct,De=Ne,Pe=rt,Te=bt,ze=Ot,vt=gt,Lt=ht,Ft=xt,$t=wt,te,Yt=0;Yt<20;Yt+=2)te=Je+vt|0,Ke^=te<<7|te>>>25,te=Ke+Je|0,De^=te<<9|te>>>23,te=De+Ke|0,vt^=te<<13|te>>>19,te=vt+De|0,Je^=te<<18|te>>>14,te=Ge+ut|0,Pe^=te<<7|te>>>25,te=Pe+Ge|0,Lt^=te<<9|te>>>23,te=Lt+Pe|0,ut^=te<<13|te>>>19,te=ut+Lt|0,Ge^=te<<18|te>>>14,te=Te+ve|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,ve^=te<<13|te>>>19,te=ve+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Fe^=te<<7|te>>>25,te=Fe+$t|0,ge^=te<<9|te>>>23,te=ge+Fe|0,ze^=te<<13|te>>>19,te=ze+ge|0,$t^=te<<18|te>>>14,te=Je+Fe|0,ut^=te<<7|te>>>25,te=ut+Je|0,Qe^=te<<9|te>>>23,te=Qe+ut|0,Fe^=te<<13|te>>>19,te=Fe+Qe|0,Je^=te<<18|te>>>14,te=Ge+Ke|0,ve^=te<<7|te>>>25,te=ve+Ge|0,ge^=te<<9|te>>>23,te=ge+ve|0,Ke^=te<<13|te>>>19,te=Ke+ge|0,Ge^=te<<18|te>>>14,te=Te+Pe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Pe^=te<<13|te>>>19,te=Pe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,vt^=te<<7|te>>>25,te=vt+$t|0,Lt^=te<<9|te>>>23,te=Lt+vt|0,Ft^=te<<13|te>>>19,te=Ft+Lt|0,$t^=te<<18|te>>>14;Je=Je+L|0,ut=ut+ee|0,Qe=Qe+re|0,Fe=Fe+he|0,Ke=Ke+Ce|0,Ge=Ge+Be|0,ve=ve+He|0,ge=ge+ct|0,De=De+Ne|0,Pe=Pe+rt|0,Te=Te+bt|0,ze=ze+Ot|0,vt=vt+gt|0,Lt=Lt+ht|0,Ft=Ft+xt|0,$t=$t+wt|0,T[0]=Je>>>0&255,T[1]=Je>>>8&255,T[2]=Je>>>16&255,T[3]=Je>>>24&255,T[4]=ut>>>0&255,T[5]=ut>>>8&255,T[6]=ut>>>16&255,T[7]=ut>>>24&255,T[8]=Qe>>>0&255,T[9]=Qe>>>8&255,T[10]=Qe>>>16&255,T[11]=Qe>>>24&255,T[12]=Fe>>>0&255,T[13]=Fe>>>8&255,T[14]=Fe>>>16&255,T[15]=Fe>>>24&255,T[16]=Ke>>>0&255,T[17]=Ke>>>8&255,T[18]=Ke>>>16&255,T[19]=Ke>>>24&255,T[20]=Ge>>>0&255,T[21]=Ge>>>8&255,T[22]=Ge>>>16&255,T[23]=Ge>>>24&255,T[24]=ve>>>0&255,T[25]=ve>>>8&255,T[26]=ve>>>16&255,T[27]=ve>>>24&255,T[28]=ge>>>0&255,T[29]=ge>>>8&255,T[30]=ge>>>16&255,T[31]=ge>>>24&255,T[32]=De>>>0&255,T[33]=De>>>8&255,T[34]=De>>>16&255,T[35]=De>>>24&255,T[36]=Pe>>>0&255,T[37]=Pe>>>8&255,T[38]=Pe>>>16&255,T[39]=Pe>>>24&255,T[40]=Te>>>0&255,T[41]=Te>>>8&255,T[42]=Te>>>16&255,T[43]=Te>>>24&255,T[44]=ze>>>0&255,T[45]=ze>>>8&255,T[46]=ze>>>16&255,T[47]=ze>>>24&255,T[48]=vt>>>0&255,T[49]=vt>>>8&255,T[50]=vt>>>16&255,T[51]=vt>>>24&255,T[52]=Lt>>>0&255,T[53]=Lt>>>8&255,T[54]=Lt>>>16&255,T[55]=Lt>>>24&255,T[56]=Ft>>>0&255,T[57]=Ft>>>8&255,T[58]=Ft>>>16&255,T[59]=Ft>>>24&255,T[60]=$t>>>0&255,T[61]=$t>>>8&255,T[62]=$t>>>16&255,T[63]=$t>>>24&255}function S(T,D,$,A){for(var L=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,ee=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,re=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,he=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,Ce=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,Be=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,He=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ne=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,rt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ot=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,gt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Je=L,ut=ee,Qe=re,Fe=he,Ke=Ce,Ge=Be,ve=He,ge=ct,De=Ne,Pe=rt,Te=bt,ze=Ot,vt=gt,Lt=ht,Ft=xt,$t=wt,te,Yt=0;Yt<20;Yt+=2)te=Je+vt|0,Ke^=te<<7|te>>>25,te=Ke+Je|0,De^=te<<9|te>>>23,te=De+Ke|0,vt^=te<<13|te>>>19,te=vt+De|0,Je^=te<<18|te>>>14,te=Ge+ut|0,Pe^=te<<7|te>>>25,te=Pe+Ge|0,Lt^=te<<9|te>>>23,te=Lt+Pe|0,ut^=te<<13|te>>>19,te=ut+Lt|0,Ge^=te<<18|te>>>14,te=Te+ve|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,ve^=te<<13|te>>>19,te=ve+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Fe^=te<<7|te>>>25,te=Fe+$t|0,ge^=te<<9|te>>>23,te=ge+Fe|0,ze^=te<<13|te>>>19,te=ze+ge|0,$t^=te<<18|te>>>14,te=Je+Fe|0,ut^=te<<7|te>>>25,te=ut+Je|0,Qe^=te<<9|te>>>23,te=Qe+ut|0,Fe^=te<<13|te>>>19,te=Fe+Qe|0,Je^=te<<18|te>>>14,te=Ge+Ke|0,ve^=te<<7|te>>>25,te=ve+Ge|0,ge^=te<<9|te>>>23,te=ge+ve|0,Ke^=te<<13|te>>>19,te=Ke+ge|0,Ge^=te<<18|te>>>14,te=Te+Pe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Pe^=te<<13|te>>>19,te=Pe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,vt^=te<<7|te>>>25,te=vt+$t|0,Lt^=te<<9|te>>>23,te=Lt+vt|0,Ft^=te<<13|te>>>19,te=Ft+Lt|0,$t^=te<<18|te>>>14;T[0]=Je>>>0&255,T[1]=Je>>>8&255,T[2]=Je>>>16&255,T[3]=Je>>>24&255,T[4]=Ge>>>0&255,T[5]=Ge>>>8&255,T[6]=Ge>>>16&255,T[7]=Ge>>>24&255,T[8]=Te>>>0&255,T[9]=Te>>>8&255,T[10]=Te>>>16&255,T[11]=Te>>>24&255,T[12]=$t>>>0&255,T[13]=$t>>>8&255,T[14]=$t>>>16&255,T[15]=$t>>>24&255,T[16]=ve>>>0&255,T[17]=ve>>>8&255,T[18]=ve>>>16&255,T[19]=ve>>>24&255,T[20]=ge>>>0&255,T[21]=ge>>>8&255,T[22]=ge>>>16&255,T[23]=ge>>>24&255,T[24]=De>>>0&255,T[25]=De>>>8&255,T[26]=De>>>16&255,T[27]=De>>>24&255,T[28]=Pe>>>0&255,T[29]=Pe>>>8&255,T[30]=Pe>>>16&255,T[31]=Pe>>>24&255}function O(T,D,$,A){x(T,D,$,A)}function E(T,D,$,A){S(T,D,$,A)}var C=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function k(T,D,$,A,L,ee,re){var he=new Uint8Array(16),Ce=new Uint8Array(64),Be,He;for(He=0;He<16;He++)he[He]=0;for(He=0;He<8;He++)he[He]=ee[He];for(;L>=64;){for(O(Ce,he,re,C),He=0;He<64;He++)T[D+He]=$[A+He]^Ce[He];for(Be=1,He=8;He<16;He++)Be=Be+(he[He]&255)|0,he[He]=Be&255,Be>>>=8;L-=64,D+=64,A+=64}if(L>0)for(O(Ce,he,re,C),He=0;He=64;){for(O(re,ee,L,C),Ce=0;Ce<64;Ce++)T[D+Ce]=re[Ce];for(he=1,Ce=8;Ce<16;Ce++)he=he+(ee[Ce]&255)|0,ee[Ce]=he&255,he>>>=8;$-=64,D+=64}if($>0)for(O(re,ee,L,C),Ce=0;Ce<$;Ce++)T[D+Ce]=re[Ce];return 0}function N(T,D,$,A,L){var ee=new Uint8Array(32);E(ee,A,L,C);for(var re=new Uint8Array(8),he=0;he<8;he++)re[he]=A[he+16];return M(T,D,$,re,ee)}function z(T,D,$,A,L,ee,re){var he=new Uint8Array(32);E(he,ee,re,C);for(var Ce=new Uint8Array(8),Be=0;Be<8;Be++)Ce[Be]=ee[Be+16];return k(T,D,$,A,L,Ce,he)}var H=function(T){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var D,$,A,L,ee,re,he,Ce;D=T[0]&255|(T[1]&255)<<8,this.r[0]=D&8191,$=T[2]&255|(T[3]&255)<<8,this.r[1]=(D>>>13|$<<3)&8191,A=T[4]&255|(T[5]&255)<<8,this.r[2]=($>>>10|A<<6)&7939,L=T[6]&255|(T[7]&255)<<8,this.r[3]=(A>>>7|L<<9)&8191,ee=T[8]&255|(T[9]&255)<<8,this.r[4]=(L>>>4|ee<<12)&255,this.r[5]=ee>>>1&8190,re=T[10]&255|(T[11]&255)<<8,this.r[6]=(ee>>>14|re<<2)&8191,he=T[12]&255|(T[13]&255)<<8,this.r[7]=(re>>>11|he<<5)&8065,Ce=T[14]&255|(T[15]&255)<<8,this.r[8]=(he>>>8|Ce<<8)&8191,this.r[9]=Ce>>>5&127,this.pad[0]=T[16]&255|(T[17]&255)<<8,this.pad[1]=T[18]&255|(T[19]&255)<<8,this.pad[2]=T[20]&255|(T[21]&255)<<8,this.pad[3]=T[22]&255|(T[23]&255)<<8,this.pad[4]=T[24]&255|(T[25]&255)<<8,this.pad[5]=T[26]&255|(T[27]&255)<<8,this.pad[6]=T[28]&255|(T[29]&255)<<8,this.pad[7]=T[30]&255|(T[31]&255)<<8};H.prototype.blocks=function(T,D,$){for(var A=this.fin?0:2048,L,ee,re,he,Ce,Be,He,ct,Ne,rt,bt,Ot,gt,ht,xt,wt,Je,ut,Qe,Fe=this.h[0],Ke=this.h[1],Ge=this.h[2],ve=this.h[3],ge=this.h[4],De=this.h[5],Pe=this.h[6],Te=this.h[7],ze=this.h[8],vt=this.h[9],Lt=this.r[0],Ft=this.r[1],$t=this.r[2],te=this.r[3],Yt=this.r[4],sn=this.r[5],un=this.r[6],jt=this.r[7],ln=this.r[8],rn=this.r[9];$>=16;)L=T[D+0]&255|(T[D+1]&255)<<8,Fe+=L&8191,ee=T[D+2]&255|(T[D+3]&255)<<8,Ke+=(L>>>13|ee<<3)&8191,re=T[D+4]&255|(T[D+5]&255)<<8,Ge+=(ee>>>10|re<<6)&8191,he=T[D+6]&255|(T[D+7]&255)<<8,ve+=(re>>>7|he<<9)&8191,Ce=T[D+8]&255|(T[D+9]&255)<<8,ge+=(he>>>4|Ce<<12)&8191,De+=Ce>>>1&8191,Be=T[D+10]&255|(T[D+11]&255)<<8,Pe+=(Ce>>>14|Be<<2)&8191,He=T[D+12]&255|(T[D+13]&255)<<8,Te+=(Be>>>11|He<<5)&8191,ct=T[D+14]&255|(T[D+15]&255)<<8,ze+=(He>>>8|ct<<8)&8191,vt+=ct>>>5|A,Ne=0,rt=Ne,rt+=Fe*Lt,rt+=Ke*(5*rn),rt+=Ge*(5*ln),rt+=ve*(5*jt),rt+=ge*(5*un),Ne=rt>>>13,rt&=8191,rt+=De*(5*sn),rt+=Pe*(5*Yt),rt+=Te*(5*te),rt+=ze*(5*$t),rt+=vt*(5*Ft),Ne+=rt>>>13,rt&=8191,bt=Ne,bt+=Fe*Ft,bt+=Ke*Lt,bt+=Ge*(5*rn),bt+=ve*(5*ln),bt+=ge*(5*jt),Ne=bt>>>13,bt&=8191,bt+=De*(5*un),bt+=Pe*(5*sn),bt+=Te*(5*Yt),bt+=ze*(5*te),bt+=vt*(5*$t),Ne+=bt>>>13,bt&=8191,Ot=Ne,Ot+=Fe*$t,Ot+=Ke*Ft,Ot+=Ge*Lt,Ot+=ve*(5*rn),Ot+=ge*(5*ln),Ne=Ot>>>13,Ot&=8191,Ot+=De*(5*jt),Ot+=Pe*(5*un),Ot+=Te*(5*sn),Ot+=ze*(5*Yt),Ot+=vt*(5*te),Ne+=Ot>>>13,Ot&=8191,gt=Ne,gt+=Fe*te,gt+=Ke*$t,gt+=Ge*Ft,gt+=ve*Lt,gt+=ge*(5*rn),Ne=gt>>>13,gt&=8191,gt+=De*(5*ln),gt+=Pe*(5*jt),gt+=Te*(5*un),gt+=ze*(5*sn),gt+=vt*(5*Yt),Ne+=gt>>>13,gt&=8191,ht=Ne,ht+=Fe*Yt,ht+=Ke*te,ht+=Ge*$t,ht+=ve*Ft,ht+=ge*Lt,Ne=ht>>>13,ht&=8191,ht+=De*(5*rn),ht+=Pe*(5*ln),ht+=Te*(5*jt),ht+=ze*(5*un),ht+=vt*(5*sn),Ne+=ht>>>13,ht&=8191,xt=Ne,xt+=Fe*sn,xt+=Ke*Yt,xt+=Ge*te,xt+=ve*$t,xt+=ge*Ft,Ne=xt>>>13,xt&=8191,xt+=De*Lt,xt+=Pe*(5*rn),xt+=Te*(5*ln),xt+=ze*(5*jt),xt+=vt*(5*un),Ne+=xt>>>13,xt&=8191,wt=Ne,wt+=Fe*un,wt+=Ke*sn,wt+=Ge*Yt,wt+=ve*te,wt+=ge*$t,Ne=wt>>>13,wt&=8191,wt+=De*Ft,wt+=Pe*Lt,wt+=Te*(5*rn),wt+=ze*(5*ln),wt+=vt*(5*jt),Ne+=wt>>>13,wt&=8191,Je=Ne,Je+=Fe*jt,Je+=Ke*un,Je+=Ge*sn,Je+=ve*Yt,Je+=ge*te,Ne=Je>>>13,Je&=8191,Je+=De*$t,Je+=Pe*Ft,Je+=Te*Lt,Je+=ze*(5*rn),Je+=vt*(5*ln),Ne+=Je>>>13,Je&=8191,ut=Ne,ut+=Fe*ln,ut+=Ke*jt,ut+=Ge*un,ut+=ve*sn,ut+=ge*Yt,Ne=ut>>>13,ut&=8191,ut+=De*te,ut+=Pe*$t,ut+=Te*Ft,ut+=ze*Lt,ut+=vt*(5*rn),Ne+=ut>>>13,ut&=8191,Qe=Ne,Qe+=Fe*rn,Qe+=Ke*ln,Qe+=Ge*jt,Qe+=ve*un,Qe+=ge*sn,Ne=Qe>>>13,Qe&=8191,Qe+=De*Yt,Qe+=Pe*te,Qe+=Te*$t,Qe+=ze*Ft,Qe+=vt*Lt,Ne+=Qe>>>13,Qe&=8191,Ne=(Ne<<2)+Ne|0,Ne=Ne+rt|0,rt=Ne&8191,Ne=Ne>>>13,bt+=Ne,Fe=rt,Ke=bt,Ge=Ot,ve=gt,ge=ht,De=xt,Pe=wt,Te=Je,ze=ut,vt=Qe,D+=16,$-=16;this.h[0]=Fe,this.h[1]=Ke,this.h[2]=Ge,this.h[3]=ve,this.h[4]=ge,this.h[5]=De,this.h[6]=Pe,this.h[7]=Te,this.h[8]=ze,this.h[9]=vt},H.prototype.finish=function(T,D){var $=new Uint16Array(10),A,L,ee,re;if(this.leftover){for(re=this.leftover,this.buffer[re++]=1;re<16;re++)this.buffer[re]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(A=this.h[1]>>>13,this.h[1]&=8191,re=2;re<10;re++)this.h[re]+=A,A=this.h[re]>>>13,this.h[re]&=8191;for(this.h[0]+=A*5,A=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=A,A=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=A,$[0]=this.h[0]+5,A=$[0]>>>13,$[0]&=8191,re=1;re<10;re++)$[re]=this.h[re]+A,A=$[re]>>>13,$[re]&=8191;for($[9]-=8192,L=(A^1)-1,re=0;re<10;re++)$[re]&=L;for(L=~L,re=0;re<10;re++)this.h[re]=this.h[re]&L|$[re];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,ee=this.h[0]+this.pad[0],this.h[0]=ee&65535,re=1;re<8;re++)ee=(this.h[re]+this.pad[re]|0)+(ee>>>16)|0,this.h[re]=ee&65535;T[D+0]=this.h[0]>>>0&255,T[D+1]=this.h[0]>>>8&255,T[D+2]=this.h[1]>>>0&255,T[D+3]=this.h[1]>>>8&255,T[D+4]=this.h[2]>>>0&255,T[D+5]=this.h[2]>>>8&255,T[D+6]=this.h[3]>>>0&255,T[D+7]=this.h[3]>>>8&255,T[D+8]=this.h[4]>>>0&255,T[D+9]=this.h[4]>>>8&255,T[D+10]=this.h[5]>>>0&255,T[D+11]=this.h[5]>>>8&255,T[D+12]=this.h[6]>>>0&255,T[D+13]=this.h[6]>>>8&255,T[D+14]=this.h[7]>>>0&255,T[D+15]=this.h[7]>>>8&255},H.prototype.update=function(T,D,$){var A,L;if(this.leftover){for(L=16-this.leftover,L>$&&(L=$),A=0;A=16&&(L=$-$%16,this.blocks(T,D,L),D+=L,$-=L),$){for(A=0;A<$;A++)this.buffer[this.leftover+A]=T[D+A];this.leftover+=$}};function V(T,D,$,A,L,ee){var re=new H(ee);return re.update($,A,L),re.finish(T,D),0}function ne(T,D,$,A,L,ee){var re=new Uint8Array(16);return V(re,0,$,A,L,ee),b(T,D,re,0)}function Z(T,D,$,A,L){var ee;if($<32)return-1;for(z(T,0,D,0,$,A,L),V(T,16,T,32,$-32,T),ee=0;ee<16;ee++)T[ee]=0;return 0}function G(T,D,$,A,L){var ee,re=new Uint8Array(32);if($<32||(N(re,0,32,A,L),ne(D,16,D,32,$-32,re)!==0))return-1;for(z(T,0,D,0,$,A,L),ee=0;ee<32;ee++)T[ee]=0;return 0}function q(T,D){var $;for($=0;$<16;$++)T[$]=D[$]|0}function W(T){var D,$,A=1;for(D=0;D<16;D++)$=T[D]+A+65535,A=Math.floor($/65536),T[D]=$-A*65536;T[0]+=A-1+37*(A-1)}function j(T,D,$){for(var A,L=~($-1),ee=0;ee<16;ee++)A=L&(T[ee]^D[ee]),T[ee]^=A,D[ee]^=A}function K(T,D){var $,A,L,ee=n(),re=n();for($=0;$<16;$++)re[$]=D[$];for(W(re),W(re),W(re),A=0;A<2;A++){for(ee[0]=re[0]-65517,$=1;$<15;$++)ee[$]=re[$]-65535-(ee[$-1]>>16&1),ee[$-1]&=65535;ee[15]=re[15]-32767-(ee[14]>>16&1),L=ee[15]>>16&1,ee[14]&=65535,j(re,ee,1-L)}for($=0;$<16;$++)T[2*$]=re[$]&255,T[2*$+1]=re[$]>>8}function Y(T,D){var $=new Uint8Array(32),A=new Uint8Array(32);return K($,T),K(A,D),w($,0,A,0)}function oe(T){var D=new Uint8Array(32);return K(D,T),D[0]&1}function Q(T,D){var $;for($=0;$<16;$++)T[$]=D[2*$]+(D[2*$+1]<<8);T[15]&=32767}function J(T,D,$){for(var A=0;A<16;A++)T[A]=D[A]+$[A]}function ue(T,D,$){for(var A=0;A<16;A++)T[A]=D[A]-$[A]}function de(T,D,$){var A,L,ee=0,re=0,he=0,Ce=0,Be=0,He=0,ct=0,Ne=0,rt=0,bt=0,Ot=0,gt=0,ht=0,xt=0,wt=0,Je=0,ut=0,Qe=0,Fe=0,Ke=0,Ge=0,ve=0,ge=0,De=0,Pe=0,Te=0,ze=0,vt=0,Lt=0,Ft=0,$t=0,te=$[0],Yt=$[1],sn=$[2],un=$[3],jt=$[4],ln=$[5],rn=$[6],Gn=$[7],mn=$[8],kn=$[9],Yn=$[10],Zn=$[11],xr=$[12],$r=$[13],Ir=$[14],Nr=$[15];A=D[0],ee+=A*te,re+=A*Yt,he+=A*sn,Ce+=A*un,Be+=A*jt,He+=A*ln,ct+=A*rn,Ne+=A*Gn,rt+=A*mn,bt+=A*kn,Ot+=A*Yn,gt+=A*Zn,ht+=A*xr,xt+=A*$r,wt+=A*Ir,Je+=A*Nr,A=D[1],re+=A*te,he+=A*Yt,Ce+=A*sn,Be+=A*un,He+=A*jt,ct+=A*ln,Ne+=A*rn,rt+=A*Gn,bt+=A*mn,Ot+=A*kn,gt+=A*Yn,ht+=A*Zn,xt+=A*xr,wt+=A*$r,Je+=A*Ir,ut+=A*Nr,A=D[2],he+=A*te,Ce+=A*Yt,Be+=A*sn,He+=A*un,ct+=A*jt,Ne+=A*ln,rt+=A*rn,bt+=A*Gn,Ot+=A*mn,gt+=A*kn,ht+=A*Yn,xt+=A*Zn,wt+=A*xr,Je+=A*$r,ut+=A*Ir,Qe+=A*Nr,A=D[3],Ce+=A*te,Be+=A*Yt,He+=A*sn,ct+=A*un,Ne+=A*jt,rt+=A*ln,bt+=A*rn,Ot+=A*Gn,gt+=A*mn,ht+=A*kn,xt+=A*Yn,wt+=A*Zn,Je+=A*xr,ut+=A*$r,Qe+=A*Ir,Fe+=A*Nr,A=D[4],Be+=A*te,He+=A*Yt,ct+=A*sn,Ne+=A*un,rt+=A*jt,bt+=A*ln,Ot+=A*rn,gt+=A*Gn,ht+=A*mn,xt+=A*kn,wt+=A*Yn,Je+=A*Zn,ut+=A*xr,Qe+=A*$r,Fe+=A*Ir,Ke+=A*Nr,A=D[5],He+=A*te,ct+=A*Yt,Ne+=A*sn,rt+=A*un,bt+=A*jt,Ot+=A*ln,gt+=A*rn,ht+=A*Gn,xt+=A*mn,wt+=A*kn,Je+=A*Yn,ut+=A*Zn,Qe+=A*xr,Fe+=A*$r,Ke+=A*Ir,Ge+=A*Nr,A=D[6],ct+=A*te,Ne+=A*Yt,rt+=A*sn,bt+=A*un,Ot+=A*jt,gt+=A*ln,ht+=A*rn,xt+=A*Gn,wt+=A*mn,Je+=A*kn,ut+=A*Yn,Qe+=A*Zn,Fe+=A*xr,Ke+=A*$r,Ge+=A*Ir,ve+=A*Nr,A=D[7],Ne+=A*te,rt+=A*Yt,bt+=A*sn,Ot+=A*un,gt+=A*jt,ht+=A*ln,xt+=A*rn,wt+=A*Gn,Je+=A*mn,ut+=A*kn,Qe+=A*Yn,Fe+=A*Zn,Ke+=A*xr,Ge+=A*$r,ve+=A*Ir,ge+=A*Nr,A=D[8],rt+=A*te,bt+=A*Yt,Ot+=A*sn,gt+=A*un,ht+=A*jt,xt+=A*ln,wt+=A*rn,Je+=A*Gn,ut+=A*mn,Qe+=A*kn,Fe+=A*Yn,Ke+=A*Zn,Ge+=A*xr,ve+=A*$r,ge+=A*Ir,De+=A*Nr,A=D[9],bt+=A*te,Ot+=A*Yt,gt+=A*sn,ht+=A*un,xt+=A*jt,wt+=A*ln,Je+=A*rn,ut+=A*Gn,Qe+=A*mn,Fe+=A*kn,Ke+=A*Yn,Ge+=A*Zn,ve+=A*xr,ge+=A*$r,De+=A*Ir,Pe+=A*Nr,A=D[10],Ot+=A*te,gt+=A*Yt,ht+=A*sn,xt+=A*un,wt+=A*jt,Je+=A*ln,ut+=A*rn,Qe+=A*Gn,Fe+=A*mn,Ke+=A*kn,Ge+=A*Yn,ve+=A*Zn,ge+=A*xr,De+=A*$r,Pe+=A*Ir,Te+=A*Nr,A=D[11],gt+=A*te,ht+=A*Yt,xt+=A*sn,wt+=A*un,Je+=A*jt,ut+=A*ln,Qe+=A*rn,Fe+=A*Gn,Ke+=A*mn,Ge+=A*kn,ve+=A*Yn,ge+=A*Zn,De+=A*xr,Pe+=A*$r,Te+=A*Ir,ze+=A*Nr,A=D[12],ht+=A*te,xt+=A*Yt,wt+=A*sn,Je+=A*un,ut+=A*jt,Qe+=A*ln,Fe+=A*rn,Ke+=A*Gn,Ge+=A*mn,ve+=A*kn,ge+=A*Yn,De+=A*Zn,Pe+=A*xr,Te+=A*$r,ze+=A*Ir,vt+=A*Nr,A=D[13],xt+=A*te,wt+=A*Yt,Je+=A*sn,ut+=A*un,Qe+=A*jt,Fe+=A*ln,Ke+=A*rn,Ge+=A*Gn,ve+=A*mn,ge+=A*kn,De+=A*Yn,Pe+=A*Zn,Te+=A*xr,ze+=A*$r,vt+=A*Ir,Lt+=A*Nr,A=D[14],wt+=A*te,Je+=A*Yt,ut+=A*sn,Qe+=A*un,Fe+=A*jt,Ke+=A*ln,Ge+=A*rn,ve+=A*Gn,ge+=A*mn,De+=A*kn,Pe+=A*Yn,Te+=A*Zn,ze+=A*xr,vt+=A*$r,Lt+=A*Ir,Ft+=A*Nr,A=D[15],Je+=A*te,ut+=A*Yt,Qe+=A*sn,Fe+=A*un,Ke+=A*jt,Ge+=A*ln,ve+=A*rn,ge+=A*Gn,De+=A*mn,Pe+=A*kn,Te+=A*Yn,ze+=A*Zn,vt+=A*xr,Lt+=A*$r,Ft+=A*Ir,$t+=A*Nr,ee+=38*ut,re+=38*Qe,he+=38*Fe,Ce+=38*Ke,Be+=38*Ge,He+=38*ve,ct+=38*ge,Ne+=38*De,rt+=38*Pe,bt+=38*Te,Ot+=38*ze,gt+=38*vt,ht+=38*Lt,xt+=38*Ft,wt+=38*$t,L=1,A=ee+L+65535,L=Math.floor(A/65536),ee=A-L*65536,A=re+L+65535,L=Math.floor(A/65536),re=A-L*65536,A=he+L+65535,L=Math.floor(A/65536),he=A-L*65536,A=Ce+L+65535,L=Math.floor(A/65536),Ce=A-L*65536,A=Be+L+65535,L=Math.floor(A/65536),Be=A-L*65536,A=He+L+65535,L=Math.floor(A/65536),He=A-L*65536,A=ct+L+65535,L=Math.floor(A/65536),ct=A-L*65536,A=Ne+L+65535,L=Math.floor(A/65536),Ne=A-L*65536,A=rt+L+65535,L=Math.floor(A/65536),rt=A-L*65536,A=bt+L+65535,L=Math.floor(A/65536),bt=A-L*65536,A=Ot+L+65535,L=Math.floor(A/65536),Ot=A-L*65536,A=gt+L+65535,L=Math.floor(A/65536),gt=A-L*65536,A=ht+L+65535,L=Math.floor(A/65536),ht=A-L*65536,A=xt+L+65535,L=Math.floor(A/65536),xt=A-L*65536,A=wt+L+65535,L=Math.floor(A/65536),wt=A-L*65536,A=Je+L+65535,L=Math.floor(A/65536),Je=A-L*65536,ee+=L-1+37*(L-1),L=1,A=ee+L+65535,L=Math.floor(A/65536),ee=A-L*65536,A=re+L+65535,L=Math.floor(A/65536),re=A-L*65536,A=he+L+65535,L=Math.floor(A/65536),he=A-L*65536,A=Ce+L+65535,L=Math.floor(A/65536),Ce=A-L*65536,A=Be+L+65535,L=Math.floor(A/65536),Be=A-L*65536,A=He+L+65535,L=Math.floor(A/65536),He=A-L*65536,A=ct+L+65535,L=Math.floor(A/65536),ct=A-L*65536,A=Ne+L+65535,L=Math.floor(A/65536),Ne=A-L*65536,A=rt+L+65535,L=Math.floor(A/65536),rt=A-L*65536,A=bt+L+65535,L=Math.floor(A/65536),bt=A-L*65536,A=Ot+L+65535,L=Math.floor(A/65536),Ot=A-L*65536,A=gt+L+65535,L=Math.floor(A/65536),gt=A-L*65536,A=ht+L+65535,L=Math.floor(A/65536),ht=A-L*65536,A=xt+L+65535,L=Math.floor(A/65536),xt=A-L*65536,A=wt+L+65535,L=Math.floor(A/65536),wt=A-L*65536,A=Je+L+65535,L=Math.floor(A/65536),Je=A-L*65536,ee+=L-1+37*(L-1),T[0]=ee,T[1]=re,T[2]=he,T[3]=Ce,T[4]=Be,T[5]=He,T[6]=ct,T[7]=Ne,T[8]=rt,T[9]=bt,T[10]=Ot,T[11]=gt,T[12]=ht,T[13]=xt,T[14]=wt,T[15]=Je}function Se(T,D){de(T,D,D)}function me(T,D){var $=n(),A;for(A=0;A<16;A++)$[A]=D[A];for(A=253;A>=0;A--)Se($,$),A!==2&&A!==4&&de($,$,D);for(A=0;A<16;A++)T[A]=$[A]}function Ze(T,D){var $=n(),A;for(A=0;A<16;A++)$[A]=D[A];for(A=250;A>=0;A--)Se($,$),A!==1&&de($,$,D);for(A=0;A<16;A++)T[A]=$[A]}function Ae(T,D,$){var A=new Uint8Array(32),L=new Float64Array(80),ee,re,he=n(),Ce=n(),Be=n(),He=n(),ct=n(),Ne=n();for(re=0;re<31;re++)A[re]=D[re];for(A[31]=D[31]&127|64,A[0]&=248,Q(L,$),re=0;re<16;re++)Ce[re]=L[re],He[re]=he[re]=Be[re]=0;for(he[0]=He[0]=1,re=254;re>=0;--re)ee=A[re>>>3]>>>(re&7)&1,j(he,Ce,ee),j(Be,He,ee),J(ct,he,Be),ue(he,he,Be),J(Be,Ce,He),ue(Ce,Ce,He),Se(He,ct),Se(Ne,he),de(he,Be,he),de(Be,Ce,ct),J(ct,he,Be),ue(he,he,Be),Se(Ce,he),ue(Be,He,Ne),de(he,Be,u),J(he,he,He),de(Be,Be,he),de(he,He,Ne),de(He,Ce,L),Se(Ce,ct),j(he,Ce,ee),j(Be,He,ee);for(re=0;re<16;re++)L[re+16]=he[re],L[re+32]=Be[re],L[re+48]=Ce[re],L[re+64]=He[re];var rt=L.subarray(32),bt=L.subarray(16);return me(rt,rt),de(bt,bt,rt),K(T,bt),0}function Le(T,D){return Ae(T,D,o)}function $e(T,D){return r(D,32),Le(T,D)}function be(T,D,$){var A=new Uint8Array(32);return Ae(A,$,D),E(T,i,A,C)}var yt=Z,lt=G;function Nt(T,D,$,A,L,ee){var re=new Uint8Array(32);return be(re,L,ee),yt(T,D,$,A,re)}function yn(T,D,$,A,L,ee){var re=new Uint8Array(32);return be(re,L,ee),lt(T,D,$,A,re)}var nn=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ie(T,D,$,A){for(var L=new Int32Array(16),ee=new Int32Array(16),re,he,Ce,Be,He,ct,Ne,rt,bt,Ot,gt,ht,xt,wt,Je,ut,Qe,Fe,Ke,Ge,ve,ge,De,Pe,Te,ze,vt=T[0],Lt=T[1],Ft=T[2],$t=T[3],te=T[4],Yt=T[5],sn=T[6],un=T[7],jt=D[0],ln=D[1],rn=D[2],Gn=D[3],mn=D[4],kn=D[5],Yn=D[6],Zn=D[7],xr=0;A>=128;){for(Ke=0;Ke<16;Ke++)Ge=8*Ke+xr,L[Ke]=$[Ge+0]<<24|$[Ge+1]<<16|$[Ge+2]<<8|$[Ge+3],ee[Ke]=$[Ge+4]<<24|$[Ge+5]<<16|$[Ge+6]<<8|$[Ge+7];for(Ke=0;Ke<80;Ke++)if(re=vt,he=Lt,Ce=Ft,Be=$t,He=te,ct=Yt,Ne=sn,rt=un,bt=jt,Ot=ln,gt=rn,ht=Gn,xt=mn,wt=kn,Je=Yn,ut=Zn,ve=un,ge=Zn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=(te>>>14|mn<<18)^(te>>>18|mn<<14)^(mn>>>9|te<<23),ge=(mn>>>14|te<<18)^(mn>>>18|te<<14)^(te>>>9|mn<<23),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=te&Yt^~te&sn,ge=mn&kn^~mn&Yn,De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=nn[Ke*2],ge=nn[Ke*2+1],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=L[Ke%16],ge=ee[Ke%16],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,Qe=Te&65535|ze<<16,Fe=De&65535|Pe<<16,ve=Qe,ge=Fe,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=(vt>>>28|jt<<4)^(jt>>>2|vt<<30)^(jt>>>7|vt<<25),ge=(jt>>>28|vt<<4)^(vt>>>2|jt<<30)^(vt>>>7|jt<<25),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=vt&Lt^vt&Ft^Lt&Ft,ge=jt&ln^jt&rn^ln&rn,De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,rt=Te&65535|ze<<16,ut=De&65535|Pe<<16,ve=Be,ge=ht,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=Qe,ge=Fe,De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,Be=Te&65535|ze<<16,ht=De&65535|Pe<<16,Lt=re,Ft=he,$t=Ce,te=Be,Yt=He,sn=ct,un=Ne,vt=rt,ln=bt,rn=Ot,Gn=gt,mn=ht,kn=xt,Yn=wt,Zn=Je,jt=ut,Ke%16===15)for(Ge=0;Ge<16;Ge++)ve=L[Ge],ge=ee[Ge],De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=L[(Ge+9)%16],ge=ee[(Ge+9)%16],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Qe=L[(Ge+1)%16],Fe=ee[(Ge+1)%16],ve=(Qe>>>1|Fe<<31)^(Qe>>>8|Fe<<24)^Qe>>>7,ge=(Fe>>>1|Qe<<31)^(Fe>>>8|Qe<<24)^(Fe>>>7|Qe<<25),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Qe=L[(Ge+14)%16],Fe=ee[(Ge+14)%16],ve=(Qe>>>19|Fe<<13)^(Fe>>>29|Qe<<3)^Qe>>>6,ge=(Fe>>>19|Qe<<13)^(Qe>>>29|Fe<<3)^(Fe>>>6|Qe<<26),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,L[Ge]=Te&65535|ze<<16,ee[Ge]=De&65535|Pe<<16;ve=vt,ge=jt,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[0],ge=D[0],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[0]=vt=Te&65535|ze<<16,D[0]=jt=De&65535|Pe<<16,ve=Lt,ge=ln,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[1],ge=D[1],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[1]=Lt=Te&65535|ze<<16,D[1]=ln=De&65535|Pe<<16,ve=Ft,ge=rn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[2],ge=D[2],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[2]=Ft=Te&65535|ze<<16,D[2]=rn=De&65535|Pe<<16,ve=$t,ge=Gn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[3],ge=D[3],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[3]=$t=Te&65535|ze<<16,D[3]=Gn=De&65535|Pe<<16,ve=te,ge=mn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[4],ge=D[4],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[4]=te=Te&65535|ze<<16,D[4]=mn=De&65535|Pe<<16,ve=Yt,ge=kn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[5],ge=D[5],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[5]=Yt=Te&65535|ze<<16,D[5]=kn=De&65535|Pe<<16,ve=sn,ge=Yn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[6],ge=D[6],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[6]=sn=Te&65535|ze<<16,D[6]=Yn=De&65535|Pe<<16,ve=un,ge=Zn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[7],ge=D[7],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[7]=un=Te&65535|ze<<16,D[7]=Zn=De&65535|Pe<<16,xr+=128,A-=128}return A}function pe(T,D,$){var A=new Int32Array(8),L=new Int32Array(8),ee=new Uint8Array(256),re,he=$;for(A[0]=1779033703,A[1]=3144134277,A[2]=1013904242,A[3]=2773480762,A[4]=1359893119,A[5]=2600822924,A[6]=528734635,A[7]=1541459225,L[0]=4089235720,L[1]=2227873595,L[2]=4271175723,L[3]=1595750129,L[4]=2917565137,L[5]=725511199,L[6]=4215389547,L[7]=327033209,ie(A,L,D,$),$%=128,re=0;re<$;re++)ee[re]=D[he-$+re];for(ee[$]=128,$=256-128*($<112?1:0),ee[$-9]=0,m(ee,$-8,he/536870912|0,he<<3),ie(A,L,ee,$),re=0;re<8;re++)m(T,8*re,A[re],L[re]);return 0}function ye(T,D){var $=n(),A=n(),L=n(),ee=n(),re=n(),he=n(),Ce=n(),Be=n(),He=n();ue($,T[1],T[0]),ue(He,D[1],D[0]),de($,$,He),J(A,T[0],T[1]),J(He,D[0],D[1]),de(A,A,He),de(L,T[3],D[3]),de(L,L,c),de(ee,T[2],D[2]),J(ee,ee,ee),ue(re,A,$),ue(he,ee,L),J(Ce,ee,L),J(Be,A,$),de(T[0],re,he),de(T[1],Be,Ce),de(T[2],Ce,he),de(T[3],re,Be)}function Ue(T,D,$){var A;for(A=0;A<4;A++)j(T[A],D[A],$)}function je(T,D){var $=n(),A=n(),L=n();me(L,D[2]),de($,D[0],L),de(A,D[1],L),K(T,A),T[31]^=oe($)<<7}function ke(T,D,$){var A,L;for(q(T[0],a),q(T[1],s),q(T[2],s),q(T[3],a),L=255;L>=0;--L)A=$[L/8|0]>>(L&7)&1,Ue(T,D,A),ye(D,T),ye(T,T),Ue(T,D,A)}function nt(T,D){var $=[n(),n(),n(),n()];q($[0],f),q($[1],h),q($[2],s),de($[3],f,h),ke(T,$,D)}function mt(T,D,$){var A=new Uint8Array(64),L=[n(),n(),n(),n()],ee;for($||r(D,32),pe(A,D,32),A[0]&=248,A[31]&=127,A[31]|=64,nt(L,A),je(T,L),ee=0;ee<32;ee++)D[ee+32]=T[ee];return 0}var xn=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Ht(T,D){var $,A,L,ee;for(A=63;A>=32;--A){for($=0,L=A-32,ee=A-12;L>4)*xn[L],$=D[L]>>8,D[L]&=255;for(L=0;L<32;L++)D[L]-=$*xn[L];for(A=0;A<32;A++)D[A+1]+=D[A]>>8,T[A]=D[A]&255}function wn(T){var D=new Float64Array(64),$;for($=0;$<64;$++)D[$]=T[$];for($=0;$<64;$++)T[$]=0;Ht(T,D)}function Ii(T,D,$,A){var L=new Uint8Array(64),ee=new Uint8Array(64),re=new Uint8Array(64),he,Ce,Be=new Float64Array(64),He=[n(),n(),n(),n()];pe(L,A,32),L[0]&=248,L[31]&=127,L[31]|=64;var ct=$+64;for(he=0;he<$;he++)T[64+he]=D[he];for(he=0;he<32;he++)T[32+he]=L[32+he];for(pe(re,T.subarray(32),$+32),wn(re),nt(He,re),je(T,He),he=32;he<64;he++)T[he]=A[he];for(pe(ee,T,$+64),wn(ee),he=0;he<64;he++)Be[he]=0;for(he=0;he<32;he++)Be[he]=re[he];for(he=0;he<32;he++)for(Ce=0;Ce<32;Ce++)Be[he+Ce]+=ee[he]*L[Ce];return Ht(T.subarray(32),Be),ct}function br(T,D){var $=n(),A=n(),L=n(),ee=n(),re=n(),he=n(),Ce=n();return q(T[2],s),Q(T[1],D),Se(L,T[1]),de(ee,L,l),ue(L,L,T[2]),J(ee,T[2],ee),Se(re,ee),Se(he,re),de(Ce,he,re),de($,Ce,L),de($,$,ee),Ze($,$),de($,$,L),de($,$,ee),de($,$,ee),de(T[0],$,ee),Se(A,T[0]),de(A,A,ee),Y(A,L)&&de(T[0],T[0],p),Se(A,T[0]),de(A,A,ee),Y(A,L)?-1:(oe(T[0])===D[31]>>7&&ue(T[0],a,T[0]),de(T[3],T[0],T[1]),0)}function yi(T,D,$,A){var L,ee=new Uint8Array(32),re=new Uint8Array(64),he=[n(),n(),n(),n()],Ce=[n(),n(),n(),n()];if($<64||br(Ce,A))return-1;for(L=0;L<$;L++)T[L]=D[L];for(L=0;L<32;L++)T[L+32]=A[L];if(pe(re,T,$),wn(re),ke(he,Ce,re),nt(Ce,D.subarray(32)),ye(he,Ce),je(ee,he),$-=64,w(D,0,ee,0)){for(L=0;L<$;L++)T[L]=0;return-1}for(L=0;L<$;L++)T[L]=D[L+64];return $}var sr=32,si=24,bi=32,Rr=16,Xi=32,yo=32,xi=32,Dr=32,Sa=32,_t=si,hn=bi,_n=Rr,qn=64,ur=32,Xr=64,bo=32,Zl=64;t.lowlevel={crypto_core_hsalsa20:E,crypto_stream_xor:z,crypto_stream:N,crypto_stream_salsa20_xor:k,crypto_stream_salsa20:M,crypto_onetimeauth:V,crypto_onetimeauth_verify:ne,crypto_verify_16:b,crypto_verify_32:w,crypto_secretbox:Z,crypto_secretbox_open:G,crypto_scalarmult:Ae,crypto_scalarmult_base:Le,crypto_box_beforenm:be,crypto_box_afternm:yt,crypto_box:Nt,crypto_box_open:yn,crypto_box_keypair:$e,crypto_hash:pe,crypto_sign:Ii,crypto_sign_keypair:mt,crypto_sign_open:yi,crypto_secretbox_KEYBYTES:sr,crypto_secretbox_NONCEBYTES:si,crypto_secretbox_ZEROBYTES:bi,crypto_secretbox_BOXZEROBYTES:Rr,crypto_scalarmult_BYTES:Xi,crypto_scalarmult_SCALARBYTES:yo,crypto_box_PUBLICKEYBYTES:xi,crypto_box_SECRETKEYBYTES:Dr,crypto_box_BEFORENMBYTES:Sa,crypto_box_NONCEBYTES:_t,crypto_box_ZEROBYTES:hn,crypto_box_BOXZEROBYTES:_n,crypto_sign_BYTES:qn,crypto_sign_PUBLICKEYBYTES:ur,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:bo,crypto_hash_BYTES:Zl,gf:n,D:l,L:xn,pack25519:K,unpack25519:Q,M:de,A:J,S:Se,Z:ue,pow2523:Ze,add:ye,set25519:q,modL:Ht,scalarmult:ke,scalarbase:nt};function Sf(T,D){if(T.length!==sr)throw new Error("bad key size");if(D.length!==si)throw new Error("bad nonce size")}function ae(T,D){if(T.length!==xi)throw new Error("bad public key size");if(D.length!==Dr)throw new Error("bad secret key size")}function le(){for(var T=0;T=0},t.sign.keyPair=function(){var T=new Uint8Array(ur),D=new Uint8Array(Xr);return mt(T,D),{publicKey:T,secretKey:D}},t.sign.keyPair.fromSecretKey=function(T){if(le(T),T.length!==Xr)throw new Error("bad secret key size");for(var D=new Uint8Array(ur),$=0;$"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(r){return Buffer.from(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(Buffer.from(r,"base64"),0))}):(t.encodeBase64=function(r){return new Buffer(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0))}):(t.encodeBase64=function(r){var i,o=[],a=r.length;for(i=0;i{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:l,form:c,...f}=e,[h,p]=y.useState(null),m=Gt(t,O=>p(O)),v=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Za({prop:i,defaultProp:o,onChange:l}),S=y.useRef(w);return y.useEffect(()=>{const O=h?.form;if(O){const E=()=>x(S.current);return O.addEventListener("reset",E),()=>O.removeEventListener("reset",E)}},[h,x]),I.jsxs($Ge,{scope:n,state:w,disabled:s,children:[I.jsx(pt.button,{type:"button",role:"checkbox","aria-checked":Sl(w)?"mixed":w,"aria-required":a,"data-state":hZ(w),"data-disabled":s?"":void 0,disabled:s,value:u,...f,ref:m,onKeyDown:Ye(e.onKeyDown,O=>{O.key==="Enter"&&O.preventDefault()}),onClick:Ye(e.onClick,O=>{x(E=>Sl(E)?!0:!E),b&&(v.current=O.isPropagationStopped(),v.current||O.stopPropagation())})}),b&&I.jsx(NGe,{control:h,bubbles:!v.current,name:r,value:u,checked:w,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"},defaultChecked:Sl(o)?!1:o})]})});cZ.displayName=k5;var fZ="CheckboxIndicator",dZ=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=IGe(fZ,n);return I.jsx(Gr,{present:r||Sl(o.state)||o.state===!0,children:I.jsx(pt.span,{"data-state":hZ(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});dZ.displayName=fZ;var NGe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,a=y.useRef(null),s=FP(n),u=lA(t);y.useEffect(()=>{const c=a.current,f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&p){const m=new Event("click",{bubbles:r});c.indeterminate=Sl(n),p.call(c,Sl(n)?!1:n),c.dispatchEvent(m)}},[s,n,r]);const l=y.useRef(Sl(n)?!1:n);return I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??l.current,...o,tabIndex:-1,ref:a,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Sl(e){return e==="indeterminate"}function hZ(e){return Sl(e)?"indeterminate":e?"checked":"unchecked"}var jQe=cZ,BQe=dZ;export{AZe as $,WGe as A,the as B,jYe as C,BYe as D,UYe as E,FYe as F,tge as G,ige as H,lYe as I,oge as J,mz as K,JYe as L,sge as M,nge as N,FGe as O,VGe as P,TYe as Q,F as R,Al as S,age as T,rge as U,tYe as V,dZe as W,kge as X,Tge as Y,OZe as Z,ZYe as _,KGe as a,BXe as a$,vZe as a0,yZe as a1,wZe as a2,_Ze as a3,CZe as a4,KYe as a5,SZe as a6,tZe as a7,xZe as a8,EZe as a9,xYe as aA,CYe as aB,dYe as aC,eYe as aD,IZe as aE,oZe as aF,hXe as aG,SXe as aH,_Xe as aI,hYe as aJ,bYe as aK,EXe as aL,OXe as aM,AXe as aN,HGe as aO,RXe as aP,DXe as aQ,$Xe as aR,MXe as aS,NXe as aT,FXe as aU,LXe as aV,jXe as aW,GYe as aX,GXe as aY,XYe as aZ,YXe as a_,gZe as aa,mZe as ab,bZe as ac,kZe as ad,DZe as ae,TZe as af,MZe as ag,LYe as ah,zGe as ai,JGe as aj,rYe as ak,yYe as al,GGe as am,iYe as an,pYe as ao,nYe as ap,uYe as aq,vYe as ar,mYe as as,cYe as at,gYe as au,QGe as av,ZGe as aw,oYe as ax,SYe as ay,_Ye as az,gm as b,fXe as b$,zXe as b0,UXe as b1,WXe as b2,HXe as b3,qXe as b4,KXe as b5,ZXe as b6,VXe as b7,JXe as b8,YYe as b9,uQe as bA,lQe as bB,WUe as bC,ZUe as bD,oQe as bE,lXe as bF,NZe as bG,BZe as bH,FZe as bI,XXe as bJ,Ui as bK,fQe as bL,dQe as bM,sXe as bN,mXe as bO,dXe as bP,eXe as bQ,YZe as bR,GZe as bS,hQe as bT,XGe as bU,wYe as bV,fYe as bW,YGe as bX,gQe as bY,mQe as bZ,$Ye as b_,rQe as ba,iQe as bb,tQe as bc,nQe as bd,c3 as be,DYe as bf,_f as bg,VZe as bh,PXe as bi,kXe as bj,$P as bk,IP as bl,JNe as bm,Js as bn,xf as bo,tp as bp,QXe as bq,LZe as br,zZe as bs,uXe as bt,UZe as bu,xXe as bv,bXe as bw,tXe as bx,yXe as by,sQe as bz,dn as c,nZe as c0,rZe as c1,SQe as c2,EQe as c3,ZZe as c4,jZe as c5,TQe as c6,MQe as c7,$Qe as c8,IQe as c9,LQe as cA,pXe as cB,QZe as cC,nXe as cD,cXe as cE,JZe as cF,gXe as cG,iXe as cH,jQe as cI,BQe as cJ,QYe as cK,cZe as cL,qYe as cM,eZe as cN,lZe as cO,rXe as cP,UGe as cQ,HZe as cR,jUe as cS,aZe as cT,XZe as cU,WZe as cV,RQe as ca,DQe as cb,AQe as cc,PQe as cd,kQe as ce,iZe as cf,sZe as cg,vXe as ch,CQe as ci,vQe as cj,xQe as ck,wQe as cl,_Qe as cm,aXe as cn,KZe as co,qZe as cp,wXe as cq,es as cr,yr as cs,oXe as ct,yQe as cu,bQe as cv,uZe as cw,Jc as cx,RZe as cy,NQe as cz,jGe as d,qr as e,PYe as f,OYe as g,AYe as h,EYe as i,I as j,Yi as k,NYe as l,Uk as m,RYe as n,BGe as o,kYe as p,VYe as q,y as r,zO as s,qGe as t,zF as u,sYe as v,aYe as w,HYe as x,WYe as y,zYe as z}; diff --git a/public/assets/admin/locales/en/common.json b/public/assets/admin/locales/en/common.json deleted file mode 100644 index 1104f45..0000000 --- a/public/assets/admin/locales/en/common.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "loading": "Loading...", - "error": "Error", - "success": "Success", - "save": "Save", - "cancel": "Cancel", - "delete": "Delete", - "edit": "Edit", - "view": "View", - "toggleNavigation": "Toggle Navigation", - "toggleSidebar": "Toggle Sidebar", - "search": "Search...", - "theme": { - "light": "Light", - "dark": "Dark", - "system": "System" - }, - "user": "User", - "defaultEmail": "user@example.com", - "settings": "Settings", - "logout": "Logout" -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/coupon.json b/public/assets/admin/locales/en/coupon.json deleted file mode 100644 index 7d37ed3..0000000 --- a/public/assets/admin/locales/en/coupon.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "title": "Coupon Management", - "description": "Here you can manage coupons, including adding, viewing, and deleting operations.", - "table": { - "columns": { - "id": "ID", - "show": "Enable", - "name": "Coupon Name", - "type": "Type", - "code": "Code", - "limitUse": "Remaining Uses", - "limitUseWithUser": "Uses Per User", - "validity": "Validity Period", - "actions": "Actions" - }, - "validity": { - "expired": "Expired {{days}} days ago", - "notStarted": "Starts in {{days}} days", - "remaining": "{{days}} days remaining", - "startTime": "Start Time", - "endTime": "End Time", - "unlimited": "Unlimited", - "noLimit": "No Limit" - }, - "actions": { - "edit": "Edit", - "delete": "Delete", - "deleteConfirm": { - "title": "Confirm Delete", - "description": "This action will permanently delete this coupon and cannot be undone. Are you sure you want to continue?", - "confirmText": "Delete" - } - }, - "toolbar": { - "search": "Search coupons...", - "type": "Type", - "reset": "Reset", - "types": { - "1": "Fixed Amount", - "2": "Percentage" - } - } - }, - "form": { - "add": "Add Coupon", - "edit": "Edit Coupon", - "name": { - "label": "Coupon Name", - "placeholder": "Enter coupon name", - "required": "Please enter coupon name" - }, - "type": { - "label": "Coupon Type and Value", - "placeholder": "Select coupon type" - }, - "value": { - "placeholder": "Enter value" - }, - "validity": { - "label": "Validity Period", - "to": "to", - "endTimeError": "End time must be later than start time" - }, - "limitUse": { - "label": "Maximum Uses", - "placeholder": "Set maximum uses, leave empty for unlimited", - "description": "Set the total number of times this coupon can be used, leave empty for unlimited uses" - }, - "limitUseWithUser": { - "label": "Uses Per User", - "placeholder": "Set uses per user, leave empty for unlimited", - "description": "Limit how many times each user can use this coupon, leave empty for unlimited uses per user" - }, - "limitPeriod": { - "label": "Subscription Periods", - "placeholder": "Limit to specific subscription periods, leave empty for no restrictions", - "description": "Select which subscription periods can use this coupon, leave empty for no period restrictions", - "empty": "No matching periods found" - }, - "limitPlan": { - "label": "Subscription Plans", - "placeholder": "Limit to specific subscription plans, leave empty for no restrictions", - "empty": "No matching plans found" - }, - "code": { - "label": "Custom Coupon Code", - "placeholder": "Enter custom code, leave empty for auto-generation", - "description": "Customize the coupon code, leave empty for auto-generation" - }, - "generateCount": { - "label": "Batch Generation Count", - "placeholder": "Number of coupons to generate, leave empty for single coupon", - "description": "Generate multiple coupon codes at once, leave empty to generate a single code" - }, - "submit": { - "saving": "Saving...", - "save": "Save" - }, - "error": { - "saveFailed": "Failed to save coupon" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/dashboard.json b/public/assets/admin/locales/en/dashboard.json deleted file mode 100644 index a46d928..0000000 --- a/public/assets/admin/locales/en/dashboard.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "title": "Dashboard", - "stats": { - "newUsers": "New Users", - "totalScore": "Total Score", - "monthlyUpload": "Monthly Upload", - "vsLastMonth": "vs Last Month", - "vsYesterday": "vs Yesterday", - "todayIncome": "Today's Income", - "monthlyIncome": "Monthly Income", - "totalIncome": "Total Income", - "totalUsers": "Total Users", - "activeUsers": "Active Users: {{count}}", - "totalOrders": "Total Orders", - "revenue": "Revenue", - "todayRegistered": "Today Registered", - "monthlyRegistered": "Monthly Registered", - "onlineUsers": "Online Users", - "pendingTickets": "Pending Tickets", - "hasPendingTickets": "There are tickets that need attention", - "noPendingTickets": "No pending tickets", - "pendingCommission": "Pending Commission", - "hasPendingCommission": "There are commissions that need confirmation", - "noPendingCommission": "No pending commission", - "monthlyNewUsers": "Monthly New Users", - "monthlyDownload": "Monthly Download", - "todayTraffic": "Today: {{value}}", - "activeUserTrend": "Active User Trend", - "realtimeUsers": "Realtime Users", - "todayPeak": "Today's Peak", - "vsLastWeek": "vs Last Week" - }, - "trafficRank": { - "nodeTrafficRank": "Node Traffic Rank", - "userTrafficRank": "User Traffic Rank", - "today": "Today", - "last7days": "Last 7 Days", - "last30days": "Last 30 Days", - "customRange": "Custom Range", - "selectTimeRange": "Select Time Range", - "selectDateRange": "Select Date Range", - "currentTraffic": "Current Traffic", - "previousTraffic": "Previous Traffic", - "changeRate": "Change Rate", - "recordTime": "Record Time" - }, - "overview": { - "title": "Revenue Overview", - "thisMonth": "This Month", - "lastMonth": "Last Month", - "to": "to", - "selectTimeRange": "Select Range", - "selectDate": "Select Date", - "last7Days": "Last 7 Days", - "last30Days": "Last 30 Days", - "last90Days": "Last 90 Days", - "last180Days": "Last 180 Days", - "lastYear": "Last Year", - "customRange": "Custom Range", - "amount": "Amount", - "count": "Count", - "transactions": "{{count}} transactions", - "orderAmount": "Order Amount", - "commissionAmount": "Commission Amount", - "orderCount": "Order Count", - "commissionCount": "Commission Count", - "totalIncome": "Total Income", - "totalCommission": "Total Commission", - "totalTransactions": "Total: {{count}} transactions", - "avgOrderAmount": "Average Order Amount:", - "commissionRate": "Commission Rate:" - }, - "traffic": { - "title": "Traffic Ranking", - "rank": "Rank", - "domain": "Domain", - "todayTraffic": "Today's Traffic", - "monthlyTraffic": "Monthly Traffic" - }, - "queue": { - "title": "Queue Status", - "jobDetails": "Job Details", - "status": { - "description": "Current queue running status", - "running": "Running Status", - "normal": "Normal", - "abnormal": "Abnormal", - "waitTime": "Current wait time: {{seconds}} seconds", - "pending": "Pending", - "processing": "Processing", - "completed": "Completed", - "failed": "Failed", - "cancelled": "Cancelled" - }, - "details": { - "description": "Queue processing details", - "recentJobs": "Recent Jobs", - "statisticsPeriod": "Statistics Period: {{hours}} hours", - "jobsPerMinute": "Jobs Per Minute", - "maxThroughput": "Max Throughput: {{value}}", - "failedJobs7Days": "Failed Jobs (7 days)", - "retentionPeriod": "Retention Period: {{hours}} hours", - "longestRunningQueue": "Longest Running Queue", - "activeProcesses": "Active Processes", - "id": "Job ID", - "type": "Job Type", - "status": "Status", - "progress": "Progress", - "createdAt": "Created At", - "updatedAt": "Updated At", - "error": "Error Message", - "data": "Job Data", - "result": "Result", - "duration": "Duration", - "attempts": "Attempts", - "nextRetry": "Next Retry" - }, - "actions": { - "retry": "Retry", - "cancel": "Cancel", - "delete": "Delete", - "viewDetails": "View Details" - }, - "empty": "No jobs in queue", - "loading": "Loading queue status...", - "error": "Failed to load queue status" - }, - "search": { - "placeholder": "Search menus and functions...", - "title": "Menu Navigation", - "noResults": "No results found", - "loading": "Searching..." - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/group.json b/public/assets/admin/locales/en/group.json deleted file mode 100644 index 7fa8933..0000000 --- a/public/assets/admin/locales/en/group.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "title": "Permission Groups", - "description": "Manage all permission groups, including adding, deleting, and editing operations.", - "columns": { - "id": "Group ID", - "name": "Group Name", - "usersCount": "Users Count", - "serverCount": "Nodes Count", - "actions": "Actions" - }, - "form": { - "add": "Add Group", - "edit": "Edit Group", - "create": "Create Group", - "update": "Update", - "name": "Group Name", - "namePlaceholder": "Please enter group name", - "nameDescription": "Group name is used to identify different user groups, it's recommended to use meaningful names.", - "cancel": "Cancel", - "editDescription": "Modify group information, changes will take effect immediately.", - "createDescription": "Create a new permission group to assign different permissions to different users." - }, - "toolbar": { - "searchPlaceholder": "Search groups...", - "reset": "Reset" - }, - "messages": { - "deleteConfirm": "Confirm Delete", - "deleteDescription": "This action will permanently delete this permission group and cannot be recovered. Are you sure you want to continue?", - "deleteButton": "Delete", - "createSuccess": "Created Successfully", - "updateSuccess": "Updated Successfully", - "nameValidation": { - "min": "Group name must be at least 2 characters", - "max": "Group name cannot exceed 50 characters", - "pattern": "Group name can only contain letters, numbers, Chinese characters, underscores and hyphens" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/knowledge.json b/public/assets/admin/locales/en/knowledge.json deleted file mode 100644 index c3e9a81..0000000 --- a/public/assets/admin/locales/en/knowledge.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "title": "Knowledge Base", - "description": "Here you can configure the knowledge base, including adding, deleting, and editing operations.", - "columns": { - "id": "ID", - "status": "Status", - "title": "Title", - "category": "Category", - "actions": "Actions" - }, - "form": { - "add": "Add Knowledge", - "edit": "Edit Knowledge", - "title": "Title", - "titlePlaceholder": "Please enter knowledge title", - "category": "Category", - "categoryPlaceholder": "Please enter category, it will be automatically classified", - "language": "Language", - "languagePlaceholder": "Please select language", - "content": "Content", - "show": "Show", - "cancel": "Cancel", - "submit": "Submit" - }, - "languages": { - "en-US": "English", - "ja-JP": "日本語", - "ko-KR": "한국어", - "vi-VN": "Tiếng Việt", - "zh-CN": "简体中文", - "zh-TW": "繁體中文" - }, - "messages": { - "deleteConfirm": "Confirm Delete", - "deleteDescription": "This action will permanently delete this knowledge base record and cannot be recovered. Are you sure you want to continue?", - "deleteButton": "Delete", - "operationSuccess": "Operation Successful" - }, - "toolbar": { - "searchPlaceholder": "Search knowledge...", - "reset": "Reset", - "sortModeHint": "Drag knowledge items to sort, click save when done", - "editSort": "Edit Sort", - "saveSort": "Save Sort" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/nav.json b/public/assets/admin/locales/en/nav.json deleted file mode 100644 index 5d02940..0000000 --- a/public/assets/admin/locales/en/nav.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "dashboard": "Dashboard", - "systemManagement": "System Management", - "systemConfig": "System Configuration", - "themeConfig": "Theme Configuration", - "noticeManagement": "Notice Management", - "paymentConfig": "Payment Configuration", - "knowledgeManagement": "Knowledge Management", - "nodeManagement": "Node Management", - "permissionGroupManagement": "Permission Group", - "routeManagement": "Route Management", - "subscriptionManagement": "Subscription", - "planManagement": "Plan Management", - "orderManagement": "Order Management", - "couponManagement": "Coupon Management", - "userManagement": "User Management", - "ticketManagement": "Ticket Management" -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/notice.json b/public/assets/admin/locales/en/notice.json deleted file mode 100644 index 97d28b8..0000000 --- a/public/assets/admin/locales/en/notice.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "title": "Notice Management", - "description": "Here you can configure notices, including adding, deleting, editing and other operations.", - "table": { - "columns": { - "id": "ID", - "show": "Display Status", - "title": "Title", - "actions": "Actions" - }, - "toolbar": { - "search": "Search notice title...", - "reset": "Reset", - "sort": { - "edit": "Edit Order", - "save": "Save Order" - } - }, - "actions": { - "edit": "Edit", - "delete": { - "title": "Delete Confirmation", - "description": "Are you sure you want to delete this notice? This action cannot be undone.", - "success": "Successfully deleted" - } - } - }, - "form": { - "add": { - "title": "Add Notice", - "button": "Add Notice" - }, - "edit": { - "title": "Edit Notice" - }, - "fields": { - "title": { - "label": "Title", - "placeholder": "Please enter notice title" - }, - "content": { - "label": "Content" - }, - "img_url": { - "label": "Background Image", - "placeholder": "Please enter notice background image URL" - }, - "show": { - "label": "Display" - }, - "tags": { - "label": "Tags", - "placeholder": "Press Enter to add tags" - } - }, - "buttons": { - "cancel": "Cancel", - "submit": "Submit", - "success": "Successfully submitted" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/order.json b/public/assets/admin/locales/en/order.json deleted file mode 100644 index 2f14902..0000000 --- a/public/assets/admin/locales/en/order.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "title": "Order Management", - "description": "Here you can view user orders, including assignment, viewing, deletion and other operations.", - "table": { - "columns": { - "tradeNo": "Order No.", - "type": "Type", - "plan": "Subscription Plan", - "period": "Period", - "amount": "Payment Amount", - "status": "Order Status", - "commission": "Commission Amount", - "commissionStatus": "Commission Status", - "createdAt": "Created At" - } - }, - "type": { - "NEW": "New Purchase", - "RENEWAL": "Renewal", - "UPGRADE": "Upgrade", - "RESET_FLOW": "Reset Traffic" - }, - "period": { - "month_price": "Monthly", - "quarter_price": "Quarterly", - "half_year_price": "Semi-annually", - "year_price": "Annually", - "two_year_price": "2 Years", - "three_year_price": "3 Years", - "onetime_price": "One-time", - "reset_price": "Reset Package" - }, - "status": { - "PENDING": "Pending", - "PROCESSING": "Processing", - "CANCELLED": "Cancelled", - "COMPLETED": "Completed", - "DISCOUNTED": "Discounted", - "tooltip": "After marking as [Paid], the system will proceed with activation and completion" - }, - "commission": { - "PENDING": "Pending", - "PROCESSING": "Processing", - "VALID": "Valid", - "INVALID": "Invalid" - }, - "actions": { - "markAsPaid": "Mark as Paid", - "cancel": "Cancel Order", - "openMenu": "Open Menu", - "reset": "Reset" - }, - "search": { - "placeholder": "Search orders..." - }, - "dialog": { - "title": "Order Information", - "basicInfo": "Basic Information", - "amountInfo": "Amount Information", - "timeInfo": "Time Information", - "addOrder": "Add Order", - "assignOrder": "Assign Order", - "fields": { - "userEmail": "User Email", - "orderPeriod": "Order Period", - "subscriptionPlan": "Subscription Plan", - "callbackNo": "Callback No.", - "paymentAmount": "Payment Amount", - "balancePayment": "Balance Payment", - "discountAmount": "Discount Amount", - "refundAmount": "Refund Amount", - "deductionAmount": "Deduction Amount", - "createdAt": "Created At", - "updatedAt": "Updated At" - }, - "placeholders": { - "email": "Please enter user email", - "plan": "Please select subscription plan", - "period": "Please select subscription period", - "amount": "Please enter payment amount" - }, - "actions": { - "cancel": "Cancel", - "confirm": "Confirm" - }, - "messages": { - "addSuccess": "Added successfully" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/payment.json b/public/assets/admin/locales/en/payment.json deleted file mode 100644 index 85b7abf..0000000 --- a/public/assets/admin/locales/en/payment.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "title": "Payment Configuration", - "description": "Configure payment methods including Alipay, WeChat Pay, etc.", - - "table": { - "columns": { - "id": "ID", - "enable": "Enable", - "name": "Display Name", - "payment": "Payment Gateway", - "notify_url": "Notify URL", - "notify_url_tooltip": "The payment gateway will send notifications to this address. Please ensure it's accessible through your firewall.", - "actions": "Actions" - }, - "actions": { - "edit": "Edit", - "delete": { - "title": "Confirm Delete", - "description": "Are you sure you want to delete this payment method? This action cannot be undone.", - "success": "Successfully deleted" - } - }, - "toolbar": { - "search": "Search payment methods...", - "reset": "Reset", - "sort": { - "hint": "Drag payment methods to sort, click save when finished", - "save": "Save Order", - "edit": "Edit Order" - } - } - }, - - "form": { - "add": { - "button": "Add Payment Method", - "title": "Add Payment Method" - }, - "edit": { - "title": "Edit Payment Method" - }, - "fields": { - "name": { - "label": "Display Name", - "placeholder": "Enter payment name", - "description": "Used for frontend display" - }, - "icon": { - "label": "Icon URL", - "placeholder": "https://example.com/icon.svg", - "description": "Icon URL for frontend display" - }, - "notify_domain": { - "label": "Notify Domain", - "placeholder": "https://example.com", - "description": "Domain for gateway notifications" - }, - "handling_fee_percent": { - "label": "Percentage Fee (%)", - "placeholder": "0-100" - }, - "handling_fee_fixed": { - "label": "Fixed Fee", - "placeholder": "0" - }, - "payment": { - "label": "Payment Gateway", - "placeholder": "Select payment gateway", - "description": "Choose the payment gateway to use" - } - }, - "validation": { - "name": { - "min": "Name must be at least 2 characters", - "max": "Name cannot exceed 30 characters" - }, - "notify_domain": { - "url": "Please enter a valid URL" - }, - "payment": { - "required": "Please select a payment gateway" - } - }, - "buttons": { - "cancel": "Cancel", - "submit": "Submit" - }, - "messages": { - "success": "Saved successfully" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/route.json b/public/assets/admin/locales/en/route.json deleted file mode 100644 index 56d247b..0000000 --- a/public/assets/admin/locales/en/route.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "title": "Route Management", - "description": "Manage all route groups, including adding, deleting, and editing operations.", - "columns": { - "id": "Group ID", - "remarks": "Remarks", - "action": "Action", - "actions": "Actions", - "matchRules": "Match {{count}} rules" - }, - "actions": { - "dns": "Resolve using specified DNS server", - "block": "Block access" - }, - "form": { - "add": "Add Route", - "edit": "Edit Route", - "create": "Create Route", - "remarks": "Remarks", - "remarksPlaceholder": "Please enter remarks", - "match": "Match Rules", - "matchPlaceholder": "example.com\n*.example.com", - "action": "Action", - "actionPlaceholder": "Please select action", - "dns": "DNS Server", - "dnsPlaceholder": "Please enter DNS server", - "cancel": "Cancel", - "submit": "Submit", - "validation": { - "remarks": "Please enter valid remarks" - } - }, - "toolbar": { - "searchPlaceholder": "Search routes...", - "reset": "Reset" - }, - "messages": { - "deleteConfirm": "Confirm Delete", - "deleteDescription": "This action will permanently delete this route group and cannot be recovered. Are you sure you want to continue?", - "deleteButton": "Delete", - "deleteSuccess": "Deleted Successfully", - "createSuccess": "Created Successfully", - "updateSuccess": "Updated Successfully" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/search.json b/public/assets/admin/locales/en/search.json deleted file mode 100644 index c10d676..0000000 --- a/public/assets/admin/locales/en/search.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "placeholder": "Search menus and functions...", - "title": "Menu Navigation", - "noResults": "No results found", - "shortcut": { - "label": "Search", - "key": "⌘K" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/server.json b/public/assets/admin/locales/en/server.json deleted file mode 100644 index 621a011..0000000 --- a/public/assets/admin/locales/en/server.json +++ /dev/null @@ -1,301 +0,0 @@ -{ - "title": "Node Configuration", - "description": "Configure node communication and synchronization settings, including communication key, polling interval, load balancing and other advanced options.", - "server_token": { - "title": "Communication Key", - "description": "The key for communication between Xboard and nodes to prevent unauthorized data access.", - "placeholder": "Please enter communication key" - }, - "server_pull_interval": { - "title": "Node Pull Action Polling Interval", - "description": "The frequency at which nodes retrieve data from the panel.", - "placeholder": "Please enter pull interval" - }, - "server_push_interval": { - "title": "Node Push Action Polling Interval", - "description": "The frequency at which nodes push data to the panel.", - "placeholder": "Please enter push interval" - }, - "device_limit_mode": { - "title": "Device Limit Mode", - "description": "In relaxed mode, multiple nodes from the same IP address count as one device.", - "strict": "Strict Mode", - "relaxed": "Relaxed Mode", - "placeholder": "Please select device limit mode" - }, - "saving": "Saving...", - "manage": { - "title": "Node Management", - "description": "Manage all nodes, including adding, deleting, editing and other operations." - }, - "columns": { - "sort": "Sort", - "nodeId": "Node ID", - "show": "Show", - "node": "Node", - "address": "Address", - "onlineUsers": { - "title": "Online Users", - "tooltip": "Online users count based on server reporting frequency" - }, - "rate": { - "title": "Rate", - "tooltip": "Traffic billing rate" - }, - "groups": { - "title": "Permission Groups", - "tooltip": "Groups that can subscribe to this node", - "empty": "--" - }, - "type": "Type", - "actions": "Actions", - "copyAddress": "Copy Connection Address", - "internalPort": "Internal Port", - "status": { - "0": "Not Running", - "1": "Unused or Abnormal", - "2": "Running Normal" - }, - "actions_dropdown": { - "edit": "Edit", - "copy": "Copy", - "delete": { - "title": "Confirm Delete", - "description": "This action will permanently delete this node and cannot be undone. Are you sure you want to continue?", - "confirm": "Delete" - }, - "copy_success": "Copied successfully", - "delete_success": "Deleted successfully" - } - }, - "toolbar": { - "search": "Search nodes...", - "type": "Type", - "reset": "Reset", - "sort": { - "tip": "Drag nodes to sort, then click save", - "edit": "Edit Sort", - "save": "Save Sort" - } - }, - "form": { - "add_node": "Add Node", - "edit_node": "Edit Node", - "new_node": "New Node", - "name": { - "label": "Node Name", - "placeholder": "Please enter node name", - "error": "Please enter a valid name" - }, - "rate": { - "label": "Rate", - "error": "Please enter a valid rate" - }, - "code": { - "label": "Custom Node ID", - "optional": "(Optional)", - "placeholder": "Please enter custom node ID" - }, - "tags": { - "label": "Node Tags", - "placeholder": "Press Enter to add tags" - }, - "groups": { - "label": "Permission Groups", - "add": "Add Group", - "placeholder": "Please select permission groups", - "empty": "No results found" - }, - "host": { - "label": "Node Address", - "placeholder": "Please enter domain or IP" - }, - "port": { - "label": "Connection Port", - "placeholder": "User connection port", - "tooltip": "The port that users actually connect to, this is the port number that needs to be filled in the client configuration. If using transit or tunnel, this port may be different from the port that the server actually listens on.", - "sync": "Sync to server port" - }, - "server_port": { - "label": "Server Port", - "placeholder": "Server listening port", - "tooltip": "The port that the server actually listens on, this is the real port opened on the server. If using transit or tunnel, this port may be different from the user connection port." - }, - "parent": { - "label": "Parent Node", - "placeholder": "Select parent node", - "none": "None" - }, - "route": { - "label": "Route Groups", - "placeholder": "Select route groups", - "empty": "No results found" - }, - "submit": "Submit", - "cancel": "Cancel", - "success": "Submitted successfully" - }, - "dynamic_form": { - "shadowsocks": { - "cipher": { - "label": "Encryption Method", - "placeholder": "Select encryption method" - }, - "obfs": { - "label": "Obfuscation", - "placeholder": "Select obfuscation method", - "none": "None", - "http": "HTTP" - }, - "obfs_settings": { - "path": "Path", - "host": "Host" - } - }, - "vmess": { - "tls": { - "label": "TLS", - "placeholder": "Please select security", - "disabled": "Disabled", - "enabled": "Enabled" - }, - "tls_settings": { - "server_name": { - "label": "Server Name Indication (SNI)", - "placeholder": "Leave empty if not used" - }, - "allow_insecure": "Allow Insecure?" - }, - "network": { - "label": "Transport Protocol", - "placeholder": "Select transport protocol" - } - }, - "trojan": { - "server_name": { - "label": "Server Name Indication (SNI)", - "placeholder": "Used for certificate verification when node address differs from certificate" - }, - "allow_insecure": "Allow Insecure?", - "network": { - "label": "Transport Protocol", - "placeholder": "Select transport protocol" - } - }, - "hysteria": { - "version": { - "label": "Protocol Version", - "placeholder": "Protocol version" - }, - "alpn": { - "label": "ALPN", - "placeholder": "ALPN" - }, - "obfs": { - "label": "Obfuscation", - "type": { - "label": "Obfuscation Implementation", - "placeholder": "Select obfuscation implementation", - "salamander": "Salamander" - }, - "password": { - "label": "Obfuscation Password", - "placeholder": "Please enter obfuscation password", - "generate_success": "Obfuscation password generated successfully" - } - }, - "tls": { - "server_name": { - "label": "Server Name Indication (SNI)", - "placeholder": "Used for certificate verification when node address differs from certificate" - }, - "allow_insecure": "Allow Insecure?" - }, - "bandwidth": { - "up": { - "label": "Upload Bandwidth", - "placeholder": "Please enter upload bandwidth", - "suffix": "Mbps", - "bbr_tip": ", leave empty to use BBR" - }, - "down": { - "label": "Download Bandwidth", - "placeholder": "Please enter download bandwidth", - "suffix": "Mbps", - "bbr_tip": ", leave empty to use BBR" - } - } - }, - "vless": { - "tls": { - "label": "Security", - "placeholder": "Please select security", - "none": "None", - "tls": "TLS", - "reality": "Reality" - }, - "tls_settings": { - "server_name": { - "label": "Server Name Indication (SNI)", - "placeholder": "Leave empty if not used" - }, - "allow_insecure": "Allow Insecure?" - }, - "reality_settings": { - "server_name": { - "label": "Destination Site (dest)", - "placeholder": "e.g., example.com" - }, - "server_port": { - "label": "Port", - "placeholder": "e.g., 443" - }, - "allow_insecure": "Allow Insecure?", - "private_key": { - "label": "Private Key" - }, - "public_key": { - "label": "Public Key" - }, - "short_id": { - "label": "Short ID", - "placeholder": "Optional, length must be even, max 16 characters", - "description": "List of shortIds available to clients, can be used to distinguish different clients, using hexadecimal characters 0-f", - "generate": "Generate Short ID", - "success": "Short ID generated successfully" - }, - "key_pair": { - "generate": "Generate Key Pair", - "success": "Key pair generated successfully", - "error": "Failed to generate key pair" - } - }, - "network": { - "label": "Transport Protocol", - "placeholder": "Select transport protocol" - }, - "flow": { - "label": "Flow Control", - "placeholder": "Select flow control" - } - } - }, - "network_settings": { - "edit_protocol": "Edit Protocol", - "edit_protocol_config": "Edit Protocol Configuration", - "use_template": "Use {{template}} Template", - "json_config_placeholder": "Please enter JSON configuration", - "json_config_placeholder_with_template": "Please enter JSON configuration or select template above", - "validation": { - "must_be_object": "Configuration must be a JSON object", - "invalid_json": "Invalid JSON format" - }, - "errors": { - "save_failed": "Error occurred while saving" - } - }, - "common": { - "cancel": "Cancel", - "confirm": "Confirm" - } -} diff --git a/public/assets/admin/locales/en/settings.json b/public/assets/admin/locales/en/settings.json deleted file mode 100644 index 8bec354..0000000 --- a/public/assets/admin/locales/en/settings.json +++ /dev/null @@ -1,538 +0,0 @@ -{ - "title": "System Settings", - "description": "Manage core system configurations, including site, security, subscription, invite commission, nodes, email, and notifications", - "server": { - "title": "Server Configuration", - "description": "Configure node communication and synchronization settings, including communication keys, polling intervals, load balancing and other advanced options.", - "server_token": { - "title": "Communication Token", - "placeholder": "Enter communication token", - "description": "Used for authentication between servers", - "generate_tooltip": "Click to generate random token" - }, - "server_pull_interval": { - "title": "Node Pull Action Polling Interval", - "description": "The frequency at which nodes retrieve data from the panel.", - "placeholder": "Enter pull interval" - }, - "server_push_interval": { - "title": "Node Push Action Polling Interval", - "description": "The frequency at which nodes push data to the panel.", - "placeholder": "Enter push interval" - }, - "device_limit_mode": { - "title": "Device Limit Mode", - "description": "In relaxed mode, using multiple nodes from the same IP address counts as one device.", - "strict": "Strict Mode", - "relaxed": "Relaxed Mode", - "placeholder": "Select device limit mode" - } - }, - "invite": { - "title": "Invitation & Commission Settings", - "description": "Configure invitation registration and commission related settings.", - "invite_force": { - "title": "Enable Forced Invitation", - "description": "When enabled, only invited users can register." - }, - "invite_commission": { - "title": "Invitation Commission Percentage", - "description": "Default global commission distribution ratio, you can configure individual ratios in user management.", - "placeholder": "Enter commission percentage" - }, - "invite_gen_limit": { - "title": "Invitation Code Generation Limit", - "description": "Maximum number of invitation codes a user can create", - "placeholder": "Enter generation limit" - }, - "invite_never_expire": { - "title": "Never Expire Invitation Code", - "description": "When enabled, invitation codes will not expire after use, otherwise they will expire after being used." - }, - "commission_first_time": { - "title": "First-time Commission Only", - "description": "When enabled, commission will only be generated on the first payment of the invitee, can be configured individually in user management." - }, - "commission_auto_check": { - "title": "Automatic Commission Confirmation", - "description": "When enabled, commission will be automatically confirmed 3 days after order completion." - }, - "commission_withdraw_limit": { - "title": "Withdrawal Threshold (Yuan)", - "description": "Withdrawal requests below this threshold will not be submitted.", - "placeholder": "Enter withdrawal threshold" - }, - "commission_withdraw_method": { - "title": "Withdrawal Methods", - "description": "Supported withdrawal methods, separate multiple methods with commas.", - "placeholder": "Enter withdrawal methods, separate with commas" - }, - "withdraw_close": { - "title": "Disable Withdrawals", - "description": "When enabled, users will be prohibited from requesting withdrawals, and invitation commissions will go directly to user balance." - }, - "commission_distribution": { - "title": "Three-level Distribution", - "description": "When enabled, commission will be split according to the three set ratios, total should not exceed 100%.", - "l1": "Level 1 Inviter Ratio", - "l2": "Level 2 Inviter Ratio", - "l3": "Level 3 Inviter Ratio", - "placeholder": "Enter ratio e.g. 50" - }, - "saving": "Saving..." - }, - "site": { - "title": "Site Settings", - "description": "Configure basic site information, including site name, description, currency unit, and other core settings.", - "form": { - "siteName": { - "label": "Site Name", - "placeholder": "Please enter site name", - "description": "Used where site name needs to be displayed." - }, - "siteDescription": { - "label": "Site Description", - "placeholder": "Please enter site description", - "description": "Used where site description needs to be displayed." - }, - "siteUrl": { - "label": "Site URL", - "placeholder": "Please enter site URL, without trailing /", - "description": "Current website URL, will be used in emails and other places where URL is needed." - }, - "forceHttps": { - "label": "Force HTTPS", - "description": "Need to enable when the site is not using HTTPS but CDN or reverse proxy has forced HTTPS." - }, - "logo": { - "label": "LOGO", - "placeholder": "Please enter LOGO URL, without trailing /", - "description": "Used where LOGO needs to be displayed." - }, - "subscribeUrl": { - "label": "Subscribe URL", - "placeholder": "Used for subscription, multiple URLs separated by ','. Leave empty to use site URL.", - "description": "Used for subscription, leave empty to use site URL." - }, - "tosUrl": { - "label": "Terms of Service (TOS) URL", - "placeholder": "Please enter TOS URL, without trailing /", - "description": "Used to link to Terms of Service (TOS)" - }, - "stopRegister": { - "label": "Stop New User Registration", - "description": "When enabled, no one will be able to register." - }, - "tryOut": { - "label": "Registration Trial", - "placeholder": "Disabled", - "description": "Select the subscription for trial, if no options please add in subscription management first.", - "duration": { - "label": "Trial Duration", - "placeholder": "0", - "description": "Trial duration in hours." - } - }, - "currency": { - "label": "Currency Unit", - "placeholder": "CNY", - "description": "For display only, changing this will affect all currency units in the system." - }, - "currencySymbol": { - "label": "Currency Symbol", - "placeholder": "¥", - "description": "For display only, changing this will affect all currency symbols in the system." - } - } - }, - "safe": { - "title": "Security Settings", - "description": "Configure system security options, including login verification, password policies, and API access settings.", - "form": { - "emailVerify": { - "label": "Email Verification", - "description": "When enabled, users will be required to verify their email." - }, - "gmailLimit": { - "label": "Disable Gmail Aliases", - "description": "When enabled, Gmail aliases will not be allowed to register." - }, - "safeMode": { - "label": "Safe Mode", - "description": "When enabled, accessing the site through domains other than the site URL will be blocked with 403." - }, - "securePath": { - "label": "Admin Path", - "placeholder": "admin", - "description": "Admin management path, changing this will modify the original admin path" - }, - "emailWhitelist": { - "label": "Email Suffix Whitelist", - "description": "When enabled, only email suffixes in the list will be allowed to register.", - "suffixes": { - "label": "Email Suffixes", - "placeholder": "Enter email suffixes, one per line", - "description": "Enter the allowed email suffixes, one per line" - } - }, - "recaptcha": { - "enable": { - "label": "Enable reCAPTCHA", - "description": "When enabled, users will need to pass reCAPTCHA verification when registering." - }, - "key": { - "label": "reCAPTCHA Key", - "placeholder": "Enter reCAPTCHA key", - "description": "Enter your reCAPTCHA key" - }, - "siteKey": { - "label": "reCAPTCHA Site Key", - "placeholder": "Enter reCAPTCHA site key", - "description": "Enter your reCAPTCHA site key" - } - }, - "registerLimit": { - "enable": { - "label": "IP Registration Limit", - "description": "When enabled, the number of registrations from the same IP will be limited." - }, - "count": { - "label": "Registration Count", - "placeholder": "Enter maximum registration count", - "description": "Maximum number of registrations allowed from the same IP" - }, - "expire": { - "label": "Limit Duration", - "placeholder": "Enter limit duration in hours", - "description": "Duration of the registration limit in hours" - } - }, - "passwordLimit": { - "enable": { - "label": "Password Attempt Limit", - "description": "When enabled, the number of password attempts will be limited." - }, - "count": { - "label": "Attempt Count", - "placeholder": "Enter maximum attempt count", - "description": "Maximum number of password attempts allowed" - }, - "expire": { - "label": "Lock Duration", - "placeholder": "Enter lock duration in hours", - "description": "Duration of the account lock in hours" - } - } - } - }, - "subscribe": { - "title": "Subscription Settings", - "description": "Manage subscription-related configurations, including subscription link format, update frequency, traffic statistics, and other settings.", - "plan_change_enable": { - "title": "Allow Subscription Changes", - "description": "When enabled, users will be able to change their subscription plans." - }, - "reset_traffic_method": { - "title": "Monthly Traffic Reset Method", - "description": "Global traffic reset method, defaults to the 1st of each month. Can be set individually for subscriptions in subscription management.", - "options": { - "monthly_first": "1st of Each Month", - "monthly_reset": "Monthly Reset", - "no_reset": "No Reset", - "yearly_first": "January 1st", - "yearly_reset": "Yearly Reset" - } - }, - "surplus_enable": { - "title": "Enable Deduction Plan", - "description": "When enabled, the system will deduct from the original subscription when users change subscriptions, refer to documentation for details." - }, - "new_order_event": { - "title": "Trigger Event on New Subscription", - "description": "This task will be triggered when a new subscription is completed.", - "options": { - "no_action": "No Action", - "reset_traffic": "Reset User Traffic" - } - }, - "renew_order_event": { - "title": "Trigger Event on Subscription Renewal", - "description": "This task will be triggered when a subscription renewal is completed.", - "options": { - "no_action": "No Action", - "reset_traffic": "Reset User Traffic" - } - }, - "change_order_event": { - "title": "Trigger Event on Subscription Change", - "description": "This task will be triggered when a subscription change is completed.", - "options": { - "no_action": "No Action", - "reset_traffic": "Reset User Traffic" - } - }, - "subscribe_path": { - "title": "Subscription Path", - "description": "Subscription path, modifying will change the original subscribe path", - "current_format": "Current subscription path format: {path}/xxxxxxxxxx" - }, - "show_info_to_server": { - "title": "Show Subscription Info in Nodes", - "description": "When enabled, subscription information will be output when users subscribe to nodes." - }, - "show_protocol_to_server": { - "title": "Show Protocol in Node Names", - "description": "When enabled, subscription lines will include protocol names (e.g., [Hy2]Hong Kong)" - }, - "saving": "Saving...", - "plan": { - "title": "Subscription Plans", - "add": "Add Plan", - "search": "Search plans...", - "sort": { - "edit": "Edit Sort", - "save": "Save Sort" - }, - "columns": { - "id": "ID", - "show": "Show", - "sell": "Sell", - "renew": "Renew", - "renew_tooltip": "Whether existing users can renew when the subscription stops selling", - "name": "Name", - "stats": "Statistics", - "group": "Permission Group", - "price": "Price", - "actions": "Actions", - "edit": "Edit", - "delete": "Delete", - "delete_confirm": { - "title": "Confirm Delete", - "description": "This action will permanently delete this subscription and cannot be undone. Are you sure you want to continue?", - "success": "Successfully deleted" - }, - "price_period": { - "monthly": "Monthly", - "quarterly": "Quarterly", - "half_yearly": "Half Yearly", - "yearly": "Yearly", - "two_yearly": "Two Years", - "three_yearly": "Three Years", - "onetime": "One Time", - "reset_traffic": "Reset Traffic", - "unit": { - "month": "/month", - "quarter": "/quarter", - "half_year": "/half year", - "year": "/year", - "two_year": "/2 years", - "three_year": "/3 years", - "times": "/time" - } - } - }, - "form": { - "add_title": "Add Plan", - "edit_title": "Edit Plan", - "name": { - "label": "Plan Name", - "placeholder": "Enter plan name" - }, - "group": { - "label": "Permission Group", - "placeholder": "Select permission group", - "add": "Add Group" - }, - "transfer": { - "label": "Traffic", - "placeholder": "Enter traffic size", - "unit": "GB" - }, - "speed": { - "label": "Speed Limit", - "placeholder": "Enter speed limit", - "unit": "Mbps" - }, - "price": { - "title": "Price Settings", - "base_price": "Base monthly price", - "clear": { - "button": "Clear Prices", - "tooltip": "Clear all period price settings" - } - }, - "device": { - "label": "Device Limit", - "placeholder": "Leave empty for no limit", - "unit": "devices" - }, - "capacity": { - "label": "Capacity Limit", - "placeholder": "Leave empty for no limit", - "unit": "users" - }, - "reset_method": { - "label": "Traffic Reset Method", - "placeholder": "Select traffic reset method", - "description": "Set how subscription traffic is reset, different methods affect how user traffic is calculated", - "options": { - "follow_system": "Follow System Settings", - "monthly_first": "1st of Each Month", - "monthly_reset": "Monthly Reset", - "no_reset": "No Reset", - "yearly_first": "January 1st", - "yearly_reset": "Yearly Reset" - } - }, - "content": { - "label": "Plan Description", - "placeholder": "Write plan description here...", - "description": "Supports Markdown format, you can use headings, lists, bold, italic and other styles to beautify the content", - "preview": "Preview", - "preview_button": { - "show": "Show Preview", - "hide": "Hide Preview" - }, - "template": { - "button": "Use Template", - "tooltip": "Click to use preset plan description template", - "content": "## Plan Features\n• High-speed and stable global network access\n• Support multiple devices online simultaneously\n• Unlimited traffic reset\n\n## Usage Instructions\n1. Supported devices: iOS, Android, Windows, macOS\n2. 24/7 technical support\n3. Automatic periodic traffic reset\n\n## Notes\n- No abuse allowed\n- Comply with local laws and regulations\n- Support plan changes anytime" - } - }, - "force_update": { - "label": "Force Update to Users" - }, - "submit": { - "submitting": "Submitting...", - "submit": "Submit", - "cancel": "Cancel", - "success": { - "add": "Plan added successfully", - "update": "Plan updated successfully" - } - } - }, - "page": { - "description": "Here you can configure subscription plans, including adding, deleting, and editing operations." - } - } - }, - "email": { - "title": "Email Settings", - "description": "Configure system email service for sending verification codes, password resets, and notifications, supporting various SMTP providers.", - "email_host": { - "title": "SMTP Host", - "description": "SMTP server address, e.g., smtp.gmail.com" - }, - "email_port": { - "title": "SMTP Port", - "description": "SMTP server port, common ports: 25, 465, 587" - }, - "email_username": { - "title": "SMTP Username", - "description": "SMTP authentication username" - }, - "email_password": { - "title": "SMTP Password", - "description": "SMTP authentication password or application-specific password" - }, - "email_encryption": { - "title": "Encryption Method", - "description": "Email encryption method", - "none": "None", - "ssl": "SSL/TLS", - "tls": "STARTTLS" - }, - "email_from": { - "title": "From Address", - "description": "Sender's email address" - }, - "email_from_name": { - "title": "From Name", - "description": "Sender's display name" - }, - "email_template": { - "title": "Email Template", - "description": "You can check the documentation for how to customize email templates", - "placeholder": "Select email template" - }, - "remind_mail": { - "title": "Email Reminders", - "description": "When enabled, users will receive email notifications when their subscription is about to expire or when traffic is running low." - }, - "test": { - "title": "Send Test Email", - "sending": "Sending...", - "description": "Send a test email to verify the configuration", - "success": "Test email sent successfully", - "error": "Failed to send test email" - } - }, - "telegram": { - "title": "Telegram Settings", - "description": "Configure Telegram bot functionality for user notifications, account binding, and command interactions.", - "bot_token": { - "title": "Bot Token", - "description": "Please enter the token provided by Botfather.", - "placeholder": "0000000000:xxxxxxxxx_xxxxxxxxxxxxxxx" - }, - "webhook": { - "title": "Set Webhook", - "description": "Set up webhook for the bot. Without setting it, you won't receive Telegram notifications.", - "button": "One-Click Setup", - "setting": "Setting Webhook..." - }, - "bot_enable": { - "title": "Enable Bot Notifications", - "description": "When enabled, the bot will send basic notifications to administrators and users who have bound their Telegram accounts." - }, - "discuss_link": { - "title": "Group Link", - "description": "Once filled in, it will be displayed on the user side or used where needed.", - "placeholder": "https://t.me/xxxxxx" - } - }, - "app": { - "title": "APP Settings", - "description": "Manage mobile application configurations, including API interfaces, version control, and push notifications.", - "common": { - "placeholder": "Please input" - }, - "windows": { - "version": { - "title": "Windows Version", - "description": "Current version number of Windows client" - }, - "download": { - "title": "Windows Download URL", - "description": "Download link for Windows client" - } - }, - "macos": { - "version": { - "title": "macOS Version", - "description": "Current version number of macOS client" - }, - "download": { - "title": "macOS Download URL", - "description": "Download link for macOS client" - } - }, - "android": { - "version": { - "title": "Android Version", - "description": "Current version number of Android client" - }, - "download": { - "title": "Android Download URL", - "description": "Download link for Android client" - } - } - }, - "common": { - "saving": "Saving...", - "save_success": "Saved automatically", - "placeholder": "Please input", - "autoSaved": "Saved automatically" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/sidebar.json b/public/assets/admin/locales/en/sidebar.json deleted file mode 100644 index 19c76e6..0000000 --- a/public/assets/admin/locales/en/sidebar.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "dashboard": "Dashboard", - "systemManagement": "System Management", - "systemConfig": "System Configuration", - "themeConfig": "Theme Configuration", - "noticeManagement": "Notice Management", - "paymentConfig": "Payment Configuration", - "knowledgeManagement": "Knowledge Base", - "nodeManagement": "Node Management", - "permissionGroupManagement": "Permission Groups", - "routeManagement": "Route Management", - "subscriptionManagement": "Subscription Management", - "planManagement": "Plan Management", - "orderManagement": "Order Management", - "couponManagement": "Coupon Management", - "userManagement": "User Management", - "ticketManagement": "Ticket Management" -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/subscribe.json b/public/assets/admin/locales/en/subscribe.json deleted file mode 100644 index bae8eae..0000000 --- a/public/assets/admin/locales/en/subscribe.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "plan": { - "title": "Subscription Plans", - "add": "Add Plan", - "search": "Search plans...", - "sort": { - "edit": "Edit Sort", - "save": "Save Sort" - }, - "columns": { - "id": "ID", - "show": "Show", - "sell": "Sell", - "renew": "Renew", - "renew_tooltip": "Whether existing users can renew when the subscription stops selling", - "name": "Name", - "stats": "Statistics", - "group": "Permission Group", - "price": "Price", - "actions": "Actions", - "edit": "Edit", - "delete": "Delete", - "delete_confirm": { - "title": "Confirm Delete", - "description": "This action will permanently delete this subscription and cannot be undone. Are you sure you want to continue?", - "success": "Successfully deleted" - }, - "price_period": { - "monthly": "Monthly", - "quarterly": "Quarterly", - "half_yearly": "Half Yearly", - "yearly": "Yearly", - "two_yearly": "Two Years", - "three_yearly": "Three Years", - "onetime": "One Time", - "reset_traffic": "Reset Traffic", - "unit": { - "month": "/month", - "quarter": "/quarter", - "half_year": "/half year", - "year": "/year", - "two_year": "/2 years", - "three_year": "/3 years", - "times": "/time" - } - } - }, - "form": { - "add_title": "Add Plan", - "edit_title": "Edit Plan", - "name": { - "label": "Plan Name", - "placeholder": "Enter plan name" - }, - "group": { - "label": "Permission Group", - "placeholder": "Select permission group", - "add": "Add Group" - }, - "transfer": { - "label": "Traffic", - "placeholder": "Enter traffic size", - "unit": "GB" - }, - "speed": { - "label": "Speed Limit", - "placeholder": "Enter speed limit", - "unit": "Mbps" - }, - "price": { - "title": "Price Settings", - "base_price": "Base monthly price", - "clear": { - "button": "Clear Prices", - "tooltip": "Clear all period price settings" - } - }, - "device": { - "label": "Device Limit", - "placeholder": "Leave empty for no limit", - "unit": "devices" - }, - "capacity": { - "label": "Capacity Limit", - "placeholder": "Leave empty for no limit", - "unit": "users" - }, - "reset_method": { - "label": "Traffic Reset Method", - "placeholder": "Select traffic reset method", - "description": "Set how subscription traffic is reset, different methods affect how user traffic is calculated", - "options": { - "follow_system": "Follow System Settings", - "monthly_first": "1st of Each Month", - "monthly_reset": "Monthly Reset", - "no_reset": "No Reset", - "yearly_first": "January 1st", - "yearly_reset": "Yearly Reset" - } - }, - "content": { - "label": "Plan Description", - "placeholder": "Write plan description here...", - "description": "Supports Markdown format, you can use headings, lists, bold, italic and other styles to beautify the content", - "preview": "Preview", - "preview_button": { - "show": "Show Preview", - "hide": "Hide Preview" - }, - "template": { - "button": "Use Template", - "tooltip": "Click to use preset plan description template", - "content": "## Plan Features\n• High-speed and stable global network access\n• Support multiple devices online simultaneously\n• Unlimited traffic reset\n\n## Usage Instructions\n1. Supported devices: iOS, Android, Windows, macOS\n2. 24/7 technical support\n3. Automatic periodic traffic reset\n\n## Notes\n- No abuse allowed\n- Comply with local laws and regulations\n- Support plan changes anytime" - } - }, - "force_update": { - "label": "Force Update to Users" - }, - "submit": { - "submitting": "Submitting...", - "submit": "Submit", - "cancel": "Cancel", - "success": { - "add": "Plan added successfully", - "update": "Plan updated successfully" - } - } - }, - "page": { - "description": "Here you can configure subscription plans, including adding, deleting, and editing operations." - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/theme.json b/public/assets/admin/locales/en/theme.json deleted file mode 100644 index 8474c31..0000000 --- a/public/assets/admin/locales/en/theme.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "title": "Theme Configuration", - "description": "Theme configuration, including theme colors, font sizes, etc. If you deploy V2board in a front-end and back-end separated way, theme configuration will not take effect.", - "upload": { - "button": "Upload Theme", - "title": "Upload Theme", - "description": "Please upload a valid theme package (.zip format). The theme package should contain a complete theme file structure.", - "dragText": "Drag and drop theme file here, or", - "clickText": "click to select", - "supportText": "Supports .zip format theme packages", - "uploading": "Uploading...", - "error": { - "format": "Only ZIP format theme files are supported" - } - }, - "preview": { - "title": "Theme Preview", - "imageCount": "{{current}} / {{total}}" - }, - "card": { - "version": "Version: {{version}}", - "currentTheme": "Current Theme", - "activateTheme": "Activate Theme", - "configureTheme": "Theme Settings", - "preview": "Preview", - "delete": { - "title": "Delete Theme", - "description": "Are you sure you want to delete this theme? This action cannot be undone.", - "button": "Delete", - "error": { - "active": "Cannot delete the currently active theme" - } - } - }, - "config": { - "title": "Configure {{name}} Theme", - "description": "Modify theme styles, layouts, and other display options.", - "cancel": "Cancel", - "save": "Save", - "success": "Settings saved successfully" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/ticket.json b/public/assets/admin/locales/en/ticket.json deleted file mode 100644 index 77272d6..0000000 --- a/public/assets/admin/locales/en/ticket.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "title": "Ticket Management", - "description": "Here you can view user tickets, including viewing, replying, and closing operations.", - "columns": { - "id": "Ticket ID", - "subject": "Subject", - "level": "Priority", - "status": "Status", - "updated_at": "Last Updated", - "created_at": "Created At", - "actions": "Actions" - }, - "status": { - "closed": "Closed", - "replied": "Replied", - "pending": "Pending", - "processing": "Processing" - }, - "level": { - "low": "Low", - "medium": "Medium", - "high": "High" - }, - "filter": { - "placeholder": "Search {field}...", - "no_results": "No results found.", - "selected": "{count} selected", - "clear": "Clear filters" - }, - "actions": { - "view_details": "View Details", - "close_ticket": "Close Ticket", - "close_confirm_title": "Confirm Close Ticket", - "close_confirm_description": "After closing, you will not be able to reply. Are you sure you want to close this ticket?", - "close_confirm_button": "Close Ticket", - "close_success": "Ticket closed successfully", - "view_ticket": "View Ticket" - }, - "detail": { - "no_messages": "No messages yet", - "created_at": "Created at", - "user_info": "User Info", - "traffic_records": "Traffic Records", - "order_records": "Order Records", - "input": { - "closed_placeholder": "Ticket is closed", - "reply_placeholder": "Type your reply...", - "sending": "Sending...", - "send": "Send" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/traffic.json b/public/assets/admin/locales/en/traffic.json deleted file mode 100644 index 41853c9..0000000 --- a/public/assets/admin/locales/en/traffic.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "trafficRecord": { - "title": "Traffic Usage Records", - "time": "Time", - "upload": "Upload", - "download": "Download", - "rate": "Rate", - "total": "Total", - "noRecords": "No records found", - "perPage": "Show per page", - "records": "records", - "page": "Page {{current}} / {{total}}", - "multiplier": "{{value}}x" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/en/user.json b/public/assets/admin/locales/en/user.json deleted file mode 100644 index d26833b..0000000 --- a/public/assets/admin/locales/en/user.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "manage": { - "title": "User Management", - "description": "Here you can manage users, including adding, deleting, editing, and querying operations." - }, - "columns": { - "is_admin": "Admin", - "is_staff": "Staff", - "id": "ID", - "email": "Email", - "online_count": "Online Devices", - "status": "Status", - "subscription": "Subscription", - "group": "Group", - "used_traffic": "Used Traffic", - "total_traffic": "Total Traffic", - "expire_time": "Expire Time", - "balance": "Balance", - "commission": "Commission", - "register_time": "Register Time", - "actions": "Actions", - "device_limit": { - "unlimited": "No device limit", - "limited": "Maximum {{count}} devices allowed" - }, - "status_text": { - "normal": "Normal", - "banned": "Banned" - }, - "online_status": { - "online": "Currently Online", - "never": "Never Online", - "last_online": "Last Online: {{time}}", - "offline_duration": { - "days": "Offline Duration: {{count}}d", - "hours": "Offline Duration: {{count}}h", - "minutes": "Offline Duration: {{count}}m", - "seconds": "Offline Duration: {{count}}s" - } - }, - "expire_status": { - "permanent": "Permanent", - "expired": "Expired {{days}} days ago", - "remaining": "{{days}} days remaining" - }, - "actions_menu": { - "edit": "Edit", - "assign_order": "Assign Order", - "copy_url": "Copy Subscribe URL", - "reset_secret": "Reset UUID & URL", - "orders": "Orders", - "invites": "Invites", - "traffic_records": "Traffic Records" - } - }, - "filter": { - "selected": "{{count}} selected", - "no_results": "No results found.", - "clear": "Clear filters", - "search_placeholder": "Search...", - "email_search": "Search user email...", - "advanced": "Advanced Filter", - "reset": "Reset Filter", - "sheet": { - "title": "Advanced Filter", - "description": "Add one or more filter conditions to find users precisely", - "conditions": "Filter Conditions", - "add": "Add Condition", - "condition": "Condition {{number}}", - "field": "Select Field", - "operator": "Select Operator", - "value": "Enter Value", - "value_number": "Enter Value ({{unit}})", - "reset": "Reset", - "apply": "Apply Filter" - }, - "fields": { - "email": "Email", - "id": "User ID", - "plan_id": "Subscription", - "transfer_enable": "Traffic", - "total_used": "Used Traffic", - "online_count": "Online Devices", - "expired_at": "Expire Time", - "uuid": "UUID", - "token": "Token", - "banned": "Account Status", - "remark": "Remark", - "inviter_email": "Inviter Email", - "invite_user_id": "Inviter ID", - "is_admin": "Admin", - "is_staff": "Staff" - }, - "operators": { - "contains": "Contains", - "eq": "Equals", - "gt": "Greater Than", - "lt": "Less Than" - }, - "status": { - "normal": "Normal", - "banned": "Banned" - }, - "boolean": { - "true": "Yes", - "false": "No" - } - }, - "generate": { - "button": "Create User", - "title": "Create User", - "form": { - "email": "Email", - "email_prefix": "Account (leave empty for batch generation)", - "email_domain": "Domain", - "password": "Password", - "password_placeholder": "Leave empty to use email as password", - "expire_time": "Expire Time", - "expire_time_placeholder": "Select user expire date, leave empty for permanent", - "permanent": "Permanent", - "subscription": "Subscription Plan", - "subscription_none": "None", - "generate_count": "Generate Count", - "generate_count_placeholder": "Enter count for batch generation", - "cancel": "Cancel", - "submit": "Generate", - "success": "Generated successfully" - } - }, - "edit": { - "button": "Edit User Info", - "title": "User Management", - "form": { - "email": "Email", - "email_placeholder": "Please enter email", - "inviter_email": "Inviter Email", - "inviter_email_placeholder": "Please enter email", - "password": "Password", - "password_placeholder": "Enter new password if you want to change it", - "balance": "Balance", - "balance_placeholder": "Please enter balance", - "commission_balance": "Commission Balance", - "commission_balance_placeholder": "Please enter commission balance", - "upload": "Upload Traffic", - "upload_placeholder": "Upload traffic", - "download": "Download Traffic", - "download_placeholder": "Download traffic", - "total_traffic": "Total Traffic", - "total_traffic_placeholder": "Please enter traffic", - "expire_time": "Expire Time", - "expire_time_placeholder": "Select user expire date, leave empty for permanent", - "expire_time_specific": "Specific Time", - "expire_time_today": "Set to end of today", - "expire_time_permanent": "Permanent", - "expire_time_1month": "One Month", - "expire_time_3months": "Three Months", - "expire_time_confirm": "Confirm", - "subscription": "Subscription Plan", - "subscription_none": "None", - "account_status": "Account Status", - "commission_type": "Commission Type", - "commission_type_system": "Follow System Settings", - "commission_type_cycle": "Cycle Commission", - "commission_type_onetime": "One-time Commission", - "commission_rate": "Commission Rate", - "commission_rate_placeholder": "Leave empty to follow site commission rate", - "discount": "Exclusive Discount", - "discount_placeholder": "Leave empty for no exclusive discount", - "speed_limit": "Speed Limit", - "speed_limit_placeholder": "Leave empty for no speed limit", - "device_limit": "Device Limit", - "device_limit_placeholder": "Leave empty for no device limit", - "is_admin": "Is Admin", - "is_staff": "Is Staff", - "remarks": "Remarks", - "remarks_placeholder": "Please enter remarks here", - "cancel": "Cancel", - "submit": "Submit", - "success": "Modified successfully" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/common.json b/public/assets/admin/locales/zh/common.json deleted file mode 100644 index e0650f0..0000000 --- a/public/assets/admin/locales/zh/common.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "loading": "加载中...", - "error": "错误", - "success": "成功", - "save": "保存", - "cancel": "取消", - "delete": "删除", - "edit": "编辑", - "view": "查看", - "toggleNavigation": "切换导航", - "toggleSidebar": "切换侧边栏", - "search": "搜索...", - "theme": { - "light": "浅色", - "dark": "深色", - "system": "跟随系统" - }, - "user": "用户", - "defaultEmail": "user@example.com", - "settings": "设置", - "logout": "退出登录" -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/coupon.json b/public/assets/admin/locales/zh/coupon.json deleted file mode 100644 index 83e293a..0000000 --- a/public/assets/admin/locales/zh/coupon.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "title": "优惠券管理", - "description": "在这里可以查看优惠券,包括增加、查看、删除等操作。", - "table": { - "columns": { - "id": "ID", - "show": "启用", - "name": "卷名称", - "type": "类型", - "code": "卷码", - "limitUse": "剩余次数", - "limitUseWithUser": "可用次数/用户", - "validity": "有效期", - "actions": "操作" - }, - "validity": { - "expired": "已过期{{days}}天", - "notStarted": "{{days}}天后开始", - "remaining": "剩余{{days}}天", - "startTime": "开始时间", - "endTime": "结束时间", - "unlimited": "无限次", - "noLimit": "无限制" - }, - "actions": { - "edit": "编辑", - "delete": "删除", - "deleteConfirm": { - "title": "确认删除", - "description": "此操作将永久删除该优惠券,删除后无法恢复。确定要继续吗?", - "confirmText": "删除" - } - }, - "toolbar": { - "search": "搜索优惠券...", - "type": "类型", - "reset": "重置", - "types": { - "1": "按金额优惠", - "2": "按比例优惠" - } - } - }, - "form": { - "add": "添加优惠券", - "edit": "编辑优惠券", - "name": { - "label": "优惠券名称", - "placeholder": "请输入优惠券名称", - "required": "请输入优惠券名称" - }, - "type": { - "label": "优惠券类型和值", - "placeholder": "优惠券类型" - }, - "value": { - "placeholder": "请输入值" - }, - "validity": { - "label": "优惠券有效期", - "to": "至", - "endTimeError": "结束时间必须晚于开始时间" - }, - "limitUse": { - "label": "最大使用次数", - "placeholder": "限制最大使用次数,留空则不限制", - "description": "设置优惠券的总使用次数限制,留空表示不限制使用次数" - }, - "limitUseWithUser": { - "label": "每个用户可使用次数", - "placeholder": "限制每个用户可使用次数,留空则不限制", - "description": "限制每个用户可使用该优惠券的次数,留空表示不限制单用户使用次数" - }, - "limitPeriod": { - "label": "指定周期", - "placeholder": "限制指定周期可以使用优惠,留空则不限制", - "description": "选择可以使用优惠券的订阅周期,留空表示不限制使用周期", - "empty": "没有找到匹配的周期" - }, - "limitPlan": { - "label": "指定订阅", - "placeholder": "限制指定订阅可以使用优惠,留空则不限制", - "empty": "没有找到匹配的订阅" - }, - "code": { - "label": "自定义优惠码", - "placeholder": "自定义优惠码,留空则自动生成", - "description": "可以自定义优惠码,留空则系统自动生成" - }, - "generateCount": { - "label": "批量生成数量", - "placeholder": "批量生成优惠码数量,留空则生成单个", - "description": "批量生成多个优惠码,留空则只生成单个优惠码" - }, - "submit": { - "saving": "保存中...", - "save": "保存" - }, - "error": { - "saveFailed": "保存优惠券失败" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/dashboard.json b/public/assets/admin/locales/zh/dashboard.json deleted file mode 100644 index 9c8c5ae..0000000 --- a/public/assets/admin/locales/zh/dashboard.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "title": "仪表盘", - "stats": { - "newUsers": "新用户", - "totalScore": "总积分", - "monthlyUpload": "月上传", - "vsLastMonth": "对比上月", - "vsYesterday": "对比昨日", - "todayIncome": "今日收入", - "monthlyIncome": "月收入", - "totalIncome": "总收入", - "totalUsers": "总用户", - "activeUsers": "活跃用户: {{count}}", - "totalOrders": "总订单", - "revenue": "收入", - "todayRegistered": "今日注册", - "monthlyRegistered": "月注册", - "onlineUsers": "在线用户", - "pendingTickets": "待处理工单", - "hasPendingTickets": "有工单需要处理", - "noPendingTickets": "无待处理工单", - "pendingCommission": "待处理佣金", - "hasPendingCommission": "有佣金需要确认", - "noPendingCommission": "无待处理佣金", - "monthlyNewUsers": "月新增用户", - "monthlyDownload": "月下载", - "todayTraffic": "今日: {{value}}", - "activeUserTrend": "活跃用户趋势", - "realtimeUsers": "实时用户", - "todayPeak": "今日峰值", - "vsLastWeek": "对比上周" - }, - "trafficRank": { - "nodeTrafficRank": "节点流量排行", - "userTrafficRank": "用户流量排行", - "today": "今天", - "last7days": "最近7天", - "last30days": "最近30天", - "customRange": "自定义范围", - "selectTimeRange": "选择时间范围", - "selectDateRange": "选择日期范围", - "currentTraffic": "当前流量", - "previousTraffic": "上期流量", - "changeRate": "变化率", - "recordTime": "记录时间" - }, - "overview": { - "title": "收入概览", - "thisMonth": "本月", - "lastMonth": "上月", - "to": "至", - "selectTimeRange": "选择范围", - "selectDate": "选择日期", - "last7Days": "最近7天", - "last30Days": "最近30天", - "last90Days": "最近90天", - "last180Days": "最近180天", - "lastYear": "最近一年", - "customRange": "自定义范围", - "amount": "金额", - "count": "数量", - "transactions": "{{count}} 笔交易", - "orderAmount": "订单金额", - "commissionAmount": "佣金金额", - "orderCount": "订单数量", - "commissionCount": "佣金数量", - "totalIncome": "总收入", - "totalCommission": "总佣金", - "totalTransactions": "共 {{count}} 笔交易", - "avgOrderAmount": "平均订单金额:", - "commissionRate": "佣金比例:" - }, - "queue": { - "title": "队列状态", - "jobDetails": "作业详情", - "status": { - "description": "当前队列运行状态", - "running": "运行状态", - "normal": "正常", - "abnormal": "异常", - "waitTime": "当前等待时间:{{seconds}} 秒", - "pending": "等待中", - "processing": "处理中", - "completed": "已完成", - "failed": "失败", - "cancelled": "已取消" - }, - "details": { - "description": "队列处理详细信息", - "recentJobs": "近期任务数", - "statisticsPeriod": "统计时间范围:{{hours}} 小时", - "jobsPerMinute": "每分钟处理量", - "maxThroughput": "最高吞吐量:{{value}}", - "failedJobs7Days": "7日报错数量", - "retentionPeriod": "保留 {{hours}} 小时", - "longestRunningQueue": "最长运行队列", - "activeProcesses": "活跃进程", - "id": "作业ID", - "type": "作业类型", - "status": "状态", - "progress": "进度", - "createdAt": "创建时间", - "updatedAt": "更新时间", - "error": "错误信息", - "data": "作业数据", - "result": "结果", - "duration": "耗时", - "attempts": "重试次数", - "nextRetry": "下次重试" - }, - "actions": { - "retry": "重试", - "cancel": "取消", - "delete": "删除", - "viewDetails": "查看详情" - }, - "empty": "队列中暂无作业", - "loading": "正在加载队列状态...", - "error": "加载队列状态失败" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/group.json b/public/assets/admin/locales/zh/group.json deleted file mode 100644 index f2f514d..0000000 --- a/public/assets/admin/locales/zh/group.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "title": "权限组管理", - "description": "管理所有权限组,包括添加、删除、编辑等操作。", - "columns": { - "id": "组ID", - "name": "组名称", - "usersCount": "用户数量", - "serverCount": "节点数量", - "actions": "操作" - }, - "form": { - "add": "添加权限组", - "edit": "编辑权限组", - "create": "创建权限组", - "update": "更新", - "name": "组名称", - "namePlaceholder": "请输入权限组名称", - "nameDescription": "权限组名称用于标识不同的用户组,建议使用有意义的名称。", - "cancel": "取消", - "editDescription": "修改权限组信息,更新后会立即生效。", - "createDescription": "创建新的权限组,可以为不同的用户分配不同的权限。" - }, - "toolbar": { - "searchPlaceholder": "搜索权限组...", - "reset": "重置" - }, - "messages": { - "deleteConfirm": "确认删除", - "deleteDescription": "此操作将永久删除该权限组,删除后无法恢复。确定要继续吗?", - "deleteButton": "删除", - "createSuccess": "创建成功", - "updateSuccess": "更新成功", - "nameValidation": { - "min": "组名至少需要2个字符", - "max": "组名不能超过50个字符", - "pattern": "组名只能包含字母、数字、中文、下划线和连字符" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/knowledge.json b/public/assets/admin/locales/zh/knowledge.json deleted file mode 100644 index 9ba01f8..0000000 --- a/public/assets/admin/locales/zh/knowledge.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "title": "知识库管理", - "description": "在这里可以配置知识库,包括添加、删除、编辑等操作。", - "columns": { - "id": "ID", - "status": "状态", - "title": "标题", - "category": "分类", - "actions": "操作" - }, - "form": { - "add": "添加知识", - "edit": "编辑知识", - "title": "标题", - "titlePlaceholder": "请输入知识标题", - "category": "分类", - "categoryPlaceholder": "请输入分类,分类将会自动归类", - "language": "语言", - "languagePlaceholder": "请选择语言", - "content": "内容", - "show": "显示", - "cancel": "取消", - "submit": "提交" - }, - "languages": { - "en-US": "English", - "ja-JP": "日本語", - "ko-KR": "한국어", - "vi-VN": "Tiếng Việt", - "zh-CN": "简体中文", - "zh-TW": "繁體中文" - }, - "messages": { - "deleteConfirm": "确认删除", - "deleteDescription": "此操作将永久删除该知识库记录,删除后无法恢复。确定要继续吗?", - "deleteButton": "删除", - "operationSuccess": "操作成功" - }, - "toolbar": { - "searchPlaceholder": "搜索知识...", - "reset": "重置", - "sortModeHint": "拖拽知识条目进行排序,完成后点击保存", - "editSort": "编辑排序", - "saveSort": "保存排序" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/nav.json b/public/assets/admin/locales/zh/nav.json deleted file mode 100644 index 57c498b..0000000 --- a/public/assets/admin/locales/zh/nav.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "dashboard": "仪表盘", - "systemManagement": "系统管理", - "systemConfig": "系统配置", - "themeConfig": "主题配置", - "noticeManagement": "公告管理", - "paymentConfig": "支付配置", - "knowledgeManagement": "知识库管理", - "nodeManagement": "节点管理", - "permissionGroupManagement": "权限组管理", - "routeManagement": "路由管理", - "subscriptionManagement": "订阅管理", - "planManagement": "套餐管理", - "orderManagement": "订单管理", - "couponManagement": "优惠券管理", - "userManagement": "用户管理", - "ticketManagement": "工单管理" -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/notice.json b/public/assets/admin/locales/zh/notice.json deleted file mode 100644 index 35ec15b..0000000 --- a/public/assets/admin/locales/zh/notice.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "title": "公告管理", - "description": "在这里可以配置公告,包括添加、删除、编辑等操作。", - "table": { - "columns": { - "id": "ID", - "show": "显示状态", - "title": "标题", - "actions": "操作" - }, - "toolbar": { - "search": "搜索公告标题...", - "reset": "重置", - "sort": { - "edit": "编辑排序", - "save": "保存排序" - } - }, - "actions": { - "edit": "编辑", - "delete": { - "title": "删除确认", - "description": "确定要删除该条公告吗?此操作无法撤销。", - "success": "删除成功" - } - } - }, - "form": { - "add": { - "title": "添加公告", - "button": "添加公告" - }, - "edit": { - "title": "编辑公告" - }, - "fields": { - "title": { - "label": "标题", - "placeholder": "请输入公告标题" - }, - "content": { - "label": "公告内容" - }, - "img_url": { - "label": "公告背景", - "placeholder": "请输入公告背景图片URL" - }, - "show": { - "label": "显示" - }, - "tags": { - "label": "节点标签", - "placeholder": "输入后回车添加标签" - } - }, - "buttons": { - "cancel": "取消", - "submit": "提交", - "success": "提交成功" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/order.json b/public/assets/admin/locales/zh/order.json deleted file mode 100644 index 456005d..0000000 --- a/public/assets/admin/locales/zh/order.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "title": "订单管理", - "description": "在这里可以查看用户订单,包括分配、查看、删除等操作。", - "table": { - "columns": { - "tradeNo": "订单号", - "type": "类型", - "plan": "订阅计划", - "period": "周期", - "amount": "支付金额", - "status": "订单状态", - "commission": "佣金金额", - "commissionStatus": "佣金状态", - "createdAt": "创建时间" - } - }, - "type": { - "NEW": "新购", - "RENEWAL": "续费", - "UPGRADE": "升级", - "RESET_FLOW": "流量重置" - }, - "period": { - "month_price": "月付", - "quarter_price": "季付", - "half_year_price": "半年付", - "year_price": "年付", - "two_year_price": "两年付", - "three_year_price": "三年付", - "onetime_price": "一次性", - "reset_price": "流量重置包" - }, - "status": { - "PENDING": "待支付", - "PROCESSING": "开通中", - "CANCELLED": "已取消", - "COMPLETED": "已完成", - "DISCOUNTED": "已折抵", - "tooltip": "标记为[已支付]后将会由系统进行开通后并完成" - }, - "commission": { - "PENDING": "待确认", - "PROCESSING": "发放中", - "VALID": "有效", - "INVALID": "无效" - }, - "actions": { - "markAsPaid": "标记为已支付", - "cancel": "取消订单", - "openMenu": "打开菜单", - "reset": "重置" - }, - "search": { - "placeholder": "搜索订单..." - }, - "dialog": { - "title": "订单信息", - "basicInfo": "基本信息", - "amountInfo": "金额信息", - "timeInfo": "时间信息", - "addOrder": "添加订单", - "assignOrder": "订单分配", - "fields": { - "userEmail": "用户邮箱", - "orderPeriod": "订单周期", - "subscriptionPlan": "订阅计划", - "callbackNo": "回调单号", - "paymentAmount": "支付金额", - "balancePayment": "余额支付", - "discountAmount": "优惠金额", - "refundAmount": "退回金额", - "deductionAmount": "折抵金额", - "createdAt": "创建时间", - "updatedAt": "更新时间" - }, - "placeholders": { - "email": "请输入用户邮箱", - "plan": "请选择订阅计划", - "period": "请选择购买时长", - "amount": "请输入需要支付的金额" - }, - "actions": { - "cancel": "取消", - "confirm": "确定" - }, - "messages": { - "addSuccess": "添加成功" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/payment.json b/public/assets/admin/locales/zh/payment.json deleted file mode 100644 index 991187e..0000000 --- a/public/assets/admin/locales/zh/payment.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "title": "支付配置", - "description": "在这里可以配置支付方式,包括支付宝、微信等。", - - "table": { - "columns": { - "id": "ID", - "enable": "启用", - "name": "显示名称", - "payment": "支付接口", - "notify_url": "通知地址", - "notify_url_tooltip": "支付网关将会把数据通知到本地址,请通过防火墙放行本地址。", - "actions": "操作" - }, - "actions": { - "edit": "编辑", - "delete": { - "title": "删除确认", - "description": "确定要删除该支付方式吗?此操作无法撤销。", - "success": "删除成功" - } - }, - "toolbar": { - "search": "搜索支付方式...", - "reset": "重置", - "sort": { - "hint": "拖拽支付方式进行排序,完成后点击保存", - "save": "保存排序", - "edit": "编辑排序" - } - } - }, - - "form": { - "add": { - "button": "添加支付方式", - "title": "添加支付方式" - }, - "edit": { - "title": "编辑支付方式" - }, - "fields": { - "name": { - "label": "显示名称", - "placeholder": "请输入支付名称", - "description": "用于前端显示" - }, - "icon": { - "label": "图标URL", - "placeholder": "https://example.com/icon.svg", - "description": "用于前端显示的图标地址" - }, - "notify_domain": { - "label": "通知域名", - "placeholder": "https://example.com", - "description": "网关通知将发送到该域名" - }, - "handling_fee_percent": { - "label": "百分比手续费(%)", - "placeholder": "0-100" - }, - "handling_fee_fixed": { - "label": "固定手续费", - "placeholder": "0" - }, - "payment": { - "label": "支付接口", - "placeholder": "请选择支付接口", - "description": "选择要使用的支付接口" - } - }, - "validation": { - "name": { - "min": "名称至少需要2个字符", - "max": "名称不能超过30个字符" - }, - "notify_domain": { - "url": "请输入有效的URL" - }, - "payment": { - "required": "请选择支付接口" - } - }, - "buttons": { - "cancel": "取消", - "submit": "提交" - }, - "messages": { - "success": "保存成功" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/route.json b/public/assets/admin/locales/zh/route.json deleted file mode 100644 index 3a3611a..0000000 --- a/public/assets/admin/locales/zh/route.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "title": "路由管理", - "description": "管理所有路由组,包括添加、删除、编辑等操作。", - "columns": { - "id": "组ID", - "remarks": "备注", - "action": "动作", - "actions": "操作", - "matchRules": "匹配{{count}}条规则" - }, - "actions": { - "dns": "指定DNS服务器进行解析", - "block": "禁止访问" - }, - "form": { - "add": "添加路由", - "edit": "编辑路由", - "create": "创建路由", - "remarks": "备注", - "remarksPlaceholder": "请输入备注", - "match": "匹配规则", - "matchPlaceholder": "example.com\n*.example.com", - "action": "动作", - "actionPlaceholder": "请选择动作", - "dns": "DNS服务器", - "dnsPlaceholder": "请输入DNS服务器", - "cancel": "取消", - "submit": "提交", - "validation": { - "remarks": "请输入有效的备注" - } - }, - "toolbar": { - "searchPlaceholder": "搜索路由...", - "reset": "重置" - }, - "messages": { - "deleteConfirm": "确认删除", - "deleteDescription": "此操作将永久删除该路由组,删除后无法恢复。确定要继续吗?", - "deleteButton": "删除", - "deleteSuccess": "删除成功", - "createSuccess": "创建成功", - "updateSuccess": "更新成功" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/search.json b/public/assets/admin/locales/zh/search.json deleted file mode 100644 index ac1e58a..0000000 --- a/public/assets/admin/locales/zh/search.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "placeholder": "搜索菜单和功能...", - "title": "菜单导航", - "noResults": "未找到结果", - "shortcut": { - "label": "搜索", - "key": "⌘K" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/server.json b/public/assets/admin/locales/zh/server.json deleted file mode 100644 index c435aea..0000000 --- a/public/assets/admin/locales/zh/server.json +++ /dev/null @@ -1,276 +0,0 @@ -{ - "manage": { - "title": "节点管理", - "description": "管理所有节点,包括添加、删除、编辑等操作。" - }, - "columns": { - "sort": "排序", - "nodeId": "节点ID", - "show": "显隐", - "node": "节点", - "address": "地址", - "onlineUsers": { - "title": "在线人数", - "tooltip": "在线人数根据服务端上报频率而定" - }, - "rate": { - "title": "倍率", - "tooltip": "流量扣费倍率" - }, - "groups": { - "title": "权限组", - "tooltip": "可订阅到该节点的权限组", - "empty": "--" - }, - "type": "类型", - "actions": "操作", - "copyAddress": "复制连接地址", - "internalPort": "内部端口", - "status": { - "0": "未运行", - "1": "无人使用或异常", - "2": "运行正常" - }, - "actions_dropdown": { - "edit": "编辑", - "copy": "复制", - "delete": { - "title": "确认删除", - "description": "此操作将永久删除该节点,删除后无法恢复。确定要继续吗?", - "confirm": "删除" - }, - "copy_success": "复制成功", - "delete_success": "删除成功" - } - }, - "toolbar": { - "search": "搜索节点...", - "type": "类型", - "reset": "重置", - "sort": { - "tip": "拖拽节点进行排序,完成后点击保存", - "edit": "编辑排序", - "save": "保存排序" - } - }, - "form": { - "add_node": "添加节点", - "edit_node": "编辑节点", - "new_node": "新建节点", - "name": { - "label": "节点名称", - "placeholder": "请输入节点名称", - "error": "请输入有效的节点名称" - }, - "rate": { - "label": "倍率", - "error": "请输入有效的倍率" - }, - "code": { - "label": "自定义节点ID", - "optional": "(选填)", - "placeholder": "请输入自定义节点ID" - }, - "tags": { - "label": "节点标签", - "placeholder": "输入后回车添加标签" - }, - "groups": { - "label": "权限组", - "add": "添加权限组", - "placeholder": "请选择权限组", - "empty": "未找到结果" - }, - "host": { - "label": "节点地址", - "placeholder": "请输入节点域名或者IP" - }, - "port": { - "label": "连接端口", - "placeholder": "用户连接端口", - "tooltip": "用户实际连接使用的端口,这是客户端配置中需要填写的端口号。如果使用了中转或隧道,这个端口可能与服务器实际监听的端口不同。", - "sync": "同步到服务端口" - }, - "server_port": { - "label": "服务端口", - "placeholder": "服务端开放端口", - "tooltip": "服务器实际监听的端口,这是在服务器上开放的真实端口。如果使用了中转或隧道,这个端口可能与用户连接端口不同。" - }, - "parent": { - "label": "父节点", - "placeholder": "选择父节点", - "none": "无" - }, - "route": { - "label": "路由组", - "placeholder": "选择路由组", - "empty": "未找到结果" - }, - "submit": "提交", - "cancel": "取消", - "success": "提交成功" - }, - "dynamic_form": { - "shadowsocks": { - "cipher": { - "label": "加密算法", - "placeholder": "选择加密算法" - }, - "obfs": { - "label": "混淆", - "placeholder": "选择混淆方式", - "none": "无", - "http": "HTTP" - }, - "obfs_settings": { - "path": "路径", - "host": "Host" - } - }, - "vmess": { - "tls": { - "label": "TLS", - "placeholder": "请选择安全性", - "disabled": "不支持", - "enabled": "支持" - }, - "tls_settings": { - "server_name": { - "label": "服务器名称指示(SNI)", - "placeholder": "不使用请留空" - }, - "allow_insecure": "允许不安全?" - }, - "network": { - "label": "传输协议", - "placeholder": "选择传输协议" - } - }, - "trojan": { - "server_name": { - "label": "服务器名称指示(SNI)", - "placeholder": "当节点地址于证书不一致时用于证书验证" - }, - "allow_insecure": "允许不安全?", - "network": { - "label": "传输协议", - "placeholder": "选择传输协议" - } - }, - "hysteria": { - "version": { - "label": "协议版本", - "placeholder": "协议版本" - }, - "alpn": { - "label": "ALPN", - "placeholder": "ALPN" - }, - "obfs": { - "label": "混淆", - "type": { - "label": "混淆实现", - "placeholder": "选择混淆实现", - "salamander": "Salamander" - }, - "password": { - "label": "混淆密码", - "placeholder": "请输入混淆密码", - "generate_success": "混淆密码生成成功" - } - }, - "tls": { - "server_name": { - "label": "服务器名称指示(SNI)", - "placeholder": "当节点地址于证书不一致时用于证书验证" - }, - "allow_insecure": "允许不安全?" - }, - "bandwidth": { - "up": { - "label": "上行宽带", - "placeholder": "请输入上行宽带", - "suffix": "Mbps", - "bbr_tip": ",留空则使用BBR" - }, - "down": { - "label": "下行宽带", - "placeholder": "请输入下行宽带", - "suffix": "Mbps", - "bbr_tip": ",留空则使用BBR" - } - } - }, - "vless": { - "tls": { - "label": "安全性", - "placeholder": "请选择安全性", - "none": "无", - "tls": "TLS", - "reality": "Reality" - }, - "tls_settings": { - "server_name": { - "label": "服务器名称指示(SNI)", - "placeholder": "不使用请留空" - }, - "allow_insecure": "允许不安全?" - }, - "reality_settings": { - "server_name": { - "label": "伪装站点(dest)", - "placeholder": "例如:example.com" - }, - "server_port": { - "label": "端口(port)", - "placeholder": "例如:443" - }, - "allow_insecure": "允许不安全?", - "private_key": { - "label": "私钥(Private key)" - }, - "public_key": { - "label": "公钥(Public key)" - }, - "short_id": { - "label": "Short ID", - "placeholder": "可留空,长度为2的倍数,最长16位", - "description": "客户端可用的 shortId 列表,可用于区分不同的客户端,使用0-f的十六进制字符", - "generate": "生成 Short ID", - "success": "Short ID 生成成功" - }, - "key_pair": { - "generate": "生成密钥对", - "success": "密钥对生成成功", - "error": "生成密钥对失败" - } - }, - "network": { - "label": "传输协议", - "placeholder": "选择传输协议" - }, - "flow": { - "label": "流控", - "placeholder": "选择流控" - } - } - }, - "network_settings": { - "edit_protocol": "编辑协议", - "edit_protocol_config": "编辑协议配置", - "use_template": "使用{{template}}模板", - "json_config_placeholder": "请输入JSON配置", - "json_config_placeholder_with_template": "请输入JSON配置或选择上方模板", - "validation": { - "must_be_object": "配置必须是一个JSON对象", - "invalid_json": "无效的JSON格式" - }, - "errors": { - "save_failed": "保存时发生错误" - } - }, - "common": { - "cancel": "取消", - "confirm": "确定" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/settings.json b/public/assets/admin/locales/zh/settings.json deleted file mode 100644 index 382fcc1..0000000 --- a/public/assets/admin/locales/zh/settings.json +++ /dev/null @@ -1,542 +0,0 @@ -{ - "title": "系统设置", - "description": "管理系统核心配置,包括站点、安全、订阅、邀请佣金、节点、邮件和通知等设置", - "site": { - "title": "站点设置", - "description": "配置站点基本信息,包括站点名称、描述、货币单位等核心设置。", - "form": { - "siteName": { - "label": "站点名称", - "placeholder": "请输入站点名称", - "description": "用于显示需要站点名称的地方。" - }, - "siteDescription": { - "label": "站点描述", - "placeholder": "请输入站点描述", - "description": "用于显示需要站点描述的地方。" - }, - "siteUrl": { - "label": "站点网址", - "placeholder": "请输入站点URL,末尾不要/", - "description": "当前网站最新网址,将会在邮件等需要用于网址处体现。" - }, - "forceHttps": { - "label": "强制HTTPS", - "description": "当站点没有使用HTTPS,CDN或反代开启强制HTTPS时需要开启。" - }, - "logo": { - "label": "LOGO", - "placeholder": "请输入LOGO URL,末尾不要/", - "description": "用于显示需要LOGO的地方。" - }, - "subscribeUrl": { - "label": "订阅URL", - "placeholder": "用于订阅所使用,多个订阅地址用','隔开.留空则为站点URL。", - "description": "用于订阅所使用,留空则为站点URL。" - }, - "tosUrl": { - "label": "用户条款(TOS)URL", - "placeholder": "请输入用户条款URL,末尾不要/", - "description": "用于跳转到用户条款(TOS)" - }, - "stopRegister": { - "label": "停止新用户注册", - "description": "开启后任何人都将无法进行注册。" - }, - "tryOut": { - "label": "注册试用", - "placeholder": "关闭", - "description": "选择需要试用的订阅,如果没有选项请先前往订阅管理添加。", - "duration": { - "label": "注册试用时长", - "placeholder": "0", - "description": "注册试用时长,单位为小时。" - } - }, - "currency": { - "label": "货币单位", - "placeholder": "CNY", - "description": "仅用于展示使用,更改后系统中所有的货币单位都将发生变更。" - }, - "currencySymbol": { - "label": "货币符号", - "placeholder": "¥", - "description": "仅用于展示使用,更改后系统中所有的货币单位都将发生变更。" - } - } - }, - "safe": { - "title": "安全设置", - "description": "配置系统安全相关选项,包括登录验证、密码策略、API访问等安全设置。", - "form": { - "emailVerify": { - "label": "邮箱验证", - "description": "开启后将会强制要求用户进行邮箱验证。" - }, - "gmailLimit": { - "label": "禁止使用Gmail多别名", - "description": "开启后Gmail多别名将无法注册。" - }, - "safeMode": { - "label": "安全模式", - "description": "开启后除了站点URL以外的绑定本站点的域名访问都将会被403。" - }, - "securePath": { - "label": "后台路径", - "placeholder": "admin", - "description": "后台管理路径,修改后将会改变原有的admin路径" - }, - "emailWhitelist": { - "label": "邮箱后缀白名单", - "description": "开启后在名单中的邮箱后缀才允许进行注册。", - "suffixes": { - "label": "邮箱后缀", - "placeholder": "输入邮箱后缀,每行一个", - "description": "输入允许的邮箱后缀,每行一个" - } - }, - "recaptcha": { - "enable": { - "label": "启用reCAPTCHA", - "description": "开启后用户注册时需要通过reCAPTCHA验证。" - }, - "key": { - "label": "reCAPTCHA密钥", - "placeholder": "输入reCAPTCHA密钥", - "description": "输入您的reCAPTCHA密钥" - }, - "siteKey": { - "label": "reCAPTCHA站点密钥", - "placeholder": "输入reCAPTCHA站点密钥", - "description": "输入您的reCAPTCHA站点密钥" - } - }, - "registerLimit": { - "enable": { - "label": "IP注册限制", - "description": "开启后将限制同一IP的注册次数。" - }, - "count": { - "label": "注册次数", - "placeholder": "输入最大注册次数", - "description": "同一IP允许的最大注册次数" - }, - "expire": { - "label": "限制时长", - "placeholder": "输入限制时长(小时)", - "description": "注册限制的持续时间(小时)" - } - }, - "passwordLimit": { - "enable": { - "label": "密码尝试限制", - "description": "开启后将限制密码尝试次数。" - }, - "count": { - "label": "尝试次数", - "placeholder": "输入最大尝试次数", - "description": "允许的最大密码尝试次数" - }, - "expire": { - "label": "锁定时长", - "placeholder": "输入锁定时长(小时)", - "description": "账户锁定的持续时间(小时)" - } - } - } - }, - "subscribe": { - "title": "订阅设置", - "description": "管理用户订阅相关配置,包括订阅链接格式、更新频率、流量统计等设置。", - "plan_change_enable": { - "title": "允许用户更改订阅", - "description": "开启后用户将会可以对订阅计划进行变更。" - }, - "reset_traffic_method": { - "title": "月流量重置方式", - "description": "全局流量重置方式,默认每月1号。可以在订阅管理为订阅单独设置。", - "options": { - "monthly_first": "每月1号", - "monthly_reset": "按月重置", - "no_reset": "不重置", - "yearly_first": "每年1月1号", - "yearly_reset": "按年重置" - } - }, - "surplus_enable": { - "title": "开启折抵方案", - "description": "开启后用户更换订阅将会由系统对原有订阅进行折抵,方案参考文档。" - }, - "new_order_event": { - "title": "当订阅新购时触发事件", - "description": "新购订阅完成时将触发该任务。", - "options": { - "no_action": "不执行任何动作", - "reset_traffic": "重置用户流量" - } - }, - "renew_order_event": { - "title": "当订阅续费时触发事件", - "description": "续费订阅完成时将触发该任务。", - "options": { - "no_action": "不执行任何动作", - "reset_traffic": "重置用户流量" - } - }, - "change_order_event": { - "title": "当订阅变更时触发事件", - "description": "变更订阅完成时将触发该任务。", - "options": { - "no_action": "不执行任何动作", - "reset_traffic": "重置用户流量" - } - }, - "subscribe_path": { - "title": "订阅路径", - "description": "订阅路径,修改后将会改变原有的subscribe路径", - "current_format": "当前订阅路径格式:{path}/xxxxxxxxxx" - }, - "show_info_to_server": { - "title": "在订阅中展示订阅信息", - "description": "开启后将会在用户订阅节点时输出订阅信息。" - }, - "show_protocol_to_server": { - "title": "在订阅中线路名称中显示协议名称", - "description": "开启后订阅线路会附带协议名称(例如: [Hy2]香港)" - }, - "saving": "保存中...", - "plan": { - "title": "订阅套餐", - "add": "添加套餐", - "search": "搜索套餐...", - "sort": { - "edit": "编辑排序", - "save": "保存排序" - }, - "columns": { - "id": "ID", - "show": "显示", - "sell": "新购", - "renew": "续费", - "renew_tooltip": "在订阅停止销售时,已购用户是否可以续费", - "name": "名称", - "stats": "统计", - "group": "权限组", - "price": "价格", - "actions": "操作", - "edit": "编辑", - "delete": "删除", - "delete_confirm": { - "title": "确认删除", - "description": "此操作将永久删除该订阅,删除后无法恢复。确定要继续吗?", - "success": "删除成功" - }, - "price_period": { - "monthly": "月付", - "quarterly": "季付", - "half_yearly": "半年付", - "yearly": "年付", - "two_yearly": "两年付", - "three_yearly": "三年付", - "onetime": "流量包", - "reset_traffic": "重置包", - "unit": { - "month": "元/月", - "quarter": "元/季", - "half_year": "元/半年", - "year": "元/年", - "two_year": "元/两年", - "three_year": "元/三年", - "times": "元/次" - } - } - }, - "form": { - "add_title": "添加套餐", - "edit_title": "编辑套餐", - "name": { - "label": "套餐名称", - "placeholder": "请输入套餐名称" - }, - "group": { - "label": "权限组", - "placeholder": "选择权限组", - "add": "添加权限组" - }, - "transfer": { - "label": "流量", - "placeholder": "请输入流量大小", - "unit": "GB" - }, - "speed": { - "label": "限速", - "placeholder": "请输入限速", - "unit": "Mbps" - }, - "price": { - "title": "售价设置", - "base_price": "基础月付价格", - "clear": { - "button": "清空价格", - "tooltip": "清空所有周期的价格设置" - } - }, - "device": { - "label": "设备限制", - "placeholder": "留空则不限制", - "unit": "台" - }, - "capacity": { - "label": "容量限制", - "placeholder": "留空则不限制", - "unit": "人" - }, - "reset_method": { - "label": "流量重置方式", - "placeholder": "选择流量重置方式", - "description": "设置订阅流量的重置方式,不同的重置方式会影响用户的流量计算方式", - "options": { - "follow_system": "跟随系统设置", - "monthly_first": "每月1号", - "monthly_reset": "按月重置", - "no_reset": "不重置", - "yearly_first": "每年1月1日", - "yearly_reset": "按年重置" - } - }, - "content": { - "label": "套餐描述", - "placeholder": "在这里编写套餐描述...", - "description": "支持 Markdown 格式,可以使用标题、列表、粗体、斜体等样式来美化描述内容", - "preview": "预览", - "preview_button": { - "show": "显示预览", - "hide": "隐藏预览" - }, - "template": { - "button": "使用模板", - "tooltip": "点击使用预设的套餐描述模板", - "content": "## 套餐特点\n• 高速稳定的全球网络接入\n• 支持多设备同时在线\n• 无限制的流量重置\n\n## 使用说明\n1. 支持设备:iOS、Android、Windows、macOS\n2. 24/7 技术支持\n3. 自动定期流量重置\n\n## 注意事项\n- 禁止滥用\n- 遵守当地法律法规\n- 支持随时更换套餐" - } - }, - "force_update": { - "label": "强制更新到用户" - }, - "submit": { - "submitting": "提交中...", - "submit": "提交", - "cancel": "取消", - "success": { - "add": "套餐添加成功", - "update": "套餐更新成功" - } - } - }, - "page": { - "description": "在这里可以配置订阅计划,包括添加、删除、编辑等操作。" - } - } - }, - "email": { - "title": "邮件设置", - "description": "配置系统邮件服务,用于发送验证码、密码重置、通知等邮件,支持多种SMTP服务商。", - "email_host": { - "title": "SMTP主机", - "description": "SMTP服务器地址,例如:smtp.gmail.com" - }, - "email_port": { - "title": "SMTP端口", - "description": "SMTP服务器端口,常用端口:25, 465, 587" - }, - "email_username": { - "title": "SMTP用户名", - "description": "SMTP认证用户名" - }, - "email_password": { - "title": "SMTP密码", - "description": "SMTP认证密码或应用专用密码" - }, - "email_encryption": { - "title": "加密方式", - "description": "邮件加密方式", - "none": "无", - "ssl": "SSL/TLS", - "tls": "STARTTLS" - }, - "email_from": { - "title": "发件人地址", - "description": "发件人邮箱地址" - }, - "email_from_name": { - "title": "发件人名称", - "description": "发件人显示名称" - }, - "email_template": { - "title": "邮件模板", - "description": "自定义邮件模板方式请查看文档", - "placeholder": "选择邮件模板" - }, - "remind_mail": { - "title": "邮件提醒", - "description": "开启后用户订阅即将到期或流量不足时会收到邮件通知。" - }, - "test": { - "title": "发送测试邮件", - "sending": "发送中...", - "description": "发送测试邮件以验证配置", - "success": "测试邮件发送成功", - "error": "测试邮件发送失败" - } - }, - "telegram": { - "title": "Telegram设置", - "description": "配置Telegram机器人功能,实现用户通知、账户绑定、指令交互等自动化服务。", - "bot_token": { - "title": "机器人令牌", - "description": "请输入从Botfather获取的令牌。", - "placeholder": "0000000000:xxxxxxxxx_xxxxxxxxxxxxxxx" - }, - "webhook": { - "title": "设置Webhook", - "description": "设置机器人的webhook,不设置将无法收到Telegram通知。", - "button": "一键设置", - "setting": "设置中..." - }, - "bot_enable": { - "title": "启用机器人通知", - "description": "开启后机器人将向管理员和已绑定Telegram的用户发送基础通知。" - }, - "discuss_link": { - "title": "群组链接", - "description": "填写后将在用户端显示或在需要的地方使用。", - "placeholder": "https://t.me/xxxxxx" - } - }, - "app": { - "title": "APP设置", - "description": "管理移动应用程序相关配置,包括API接口、版本控制、推送通知等功能设置。", - "common": { - "placeholder": "请输入" - }, - "windows": { - "version": { - "title": "Windows版本", - "description": "Windows客户端当前版本号" - }, - "download": { - "title": "Windows下载地址", - "description": "Windows客户端下载链接" - } - }, - "macos": { - "version": { - "title": "macOS版本", - "description": "macOS客户端当前版本号" - }, - "download": { - "title": "macOS下载地址", - "description": "macOS客户端下载链接" - } - }, - "android": { - "version": { - "title": "Android版本", - "description": "Android客户端当前版本号" - }, - "download": { - "title": "Android下载地址", - "description": "Android客户端下载链接" - } - } - }, - "common": { - "saving": "保存中...", - "save_success": "已自动保存", - "placeholder": "请输入" - }, - "invite": { - "title": "邀请&佣金设置", - "description": "邀请注册、佣金相关设置。", - "invite_force": { - "title": "开启强制邀请", - "description": "开启后只有被邀请的用户才可以进行注册。" - }, - "invite_commission": { - "title": "邀请佣金百分比", - "description": "默认全局的佣金分配比例,你可以在用户管理单独配置单个比例。", - "placeholder": "请输入佣金百分比" - }, - "invite_gen_limit": { - "title": "用户可创建邀请码上限", - "description": "用户可创建邀请码上限", - "placeholder": "请输入创建上限" - }, - "invite_never_expire": { - "title": "邀请码永不失效", - "description": "开启后邀请码被使用后将不会失效,否则使用过后即失效。" - }, - "commission_first_time": { - "title": "佣金仅首次发放", - "description": "开启后被邀请人首次支付时才会产生佣金,可以在用户管理对用户进行单独配置。" - }, - "commission_auto_check": { - "title": "佣金自动确认", - "description": "开启后佣金将会在订单完成3日后自动进行确认。" - }, - "commission_withdraw_limit": { - "title": "提现单申请门槛(元)", - "description": "小于门槛金额的提现单将不会被提交。", - "placeholder": "请输入提现门槛" - }, - "commission_withdraw_method": { - "title": "提现方式", - "description": "可以支持的提现方式,多个用逗号分隔。", - "placeholder": "请输入提现方式,多个用逗号分隔" - }, - "withdraw_close": { - "title": "关闭提现", - "description": "关闭后将禁止用户申请提现,且邀请佣金将会直接进入用户余额。" - }, - "commission_distribution": { - "title": "三级分销", - "description": "开启后将佣金将按照设置的3成比例进行分成,三成比例合计请不要大于100%。", - "l1": "一级邀请人比例", - "l2": "二级邀请人比例", - "l3": "三级邀请人比例", - "placeholder": "请输入比例,如:50" - }, - "saving": "保存中..." - }, - "server": { - "title": "节点配置", - "description": "配置节点通信和同步设置,包括通信密钥、轮询间隔、负载均衡等高级选项。", - "server_token": { - "title": "通讯密钥", - "description": "Xboard与节点通讯的密钥,以便数据不会被他人获取。", - "placeholder": "请输入通讯密钥", - "generate_tooltip": "点击生成随机通信密钥" - }, - "server_pull_interval": { - "title": "节点拉取动作轮询间隔", - "description": "节点从面板获取数据的间隔频率。", - "placeholder": "请输入拉取间隔" - }, - "server_push_interval": { - "title": "节点推送动作轮询间隔", - "description": "节点推送数据到面板的间隔频率。", - "placeholder": "请输入推送间隔" - }, - "device_limit_mode": { - "title": "设备限制模式", - "description": "宽松模式下,同一IP地址使用多个节点只统计为一个设备。", - "strict": "严格模式", - "relaxed": "宽松模式", - "placeholder": "请选择设备限制模式" - }, - "saving": "保存中...", - "manage": { - "title": "节点管理", - "description": "管理所有节点,包括添加、删除、编辑等操作。" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/sidebar.json b/public/assets/admin/locales/zh/sidebar.json deleted file mode 100644 index 57c498b..0000000 --- a/public/assets/admin/locales/zh/sidebar.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "dashboard": "仪表盘", - "systemManagement": "系统管理", - "systemConfig": "系统配置", - "themeConfig": "主题配置", - "noticeManagement": "公告管理", - "paymentConfig": "支付配置", - "knowledgeManagement": "知识库管理", - "nodeManagement": "节点管理", - "permissionGroupManagement": "权限组管理", - "routeManagement": "路由管理", - "subscriptionManagement": "订阅管理", - "planManagement": "套餐管理", - "orderManagement": "订单管理", - "couponManagement": "优惠券管理", - "userManagement": "用户管理", - "ticketManagement": "工单管理" -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/subscribe.json b/public/assets/admin/locales/zh/subscribe.json deleted file mode 100644 index 313932c..0000000 --- a/public/assets/admin/locales/zh/subscribe.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "plan": { - "title": "订阅套餐", - "add": "添加套餐", - "search": "搜索套餐...", - "sort": { - "edit": "编辑排序", - "save": "保存排序" - }, - "columns": { - "id": "ID", - "show": "显示", - "sell": "新购", - "renew": "续费", - "renew_tooltip": "在订阅停止销售时,已购用户是否可以续费", - "name": "名称", - "stats": "统计", - "group": "权限组", - "price": "价格", - "actions": "操作", - "edit": "编辑", - "delete": "删除", - "delete_confirm": { - "title": "确认删除", - "description": "此操作将永久删除该订阅,删除后无法恢复。确定要继续吗?", - "success": "删除成功" - }, - "price_period": { - "monthly": "月付", - "quarterly": "季付", - "half_yearly": "半年付", - "yearly": "年付", - "two_yearly": "两年付", - "three_yearly": "三年付", - "onetime": "流量包", - "reset_traffic": "重置包", - "unit": { - "month": "元/月", - "quarter": "元/季", - "half_year": "元/半年", - "year": "元/年", - "two_year": "元/两年", - "three_year": "元/三年", - "times": "元/次" - } - } - }, - "form": { - "add_title": "添加套餐", - "edit_title": "编辑套餐", - "name": { - "label": "套餐名称", - "placeholder": "请输入套餐名称" - }, - "group": { - "label": "权限组", - "placeholder": "选择权限组", - "add": "添加权限组" - }, - "transfer": { - "label": "流量", - "placeholder": "请输入流量大小", - "unit": "GB" - }, - "speed": { - "label": "限速", - "placeholder": "请输入限速", - "unit": "Mbps" - }, - "price": { - "title": "售价设置", - "base_price": "基础月付价格", - "clear": { - "button": "清空价格", - "tooltip": "清空所有周期的价格设置" - } - }, - "device": { - "label": "设备限制", - "placeholder": "留空则不限制", - "unit": "台" - }, - "capacity": { - "label": "容量限制", - "placeholder": "留空则不限制", - "unit": "人" - }, - "reset_method": { - "label": "流量重置方式", - "placeholder": "选择流量重置方式", - "description": "设置订阅流量的重置方式,不同的重置方式会影响用户的流量计算方式", - "options": { - "follow_system": "跟随系统设置", - "monthly_first": "每月1号", - "monthly_reset": "按月重置", - "no_reset": "不重置", - "yearly_first": "每年1月1日", - "yearly_reset": "按年重置" - } - }, - "content": { - "label": "套餐描述", - "placeholder": "在这里编写套餐描述...", - "description": "支持 Markdown 格式,可以使用标题、列表、粗体、斜体等样式来美化描述内容", - "preview": "预览", - "preview_button": { - "show": "显示预览", - "hide": "隐藏预览" - }, - "template": { - "button": "使用模板", - "tooltip": "点击使用预设的套餐描述模板", - "content": "## 套餐特点\n• 高速稳定的全球网络接入\n• 支持多设备同时在线\n• 无限制的流量重置\n\n## 使用说明\n1. 支持设备:iOS、Android、Windows、macOS\n2. 24/7 技术支持\n3. 自动定期流量重置\n\n## 注意事项\n- 禁止滥用\n- 遵守当地法律法规\n- 支持随时更换套餐" - } - }, - "force_update": { - "label": "强制更新到用户" - }, - "submit": { - "submitting": "提交中...", - "submit": "提交", - "cancel": "取消", - "success": { - "add": "套餐添加成功", - "update": "套餐更新成功" - } - } - }, - "page": { - "description": "在这里可以配置订阅计划,包括添加、删除、编辑等操作。" - } - } - } \ No newline at end of file diff --git a/public/assets/admin/locales/zh/theme.json b/public/assets/admin/locales/zh/theme.json deleted file mode 100644 index e52d336..0000000 --- a/public/assets/admin/locales/zh/theme.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "title": "主题配置", - "description": "主题配置,包括主题色、字体大小等。如果你采用前后分离的方式部署V2board,那么主题配置将不会生效。", - "upload": { - "button": "上传主题", - "title": "上传主题", - "description": "请上传一个有效的主题压缩包(.zip 格式)。主题包应包含完整的主题文件结构。", - "dragText": "将主题文件拖放到此处,或者", - "clickText": "点击选择", - "supportText": "支持 .zip 格式的主题包", - "uploading": "正在上传...", - "error": { - "format": "只支持上传 ZIP 格式的主题文件" - } - }, - "preview": { - "title": "主题预览", - "imageCount": "{{current}} / {{total}}" - }, - "card": { - "version": "版本: {{version}}", - "currentTheme": "当前主题", - "activateTheme": "激活主题", - "configureTheme": "主题设置", - "preview": "预览", - "delete": { - "title": "删除主题", - "description": "确定要删除该主题吗?删除后无法恢复。", - "button": "删除", - "error": { - "active": "不能删除当前使用的主题" - } - } - }, - "config": { - "title": "配置{{name}}主题", - "description": "修改主题的样式、布局和其他显示选项。", - "cancel": "取消", - "save": "保存", - "success": "保存成功" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/ticket.json b/public/assets/admin/locales/zh/ticket.json deleted file mode 100644 index 3a053db..0000000 --- a/public/assets/admin/locales/zh/ticket.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "title": "工单管理", - "description": "在这里可以查看用户工单,包括查看、回复、关闭等操作。", - "columns": { - "id": "工单号", - "subject": "主题", - "level": "优先级", - "status": "状态", - "updated_at": "最后更新", - "created_at": "创建时间", - "actions": "操作" - }, - "status": { - "closed": "已关闭", - "replied": "已回复", - "pending": "待回复", - "processing": "处理中" - }, - "level": { - "low": "低", - "medium": "中", - "high": "高" - }, - "filter": { - "placeholder": "搜索{field}...", - "no_results": "未找到结果", - "selected": "已选择 {count} 项", - "clear": "清除筛选" - }, - "actions": { - "view_details": "查看详情", - "close_ticket": "关闭工单", - "close_confirm_title": "确认关闭工单", - "close_confirm_description": "关闭后将无法继续回复,是否确认关闭该工单?", - "close_confirm_button": "关闭工单", - "close_success": "工单已关闭", - "view_ticket": "查看工单" - }, - "detail": { - "no_messages": "暂无消息记录", - "created_at": "创建于", - "user_info": "用户信息", - "traffic_records": "流量记录", - "order_records": "订单记录", - "input": { - "closed_placeholder": "工单已关闭", - "reply_placeholder": "请输入回复内容...", - "sending": "发送中...", - "send": "发送" - } - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/traffic.json b/public/assets/admin/locales/zh/traffic.json deleted file mode 100644 index c8c1790..0000000 --- a/public/assets/admin/locales/zh/traffic.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "trafficRecord": { - "title": "流量使用记录", - "time": "时间", - "upload": "上行流量", - "download": "下行流量", - "rate": "倍率", - "total": "总计", - "noRecords": "暂无记录", - "perPage": "每页显示", - "records": "条记录", - "page": "第 {{current}} / {{total}} 页", - "multiplier": "{{value}}x" - } -} \ No newline at end of file diff --git a/public/assets/admin/locales/zh/user.json b/public/assets/admin/locales/zh/user.json deleted file mode 100644 index 486c7c7..0000000 --- a/public/assets/admin/locales/zh/user.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "manage": { - "title": "用户管理", - "description": "在这里可以管理用户,包括增加、删除、编辑、查询等操作。" - }, - "columns": { - "is_admin": "管理员", - "is_staff": "员工", - "id": "ID", - "email": "邮箱", - "online_count": "在线设备", - "status": "状态", - "subscription": "订阅", - "group": "权限组", - "used_traffic": "已用流量", - "total_traffic": "总流量", - "expire_time": "到期时间", - "balance": "余额", - "commission": "佣金", - "register_time": "注册时间", - "actions": "操作", - "device_limit": { - "unlimited": "无设备数限制", - "limited": "最多可同时在线 {{count}} 台设备" - }, - "status_text": { - "normal": "正常", - "banned": "封禁" - }, - "online_status": { - "online": "当前在线", - "never": "从未在线", - "last_online": "最后在线时间: {{time}}", - "offline_duration": { - "days": "离线时长: {{count}}天", - "hours": "离线时长: {{count}}小时", - "minutes": "离线时长: {{count}}分钟", - "seconds": "离线时长: {{count}}秒" - } - }, - "expire_status": { - "permanent": "长期有效", - "expired": "已过期 {{days}} 天", - "remaining": "剩余 {{days}} 天" - }, - "actions_menu": { - "edit": "编辑", - "assign_order": "分配订单", - "copy_url": "复制订阅URL", - "reset_secret": "重置UUID及订阅URL", - "orders": "TA的订单", - "invites": "TA的邀请", - "traffic_records": "TA的流量记录" - } - }, - "filter": { - "selected": "已选择 {{count}} 项", - "no_results": "未找到结果", - "clear": "清除筛选", - "search_placeholder": "搜索...", - "email_search": "搜索用户邮箱...", - "advanced": "高级筛选", - "reset": "重置筛选", - "sheet": { - "title": "高级筛选", - "description": "添加一个或多个筛选条件来精确查找用户", - "conditions": "筛选条件", - "add": "添加条件", - "condition": "条件 {{number}}", - "field": "选择字段", - "operator": "选择操作符", - "value": "输入值", - "value_number": "输入数值({{unit}})", - "reset": "重置", - "apply": "应用筛选" - }, - "fields": { - "email": "邮箱", - "id": "用户ID", - "plan_id": "订阅", - "transfer_enable": "流量", - "total_used": "已用流量", - "online_count": "在线设备", - "expired_at": "到期时间", - "uuid": "UUID", - "token": "Token", - "banned": "账号状态", - "remark": "备注", - "inviter_email": "邀请人邮箱", - "invite_user_id": "邀请人ID", - "is_admin": "管理员", - "is_staff": "员工" - }, - "operators": { - "contains": "包含", - "eq": "等于", - "gt": "大于", - "lt": "小于" - }, - "status": { - "normal": "正常", - "banned": "禁用" - }, - "boolean": { - "true": "是", - "false": "否" - } - }, - "generate": { - "button": "创建用户", - "title": "创建用户", - "form": { - "email": "邮箱", - "email_prefix": "帐号(批量生成请留空)", - "email_domain": "域", - "password": "密码", - "password_placeholder": "留空则密码与邮件相同", - "expire_time": "到期时间", - "expire_time_placeholder": "请选择用户到期日期,留空为长期有效", - "permanent": "长期有效", - "subscription": "订阅计划", - "subscription_none": "无", - "generate_count": "生成数量", - "generate_count_placeholder": "如果为批量生产请输入生成数量", - "cancel": "取消", - "submit": "生成", - "success": "生成成功" - } - }, - "edit": { - "button": "编辑用户信息", - "title": "用户管理", - "form": { - "email": "邮箱", - "email_placeholder": "请输入邮箱", - "inviter_email": "邀请人邮箱", - "inviter_email_placeholder": "请输入邮箱", - "password": "密码", - "password_placeholder": "如需修改密码请输入", - "balance": "余额", - "balance_placeholder": "请输入余额", - "commission_balance": "佣金余额", - "commission_balance_placeholder": "请输入佣金余额", - "upload": "已用上行", - "upload_placeholder": "已用上行", - "download": "已用下行", - "download_placeholder": "已用下行", - "total_traffic": "流量", - "total_traffic_placeholder": "请输入流量", - "expire_time": "到期时间", - "expire_time_placeholder": "请选择用户到期日期,留空为长期有效", - "expire_time_specific": "具体时间", - "expire_time_today": "设为当天结束", - "expire_time_permanent": "长期有效", - "expire_time_1month": "一个月", - "expire_time_3months": "三个月", - "expire_time_confirm": "确定", - "subscription": "订阅计划", - "subscription_none": "无", - "account_status": "账户状态", - "commission_type": "佣金类型", - "commission_type_system": "跟随系统设置", - "commission_type_cycle": "循环返利", - "commission_type_onetime": "首次返利", - "commission_rate": "推荐返利比例", - "commission_rate_placeholder": "为空则跟随站点设置返利比例", - "discount": "专享折扣比例", - "discount_placeholder": "为空则不享受专享折扣", - "speed_limit": "限速", - "speed_limit_placeholder": "留空则不限速", - "device_limit": "设备限制", - "device_limit_placeholder": "留空则不限制", - "is_admin": "是否管理员", - "is_staff": "是否员工", - "remarks": "备注", - "remarks_placeholder": "请在这里记录", - "cancel": "取消", - "submit": "提交", - "success": "修改成功" - } - } -} \ No newline at end of file