diff --git a/crates/librqbit/webui/dist/assets/index.css b/crates/librqbit/webui/dist/assets/index.css index e80c788d..a3758293 100644 --- a/crates/librqbit/webui/dist/assets/index.css +++ b/crates/librqbit/webui/dist/assets/index.css @@ -1 +1 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-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;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.left-0{left:0}.start-0{inset-inline-start:0px}.top-0{top:0}.z-10{z-index:10}.z-\[300\]{z-index:300}.z-\[301\]{z-index:301}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-5{margin:1.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.me-2{margin-inline-end:.5rem}.ml-2{margin-left:.5rem}.ms-2{margin-inline-start:.5rem}.mt-1{margin-top:.25rem}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-10{height:2.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-8{width:2rem}.w-full{width:100%}.max-w-2xl{max-width:42rem}.max-w-7xl{max-width:80rem}.flex-grow{flex-grow:1}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.text-ellipsis{text-overflow:ellipsis}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-green-50{--tw-border-opacity: 1;border-color:rgb(240 253 244 / var(--tw-border-opacity))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity))}.bg-black\/30{background-color:#0000004d}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.fill-blue-600{fill:#2563eb}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.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}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-5{padding-left:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.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-semibold{font-weight:600}.italic{font-style:italic}.leading-none{line-height:1}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.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)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.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}.hover\:border-red-700:hover{--tw-border-opacity: 1;border-color:rgb(185 28 28 / var(--tw-border-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.hover\:bg-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity))}.hover\:text-amber-500:hover{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-green-600:hover{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:drop-shadow-sm:hover{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));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)}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-blue-200:disabled{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:border-none){border-style:none}:is(.dark .dark\:border-slate-500){--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity))}:is(.dark .dark\:border-slate-600){--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity))}:is(.dark .dark\:border-slate-700){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity))}:is(.dark .dark\:border-slate-900){--tw-border-opacity: 1;border-color:rgb(15 23 42 / var(--tw-border-opacity))}:is(.dark .dark\:bg-black\/60){background-color:#0009}:is(.dark .dark\:bg-blue-900){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-500){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-800){--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-800\/60){background-color:#991b1b99}:is(.dark .dark\:bg-slate-600){--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-slate-800){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}:is(.dark .dark\:text-gray-200){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-50){--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-600){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}:is(.dark .dark\:text-slate-200){--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}:is(.dark .dark\:text-slate-300){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}:is(.dark .dark\:text-slate-400){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:bg-blue-900\/50:hover){background-color:#1e3a8a80}:is(.dark .dark\:hover\:bg-red-900:hover){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-slate-700:hover){--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}:is(.dark .dark\:disabled\:bg-slate-600:disabled){--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}:is(.dark .dark\:disabled\:text-slate-300:disabled){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:flex-wrap{flex-wrap:wrap}.sm\:px-7{padding-left:1.75rem;padding-right:1.75rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}}@media (min-width: 768px){.md\:block{display:block}.md\:hidden{display:none}}@media (min-width: 1024px){.lg\:mb-0{margin-bottom:0}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:justify-between{justify-content:space-between}} +*,: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]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--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: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.left-0{left:0}.start-0{inset-inline-start:0px}.top-0{top:0}.z-10{z-index:10}.z-\[300\]{z-index:300}.z-\[301\]{z-index:301}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-5{margin:1.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.me-2{margin-inline-end:.5rem}.ml-2{margin-left:.5rem}.ms-2{margin-inline-start:.5rem}.mt-1{margin-top:.25rem}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-10{height:2.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-8{width:2rem}.w-full{width:100%}.max-w-2xl{max-width:42rem}.max-w-7xl{max-width:80rem}.flex-grow{flex-grow:1}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.text-ellipsis{text-overflow:ellipsis}.whitespace-pre-wrap{white-space:pre-wrap}.text-nowrap{text-wrap:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-green-50{--tw-border-opacity: 1;border-color:rgb(240 253 244 / var(--tw-border-opacity))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity))}.bg-black\/30{background-color:#0000004d}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.fill-blue-600{fill:#2563eb}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.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}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-5{padding-left:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.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-semibold{font-weight:600}.italic{font-style:italic}.leading-none{line-height:1}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.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)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.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}.hover\:border-red-700:hover{--tw-border-opacity: 1;border-color:rgb(185 28 28 / var(--tw-border-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.hover\:bg-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity))}.hover\:text-amber-500:hover{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-green-600:hover{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:drop-shadow-sm:hover{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));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)}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-blue-200:disabled{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:border-none:is(.dark *){border-style:none}.dark\:border-slate-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity))}.dark\:border-slate-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity))}.dark\:border-slate-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity))}.dark\:border-slate-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(15 23 42 / var(--tw-border-opacity))}.dark\:bg-black\/60:is(.dark *){background-color:#0009}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity))}.dark\:bg-gray-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:bg-red-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity))}.dark\:bg-red-800\/60:is(.dark *){background-color:#991b1b99}.dark\:bg-slate-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-gray-50:is(.dark *){--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.dark\:text-slate-200:is(.dark *){--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}.dark\:text-slate-300:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:bg-blue-900\/50:hover:is(.dark *){background-color:#1e3a8a80}.dark\:hover\:bg-red-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.dark\:hover\:bg-slate-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}.dark\:disabled\:bg-slate-600:disabled:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.dark\:disabled\:text-slate-300:disabled:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:flex-wrap{flex-wrap:wrap}.sm\:px-7{padding-left:1.75rem;padding-right:1.75rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}}@media (min-width: 768px){.md\:block{display:block}.md\:hidden{display:none}}@media (min-width: 1024px){.lg\:mb-0{margin-bottom:0}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:justify-between{justify-content:space-between}} diff --git a/crates/librqbit/webui/dist/assets/index.js b/crates/librqbit/webui/dist/assets/index.js index dbdc0e14..453915f8 100644 --- a/crates/librqbit/webui/dist/assets/index.js +++ b/crates/librqbit/webui/dist/assets/index.js @@ -1,4 +1,4 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function il(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _c={exports:{}},Ci={},Cc={exports:{}},B={};/** +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function il(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _c={exports:{}},_i={},Tc={exports:{}},B={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ol=Symbol.for("react.element"),M1=Symbol.for("react.portal"),z1=Symbol.for("react.fragment"),F1=Symbol.for("react.strict_mode"),I1=Symbol.for("react.profiler"),D1=Symbol.for("react.provider"),R1=Symbol.for("react.context"),A1=Symbol.for("react.forward_ref"),$1=Symbol.for("react.suspense"),U1=Symbol.for("react.memo"),B1=Symbol.for("react.lazy"),bs=Symbol.iterator;function H1(e){return e===null||typeof e!="object"?null:(e=bs&&e[bs]||e["@@iterator"],typeof e=="function"?e:null)}var Tc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},jc=Object.assign,Nc={};function sr(e,t,n){this.props=e,this.context=t,this.refs=Nc,this.updater=n||Tc}sr.prototype.isReactComponent={};sr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};sr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pc(){}Pc.prototype=sr.prototype;function Iu(e,t,n){this.props=e,this.context=t,this.refs=Nc,this.updater=n||Tc}var Du=Iu.prototype=new Pc;Du.constructor=Iu;jc(Du,sr.prototype);Du.isPureReactComponent=!0;var ea=Array.isArray,Lc=Object.prototype.hasOwnProperty,Ru={current:null},Oc={key:!0,ref:!0,__self:!0,__source:!0};function Mc(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Lc.call(t,r)&&!Oc.hasOwnProperty(r)&&(l[r]=t[r]);var s=arguments.length-2;if(s===1)l.children=n;else if(1>>1,ee=P[K];if(0>>1;Kl(pt,$))Yel(Ot,pt)?(P[K]=Ot,P[Ye]=$,K=Ye):(P[K]=pt,P[$e]=$,K=$e);else if(Yel(Ot,$))P[K]=Ot,P[Ye]=$,K=Ye;else break e}}return R}function l(P,R){var $=P.sortIndex-R.sortIndex;return $!==0?$:P.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var a=[],f=[],v=1,w=null,y=3,x=!1,k=!1,S=!1,I=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(P){for(var R=n(f);R!==null;){if(R.callback===null)r(f);else if(R.startTime<=P)r(f),R.sortIndex=R.expirationTime,t(a,R);else break;R=n(f)}}function C(P){if(S=!1,g(P),!k)if(n(a)!==null)k=!0,Ae(T);else{var R=n(f);R!==null&&rt(C,R.startTime-P)}}function T(P,R){k=!1,S&&(S=!1,h(z),z=-1),x=!0;var $=y;try{for(g(R),w=n(a);w!==null&&(!(w.expirationTime>R)||P&&!xe());){var K=w.callback;if(typeof K=="function"){w.callback=null,y=w.priorityLevel;var ee=K(w.expirationTime<=R);R=e.unstable_now(),typeof ee=="function"?w.callback=ee:w===n(a)&&r(a),g(R)}else r(a);w=n(a)}if(w!==null)var Ge=!0;else{var $e=n(f);$e!==null&&rt(C,$e.startTime-R),Ge=!1}return Ge}finally{w=null,y=$,x=!1}}var j=!1,O=null,z=-1,W=5,A=-1;function xe(){return!(e.unstable_now()-AP||125K?(P.sortIndex=$,t(f,P),n(a)===null&&P===n(f)&&(S?(h(z),z=-1):S=!0,rt(C,$-K))):(P.sortIndex=ee,t(a,P),k||x||(k=!0,Ae(T))),P},e.unstable_shouldYield=xe,e.unstable_wrapCallback=function(P){var R=y;return function(){var $=y;y=R;try{return P.apply(this,arguments)}finally{y=$}}}})(Dc);Ic.exports=Dc;var b1=Ic.exports;/** + */(function(e){function t(P,R){var $=P.length;P.push(R);e:for(;0<$;){var K=$-1>>>1,ee=P[K];if(0>>1;Kl(pt,$))Yel(Ot,pt)?(P[K]=Ot,P[Ye]=$,K=Ye):(P[K]=pt,P[$e]=$,K=$e);else if(Yel(Ot,$))P[K]=Ot,P[Ye]=$,K=Ye;else break e}}return R}function l(P,R){var $=P.sortIndex-R.sortIndex;return $!==0?$:P.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var a=[],f=[],y=1,x=null,v=3,w=!1,S=!1,k=!1,z=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(P){for(var R=n(f);R!==null;){if(R.callback===null)r(f);else if(R.startTime<=P)r(f),R.sortIndex=R.expirationTime,t(a,R);else break;R=n(f)}}function _(P){if(k=!1,m(P),!S)if(n(a)!==null)S=!0,Ae(T);else{var R=n(f);R!==null&&rt(_,R.startTime-P)}}function T(P,R){S=!1,k&&(k=!1,h(F),F=-1),w=!0;var $=v;try{for(m(R),x=n(a);x!==null&&(!(x.expirationTime>R)||P&&!we());){var K=x.callback;if(typeof K=="function"){x.callback=null,v=x.priorityLevel;var ee=K(x.expirationTime<=R);R=e.unstable_now(),typeof ee=="function"?x.callback=ee:x===n(a)&&r(a),m(R)}else r(a);x=n(a)}if(x!==null)var Ge=!0;else{var $e=n(f);$e!==null&&rt(_,$e.startTime-R),Ge=!1}return Ge}finally{x=null,v=$,w=!1}}var j=!1,O=null,F=-1,W=5,A=-1;function we(){return!(e.unstable_now()-AP||125K?(P.sortIndex=$,t(f,P),n(a)===null&&P===n(f)&&(k?(h(F),F=-1):k=!0,rt(_,$-K))):(P.sortIndex=ee,t(a,P),S||w||(S=!0,Ae(T))),P},e.unstable_shouldYield=we,e.unstable_wrapCallback=function(P){var R=v;return function(){var $=v;v=R;try{return P.apply(this,arguments)}finally{v=$}}}})(Rc);Dc.exports=Rc;var b1=Dc.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Rc=_,Ie=b1;function N(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"),Uo=Object.prototype.hasOwnProperty,ep=/^[: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]*$/,na={},ra={};function tp(e){return Uo.call(ra,e)?!0:Uo.call(na,e)?!1:ep.test(e)?ra[e]=!0:(na[e]=!0,!1)}function np(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 rp(e,t,n,r){if(t===null||typeof t>"u"||np(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 Ce(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){me[e]=new Ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];me[t]=new Ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){me[e]=new Ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){me[e]=new Ce(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){me[e]=new Ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){me[e]=new Ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){me[e]=new Ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){me[e]=new Ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){me[e]=new Ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var $u=/[\-:]([a-z])/g;function Uu(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($u,Uu);me[t]=new Ce(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($u,Uu);me[t]=new Ce(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($u,Uu);me[t]=new Ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){me[e]=new Ce(e,1,!1,e.toLowerCase(),null,!1,!1)});me.xlinkHref=new Ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){me[e]=new Ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function Bu(e,t,n,r){var l=me.hasOwnProperty(t)?me[t]:null;(l!==null?l.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Uo=Object.prototype.hasOwnProperty,ep=/^[: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]*$/,ra={},la={};function tp(e){return Uo.call(la,e)?!0:Uo.call(ra,e)?!1:ep.test(e)?la[e]=!0:(ra[e]=!0,!1)}function np(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 rp(e,t,n,r){if(t===null||typeof t>"u"||np(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 _e(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){me[e]=new _e(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];me[t]=new _e(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){me[e]=new _e(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){me[e]=new _e(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){me[e]=new _e(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){me[e]=new _e(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){me[e]=new _e(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){me[e]=new _e(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){me[e]=new _e(e,5,!1,e.toLowerCase(),null,!1,!1)});var $u=/[\-:]([a-z])/g;function Uu(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($u,Uu);me[t]=new _e(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($u,Uu);me[t]=new _e(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($u,Uu);me[t]=new _e(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){me[e]=new _e(e,1,!1,e.toLowerCase(),null,!1,!1)});me.xlinkHref=new _e("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){me[e]=new _e(e,1,!1,e.toLowerCase(),null,!0,!0)});function Bu(e,t,n,r){var l=me.hasOwnProperty(t)?me[t]:null;(l!==null?l.type!==0:r||!(2s||l[o]!==i[s]){var a=` -`+l[o].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=o&&0<=s);break}}}finally{so=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Nr(e):""}function lp(e){switch(e.tag){case 5:return Nr(e.type);case 16:return Nr("Lazy");case 13:return Nr("Suspense");case 19:return Nr("SuspenseList");case 0:case 2:case 15:return e=ao(e.type,!1),e;case 11:return e=ao(e.type.render,!1),e;case 1:return e=ao(e.type,!0),e;default:return""}}function Wo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Dn:return"Fragment";case In:return"Portal";case Bo:return"Profiler";case Hu:return"StrictMode";case Ho:return"Suspense";case Vo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Uc:return(e.displayName||"Context")+".Consumer";case $c:return(e._context.displayName||"Context")+".Provider";case Vu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Wu:return t=e.displayName||null,t!==null?t:Wo(e.type)||"Memo";case Dt:t=e._payload,e=e._init;try{return Wo(e(t))}catch{}}return null}function ip(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 Wo(t);case 8:return t===Hu?"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 qt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function op(e){var t=Hc(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 l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Cl(e){e._valueTracker||(e._valueTracker=op(e))}function Vc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function bl(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 Qo(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ia(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=qt(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 Wc(e,t){t=t.checked,t!=null&&Bu(e,"checked",t,!1)}function Ko(e,t){Wc(e,t);var n=qt(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")?Zo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Zo(e,t.type,qt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function oa(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 Zo(e,t,n){(t!=="number"||bl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Pr=Array.isArray;function Zn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Tl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mr={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},up=["Webkit","ms","Moz","O"];Object.keys(Mr).forEach(function(e){up.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mr[t]=Mr[e]})});function Gc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Mr.hasOwnProperty(e)&&Mr[e]?(""+t).trim():t+"px"}function Yc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Gc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var sp=re({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 Xo(e,t){if(t){if(sp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function Jo(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 qo=null;function Qu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bo=null,Gn=null,Yn=null;function aa(e){if(e=al(e)){if(typeof bo!="function")throw Error(N(280));var t=e.stateNode;t&&(t=Li(t),bo(e.stateNode,e.type,t))}}function Xc(e){Gn?Yn?Yn.push(e):Yn=[e]:Gn=e}function Jc(){if(Gn){var e=Gn,t=Yn;if(Yn=Gn=null,aa(e),t)for(e=0;e>>=0,e===0?32:31-(wp(e)/xp|0)|0}var jl=64,Nl=4194304;function Lr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ri(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~l;s!==0?r=Lr(s):(i&=o,i!==0&&(r=Lr(i)))}else o=n&~l,o!==0?r=Lr(o):i!==0&&(r=Lr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&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 ul(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-et(t),e[t]=n}function _p(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=Fr),ya=String.fromCharCode(32),wa=!1;function yf(e,t){switch(e){case"keyup":return qp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rn=!1;function eh(e,t){switch(e){case"compositionend":return wf(t);case"keypress":return t.which!==32?null:(wa=!0,ya);case"textInput":return e=t.data,e===ya&&wa?null:e;default:return null}}function th(e,t){if(Rn)return e==="compositionend"||!bu&&yf(e,t)?(e=gf(),Wl=Xu=Bt=null,Rn=!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=Ea(n)}}function Ef(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ef(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _f(){for(var e=window,t=bl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=bl(e.document)}return t}function es(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 ch(e){var t=_f(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ef(n.ownerDocument.documentElement,n)){if(r!==null&&es(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 l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=_a(n,i);var o=_a(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,An=null,iu=null,Dr=null,ou=!1;function Ca(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ou||An==null||An!==bl(r)||(r=An,"selectionStart"in r&&es(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}),Dr&&Gr(Dr,r)||(Dr=r,r=oi(iu,"onSelect"),0Bn||(e.current=du[Bn],du[Bn]=null,Bn--)}function Y(e,t){Bn++,du[Bn]=e.current,e.current=t}var bt={},we=nn(bt),Pe=nn(!1),yn=bt;function tr(e,t){var n=e.type.contextTypes;if(!n)return bt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Le(e){return e=e.childContextTypes,e!=null}function si(){J(Pe),J(we)}function Ma(e,t,n){if(we.current!==bt)throw Error(N(168));Y(we,t),Y(Pe,n)}function zf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(N(108,ip(e)||"Unknown",l));return re({},n,r)}function ai(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||bt,yn=we.current,Y(we,e),Y(Pe,Pe.current),!0}function za(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=zf(e,t,yn),r.__reactInternalMemoizedMergedChildContext=e,J(Pe),J(we),Y(we,e)):J(Pe),Y(Pe,n)}var xt=null,Oi=!1,_o=!1;function Ff(e){xt===null?xt=[e]:xt.push(e)}function kh(e){Oi=!0,Ff(e)}function rn(){if(!_o&&xt!==null){_o=!0;var e=0,t=Q;try{var n=xt;for(Q=1;e>=o,l-=o,St=1<<32-et(t)+l|n<z?(W=O,O=null):W=O.sibling;var A=y(h,O,g[z],C);if(A===null){O===null&&(O=W);break}e&&O&&A.alternate===null&&t(h,O),p=i(A,p,z),j===null?T=A:j.sibling=A,j=A,O=W}if(z===g.length)return n(h,O),b&&sn(h,z),T;if(O===null){for(;zz?(W=O,O=null):W=O.sibling;var xe=y(h,O,A.value,C);if(xe===null){O===null&&(O=W);break}e&&O&&xe.alternate===null&&t(h,O),p=i(xe,p,z),j===null?T=xe:j.sibling=xe,j=xe,O=W}if(A.done)return n(h,O),b&&sn(h,z),T;if(O===null){for(;!A.done;z++,A=g.next())A=w(h,A.value,C),A!==null&&(p=i(A,p,z),j===null?T=A:j.sibling=A,j=A);return b&&sn(h,z),T}for(O=r(h,O);!A.done;z++,A=g.next())A=x(O,h,z,A.value,C),A!==null&&(e&&A.alternate!==null&&O.delete(A.key===null?z:A.key),p=i(A,p,z),j===null?T=A:j.sibling=A,j=A);return e&&O.forEach(function(ft){return t(h,ft)}),b&&sn(h,z),T}function I(h,p,g,C){if(typeof g=="object"&&g!==null&&g.type===Dn&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case _l:e:{for(var T=g.key,j=p;j!==null;){if(j.key===T){if(T=g.type,T===Dn){if(j.tag===7){n(h,j.sibling),p=l(j,g.props.children),p.return=h,h=p;break e}}else if(j.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Dt&&Ua(T)===j.type){n(h,j.sibling),p=l(j,g.props),p.ref=Cr(h,j,g),p.return=h,h=p;break e}n(h,j);break}else t(h,j);j=j.sibling}g.type===Dn?(p=gn(g.props.children,h.mode,C,g.key),p.return=h,h=p):(C=ql(g.type,g.key,g.props,null,h.mode,C),C.ref=Cr(h,p,g),C.return=h,h=C)}return o(h);case In:e:{for(j=g.key;p!==null;){if(p.key===j)if(p.tag===4&&p.stateNode.containerInfo===g.containerInfo&&p.stateNode.implementation===g.implementation){n(h,p.sibling),p=l(p,g.children||[]),p.return=h,h=p;break e}else{n(h,p);break}else t(h,p);p=p.sibling}p=Mo(g,h.mode,C),p.return=h,h=p}return o(h);case Dt:return j=g._init,I(h,p,j(g._payload),C)}if(Pr(g))return k(h,p,g,C);if(xr(g))return S(h,p,g,C);Il(h,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,p!==null&&p.tag===6?(n(h,p.sibling),p=l(p,g),p.return=h,h=p):(n(h,p),p=Oo(g,h.mode,C),p.return=h,h=p),o(h)):n(h,p)}return I}var rr=Hf(!0),Vf=Hf(!1),cl={},ct=nn(cl),qr=nn(cl),br=nn(cl);function pn(e){if(e===cl)throw Error(N(174));return e}function as(e,t){switch(Y(br,t),Y(qr,e),Y(ct,cl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Yo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Yo(t,e)}J(ct),Y(ct,t)}function lr(){J(ct),J(qr),J(br)}function Wf(e){pn(br.current);var t=pn(ct.current),n=Yo(t,e.type);t!==n&&(Y(qr,e),Y(ct,n))}function cs(e){qr.current===e&&(J(ct),J(qr))}var te=nn(0);function mi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Co=[];function fs(){for(var e=0;en?n:4,e(!0);var r=To.transition;To.transition={};try{e(!1),t()}finally{Q=n,To.transition=r}}function od(){return Ze().memoizedState}function Th(e,t,n){var r=Yt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ud(e))sd(t,n);else if(n=Af(e,t,n,r),n!==null){var l=Ee();tt(n,e,r,l),ad(n,t,r)}}function jh(e,t,n){var r=Yt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ud(e))sd(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,n);if(l.hasEagerState=!0,l.eagerState=s,nt(s,o)){var a=t.interleaved;a===null?(l.next=l,us(t)):(l.next=a.next,a.next=l),t.interleaved=l;return}}catch{}finally{}n=Af(e,t,l,r),n!==null&&(l=Ee(),tt(n,e,r,l),ad(n,t,r))}}function ud(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function sd(e,t){Rr=gi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ad(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zu(e,n)}}var vi={readContext:Ke,useCallback:ge,useContext:ge,useEffect:ge,useImperativeHandle:ge,useInsertionEffect:ge,useLayoutEffect:ge,useMemo:ge,useReducer:ge,useRef:ge,useState:ge,useDebugValue:ge,useDeferredValue:ge,useTransition:ge,useMutableSource:ge,useSyncExternalStore:ge,useId:ge,unstable_isNewReconciler:!1},Nh={readContext:Ke,useCallback:function(e,t){return ut().memoizedState=[e,t===void 0?null:t],e},useContext:Ke,useEffect:Ha,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gl(4194308,4,td.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gl(4,2,e,t)},useMemo:function(e,t){var n=ut();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ut();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=Th.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=ut();return e={current:e},t.memoizedState=e},useState:Ba,useDebugValue:gs,useDeferredValue:function(e){return ut().memoizedState=e},useTransition:function(){var e=Ba(!1),t=e[0];return e=Ch.bind(null,e[1]),ut().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,l=ut();if(b){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),de===null)throw Error(N(349));xn&30||Zf(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Ha(Yf.bind(null,r,i,e),[e]),r.flags|=2048,nl(9,Gf.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ut(),t=de.identifierPrefix;if(b){var n=kt,r=St;n=(r&~(1<<32-et(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=el++,0")&&(a=a.replace("",e.displayName)),a}while(1<=o&&0<=s);break}}}finally{so=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Nr(e):""}function lp(e){switch(e.tag){case 5:return Nr(e.type);case 16:return Nr("Lazy");case 13:return Nr("Suspense");case 19:return Nr("SuspenseList");case 0:case 2:case 15:return e=ao(e.type,!1),e;case 11:return e=ao(e.type.render,!1),e;case 1:return e=ao(e.type,!0),e;default:return""}}function Wo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Dn:return"Fragment";case In:return"Portal";case Bo:return"Profiler";case Hu:return"StrictMode";case Ho:return"Suspense";case Vo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bc:return(e.displayName||"Context")+".Consumer";case Uc:return(e._context.displayName||"Context")+".Provider";case Vu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Wu:return t=e.displayName||null,t!==null?t:Wo(e.type)||"Memo";case Dt:t=e._payload,e=e._init;try{return Wo(e(t))}catch{}}return null}function ip(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 Wo(t);case 8:return t===Hu?"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 qt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function op(e){var t=Vc(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 l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _l(e){e._valueTracker||(e._valueTracker=op(e))}function Wc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Vc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function bl(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 Qo(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function oa(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=qt(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 Qc(e,t){t=t.checked,t!=null&&Bu(e,"checked",t,!1)}function Ko(e,t){Qc(e,t);var n=qt(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")?Zo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Zo(e,t.type,qt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ua(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 Zo(e,t,n){(t!=="number"||bl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Pr=Array.isArray;function Zn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Tl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mr={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},up=["Webkit","ms","Moz","O"];Object.keys(Mr).forEach(function(e){up.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mr[t]=Mr[e]})});function Yc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Mr.hasOwnProperty(e)&&Mr[e]?(""+t).trim():t+"px"}function Xc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Yc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var sp=re({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 Xo(e,t){if(t){if(sp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function Jo(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 qo=null;function Qu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bo=null,Gn=null,Yn=null;function ca(e){if(e=al(e)){if(typeof bo!="function")throw Error(N(280));var t=e.stateNode;t&&(t=Li(t),bo(e.stateNode,e.type,t))}}function Jc(e){Gn?Yn?Yn.push(e):Yn=[e]:Gn=e}function qc(){if(Gn){var e=Gn,t=Yn;if(Yn=Gn=null,ca(e),t)for(e=0;e>>=0,e===0?32:31-(xp(e)/wp|0)|0}var jl=64,Nl=4194304;function Lr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ri(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~l;s!==0?r=Lr(s):(i&=o,i!==0&&(r=Lr(i)))}else o=n&~l,o!==0?r=Lr(o):i!==0&&(r=Lr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&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 ul(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-et(t),e[t]=n}function Cp(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=Fr),xa=String.fromCharCode(32),wa=!1;function xf(e,t){switch(e){case"keyup":return qp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rn=!1;function eh(e,t){switch(e){case"compositionend":return wf(t);case"keypress":return t.which!==32?null:(wa=!0,xa);case"textInput":return e=t.data,e===xa&&wa?null:e;default:return null}}function th(e,t){if(Rn)return e==="compositionend"||!bu&&xf(e,t)?(e=vf(),Wl=Xu=Bt=null,Rn=!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=Ca(n)}}function Cf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _f(){for(var e=window,t=bl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=bl(e.document)}return t}function es(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 ch(e){var t=_f(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Cf(n.ownerDocument.documentElement,n)){if(r!==null&&es(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 l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=_a(n,i);var o=_a(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,An=null,iu=null,Dr=null,ou=!1;function Ta(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ou||An==null||An!==bl(r)||(r=An,"selectionStart"in r&&es(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}),Dr&&Gr(Dr,r)||(Dr=r,r=oi(iu,"onSelect"),0Bn||(e.current=du[Bn],du[Bn]=null,Bn--)}function Y(e,t){Bn++,du[Bn]=e.current,e.current=t}var bt={},xe=nn(bt),Pe=nn(!1),yn=bt;function tr(e,t){var n=e.type.contextTypes;if(!n)return bt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Le(e){return e=e.childContextTypes,e!=null}function si(){J(Pe),J(xe)}function za(e,t,n){if(xe.current!==bt)throw Error(N(168));Y(xe,t),Y(Pe,n)}function Ff(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(N(108,ip(e)||"Unknown",l));return re({},n,r)}function ai(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||bt,yn=xe.current,Y(xe,e),Y(Pe,Pe.current),!0}function Fa(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=Ff(e,t,yn),r.__reactInternalMemoizedMergedChildContext=e,J(Pe),J(xe),Y(xe,e)):J(Pe),Y(Pe,n)}var wt=null,Oi=!1,Co=!1;function If(e){wt===null?wt=[e]:wt.push(e)}function kh(e){Oi=!0,If(e)}function rn(){if(!Co&&wt!==null){Co=!0;var e=0,t=Q;try{var n=wt;for(Q=1;e>=o,l-=o,St=1<<32-et(t)+l|n<F?(W=O,O=null):W=O.sibling;var A=v(h,O,m[F],_);if(A===null){O===null&&(O=W);break}e&&O&&A.alternate===null&&t(h,O),p=i(A,p,F),j===null?T=A:j.sibling=A,j=A,O=W}if(F===m.length)return n(h,O),b&&sn(h,F),T;if(O===null){for(;FF?(W=O,O=null):W=O.sibling;var we=v(h,O,A.value,_);if(we===null){O===null&&(O=W);break}e&&O&&we.alternate===null&&t(h,O),p=i(we,p,F),j===null?T=we:j.sibling=we,j=we,O=W}if(A.done)return n(h,O),b&&sn(h,F),T;if(O===null){for(;!A.done;F++,A=m.next())A=x(h,A.value,_),A!==null&&(p=i(A,p,F),j===null?T=A:j.sibling=A,j=A);return b&&sn(h,F),T}for(O=r(h,O);!A.done;F++,A=m.next())A=w(O,h,F,A.value,_),A!==null&&(e&&A.alternate!==null&&O.delete(A.key===null?F:A.key),p=i(A,p,F),j===null?T=A:j.sibling=A,j=A);return e&&O.forEach(function(ft){return t(h,ft)}),b&&sn(h,F),T}function z(h,p,m,_){if(typeof m=="object"&&m!==null&&m.type===Dn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Cl:e:{for(var T=m.key,j=p;j!==null;){if(j.key===T){if(T=m.type,T===Dn){if(j.tag===7){n(h,j.sibling),p=l(j,m.props.children),p.return=h,h=p;break e}}else if(j.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Dt&&Ba(T)===j.type){n(h,j.sibling),p=l(j,m.props),p.ref=_r(h,j,m),p.return=h,h=p;break e}n(h,j);break}else t(h,j);j=j.sibling}m.type===Dn?(p=gn(m.props.children,h.mode,_,m.key),p.return=h,h=p):(_=ql(m.type,m.key,m.props,null,h.mode,_),_.ref=_r(h,p,m),_.return=h,h=_)}return o(h);case In:e:{for(j=m.key;p!==null;){if(p.key===j)if(p.tag===4&&p.stateNode.containerInfo===m.containerInfo&&p.stateNode.implementation===m.implementation){n(h,p.sibling),p=l(p,m.children||[]),p.return=h,h=p;break e}else{n(h,p);break}else t(h,p);p=p.sibling}p=Mo(m,h.mode,_),p.return=h,h=p}return o(h);case Dt:return j=m._init,z(h,p,j(m._payload),_)}if(Pr(m))return S(h,p,m,_);if(wr(m))return k(h,p,m,_);Il(h,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,p!==null&&p.tag===6?(n(h,p.sibling),p=l(p,m),p.return=h,h=p):(n(h,p),p=Oo(m,h.mode,_),p.return=h,h=p),o(h)):n(h,p)}return z}var rr=Vf(!0),Wf=Vf(!1),cl={},ct=nn(cl),qr=nn(cl),br=nn(cl);function pn(e){if(e===cl)throw Error(N(174));return e}function as(e,t){switch(Y(br,t),Y(qr,e),Y(ct,cl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Yo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Yo(t,e)}J(ct),Y(ct,t)}function lr(){J(ct),J(qr),J(br)}function Qf(e){pn(br.current);var t=pn(ct.current),n=Yo(t,e.type);t!==n&&(Y(qr,e),Y(ct,n))}function cs(e){qr.current===e&&(J(ct),J(qr))}var te=nn(0);function mi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var _o=[];function fs(){for(var e=0;e<_o.length;e++)_o[e]._workInProgressVersionPrimary=null;_o.length=0}var Zl=Pt.ReactCurrentDispatcher,To=Pt.ReactCurrentBatchConfig,wn=0,ne=null,ue=null,fe=null,gi=!1,Rr=!1,el=0,Ch=0;function ge(){throw Error(N(321))}function ds(e,t){if(t===null)return!1;for(var n=0;nn?n:4,e(!0);var r=To.transition;To.transition={};try{e(!1),t()}finally{Q=n,To.transition=r}}function ud(){return Ze().memoizedState}function Th(e,t,n){var r=Yt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sd(e))ad(t,n);else if(n=$f(e,t,n,r),n!==null){var l=Ee();tt(n,e,r,l),cd(n,t,r)}}function jh(e,t,n){var r=Yt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sd(e))ad(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,n);if(l.hasEagerState=!0,l.eagerState=s,nt(s,o)){var a=t.interleaved;a===null?(l.next=l,us(t)):(l.next=a.next,a.next=l),t.interleaved=l;return}}catch{}finally{}n=$f(e,t,l,r),n!==null&&(l=Ee(),tt(n,e,r,l),cd(n,t,r))}}function sd(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function ad(e,t){Rr=gi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zu(e,n)}}var vi={readContext:Ke,useCallback:ge,useContext:ge,useEffect:ge,useImperativeHandle:ge,useInsertionEffect:ge,useLayoutEffect:ge,useMemo:ge,useReducer:ge,useRef:ge,useState:ge,useDebugValue:ge,useDeferredValue:ge,useTransition:ge,useMutableSource:ge,useSyncExternalStore:ge,useId:ge,unstable_isNewReconciler:!1},Nh={readContext:Ke,useCallback:function(e,t){return ut().memoizedState=[e,t===void 0?null:t],e},useContext:Ke,useEffect:Va,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gl(4194308,4,nd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gl(4,2,e,t)},useMemo:function(e,t){var n=ut();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ut();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=Th.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=ut();return e={current:e},t.memoizedState=e},useState:Ha,useDebugValue:gs,useDeferredValue:function(e){return ut().memoizedState=e},useTransition:function(){var e=Ha(!1),t=e[0];return e=_h.bind(null,e[1]),ut().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,l=ut();if(b){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),de===null)throw Error(N(349));wn&30||Gf(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Va(Xf.bind(null,r,i,e),[e]),r.flags|=2048,nl(9,Yf.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ut(),t=de.identifierPrefix;if(b){var n=kt,r=St;n=(r&~(1<<32-et(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=el++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[st]=t,e[Jr]=r,yd(e,t,!1,!1),t.stateNode=e;e:{switch(o=Jo(n,r),n){case"dialog":X("cancel",e),X("close",e),l=r;break;case"iframe":case"object":case"embed":X("load",e),l=r;break;case"video":case"audio":for(l=0;lor&&(t.flags|=128,r=!0,Tr(i,!1),t.lanes=4194304)}else{if(!r)if(e=mi(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!b)return ve(t),null}else 2*ie()-i.renderingStartTime>or&&n!==1073741824&&(t.flags|=128,r=!0,Tr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ie(),t.sibling=null,n=te.current,Y(te,r?n&1|2:n&1),t):(ve(t),null);case 22:case 23:return ks(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Me&1073741824&&(ve(t),t.subtreeFlags&6&&(t.flags|=8192)):ve(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function Dh(e,t){switch(ns(t),t.tag){case 1:return Le(t.type)&&si(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return lr(),J(Pe),J(we),fs(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return cs(t),null;case 13:if(J(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));nr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return J(te),null;case 4:return lr(),null;case 10:return os(t.type._context),null;case 22:case 23:return ks(),null;case 24:return null;default:return null}}var Rl=!1,ye=!1,Rh=typeof WeakSet=="function"?WeakSet:Set,F=null;function Qn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){le(e,t,r)}else n.current=null}function _u(e,t,n){try{n()}catch(r){le(e,t,r)}}var Ja=!1;function Ah(e,t){if(uu=li,e=_f(),es(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 l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,s=-1,a=-1,f=0,v=0,w=e,y=null;t:for(;;){for(var x;w!==n||l!==0&&w.nodeType!==3||(s=o+l),w!==i||r!==0&&w.nodeType!==3||(a=o+r),w.nodeType===3&&(o+=w.nodeValue.length),(x=w.firstChild)!==null;)y=w,w=x;for(;;){if(w===e)break t;if(y===n&&++f===l&&(s=o),y===i&&++v===r&&(a=o),(x=w.nextSibling)!==null)break;w=y,y=w.parentNode}w=x}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(su={focusedElem:e,selectionRange:n},li=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var S=k.memoizedProps,I=k.memoizedState,h=t.stateNode,p=h.getSnapshotBeforeUpdate(t.elementType===t.type?S:Je(t.type,S),I);h.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(C){le(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return k=Ja,Ja=!1,k}function Ar(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&_u(t,n,i)}l=l.next}while(l!==r)}}function Fi(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 Cu(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 Sd(e){var t=e.alternate;t!==null&&(e.alternate=null,Sd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[st],delete t[Jr],delete t[fu],delete t[xh],delete t[Sh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kd(e){return e.tag===5||e.tag===3||e.tag===4}function qa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tu(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=ui));else if(r!==4&&(e=e.child,e!==null))for(Tu(e,t,n),e=e.sibling;e!==null;)Tu(e,t,n),e=e.sibling}function ju(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(ju(e,t,n),e=e.sibling;e!==null;)ju(e,t,n),e=e.sibling}var pe=null,qe=!1;function It(e,t,n){for(n=n.child;n!==null;)Ed(e,t,n),n=n.sibling}function Ed(e,t,n){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Ti,n)}catch{}switch(n.tag){case 5:ye||Qn(n,t);case 6:var r=pe,l=qe;pe=null,It(e,t,n),pe=r,qe=l,pe!==null&&(qe?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(qe?(e=pe,n=n.stateNode,e.nodeType===8?Eo(e.parentNode,n):e.nodeType===1&&Eo(e,n),Kr(e)):Eo(pe,n.stateNode));break;case 4:r=pe,l=qe,pe=n.stateNode.containerInfo,qe=!0,It(e,t,n),pe=r,qe=l;break;case 0:case 11:case 14:case 15:if(!ye&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&_u(n,t,o),l=l.next}while(l!==r)}It(e,t,n);break;case 1:if(!ye&&(Qn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){le(n,t,s)}It(e,t,n);break;case 21:It(e,t,n);break;case 22:n.mode&1?(ye=(r=ye)||n.memoizedState!==null,It(e,t,n),ye=r):It(e,t,n);break;default:It(e,t,n)}}function ba(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Rh),t.forEach(function(r){var l=Zh.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Xe(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~i}if(r=l,r=ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Uh(r/1960))-r,10e?16:e,Ht===null)var r=!1;else{if(e=Ht,Ht=null,xi=0,V&6)throw Error(N(331));var l=V;for(V|=4,F=e.current;F!==null;){var i=F,o=i.child;if(F.flags&16){var s=i.deletions;if(s!==null){for(var a=0;aie()-xs?mn(e,0):ws|=n),Oe(e,t)}function Od(e,t){t===0&&(e.mode&1?(t=Nl,Nl<<=1,!(Nl&130023424)&&(Nl=4194304)):t=1);var n=Ee();e=jt(e,t),e!==null&&(ul(e,t,n),Oe(e,n))}function Kh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Od(e,n)}function Zh(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),Od(e,n)}var Md;Md=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pe.current)Ne=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ne=!1,Fh(e,t,n);Ne=!!(e.flags&131072)}else Ne=!1,b&&t.flags&1048576&&If(t,fi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yl(e,t),e=t.pendingProps;var l=tr(t,we.current);Jn(t,n),l=ps(null,t,r,e,l,n);var i=hs();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Le(r)?(i=!0,ai(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ss(t),l.updater=Mi,t.stateNode=l,l._reactInternals=t,vu(t,r,e,n),t=xu(null,t,r,!0,i,n)):(t.tag=0,b&&i&&ts(t),ke(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Yh(r),e=Je(r,e),l){case 0:t=wu(null,t,r,e,n);break e;case 1:t=Ga(null,t,r,e,n);break e;case 11:t=Ka(null,t,r,e,n);break e;case 14:t=Za(null,t,r,Je(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),wu(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),Ga(e,t,r,l,n);case 3:e:{if(md(t),e===null)throw Error(N(387));r=t.pendingProps,i=t.memoizedState,l=i.element,$f(e,t),hi(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=ir(Error(N(423)),t),t=Ya(e,t,r,n,l);break e}else if(r!==l){l=ir(Error(N(424)),t),t=Ya(e,t,r,n,l);break e}else for(ze=Kt(t.stateNode.containerInfo.firstChild),Fe=t,b=!0,be=null,n=Vf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(nr(),r===l){t=Nt(e,t,n);break e}ke(e,t,r,n)}t=t.child}return t;case 5:return Wf(t),e===null&&hu(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,au(r,l)?o=null:i!==null&&au(r,i)&&(t.flags|=32),hd(e,t),ke(e,t,o,n),t.child;case 6:return e===null&&hu(t),null;case 13:return gd(e,t,n);case 4:return as(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=rr(t,null,r,n):ke(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),Ka(e,t,r,l,n);case 7:return ke(e,t,t.pendingProps,n),t.child;case 8:return ke(e,t,t.pendingProps.children,n),t.child;case 12:return ke(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,Y(di,r._currentValue),r._currentValue=o,i!==null)if(nt(i.value,o)){if(i.children===l.children&&!Pe.current){t=Nt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=_t(-1,n&-n),a.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var v=f.pending;v===null?a.next=a:(a.next=v.next,v.next=a),f.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),mu(i.return,n,t),s.lanes|=n;break}a=a.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(N(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),mu(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ke(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Jn(t,n),l=Ke(l),r=r(l),t.flags|=1,ke(e,t,r,n),t.child;case 14:return r=t.type,l=Je(r,t.pendingProps),l=Je(r.type,l),Za(e,t,r,l,n);case 15:return dd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),Yl(e,t),t.tag=1,Le(r)?(e=!0,ai(t)):e=!1,Jn(t,n),Bf(t,r,l),vu(t,r,l,n),xu(null,t,r,!0,e,n);case 19:return vd(e,t,n);case 22:return pd(e,t,n)}throw Error(N(156,t.tag))};function zd(e,t){return lf(e,t)}function Gh(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 We(e,t,n,r){return new Gh(e,t,n,r)}function _s(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yh(e){if(typeof e=="function")return _s(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vu)return 11;if(e===Wu)return 14}return 2}function Xt(e,t){var n=e.alternate;return n===null?(n=We(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 ql(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")_s(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Dn:return gn(n.children,l,i,t);case Hu:o=8,l|=8;break;case Bo:return e=We(12,n,t,l|2),e.elementType=Bo,e.lanes=i,e;case Ho:return e=We(13,n,t,l),e.elementType=Ho,e.lanes=i,e;case Vo:return e=We(19,n,t,l),e.elementType=Vo,e.lanes=i,e;case Bc:return Di(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $c:o=10;break e;case Uc:o=9;break e;case Vu:o=11;break e;case Wu:o=14;break e;case Dt:o=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=We(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function gn(e,t,n,r){return e=We(7,e,r,t),e.lanes=n,e}function Di(e,t,n,r){return e=We(22,e,r,t),e.elementType=Bc,e.lanes=n,e.stateNode={isHidden:!1},e}function Oo(e,t,n){return e=We(6,e,null,t),e.lanes=n,e}function Mo(e,t,n){return t=We(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xh(e,t,n,r,l){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=fo(0),this.expirationTimes=fo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Cs(e,t,n,r,l,i,o,s,a){return e=new Xh(e,t,n,s,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=We(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ss(i),e}function Jh(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Rd)}catch(e){console.error(e)}}Rd(),Fc.exports=De;var Ad=Fc.exports;const nm=il(Ad);var uc=Ad;$o.createRoot=uc.createRoot,$o.hydrateRoot=uc.hydrateRoot;const Lt=_.createContext({listTorrents:()=>{throw new Error("Function not implemented.")},getTorrentDetails:()=>{throw new Error("Function not implemented.")},getTorrentStats:()=>{throw new Error("Function not implemented.")},uploadTorrent:()=>{throw new Error("Function not implemented.")},updateOnlyFiles:()=>{throw new Error("Function not implemented.")},pause:()=>{throw new Error("Function not implemented.")},start:()=>{throw new Error("Function not implemented.")},forget:()=>{throw new Error("Function not implemented.")},delete:()=>{throw new Error("Function not implemented.")},getStreamLogsUrl:()=>null}),Ps=_.createContext({refresh:()=>{}}),Ei=({label:e,className:t})=>d.jsxs("div",{className:`flex gap-2 items-center ${t}`,children:[d.jsxs("svg",{"aria-hidden":"true",className:"w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),d.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),e?d.jsxs("span",{className:"text-sm",children:[e," ..."]}):d.jsx("span",{className:"sr-only",children:"Loading..."})]}),Ls="initializing",rm="paused",lm="live",im="error";function Os(e,t){let n,r=t;const l=async()=>{if(r=await e(),r==null)throw"asyncCallback returned null or undefined";i()};let i=()=>{n=setTimeout(l,r)};return i(),()=>{clearTimeout(n)}}function $d(e,t){let n;const r=async()=>{await e().then(()=>!1,()=>!0)&&l()};let l=i=>{n=setTimeout(r,i!==void 0?i:t)};return l(0),()=>clearTimeout(n)}var Ud={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},sc=Et.createContext&&Et.createContext(Ud),Jt=globalThis&&globalThis.__assign||function(){return Jt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{onClick:t,disabled:n,color:r,children:l,className:i,...o}=e,s=f=>{f.stopPropagation(),!n&&t()},a=r?`text-${r}`:"";return d.jsx("a",{className:`p-1 text-blue-500 flex items-center justify-center ${a} ${i}`,onClick:s,href:"#",...o,children:l})};function fm(e){return ae({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M0 .5A.5.5 0 0 1 .5 0h4a.5.5 0 0 1 0 1h-4A.5.5 0 0 1 0 .5Zm0 2A.5.5 0 0 1 .5 2h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5Zm9 0a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5Zm-9 2A.5.5 0 0 1 .5 4h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5Zm5 0a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5Zm7 0a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5Zm-12 2A.5.5 0 0 1 .5 6h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5Zm8 0a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5Zm-8 2A.5.5 0 0 1 .5 8h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5Zm7 0a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5Zm-7 2a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 0 1h-8a.5.5 0 0 1-.5-.5Zm0 2a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5Zm0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5Z"}}]})(e)}function dm(e){return ae({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278zM4.858 1.311A7.269 7.269 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.316 7.316 0 0 0 5.205-2.162c-.337.042-.68.063-1.029.063-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286z"}}]})(e)}function Hd(e){return ae({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"}}]})(e)}const pm=({title:e,children:t,onClose:n})=>d.jsxs("div",{className:"bg-red-200 p-3 rounded-md mb-3 dark:bg-red-800/60",children:[d.jsxs("div",{className:"flex justify-between mb-2",children:[d.jsx("h2",{className:"text-lg font-semibold",children:e}),n&&d.jsx("button",{onClick:n,children:d.jsx(Hd,{})})]}),t]}),En=e=>{var r,l,i;let{error:t,remove:n}=e;return t==null?null:d.jsxs(pm,{onClose:n,title:t.text,children:[((r=t.details)==null?void 0:r.statusText)&&d.jsx("div",{className:"pb-2 text-md",children:(l=t.details)==null?void 0:l.statusText}),d.jsx("div",{className:"whitespace-pre-wrap text-sm",children:(i=t.details)==null?void 0:i.text})]})};function Ms(e){return e&&e.ownerDocument||document}function zo(e){e===void 0&&(e=Ms());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function ac(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}const Bi=!!(typeof window<"u"&&window.document&&window.document.createElement);var Mu=!1,zu=!1;try{var Fo={get passive(){return Mu=!0},get once(){return zu=Mu=!0}};Bi&&(window.addEventListener("test",Fo,Fo),window.removeEventListener("test",Fo,!0))}catch{}function hm(e,t,n,r){if(r&&typeof r!="boolean"&&!zu){var l=r.once,i=r.capture,o=n;!zu&&l&&(o=n.__once||function s(a){this.removeEventListener(t,s,i),n.call(this,a)},n.__once=o),e.addEventListener(t,o,Mu?r:i)}e.addEventListener(t,n,r)}function mm(e,t,n,r){var l=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,l),n.__once&&e.removeEventListener(t,n.__once,l)}function cc(e,t,n,r){return hm(e,t,n,r),function(){mm(e,t,n,r)}}function gm(){const e=_.useRef(!0),t=_.useRef(()=>e.current);return _.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function vm(e){const t=_.useRef(e);return t.current=e,t}function ym(e){const t=vm(e);_.useEffect(()=>()=>t.current(),[])}function wm(e){const t=_.useRef(null);return _.useEffect(()=>{t.current=e}),t.current}function xm(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e},[e]),t}function cn(e){const t=xm(e);return _.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function Sm(e){var t=Ms(e);return t&&t.defaultView||window}function km(e,t){return Sm(e).getComputedStyle(e,t)}var Em=/([A-Z])/g;function _m(e){return e.replace(Em,"-$1").toLowerCase()}var Cm=/^ms-/;function Ul(e){return _m(e).replace(Cm,"-ms-")}var Tm=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function jm(e){return!!(e&&Tm.test(e))}function fc(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(Ul(t))||km(e).getPropertyValue(Ul(t));Object.keys(t).forEach(function(l){var i=t[l];!i&&i!==0?e.style.removeProperty(Ul(l)):jm(l)?r+=l+"("+i+") ":n+=Ul(l)+": "+i+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const Nm="data-rr-ui-";function Pm(e){return`${Nm}${e}`}function Lm(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const dc=Pm("modal-open");class Om{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return Lm(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",l=this.getElement();t.style={overflow:l.style.overflow,[r]:l.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(fc(l,r)||"0",10)+t.scrollBarWidth}px`),l.setAttribute(dc,""),fc(l,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(dc),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const Vd=Om,Wd=_.createContext(Bi?window:void 0);Wd.Provider;function zs(){return _.useContext(Wd)}const Io=(e,t)=>Bi?e==null?(t||Ms()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Mm(e,t){const n=zs(),[r,l]=_.useState(()=>Io(e,n==null?void 0:n.document));if(!r){const i=Io(e);i&&l(i)}return _.useEffect(()=>{t&&r&&t(r)},[t,r]),_.useEffect(()=>{const i=Io(e);i!==r&&l(i)},[e,r]),r}const pc=e=>!e||typeof e=="function"?e:t=>{e.current=t};function zm(e,t){const n=pc(e),r=pc(t);return l=>{n&&n(l),r&&r(l)}}function Qd(e,t){return _.useMemo(()=>zm(e,t),[e,t])}const Fm=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Im=typeof document<"u",hc=Im||Fm?_.useLayoutEffect:_.useEffect;function Dm({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:l}){const i=_.useRef(null),o=_.useRef(t),s=cn(n);_.useEffect(()=>{t?o.current=!0:s(i.current)},[t,s]);const a=Qd(i,e.ref),f=_.cloneElement(e,{ref:a});return t?f:l||!o.current&&r?null:f}function Rm({in:e,onTransition:t}){const n=_.useRef(null),r=_.useRef(!0),l=cn(t);return hc(()=>{if(!n.current)return;let i=!1;return l({in:e,element:n.current,initial:r.current,isStale:()=>i}),()=>{i=!0}},[e,l]),hc(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function Am({children:e,in:t,onExited:n,onEntered:r,transition:l}){const[i,o]=_.useState(!t);t&&i&&o(!1);const s=Rm({in:!!t,onTransition:f=>{const v=()=>{f.isStale()||(f.in?r==null||r(f.element,f.initial):(o(!0),n==null||n(f.element)))};Promise.resolve(l(f)).then(v,w=>{throw f.in||o(!0),w})}}),a=Qd(s,e.ref);return i&&!t?null:_.cloneElement(e,{ref:a})}function mc(e,t,n){return e?d.jsx(e,Object.assign({},n)):t?d.jsx(Am,Object.assign({},n,{transition:t})):d.jsx(Dm,Object.assign({},n))}function $m(e){return e.code==="Escape"||e.keyCode===27}const Um=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Bm(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,i;for(i=0;i=0)&&(n[l]=e[l]);return n}let Do;function Hm(e){return Do||(Do=new Vd({ownerDocument:e==null?void 0:e.document})),Do}function Vm(e){const t=zs(),n=e||Hm(t),r=_.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:_.useCallback(l=>{r.current.dialog=l},[]),setBackdropRef:_.useCallback(l=>{r.current.backdrop=l},[])})}const Kd=_.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:l,style:i,children:o,backdrop:s=!0,keyboard:a=!0,onBackdropClick:f,onEscapeKeyDown:v,transition:w,runTransition:y,backdropTransition:x,runBackdropTransition:k,autoFocus:S=!0,enforceFocus:I=!0,restoreFocus:h=!0,restoreFocusOptions:p,renderDialog:g,renderBackdrop:C=q=>d.jsx("div",Object.assign({},q)),manager:T,container:j,onShow:O,onHide:z=()=>{},onExit:W,onExited:A,onExiting:xe,onEnter:ft,onEntering:dt,onEntered:Tn}=e,fr=Bm(e,Um);const Ae=zs(),rt=Mm(j),P=Vm(T),R=gm(),$=wm(n),[K,ee]=_.useState(!n),Ge=_.useRef(null);_.useImperativeHandle(t,()=>P,[P]),Bi&&!$&&n&&(Ge.current=zo(Ae==null?void 0:Ae.document)),n&&K&&ee(!1);const $e=cn(()=>{if(P.add(),dr.current=cc(document,"keydown",Z),jn.current=cc(document,"focus",()=>setTimeout(Ye),!0),O&&O(),S){var q,hr;const Ln=zo((q=(hr=P.dialog)==null?void 0:hr.ownerDocument)!=null?q:Ae==null?void 0:Ae.document);P.dialog&&Ln&&!ac(P.dialog,Ln)&&(Ge.current=Ln,P.dialog.focus())}}),pt=cn(()=>{if(P.remove(),dr.current==null||dr.current(),jn.current==null||jn.current(),h){var q;(q=Ge.current)==null||q.focus==null||q.focus(p),Ge.current=null}});_.useEffect(()=>{!n||!rt||$e()},[n,rt,$e]),_.useEffect(()=>{K&&pt()},[K,pt]),ym(()=>{pt()});const Ye=cn(()=>{if(!I||!R()||!P.isTopModal())return;const q=zo(Ae==null?void 0:Ae.document);P.dialog&&q&&!ac(P.dialog,q)&&P.dialog.focus()}),Ot=cn(q=>{q.target===q.currentTarget&&(f==null||f(q),s===!0&&z())}),Z=cn(q=>{a&&$m(q)&&P.isTopModal()&&(v==null||v(q),q.defaultPrevented||z())}),jn=_.useRef(),dr=_.useRef(),lt=(...q)=>{ee(!0),A==null||A(...q)};if(!rt)return null;const pr=Object.assign({role:r,ref:P.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},fr,{style:i,className:l,tabIndex:-1});let Nn=g?g(pr):d.jsx("div",Object.assign({},pr,{children:_.cloneElement(o,{role:"document"})}));Nn=mc(w,y,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:W,onExiting:xe,onExited:lt,onEnter:ft,onEntering:dt,onEntered:Tn,children:Nn});let Pn=null;return s&&(Pn=C({ref:P.setBackdropRef,onClick:Ot}),Pn=mc(x,k,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Pn})),d.jsx(d.Fragment,{children:nm.createPortal(d.jsxs(d.Fragment,{children:[Pn,Nn]}),rt)})});Kd.displayName="Modal";const Wm=Object.assign(Kd,{Manager:Vd}),Qm=({onClose:e,title:t})=>d.jsxs("div",{className:"flex p-3 justify-between items-center border-b dark:border-slate-600",children:[d.jsx("h2",{className:"text-xl font-semibold dark:slate-300",children:t}),e&&d.jsx("button",{className:"text-gray-500 hover:text-gray-700",onClick:e,"aria-label":"Close modal",children:d.jsx(Hd,{className:"w-5 h-5"})})]}),Hi=({isOpen:e,onClose:t,title:n,children:r,className:l})=>{const i=()=>d.jsx("div",{className:"fixed inset-0 bg-black/30 z-[300] dark:bg-black/60 backdrop-blur"});return d.jsx(Wm,{show:e,onHide:t,renderBackdrop:i,className:"fixed z-[301] top-0 left-0 w-full h-full block overflow-x-hidden overflow-y-auto",children:d.jsxs("div",{className:`bg-white shadow-lg my-8 mx-auto max-w-2xl rounded ${l} dark:bg-slate-800 dark:text-gray-50`,children:[d.jsx(Qm,{onClose:t,title:n}),r]})})},Vi=({children:e})=>d.jsx("div",{className:"p-3 border-b dark:border-slate-500",children:e}),Wi=({children:e,className:t})=>d.jsx("div",{className:`p-3 flex justify-end gap-2 ${t}`,children:e}),en=({onClick:e,children:t,className:n,disabled:r,variant:l})=>{let i={secondary:"hover:bg-blue-500 transition-colors hover:text-white dark:hover:bg-blue-900/50",danger:"bg-red-400 text-white border-green-50 hover:border-red-700 hover:bg-red-600 dark:bg-red-800 dark:border-none dark:hover:bg-red-900",primary:"bg-blue-600 text-white hover:bg-blue-800 disabled:bg-blue-200 dark:disabled:bg-slate-600 dark:disabled:text-slate-300 dark:border-none",cancel:"hover:bg-slate-200 dark:bg-slate-600 dark:hover:bg-slate-700 dark:border-none",none:""}[l??"secondary"];return d.jsx("button",{disabled:r,onClick:o=>{o.preventDefault(),e()},className:`inline-flex items-center gap-1 border rounded-lg disabled:cursor-not-allowed px-2 py-1 dark:border-slate-700 ${i} ${n}`,children:t})},gc=e=>{let t;const n=new Set,r=(a,f)=>{const v=typeof a=="function"?a(t):a;if(!Object.is(v,t)){const w=t;t=f??(typeof v!="object"||v===null)?v:Object.assign({},t,v),n.forEach(y=>y(t,w))}},l=()=>t,s={setState:r,getState:l,subscribe:a=>(n.add(a),()=>n.delete(a)),destroy:()=>{n.clear()}};return t=e(r,l,s),s},Km=e=>e?gc(e):gc;var Zd={exports:{}},Gd={},Yd={exports:{}},Xd={};/** +`+i.stack}return{value:e,source:t,stack:l,digest:null}}function Po(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function yu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Oh=typeof WeakMap=="function"?WeakMap:Map;function fd(e,t,n){n=Ct(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){xi||(xi=!0,Nu=r),yu(e,t)},n}function dd(e,t,n){n=Ct(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){yu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){yu(e,t),typeof r!="function"&&(Gt===null?Gt=new Set([this]):Gt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Wa(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Oh;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Qh.bind(null,e,t,n),t.then(e,e))}function Qa(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 Ka(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,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=Ct(-1,1),t.tag=2,Zt(n,t,1))),n.lanes|=1),e)}var Mh=Pt.ReactCurrentOwner,Ne=!1;function ke(e,t,n,r){t.child=e===null?Wf(t,null,n,r):rr(t,e.child,n,r)}function Za(e,t,n,r,l){n=n.render;var i=t.ref;return Jn(t,l),r=ps(e,t,n,r,i,l),n=hs(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Nt(e,t,l)):(b&&n&&ts(t),t.flags|=1,ke(e,t,r,l),t.child)}function Ga(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!Cs(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,pd(e,t,i,r,l)):(e=ql(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&l)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Gr,n(o,r)&&e.ref===t.ref)return Nt(e,t,l)}return t.flags|=1,e=Xt(i,r),e.ref=t.ref,e.return=t,t.child=e}function pd(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(Gr(i,r)&&e.ref===t.ref)if(Ne=!1,t.pendingProps=r=i,(e.lanes&l)!==0)e.flags&131072&&(Ne=!0);else return t.lanes=e.lanes,Nt(e,t,l)}return xu(e,t,n,r,l)}function hd(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Y(Kn,Me),Me|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Y(Kn,Me),Me|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Y(Kn,Me),Me|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Y(Kn,Me),Me|=r;return ke(e,t,l,n),t.child}function md(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function xu(e,t,n,r,l){var i=Le(n)?yn:xe.current;return i=tr(t,i),Jn(t,l),n=ps(e,t,n,r,i,l),r=hs(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Nt(e,t,l)):(b&&r&&ts(t),t.flags|=1,ke(e,t,n,l),t.child)}function Ya(e,t,n,r,l){if(Le(n)){var i=!0;ai(t)}else i=!1;if(Jn(t,l),t.stateNode===null)Yl(e,t),Hf(t,n,r),vu(t,n,r,l),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var a=o.context,f=n.contextType;typeof f=="object"&&f!==null?f=Ke(f):(f=Le(n)?yn:xe.current,f=tr(t,f));var y=n.getDerivedStateFromProps,x=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function";x||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==r||a!==f)&&Ua(t,o,r,f),Rt=!1;var v=t.memoizedState;o.state=v,hi(t,r,o,l),a=t.memoizedState,s!==r||v!==a||Pe.current||Rt?(typeof y=="function"&&(gu(t,n,y,r),a=t.memoizedState),(s=Rt||$a(t,n,s,r,v,a,f))?(x||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),o.props=r,o.state=a,o.context=f,r=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Uf(e,t),s=t.memoizedProps,f=t.type===t.elementType?s:Je(t.type,s),o.props=f,x=t.pendingProps,v=o.context,a=n.contextType,typeof a=="object"&&a!==null?a=Ke(a):(a=Le(n)?yn:xe.current,a=tr(t,a));var w=n.getDerivedStateFromProps;(y=typeof w=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==x||v!==a)&&Ua(t,o,r,a),Rt=!1,v=t.memoizedState,o.state=v,hi(t,r,o,l);var S=t.memoizedState;s!==x||v!==S||Pe.current||Rt?(typeof w=="function"&&(gu(t,n,w,r),S=t.memoizedState),(f=Rt||$a(t,n,f,r,v,S,a)||!1)?(y||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,S,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,S,a)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=S),o.props=r,o.state=S,o.context=a,r=f):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),r=!1)}return wu(e,t,n,r,i,l)}function wu(e,t,n,r,l,i){md(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return l&&Fa(t,n,!1),Nt(e,t,i);r=t.stateNode,Mh.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=rr(t,e.child,null,i),t.child=rr(t,null,s,i)):ke(e,t,s,i),t.memoizedState=r.state,l&&Fa(t,n,!0),t.child}function gd(e){var t=e.stateNode;t.pendingContext?za(e,t.pendingContext,t.pendingContext!==t.context):t.context&&za(e,t.context,!1),as(e,t.containerInfo)}function Xa(e,t,n,r,l){return nr(),rs(l),t.flags|=256,ke(e,t,n,r),t.child}var Su={dehydrated:null,treeContext:null,retryLane:0};function ku(e){return{baseLanes:e,cachePool:null,transitions:null}}function vd(e,t,n){var r=t.pendingProps,l=te.current,i=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(l&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),Y(te,l&1),e===null)return hu(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):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Di(o,r,0,null),e=gn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ku(n),t.memoizedState=Su,e):vs(t,o));if(l=e.memoizedState,l!==null&&(s=l.dehydrated,s!==null))return zh(e,t,o,r,s,l,n);if(i){i=r.fallback,o=t.mode,l=e.child,s=l.sibling;var a={mode:"hidden",children:r.children};return!(o&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Xt(l,a),r.subtreeFlags=l.subtreeFlags&14680064),s!==null?i=Xt(s,i):(i=gn(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?ku(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Su,r}return i=e.child,e=i.sibling,r=Xt(i,{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 vs(e,t){return t=Di({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Dl(e,t,n,r){return r!==null&&rs(r),rr(t,e.child,null,n),e=vs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zh(e,t,n,r,l,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Po(Error(N(422))),Dl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,l=t.mode,r=Di({mode:"visible",children:r.children},l,0,null),i=gn(i,l,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&rr(t,e.child,null,o),t.child.memoizedState=ku(o),t.memoizedState=Su,i);if(!(t.mode&1))return Dl(e,t,o,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var s=r.dgst;return r=s,i=Error(N(419)),r=Po(i,r,void 0),Dl(e,t,o,r)}if(s=(o&e.childLanes)!==0,Ne||s){if(r=de,r!==null){switch(o&-o){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|o)?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,jt(e,l),tt(r,e,l,-1))}return Es(),r=Po(Error(N(421))),Dl(e,t,o,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Kh.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,ze=Kt(l.nextSibling),Fe=t,b=!0,be=null,e!==null&&(He[Ve++]=St,He[Ve++]=kt,He[Ve++]=xn,St=e.id,kt=e.overflow,xn=t),t=vs(t,r.children),t.flags|=4096,t)}function Ja(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),mu(e.return,t,n)}function Lo(e,t,n,r,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=l)}function yd(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(ke(e,t,r.children,n),r=te.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&&Ja(e,n,t);else if(e.tag===19)Ja(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(Y(te,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&mi(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Lo(t,!1,l,n,i);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&mi(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Lo(t,!0,n,null,i);break;case"together":Lo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Yl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Nt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Sn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,n=Xt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fh(e,t,n){switch(t.tag){case 3:gd(t),nr();break;case 5:Qf(t);break;case 1:Le(t.type)&&ai(t);break;case 4:as(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;Y(di,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Y(te,te.current&1),t.flags|=128,null):n&t.child.childLanes?vd(e,t,n):(Y(te,te.current&1),e=Nt(e,t,n),e!==null?e.sibling:null);Y(te,te.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return yd(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Y(te,te.current),r)break;return null;case 22:case 23:return t.lanes=0,hd(e,t,n)}return Nt(e,t,n)}var xd,Eu,wd,Sd;xd=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}};Eu=function(){};wd=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,pn(ct.current);var i=null;switch(n){case"input":l=Qo(e,l),r=Qo(e,r),i=[];break;case"select":l=re({},l,{value:void 0}),r=re({},r,{value:void 0}),i=[];break;case"textarea":l=Go(e,l),r=Go(e,r),i=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ui)}Xo(n,r);var o;n=null;for(f in l)if(!r.hasOwnProperty(f)&&l.hasOwnProperty(f)&&l[f]!=null)if(f==="style"){var s=l[f];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(Br.hasOwnProperty(f)?i||(i=[]):(i=i||[]).push(f,null));for(f in r){var a=r[f];if(s=l!=null?l[f]:void 0,r.hasOwnProperty(f)&&a!==s&&(a!=null||s!=null))if(f==="style")if(s){for(o in s)!s.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in a)a.hasOwnProperty(o)&&s[o]!==a[o]&&(n||(n={}),n[o]=a[o])}else n||(i||(i=[]),i.push(f,n)),n=a;else f==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(i=i||[]).push(f,a)):f==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(f,""+a):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(Br.hasOwnProperty(f)?(a!=null&&f==="onScroll"&&X("scroll",e),i||s===a||(i=[])):(i=i||[]).push(f,a))}n&&(i=i||[]).push("style",n);var f=i;(t.updateQueue=f)&&(t.flags|=4)}};Sd=function(e,t,n,r){n!==r&&(t.flags|=4)};function Tr(e,t){if(!b)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 ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ih(e,t,n){var r=t.pendingProps;switch(ns(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ve(t),null;case 1:return Le(t.type)&&si(),ve(t),null;case 3:return r=t.stateNode,lr(),J(Pe),J(xe),fs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Fl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,be!==null&&(Ou(be),be=null))),Eu(e,t),ve(t),null;case 5:cs(t);var l=pn(br.current);if(n=t.type,e!==null&&t.stateNode!=null)wd(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(N(166));return ve(t),null}if(e=pn(ct.current),Fl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[st]=t,r[Jr]=i,e=(t.mode&1)!==0,n){case"dialog":X("cancel",r),X("close",r);break;case"iframe":case"object":case"embed":X("load",r);break;case"video":case"audio":for(l=0;l<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[st]=t,e[Jr]=r,xd(e,t,!1,!1),t.stateNode=e;e:{switch(o=Jo(n,r),n){case"dialog":X("cancel",e),X("close",e),l=r;break;case"iframe":case"object":case"embed":X("load",e),l=r;break;case"video":case"audio":for(l=0;lor&&(t.flags|=128,r=!0,Tr(i,!1),t.lanes=4194304)}else{if(!r)if(e=mi(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!b)return ve(t),null}else 2*ie()-i.renderingStartTime>or&&n!==1073741824&&(t.flags|=128,r=!0,Tr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ie(),t.sibling=null,n=te.current,Y(te,r?n&1|2:n&1),t):(ve(t),null);case 22:case 23:return ks(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Me&1073741824&&(ve(t),t.subtreeFlags&6&&(t.flags|=8192)):ve(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function Dh(e,t){switch(ns(t),t.tag){case 1:return Le(t.type)&&si(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return lr(),J(Pe),J(xe),fs(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return cs(t),null;case 13:if(J(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));nr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return J(te),null;case 4:return lr(),null;case 10:return os(t.type._context),null;case 22:case 23:return ks(),null;case 24:return null;default:return null}}var Rl=!1,ye=!1,Rh=typeof WeakSet=="function"?WeakSet:Set,I=null;function Qn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){le(e,t,r)}else n.current=null}function Cu(e,t,n){try{n()}catch(r){le(e,t,r)}}var qa=!1;function Ah(e,t){if(uu=li,e=_f(),es(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 l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,s=-1,a=-1,f=0,y=0,x=e,v=null;t:for(;;){for(var w;x!==n||l!==0&&x.nodeType!==3||(s=o+l),x!==i||r!==0&&x.nodeType!==3||(a=o+r),x.nodeType===3&&(o+=x.nodeValue.length),(w=x.firstChild)!==null;)v=x,x=w;for(;;){if(x===e)break t;if(v===n&&++f===l&&(s=o),v===i&&++y===r&&(a=o),(w=x.nextSibling)!==null)break;x=v,v=x.parentNode}x=w}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(su={focusedElem:e,selectionRange:n},li=!1,I=t;I!==null;)if(t=I,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var k=S.memoizedProps,z=S.memoizedState,h=t.stateNode,p=h.getSnapshotBeforeUpdate(t.elementType===t.type?k:Je(t.type,k),z);h.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(_){le(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return S=qa,qa=!1,S}function Ar(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&Cu(t,n,i)}l=l.next}while(l!==r)}}function Fi(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 _u(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 kd(e){var t=e.alternate;t!==null&&(e.alternate=null,kd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[st],delete t[Jr],delete t[fu],delete t[wh],delete t[Sh])),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 Ed(e){return e.tag===5||e.tag===3||e.tag===4}function ba(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ed(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 Tu(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=ui));else if(r!==4&&(e=e.child,e!==null))for(Tu(e,t,n),e=e.sibling;e!==null;)Tu(e,t,n),e=e.sibling}function ju(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(ju(e,t,n),e=e.sibling;e!==null;)ju(e,t,n),e=e.sibling}var pe=null,qe=!1;function It(e,t,n){for(n=n.child;n!==null;)Cd(e,t,n),n=n.sibling}function Cd(e,t,n){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Ti,n)}catch{}switch(n.tag){case 5:ye||Qn(n,t);case 6:var r=pe,l=qe;pe=null,It(e,t,n),pe=r,qe=l,pe!==null&&(qe?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(qe?(e=pe,n=n.stateNode,e.nodeType===8?Eo(e.parentNode,n):e.nodeType===1&&Eo(e,n),Kr(e)):Eo(pe,n.stateNode));break;case 4:r=pe,l=qe,pe=n.stateNode.containerInfo,qe=!0,It(e,t,n),pe=r,qe=l;break;case 0:case 11:case 14:case 15:if(!ye&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Cu(n,t,o),l=l.next}while(l!==r)}It(e,t,n);break;case 1:if(!ye&&(Qn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){le(n,t,s)}It(e,t,n);break;case 21:It(e,t,n);break;case 22:n.mode&1?(ye=(r=ye)||n.memoizedState!==null,It(e,t,n),ye=r):It(e,t,n);break;default:It(e,t,n)}}function ec(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Rh),t.forEach(function(r){var l=Zh.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Xe(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~i}if(r=l,r=ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Uh(r/1960))-r,10e?16:e,Ht===null)var r=!1;else{if(e=Ht,Ht=null,wi=0,V&6)throw Error(N(331));var l=V;for(V|=4,I=e.current;I!==null;){var i=I,o=i.child;if(I.flags&16){var s=i.deletions;if(s!==null){for(var a=0;aie()-ws?mn(e,0):xs|=n),Oe(e,t)}function Md(e,t){t===0&&(e.mode&1?(t=Nl,Nl<<=1,!(Nl&130023424)&&(Nl=4194304)):t=1);var n=Ee();e=jt(e,t),e!==null&&(ul(e,t,n),Oe(e,n))}function Kh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Md(e,n)}function Zh(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),Md(e,n)}var zd;zd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pe.current)Ne=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ne=!1,Fh(e,t,n);Ne=!!(e.flags&131072)}else Ne=!1,b&&t.flags&1048576&&Df(t,fi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yl(e,t),e=t.pendingProps;var l=tr(t,xe.current);Jn(t,n),l=ps(null,t,r,e,l,n);var i=hs();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Le(r)?(i=!0,ai(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ss(t),l.updater=Mi,t.stateNode=l,l._reactInternals=t,vu(t,r,e,n),t=wu(null,t,r,!0,i,n)):(t.tag=0,b&&i&&ts(t),ke(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Yh(r),e=Je(r,e),l){case 0:t=xu(null,t,r,e,n);break e;case 1:t=Ya(null,t,r,e,n);break e;case 11:t=Za(null,t,r,e,n);break e;case 14:t=Ga(null,t,r,Je(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),xu(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),Ya(e,t,r,l,n);case 3:e:{if(gd(t),e===null)throw Error(N(387));r=t.pendingProps,i=t.memoizedState,l=i.element,Uf(e,t),hi(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=ir(Error(N(423)),t),t=Xa(e,t,r,n,l);break e}else if(r!==l){l=ir(Error(N(424)),t),t=Xa(e,t,r,n,l);break e}else for(ze=Kt(t.stateNode.containerInfo.firstChild),Fe=t,b=!0,be=null,n=Wf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(nr(),r===l){t=Nt(e,t,n);break e}ke(e,t,r,n)}t=t.child}return t;case 5:return Qf(t),e===null&&hu(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,au(r,l)?o=null:i!==null&&au(r,i)&&(t.flags|=32),md(e,t),ke(e,t,o,n),t.child;case 6:return e===null&&hu(t),null;case 13:return vd(e,t,n);case 4:return as(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=rr(t,null,r,n):ke(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),Za(e,t,r,l,n);case 7:return ke(e,t,t.pendingProps,n),t.child;case 8:return ke(e,t,t.pendingProps.children,n),t.child;case 12:return ke(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,Y(di,r._currentValue),r._currentValue=o,i!==null)if(nt(i.value,o)){if(i.children===l.children&&!Pe.current){t=Nt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Ct(-1,n&-n),a.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var y=f.pending;y===null?a.next=a:(a.next=y.next,y.next=a),f.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),mu(i.return,n,t),s.lanes|=n;break}a=a.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(N(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),mu(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ke(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Jn(t,n),l=Ke(l),r=r(l),t.flags|=1,ke(e,t,r,n),t.child;case 14:return r=t.type,l=Je(r,t.pendingProps),l=Je(r.type,l),Ga(e,t,r,l,n);case 15:return pd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),Yl(e,t),t.tag=1,Le(r)?(e=!0,ai(t)):e=!1,Jn(t,n),Hf(t,r,l),vu(t,r,l,n),wu(null,t,r,!0,e,n);case 19:return yd(e,t,n);case 22:return hd(e,t,n)}throw Error(N(156,t.tag))};function Fd(e,t){return of(e,t)}function Gh(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 We(e,t,n,r){return new Gh(e,t,n,r)}function Cs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yh(e){if(typeof e=="function")return Cs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vu)return 11;if(e===Wu)return 14}return 2}function Xt(e,t){var n=e.alternate;return n===null?(n=We(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 ql(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")Cs(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Dn:return gn(n.children,l,i,t);case Hu:o=8,l|=8;break;case Bo:return e=We(12,n,t,l|2),e.elementType=Bo,e.lanes=i,e;case Ho:return e=We(13,n,t,l),e.elementType=Ho,e.lanes=i,e;case Vo:return e=We(19,n,t,l),e.elementType=Vo,e.lanes=i,e;case Hc:return Di(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Uc:o=10;break e;case Bc:o=9;break e;case Vu:o=11;break e;case Wu:o=14;break e;case Dt:o=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=We(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function gn(e,t,n,r){return e=We(7,e,r,t),e.lanes=n,e}function Di(e,t,n,r){return e=We(22,e,r,t),e.elementType=Hc,e.lanes=n,e.stateNode={isHidden:!1},e}function Oo(e,t,n){return e=We(6,e,null,t),e.lanes=n,e}function Mo(e,t,n){return t=We(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xh(e,t,n,r,l){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=fo(0),this.expirationTimes=fo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function _s(e,t,n,r,l,i,o,s,a){return e=new Xh(e,t,n,s,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=We(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ss(i),e}function Jh(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ad)}catch(e){console.error(e)}}Ad(),Ic.exports=De;var $d=Ic.exports;const nm=il($d);var sc=$d;$o.createRoot=sc.createRoot,$o.hydrateRoot=sc.hydrateRoot;const Lt=C.createContext({listTorrents:()=>{throw new Error("Function not implemented.")},getTorrentDetails:()=>{throw new Error("Function not implemented.")},getTorrentStats:()=>{throw new Error("Function not implemented.")},uploadTorrent:()=>{throw new Error("Function not implemented.")},updateOnlyFiles:()=>{throw new Error("Function not implemented.")},pause:()=>{throw new Error("Function not implemented.")},start:()=>{throw new Error("Function not implemented.")},forget:()=>{throw new Error("Function not implemented.")},delete:()=>{throw new Error("Function not implemented.")},getStreamLogsUrl:()=>null}),Ps=C.createContext({refresh:()=>{}}),Ei=({label:e,className:t})=>d.jsxs("div",{className:`flex gap-2 items-center ${t}`,children:[d.jsxs("svg",{"aria-hidden":"true",className:"w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),d.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),e?d.jsxs("span",{className:"text-sm",children:[e," ..."]}):d.jsx("span",{className:"sr-only",children:"Loading..."})]}),Ls="initializing",rm="paused",lm="live",im="error";function Os(e,t){let n,r=t;const l=async()=>{if(r=await e(),r==null)throw"asyncCallback returned null or undefined";i()};let i=()=>{n=setTimeout(l,r)};return i(),()=>{clearTimeout(n)}}function Ud(e,t){let n;const r=async()=>{await e().then(()=>!1,()=>!0)&&l()};let l=i=>{n=setTimeout(r,i!==void 0?i:t)};return l(0),()=>clearTimeout(n)}var Bd={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ac=Et.createContext&&Et.createContext(Bd),Jt=globalThis&&globalThis.__assign||function(){return Jt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{onClick:t,disabled:n,color:r,children:l,className:i,...o}=e,s=f=>{f.stopPropagation(),!n&&t()},a=r?`text-${r}`:"";return d.jsx("a",{className:`p-1 text-blue-500 flex items-center justify-center ${a} ${i}`,onClick:s,href:"#",...o,children:l})};function fm(e){return ae({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M0 .5A.5.5 0 0 1 .5 0h4a.5.5 0 0 1 0 1h-4A.5.5 0 0 1 0 .5Zm0 2A.5.5 0 0 1 .5 2h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5Zm9 0a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5Zm-9 2A.5.5 0 0 1 .5 4h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5Zm5 0a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5Zm7 0a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5Zm-12 2A.5.5 0 0 1 .5 6h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5Zm8 0a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5Zm-8 2A.5.5 0 0 1 .5 8h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5Zm7 0a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5Zm-7 2a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 0 1h-8a.5.5 0 0 1-.5-.5Zm0 2a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5Zm0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5Z"}}]})(e)}function dm(e){return ae({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278zM4.858 1.311A7.269 7.269 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.316 7.316 0 0 0 5.205-2.162c-.337.042-.68.063-1.029.063-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286z"}}]})(e)}function Vd(e){return ae({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"}}]})(e)}const pm=({title:e,children:t,onClose:n})=>d.jsxs("div",{className:"bg-red-200 p-3 rounded-md mb-3 dark:bg-red-800/60",children:[d.jsxs("div",{className:"flex justify-between mb-2",children:[d.jsx("h2",{className:"text-lg font-semibold",children:e}),n&&d.jsx("button",{onClick:n,children:d.jsx(Vd,{})})]}),t]}),En=e=>{var r,l,i;let{error:t,remove:n}=e;return t==null?null:d.jsxs(pm,{onClose:n,title:t.text,children:[((r=t.details)==null?void 0:r.statusText)&&d.jsx("div",{className:"pb-2 text-md",children:(l=t.details)==null?void 0:l.statusText}),d.jsx("div",{className:"whitespace-pre-wrap text-sm",children:(i=t.details)==null?void 0:i.text})]})};function Ms(e){return e&&e.ownerDocument||document}function zo(e){e===void 0&&(e=Ms());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function cc(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}const Bi=!!(typeof window<"u"&&window.document&&window.document.createElement);var Mu=!1,zu=!1;try{var Fo={get passive(){return Mu=!0},get once(){return zu=Mu=!0}};Bi&&(window.addEventListener("test",Fo,Fo),window.removeEventListener("test",Fo,!0))}catch{}function hm(e,t,n,r){if(r&&typeof r!="boolean"&&!zu){var l=r.once,i=r.capture,o=n;!zu&&l&&(o=n.__once||function s(a){this.removeEventListener(t,s,i),n.call(this,a)},n.__once=o),e.addEventListener(t,o,Mu?r:i)}e.addEventListener(t,n,r)}function mm(e,t,n,r){var l=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,l),n.__once&&e.removeEventListener(t,n.__once,l)}function fc(e,t,n,r){return hm(e,t,n,r),function(){mm(e,t,n,r)}}function gm(){const e=C.useRef(!0),t=C.useRef(()=>e.current);return C.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function vm(e){const t=C.useRef(e);return t.current=e,t}function ym(e){const t=vm(e);C.useEffect(()=>()=>t.current(),[])}function xm(e){const t=C.useRef(null);return C.useEffect(()=>{t.current=e}),t.current}function wm(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e},[e]),t}function cn(e){const t=wm(e);return C.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function Sm(e){var t=Ms(e);return t&&t.defaultView||window}function km(e,t){return Sm(e).getComputedStyle(e,t)}var Em=/([A-Z])/g;function Cm(e){return e.replace(Em,"-$1").toLowerCase()}var _m=/^ms-/;function Ul(e){return Cm(e).replace(_m,"-ms-")}var Tm=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function jm(e){return!!(e&&Tm.test(e))}function dc(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(Ul(t))||km(e).getPropertyValue(Ul(t));Object.keys(t).forEach(function(l){var i=t[l];!i&&i!==0?e.style.removeProperty(Ul(l)):jm(l)?r+=l+"("+i+") ":n+=Ul(l)+": "+i+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const Nm="data-rr-ui-";function Pm(e){return`${Nm}${e}`}function Lm(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const pc=Pm("modal-open");class Om{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return Lm(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",l=this.getElement();t.style={overflow:l.style.overflow,[r]:l.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(dc(l,r)||"0",10)+t.scrollBarWidth}px`),l.setAttribute(pc,""),dc(l,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(pc),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const Wd=Om,Qd=C.createContext(Bi?window:void 0);Qd.Provider;function zs(){return C.useContext(Qd)}const Io=(e,t)=>Bi?e==null?(t||Ms()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Mm(e,t){const n=zs(),[r,l]=C.useState(()=>Io(e,n==null?void 0:n.document));if(!r){const i=Io(e);i&&l(i)}return C.useEffect(()=>{t&&r&&t(r)},[t,r]),C.useEffect(()=>{const i=Io(e);i!==r&&l(i)},[e,r]),r}const hc=e=>!e||typeof e=="function"?e:t=>{e.current=t};function zm(e,t){const n=hc(e),r=hc(t);return l=>{n&&n(l),r&&r(l)}}function Fs(e,t){return C.useMemo(()=>zm(e,t),[e,t])}const Fm=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Im=typeof document<"u",mc=Im||Fm?C.useLayoutEffect:C.useEffect;function Dm({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:l}){const i=C.useRef(null),o=C.useRef(t),s=cn(n);C.useEffect(()=>{t?o.current=!0:s(i.current)},[t,s]);const a=Fs(i,e.ref),f=C.cloneElement(e,{ref:a});return t?f:l||!o.current&&r?null:f}const Rm=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function Am(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,i;for(i=0;i=0)&&(n[l]=e[l]);return n}function $m(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:l,onExiting:i,onExited:o,addEndListener:s,children:a}=e,f=Am(e,Rm);const y=C.useRef(null),x=Fs(y,typeof a=="function"?null:a.ref),v=_=>T=>{_&&y.current&&_(y.current,T)},w=C.useCallback(v(t),[t]),S=C.useCallback(v(n),[n]),k=C.useCallback(v(r),[r]),z=C.useCallback(v(l),[l]),h=C.useCallback(v(i),[i]),p=C.useCallback(v(o),[o]),m=C.useCallback(v(s),[s]);return Object.assign({},f,{nodeRef:y},t&&{onEnter:w},n&&{onEntering:S},r&&{onEntered:k},l&&{onExit:z},i&&{onExiting:h},o&&{onExited:p},s&&{addEndListener:m},{children:typeof a=="function"?(_,T)=>a(_,Object.assign({},T,{ref:x})):C.cloneElement(a,{ref:x})})}const Um=["component"];function Bm(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,i;for(i=0;i=0)&&(n[l]=e[l]);return n}const Hm=C.forwardRef((e,t)=>{let{component:n}=e,r=Bm(e,Um);const l=$m(r);return d.jsx(n,Object.assign({ref:t},l))}),Vm=Hm;function Wm({in:e,onTransition:t}){const n=C.useRef(null),r=C.useRef(!0),l=cn(t);return mc(()=>{if(!n.current)return;let i=!1;return l({in:e,element:n.current,initial:r.current,isStale:()=>i}),()=>{i=!0}},[e,l]),mc(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function Qm({children:e,in:t,onExited:n,onEntered:r,transition:l}){const[i,o]=C.useState(!t);t&&i&&o(!1);const s=Wm({in:!!t,onTransition:f=>{const y=()=>{f.isStale()||(f.in?r==null||r(f.element,f.initial):(o(!0),n==null||n(f.element)))};Promise.resolve(l(f)).then(y,x=>{throw f.in||o(!0),x})}}),a=Fs(s,e.ref);return i&&!t?null:C.cloneElement(e,{ref:a})}function gc(e,t,n){return e?d.jsx(Vm,Object.assign({},n,{component:e})):t?d.jsx(Qm,Object.assign({},n,{transition:t})):d.jsx(Dm,Object.assign({},n))}function Km(e){return e.code==="Escape"||e.keyCode===27}const Zm=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Gm(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,i;for(i=0;i=0)&&(n[l]=e[l]);return n}let Do;function Ym(e){return Do||(Do=new Wd({ownerDocument:e==null?void 0:e.document})),Do}function Xm(e){const t=zs(),n=e||Ym(t),r=C.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:C.useCallback(l=>{r.current.dialog=l},[]),setBackdropRef:C.useCallback(l=>{r.current.backdrop=l},[])})}const Kd=C.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:l,style:i,children:o,backdrop:s=!0,keyboard:a=!0,onBackdropClick:f,onEscapeKeyDown:y,transition:x,runTransition:v,backdropTransition:w,runBackdropTransition:S,autoFocus:k=!0,enforceFocus:z=!0,restoreFocus:h=!0,restoreFocusOptions:p,renderDialog:m,renderBackdrop:_=q=>d.jsx("div",Object.assign({},q)),manager:T,container:j,onShow:O,onHide:F=()=>{},onExit:W,onExited:A,onExiting:we,onEnter:ft,onEntering:dt,onEntered:Tn}=e,fr=Gm(e,Zm);const Ae=zs(),rt=Mm(j),P=Xm(T),R=gm(),$=xm(n),[K,ee]=C.useState(!n),Ge=C.useRef(null);C.useImperativeHandle(t,()=>P,[P]),Bi&&!$&&n&&(Ge.current=zo(Ae==null?void 0:Ae.document)),n&&K&&ee(!1);const $e=cn(()=>{if(P.add(),dr.current=fc(document,"keydown",Z),jn.current=fc(document,"focus",()=>setTimeout(Ye),!0),O&&O(),k){var q,hr;const Ln=zo((q=(hr=P.dialog)==null?void 0:hr.ownerDocument)!=null?q:Ae==null?void 0:Ae.document);P.dialog&&Ln&&!cc(P.dialog,Ln)&&(Ge.current=Ln,P.dialog.focus())}}),pt=cn(()=>{if(P.remove(),dr.current==null||dr.current(),jn.current==null||jn.current(),h){var q;(q=Ge.current)==null||q.focus==null||q.focus(p),Ge.current=null}});C.useEffect(()=>{!n||!rt||$e()},[n,rt,$e]),C.useEffect(()=>{K&&pt()},[K,pt]),ym(()=>{pt()});const Ye=cn(()=>{if(!z||!R()||!P.isTopModal())return;const q=zo(Ae==null?void 0:Ae.document);P.dialog&&q&&!cc(P.dialog,q)&&P.dialog.focus()}),Ot=cn(q=>{q.target===q.currentTarget&&(f==null||f(q),s===!0&&F())}),Z=cn(q=>{a&&Km(q)&&P.isTopModal()&&(y==null||y(q),q.defaultPrevented||F())}),jn=C.useRef(),dr=C.useRef(),lt=(...q)=>{ee(!0),A==null||A(...q)};if(!rt)return null;const pr=Object.assign({role:r,ref:P.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},fr,{style:i,className:l,tabIndex:-1});let Nn=m?m(pr):d.jsx("div",Object.assign({},pr,{children:C.cloneElement(o,{role:"document"})}));Nn=gc(x,v,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:W,onExiting:we,onExited:lt,onEnter:ft,onEntering:dt,onEntered:Tn,children:Nn});let Pn=null;return s&&(Pn=_({ref:P.setBackdropRef,onClick:Ot}),Pn=gc(w,S,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Pn})),d.jsx(d.Fragment,{children:nm.createPortal(d.jsxs(d.Fragment,{children:[Pn,Nn]}),rt)})});Kd.displayName="Modal";const Jm=Object.assign(Kd,{Manager:Wd}),qm=({onClose:e,title:t})=>d.jsxs("div",{className:"flex p-3 justify-between items-center border-b dark:border-slate-600",children:[d.jsx("h2",{className:"text-xl font-semibold dark:slate-300",children:t}),e&&d.jsx("button",{className:"text-gray-500 hover:text-gray-700",onClick:e,"aria-label":"Close modal",children:d.jsx(Vd,{className:"w-5 h-5"})})]}),Hi=({isOpen:e,onClose:t,title:n,children:r,className:l})=>{const i=()=>d.jsx("div",{className:"fixed inset-0 bg-black/30 z-[300] dark:bg-black/60 backdrop-blur"});return d.jsx(Jm,{show:e,onHide:t,renderBackdrop:i,className:"fixed z-[301] top-0 left-0 w-full h-full block overflow-x-hidden overflow-y-auto",children:d.jsxs("div",{className:`bg-white shadow-lg my-8 mx-auto max-w-2xl rounded ${l} dark:bg-slate-800 dark:text-gray-50`,children:[d.jsx(qm,{onClose:t,title:n}),r]})})},Vi=({children:e})=>d.jsx("div",{className:"p-3 border-b dark:border-slate-500",children:e}),Wi=({children:e,className:t})=>d.jsx("div",{className:`p-3 flex justify-end gap-2 ${t}`,children:e}),en=({onClick:e,children:t,className:n,disabled:r,variant:l})=>{let i={secondary:"hover:bg-blue-500 transition-colors hover:text-white dark:hover:bg-blue-900/50",danger:"bg-red-400 text-white border-green-50 hover:border-red-700 hover:bg-red-600 dark:bg-red-800 dark:border-none dark:hover:bg-red-900",primary:"bg-blue-600 text-white hover:bg-blue-800 disabled:bg-blue-200 dark:disabled:bg-slate-600 dark:disabled:text-slate-300 dark:border-none",cancel:"hover:bg-slate-200 dark:bg-slate-600 dark:hover:bg-slate-700 dark:border-none",none:""}[l??"secondary"];return d.jsx("button",{disabled:r,onClick:o=>{o.preventDefault(),e()},className:`inline-flex items-center gap-1 border rounded-lg disabled:cursor-not-allowed px-2 py-1 dark:border-slate-700 ${i} ${n}`,children:t})},vc=e=>{let t;const n=new Set,r=(y,x)=>{const v=typeof y=="function"?y(t):y;if(!Object.is(v,t)){const w=t;t=x??(typeof v!="object"||v===null)?v:Object.assign({},t,v),n.forEach(S=>S(t,w))}},l=()=>t,a={setState:r,getState:l,getInitialState:()=>f,subscribe:y=>(n.add(y),()=>n.delete(y)),destroy:()=>{n.clear()}},f=t=e(r,l,a);return a},bm=e=>e?vc(e):vc;var Zd={exports:{}},Gd={},Yd={exports:{}},Xd={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -45,7 +45,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ur=_;function Zm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gm=typeof Object.is=="function"?Object.is:Zm,Ym=ur.useState,Xm=ur.useEffect,Jm=ur.useLayoutEffect,qm=ur.useDebugValue;function bm(e,t){var n=t(),r=Ym({inst:{value:n,getSnapshot:t}}),l=r[0].inst,i=r[1];return Jm(function(){l.value=n,l.getSnapshot=t,Ro(l)&&i({inst:l})},[e,n,t]),Xm(function(){return Ro(l)&&i({inst:l}),e(function(){Ro(l)&&i({inst:l})})},[e]),qm(n),n}function Ro(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Gm(e,n)}catch{return!0}}function eg(e,t){return t()}var tg=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?eg:bm;Xd.useSyncExternalStore=ur.useSyncExternalStore!==void 0?ur.useSyncExternalStore:tg;Yd.exports=Xd;var ng=Yd.exports;/** + */var ur=C;function eg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tg=typeof Object.is=="function"?Object.is:eg,ng=ur.useState,rg=ur.useEffect,lg=ur.useLayoutEffect,ig=ur.useDebugValue;function og(e,t){var n=t(),r=ng({inst:{value:n,getSnapshot:t}}),l=r[0].inst,i=r[1];return lg(function(){l.value=n,l.getSnapshot=t,Ro(l)&&i({inst:l})},[e,n,t]),rg(function(){return Ro(l)&&i({inst:l}),e(function(){Ro(l)&&i({inst:l})})},[e]),ig(n),n}function Ro(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tg(e,n)}catch{return!0}}function ug(e,t){return t()}var sg=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ug:og;Xd.useSyncExternalStore=ur.useSyncExternalStore!==void 0?ur.useSyncExternalStore:sg;Yd.exports=Xd;var ag=Yd.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -53,4 +53,4 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Qi=_,rg=ng;function lg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ig=typeof Object.is=="function"?Object.is:lg,og=rg.useSyncExternalStore,ug=Qi.useRef,sg=Qi.useEffect,ag=Qi.useMemo,cg=Qi.useDebugValue;Gd.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var i=ug(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=ag(function(){function a(x){if(!f){if(f=!0,v=x,x=r(x),l!==void 0&&o.hasValue){var k=o.value;if(l(k,x))return w=k}return w=x}if(k=w,ig(v,x))return k;var S=r(x);return l!==void 0&&l(k,S)?k:(v=x,w=S)}var f=!1,v,w,y=n===void 0?null:n;return[function(){return a(t())},y===null?void 0:function(){return a(y())}]},[t,n,r,l]);var s=og(e,i[0],i[1]);return sg(function(){o.hasValue=!0,o.value=s},[s]),cg(s),s};Zd.exports=Gd;var fg=Zd.exports;const dg=il(fg),{useDebugValue:pg}=Et,{useSyncExternalStoreWithSelector:hg}=dg;function mg(e,t=e.getState,n){const r=hg(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return pg(r),r}const vc=e=>{const t=typeof e=="function"?Km(e):e,n=(r,l)=>mg(t,r,l);return Object.assign(n,t),n},Jd=e=>e?vc(e):vc,gg=(e,t)=>e.id==t.id&&e.info_hash==t.info_hash,vg=(e,t)=>e===null&&t===null?!0:e===null||t===null?!1:e.length===t.length&&e.every((n,r)=>gg(n,t[r])),vn=Jd(e=>({torrents:null,torrentsLoading:!1,torrentsInitiallyLoading:!1,setTorrentsLoading:t=>e(n=>n.torrents==null?{torrentsInitiallyLoading:t,torrentsLoading:t}:{torrentsInitiallyLoading:!1,torrentsLoading:t}),setTorrents:t=>e(n=>vg(n.torrents,t)?{}:{torrents:t}),refreshTorrents:()=>{},setRefreshTorrents:t=>e({refreshTorrents:t})})),yg=({id:e,show:t,onHide:n})=>{if(!t)return null;const[r,l]=_.useState(!1),[i,o]=_.useState(null),[s,a]=_.useState(!1),f=_.useContext(Lt),v=vn(x=>x.refreshTorrents),w=()=>{l(!1),o(null),a(!1),n()},y=()=>{a(!0),(r?f.delete:f.forget)(e).then(()=>{v(),w()}).catch(k=>{o({text:`Error deleting torrent id=${e}`,details:k}),a(!1)})};return d.jsxs(Hi,{isOpen:t,onClose:n,title:"Delete torrent",children:[d.jsxs(Vi,{children:[d.jsx("p",{className:"text-gray-700 dark:text-slate-300",children:"Are you sure you want to delete the torrent?"}),d.jsxs("div",{className:"mt-4 flex items-center",children:[d.jsx("input",{type:"checkbox",id:"deleteFiles",className:"form-checkbox h-4 w-4 text-blue-500",onChange:()=>l(!r),checked:r,placeholder:"Also delete files"}),d.jsx("label",{htmlFor:"deleteFiles",className:"ml-2 text-gray-700 dark:text-slate-300",children:"Also delete files"})]}),i&&d.jsx(En,{error:i})]}),d.jsxs(Wi,{children:[s&&d.jsx(Ei,{}),d.jsx(en,{variant:"cancel",onClick:w,children:"Cancel"}),d.jsx(en,{variant:"danger",onClick:y,disabled:s,children:"Delete Torrent"})]})]})};function wg(e){return ae({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.4 315.7l-42.6-24.6c4.3-23.2 4.3-47 0-70.2l42.6-24.6c4.9-2.8 7.1-8.6 5.5-14-11.1-35.6-30-67.8-54.7-94.6-3.8-4.1-10-5.1-14.8-2.3L380.8 110c-17.9-15.4-38.5-27.3-60.8-35.1V25.8c0-5.6-3.9-10.5-9.4-11.7-36.7-8.2-74.3-7.8-109.2 0-5.5 1.2-9.4 6.1-9.4 11.7V75c-22.2 7.9-42.8 19.8-60.8 35.1L88.7 85.5c-4.9-2.8-11-1.9-14.8 2.3-24.7 26.7-43.6 58.9-54.7 94.6-1.7 5.4.6 11.2 5.5 14L67.3 221c-4.3 23.2-4.3 47 0 70.2l-42.6 24.6c-4.9 2.8-7.1 8.6-5.5 14 11.1 35.6 30 67.8 54.7 94.6 3.8 4.1 10 5.1 14.8 2.3l42.6-24.6c17.9 15.4 38.5 27.3 60.8 35.1v49.2c0 5.6 3.9 10.5 9.4 11.7 36.7 8.2 74.3 7.8 109.2 0 5.5-1.2 9.4-6.1 9.4-11.7v-49.2c22.2-7.9 42.8-19.8 60.8-35.1l42.6 24.6c4.9 2.8 11 1.9 14.8-2.3 24.7-26.7 43.6-58.9 54.7-94.6 1.5-5.5-.7-11.3-5.6-14.1zM256 336c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"}}]})(e)}function xg(e){return ae({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"}}]})(e)}function Sg(e){return ae({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function kg(e){return ae({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}const bn=Jd(e=>({closeableError:null,setCloseableError:t=>e(()=>({closeableError:t})),otherError:null,setOtherError:t=>e(()=>({otherError:t}))})),Eg=({id:e,statsResponse:t,extendedView:n,setExtendedView:r})=>{let l=t.state,[i,o]=_.useState(!1),[s,a]=_.useState(!1),f=_.useContext(Ps);const v=l=="live",w=l=="paused"||l=="error",y=l=="paused"||l=="live",x=bn(g=>g.setCloseableError),k=_.useContext(Lt),S=()=>{o(!0),k.start(e).then(()=>{f.refresh()},g=>{x({text:`Error starting torrent id=${e}`,details:g})}).finally(()=>o(!1))},I=()=>{o(!0),k.pause(e).then(()=>{f.refresh()},g=>{x({text:`Error pausing torrent id=${e}`,details:g})}).finally(()=>o(!1))},h=()=>{o(!0),a(!0)},p=()=>{o(!1),a(!1)};return d.jsxs("div",{className:"flex w-full justify-center gap-2 dark:text-slate-300",children:[w&&d.jsx(hn,{onClick:S,disabled:i,children:d.jsx(Sg,{className:"hover:text-green-600"})}),v&&d.jsx(hn,{onClick:I,disabled:i,children:d.jsx(xg,{className:"hover:text-amber-500"})}),y&&d.jsx(hn,{onClick:()=>r(!n),disabled:i,children:d.jsx(wg,{className:"hover:text-green-600"})}),d.jsx(hn,{onClick:h,disabled:i,children:d.jsx(kg,{className:"hover:text-red-500"})}),d.jsx(yg,{id:e,show:s,onHide:p})]})},yc={warn:"bg-amber-500 text-white",info:"bg-blue-500 text-white",success:"bg-green-700 text-white",error:"bg-red-500 text-white"},qd=({now:e,variant:t,label:n,classNames:r})=>{const l=n??`${e.toFixed(2)}%`,i=yc[t??"info"]??yc.info;return d.jsx("div",{className:`w-full bg-gray-200 rounded-full mb-1 dark:bg-gray-500 ${r}`,children:d.jsx("div",{className:`text-xs font-medium transition-all text-center leading-none py-0.5 px-2 rounded-full ${i} ${e<1&&"bg-transparent"}`,style:{width:`${e}%`},children:l})})};function ll(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]}const _g=({statsResponse:e})=>{var t,n;switch(e.state){case rm:return"Paused";case Ls:return"Checking files";case im:return"Error"}return e.state!="live"||e.live===null?e.state:d.jsxs(d.Fragment,{children:[!e.finished&&d.jsxs("div",{className:"download-speed",children:["↓ ",(t=e.live.download_speed)==null?void 0:t.human_readable]}),d.jsxs("div",{className:"upload-speed",children:["↑ ",(n=e.live.upload_speed)==null?void 0:n.human_readable,e.live.snapshot.uploaded_bytes>0&&d.jsxs("span",{children:["(",ll(e.live.snapshot.uploaded_bytes),")"]})]})]})};function Cg(e){return e.files.filter(n=>n.included).reduce((n,r)=>n.length>r.length?n:r).name}function Tg(e){return e.name??Cg(e)}function jg(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60,l=(i,o)=>i>0?`${i}${o}`:"";return t>0?`${l(t,"h")} ${l(n,"m")}`.trim():n>0?`${l(n,"m")} ${l(r,"s")}`.trim():`${l(r,"s")}`.trim()}function Ng(e){var n,r,l;let t=(l=(r=(n=e==null?void 0:e.live)==null?void 0:n.time_remaining)==null?void 0:r.duration)==null?void 0:l.secs;return t==null?"N/A":jg(t)}function Pg(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}}]})(e)}function Lg(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}}]})(e)}function Og(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"}}]})(e)}function Mg(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M9 16h6v-6h4l-7-7-7 7h4v6zm3-10.17L14.17 8H13v6h-2V8H9.83L12 5.83zM5 18h14v2H5z"}}]})(e)}function zg(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 12c0 5.52-4.48 10-10 10S2 17.52 2 12c0-1.19.22-2.32.6-3.38l1.88.68C4.17 10.14 4 11.05 4 12c0 4.41 3.59 8 8 8s8-3.59 8-8-3.59-8-8-8c-.95 0-1.85.17-2.69.48l-.68-1.89C9.69 2.22 10.82 2 12 2c5.52 0 10 4.48 10 10zM5.5 4C4.67 4 4 4.67 4 5.5S4.67 7 5.5 7 7 6.33 7 5.5 6.33 4 5.5 4zM11 16V8H9v8h2zm4 0V8h-2v8h2z"}}]})(e)}const Fg=({className:e,finished:t,live:n,error:r})=>{const l=t&&n;return r?d.jsx(Lg,{className:e,color:"red"}):l?d.jsx(Mg,{className:e,color:"green"}):t?d.jsx(Pg,{className:e,color:"green"}):n?d.jsx(Og,{className:`text-blue-500 ${e}`}):d.jsx(zg,{className:e})},wc=({checked:e,name:t,disabled:n,onChange:r,label:l,help:i,inputType:o,children:s})=>d.jsxs("div",{className:"flex gap-3 items-start",children:[d.jsx("div",{className:"flex",children:d.jsx("input",{type:o||"checkbox",className:"block mt-1",id:t,name:t,disabled:n,checked:e,onChange:r})}),d.jsxs("div",{className:"text-sm flex flex-col gap-1",children:[d.jsx("label",{htmlFor:t,children:l}),i&&d.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-300 mb-3",children:i})]}),s]});function Ig(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Square_Minus"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M18.438,20.938H5.564a2.5,2.5,0,0,1-2.5-2.5V5.564a2.5,2.5,0,0,1,2.5-2.5H18.438a2.5,2.5,0,0,1,2.5,2.5V18.438A2.5,2.5,0,0,1,18.438,20.938ZM5.564,4.064a1.5,1.5,0,0,0-1.5,1.5V18.438a1.5,1.5,0,0,0,1.5,1.5H18.438a1.5,1.5,0,0,0,1.5-1.5V5.564a1.5,1.5,0,0,0-1.5-1.5Z"}},{tag:"path",attr:{d:"M9,12.5a.5.5,0,0,1,0-1h6a.5.5,0,0,1,0,1Z"}}]}]}]})(e)}function Dg(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Square_Plus"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M18.438,20.938H5.563a2.5,2.5,0,0,1-2.5-2.5V5.564a2.5,2.5,0,0,1,2.5-2.5H18.438a2.5,2.5,0,0,1,2.5,2.5V18.438A2.5,2.5,0,0,1,18.438,20.938ZM5.563,4.064a1.5,1.5,0,0,0-1.5,1.5V18.438a1.5,1.5,0,0,0,1.5,1.5H18.438a1.5,1.5,0,0,0,1.5-1.5V5.564a1.5,1.5,0,0,0-1.5-1.5Z"}},{tag:"path",attr:{d:"M15,12.5H12.5V15a.5.5,0,0,1-1,0V12.5H9a.5.5,0,0,1,0-1h2.5V9a.5.5,0,0,1,1,0v2.5H15A.5.5,0,0,1,15,12.5Z"}}]}]}]})(e)}var _i={exports:{}};_i.exports;(function(e,t){var n=200,r="Expected a function",l="__lodash_hash_undefined__",i=1,o=2,s=1/0,a=9007199254740991,f="[object Arguments]",v="[object Array]",w="[object Boolean]",y="[object Date]",x="[object Error]",k="[object Function]",S="[object GeneratorFunction]",I="[object Map]",h="[object Number]",p="[object Object]",g="[object Promise]",C="[object RegExp]",T="[object Set]",j="[object String]",O="[object Symbol]",z="[object WeakMap]",W="[object ArrayBuffer]",A="[object DataView]",xe="[object Float32Array]",ft="[object Float64Array]",dt="[object Int8Array]",Tn="[object Int16Array]",fr="[object Int32Array]",Ae="[object Uint8Array]",rt="[object Uint8ClampedArray]",P="[object Uint16Array]",R="[object Uint32Array]",$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/,ee=/^\./,Ge=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$e=/[\\^$.*+?()[\]{}|]/g,pt=/\\(\\)?/g,Ye=/^\[object .+?Constructor\]$/,Ot=/^(?:0|[1-9]\d*)$/,Z={};Z[xe]=Z[ft]=Z[dt]=Z[Tn]=Z[fr]=Z[Ae]=Z[rt]=Z[P]=Z[R]=!0,Z[f]=Z[v]=Z[W]=Z[w]=Z[A]=Z[y]=Z[x]=Z[k]=Z[I]=Z[h]=Z[p]=Z[C]=Z[T]=Z[j]=Z[z]=!1;var jn=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,dr=typeof self=="object"&&self&&self.Object===Object&&self,lt=jn||dr||Function("return this")(),pr=t&&!t.nodeType&&t,Nn=pr&&!0&&e&&!e.nodeType&&e,Pn=Nn&&Nn.exports===pr,q=Pn&&jn.process,hr=function(){try{return q&&q.binding("util")}catch{}}(),Ln=hr&&hr.isTypedArray;function l0(u,c,m){switch(m.length){case 0:return u.call(c);case 1:return u.call(c,m[0]);case 2:return u.call(c,m[0],m[1]);case 3:return u.call(c,m[0],m[1],m[2])}return u.apply(c,m)}function Is(u,c){for(var m=-1,E=u?u.length:0,M=Array(E);++m-1}function F0(u,c){var m=this.__data__,E=ml(m,u);return E<0?m.push([u,c]):m[E][1]=c,this}mt.prototype.clear=L0,mt.prototype.delete=O0,mt.prototype.get=M0,mt.prototype.has=z0,mt.prototype.set=F0;function gt(u){var c=-1,m=u?u.length:0;for(this.clear();++c0&&m(U)?c>1?Vs(U,c-1,m,E,M):i0(M,U):E||(M[M.length]=U)}return M}var Y0=m1();function X0(u,c){return u&&Y0(u,c,xl)}function Ws(u,c){c=vl(c,u)?[c]:Qs(c);for(var m=0,E=c.length;u!=null&&mc||L&&D&&H&&!U&&!G||E&&D&&H||!m&&H||!M)return 1;if(!E&&!L&&!G&&u=U)return H;var G=m[E];return H*(G=="desc"?-1:1)}}return u.index-c.index}function h1(u,c){return function(m,E){if(m==null)return m;if(!vr(m))return u(m,E);for(var M=m.length,L=c?M:-1,D=Object(m);(c?L--:++LU))return!1;var G=L.get(u);if(G&&L.get(c))return G==c;var Se=-1,Te=!0,ce=M&i?new hl:void 0;for(L.set(u,c),L.set(c,u);++Se-1&&u%1==0&&u1&&Zs(u,c[0],c[1])?c=[]:m>2&&Zs(c[0],c[1],c[2])&&(c=[c[0]]),s1(u,Vs(c,1),[])});function no(u,c){if(typeof u!="function"||c&&typeof c!="function")throw new TypeError(r);var m=function(){var E=arguments,M=c?c.apply(this,E):E[0],L=m.cache;if(L.has(M))return L.get(M);var D=u.apply(this,E);return m.cache=L.set(M,D),D};return m.cache=new(no.Cache||gt),m}no.Cache=gt;function ro(u,c){return u===c||u!==u&&c!==c}function lo(u){return T1(u)&&ht.call(u,"callee")&&(!v0.call(u,"callee")||On.call(u)==f)}var zt=Array.isArray;function vr(u){return u!=null&&io(u.length)&&!Xs(u)}function T1(u){return wl(u)&&vr(u)}function Xs(u){var c=yr(u)?On.call(u):"";return c==k||c==S}function io(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=a}function yr(u){var c=typeof u;return!!u&&(c=="object"||c=="function")}function wl(u){return!!u&&typeof u=="object"}function wr(u){return typeof u=="symbol"||wl(u)&&On.call(u)==O}var j1=Ln?Ds(Ln):n1;function N1(u){return u==null?"":f1(u)}function P1(u,c,m){var E=u==null?void 0:Ws(u,c);return E===void 0?m:E}function L1(u,c){return u!=null&&w1(u,c,q0)}function xl(u){return vr(u)?Z0(u):l1(u)}function Js(u){return u}function O1(u){return vl(u)?u0(yl(u)):a1(u)}e.exports=C1})(_i,_i.exports);var Rg=_i.exports;const xc=il(Rg),Ag=(e,t)=>{const n=(r,l,i,o)=>{let s=[],a=[],f={};const v=x=>(f[x]=f[x]||[],f[x]);i.forEach(x=>{if(o==x.pathComponents.length-1){s.push(x);return}v(x.pathComponents[0]).push(x)}),s=xc(s,x=>x.filename);let w=xc(Object.entries(f),([x,k])=>x),y=0;for(const[x,k]of w)a.push(n(x,l+"."+y,k,o+1)),y+=1;return{name:r,id:l,dirs:a,files:s}};return n("","filetree-root",e.files.map((r,l)=>({id:l,filename:r.components[r.components.length-1],pathComponents:r.components,length:r.length,have_bytes:t?t.file_progress[l]??0:0})),0)},bd=({tree:e,selectedFiles:t,setSelectedFiles:n,initialExpanded:r,torrentDetails:l,torrentStats:i,showProgressBar:o,disabled:s})=>{let[a,f]=_.useState(r),v=_.useMemo(()=>{let S=I=>{let h=I.dirs.flatMap(S);return h.push(...I.files.map(p=>p.id)),h};return S(e)},[e]);const w=S=>{if(S.target.checked){let I=new Set(t);v.forEach(h=>I.add(h)),n(I)}else{let I=new Set(t);v.forEach(h=>I.delete(h)),n(I)}},y=S=>{if(t.has(S)){let I=new Set(t);I.delete(S),n(I)}else{let I=new Set(t);I.add(S),n(I)}},x=()=>v.filter(S=>t.has(S)).length,k=()=>v.filter(S=>t.has(S)).map(S=>l.files[S].length).reduce((S,I)=>S+I,0);return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center",children:[d.jsx(hn,{onClick:()=>f(!a),children:a?d.jsx(Ig,{}):d.jsx(Dg,{})}),d.jsx(wc,{checked:v.every(S=>t.has(S)),label:`${e.name?e.name+", ":""} ${x()} files, ${ll(k())}`,name:e.id,onChange:w})]}),d.jsxs("div",{className:"pl-5",hidden:!a,children:[e.dirs.map(S=>d.jsx(bd,{torrentDetails:l,torrentStats:i,tree:S,selectedFiles:t,setSelectedFiles:n,initialExpanded:!1},S.name)),d.jsx("div",{className:"pl-1",children:e.files.map(S=>d.jsxs("div",{className:`${o?"grid grid-cols-1 gap-1 items-start lg:grid-cols-2 mb-2 lg:mb-0":""}`,children:[d.jsx(wc,{checked:t.has(S.id),label:`${S.filename} (${ll(S.length)})`,name:`file-${S.id}`,disabled:s,onChange:()=>y(S.id)}),o&&d.jsx(qd,{now:S.have_bytes/S.length*100,variant:S.have_bytes==S.length?"success":"info"})]},S.id))})]})]})},e0=({torrentDetails:e,selectedFiles:t,setSelectedFiles:n,torrentStats:r,showProgressBar:l,disabled:i})=>{let o=_.useMemo(()=>Ag(e,r),[e,r]);return d.jsx(bd,{torrentDetails:e,torrentStats:r,tree:o,selectedFiles:t,setSelectedFiles:n,initialExpanded:!0,showProgressBar:l,disabled:i})},$g=({id:e,detailsResponse:t,statsResponse:n})=>{const r=(n==null?void 0:n.state)??"",l=(n==null?void 0:n.error)??null,i=(n==null?void 0:n.total_bytes)??1,o=(n==null?void 0:n.progress_bytes)??0,s=(n==null?void 0:n.finished)||!1,a=l||i==0?100:o/i*100,f=()=>{var j;let T=(j=n==null?void 0:n.live)==null?void 0:j.snapshot.peer_stats;return T?`${T.live} / ${T.seen}`:""},v=T=>d.jsx(Fg,{className:T,error:!!l,live:!!(n!=null&&n.live),finished:s}),[w,y]=_.useState(new Set);_.useEffect(()=>{y(new Set((t==null?void 0:t.files.map((T,j)=>({f:T,id:j})).filter(({f:T})=>T.included).map(({id:T})=>T))??[]))},[t]);const x=_.useContext(Lt),k=_.useContext(Ps),[S,I]=_.useState(!1);let h=bn(T=>T.setCloseableError);const p=T=>{I(!0),x.updateOnlyFiles(e,Array.from(T)).then(()=>{k.refresh(),h(null)},j=>{h({text:"Error configuring torrent",details:j})}).finally(()=>I(!1))},[g,C]=_.useState(!1);return d.jsxs("div",{className:"flex flex-col border p-2 border-gray-200 rounded-xl shadow-xs hover:drop-shadow-sm dark:bg-slate-800 dark:border-slate-900",children:[d.jsxs("section",{className:"flex flex-col lg:flex-row items-center gap-2",children:[d.jsx("div",{className:"hidden md:block",children:v("w-10 h-10")}),d.jsxs("div",{className:"w-full flex flex-col gap-2",children:[t&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"md:hidden",children:v("w-5 h-5")}),d.jsx("div",{className:"text-left text-lg text-gray-900 text-ellipsis break-all dark:text-slate-200",children:Tg(t)})]}),l?d.jsxs("p",{className:"text-red-500 text-sm",children:[d.jsx("strong",{children:"Error:"})," ",l]}):d.jsxs(d.Fragment,{children:[d.jsx("div",{children:d.jsx(qd,{now:a,label:l,variant:r==Ls?"warn":s?"success":"info"})}),d.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-2 sm:flex-wrap items-center text-sm text-nowrap font-medium text-gray-500",children:[d.jsxs("div",{className:"flex gap-2 items-center",children:[d.jsx(cm,{})," ",f().toString()]}),d.jsxs("div",{className:"flex gap-2 items-center",children:[d.jsx(am,{}),d.jsxs("div",{children:[ll(o),"/",ll(i)]})]}),n&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex gap-2 items-center",children:[d.jsx(sm,{}),Ng(n)]}),d.jsx("div",{className:"flex gap-2 items-center",children:d.jsx(_g,{statsResponse:n})})]})]})]})]}),n&&d.jsx("div",{className:"",children:d.jsx(Eg,{id:e,statsResponse:n,extendedView:g,setExtendedView:C})})]}),t&&g&&d.jsx("div",{className:"",children:d.jsx(e0,{torrentDetails:t,torrentStats:n,selectedFiles:w,setSelectedFiles:p,disabled:S,showProgressBar:!0})})]})},Ug=({id:e,torrent:t})=>{const[n,r]=_.useState(null),[l,i]=_.useState(null),[o,s]=_.useState(0),a=_.useContext(Lt),f=()=>{s(o+1)};return _.useEffect(()=>$d(async()=>{await a.getTorrentDetails(t.id).then(r)},1e3),[o]),_.useEffect(()=>Os(async()=>a.getTorrentStats(t.id).then(x=>(i(x),x)).then(x=>x.state==Ls||x.state==lm?1e3:1e4,()=>1e4),0),[o]),d.jsx(Ps.Provider,{value:{refresh:f},children:d.jsx($g,{id:e,detailsResponse:n,statsResponse:l})})},Bg=e=>d.jsx("div",{className:"flex flex-col gap-2 mx-2 pb-3 sm:px-7",children:e.torrents===null?e.loading?d.jsx(Ei,{className:"justify-center m-5",label:"Loading torrent list"}):null:e.torrents.length===0?d.jsx("p",{className:"text-center",children:"No existing torrents found."}):e.torrents.map(t=>d.jsx(Ug,{id:t.id,torrent:t},t.id))}),Hg=e=>{let t=bn(o=>o.closeableError),n=bn(o=>o.setCloseableError),r=bn(o=>o.otherError),l=vn(o=>o.torrents),i=vn(o=>o.torrentsInitiallyLoading);return d.jsxs("div",{className:"container mx-auto",children:[d.jsx(En,{error:t,remove:()=>n(null)}),d.jsx(En,{error:r}),d.jsx(Bg,{torrents:l,loading:i})]})};var Vg="Expected a function",Sc=0/0,Wg="[object Symbol]",Qg=/^\s+|\s+$/g,Kg=/^[-+]0x[0-9a-f]+$/i,Zg=/^0b[01]+$/i,Gg=/^0o[0-7]+$/i,Yg=parseInt,Xg=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,Jg=typeof self=="object"&&self&&self.Object===Object&&self,qg=Xg||Jg||Function("return this")(),bg=Object.prototype,ev=bg.toString,tv=Math.max,nv=Math.min,Ao=function(){return qg.Date.now()};function rv(e,t,n){var r,l,i,o,s,a,f=0,v=!1,w=!1,y=!0;if(typeof e!="function")throw new TypeError(Vg);t=kc(t)||0,Fu(n)&&(v=!!n.leading,w="maxWait"in n,i=w?tv(kc(n.maxWait)||0,t):i,y="trailing"in n?!!n.trailing:y);function x(j){var O=r,z=l;return r=l=void 0,f=j,o=e.apply(z,O),o}function k(j){return f=j,s=setTimeout(h,t),v?x(j):o}function S(j){var O=j-a,z=j-f,W=t-O;return w?nv(W,i-z):W}function I(j){var O=j-a,z=j-f;return a===void 0||O>=t||O<0||w&&z>=i}function h(){var j=Ao();if(I(j))return p(j);s=setTimeout(h,S(j))}function p(j){return s=void 0,y&&r?x(j):(r=l=void 0,o)}function g(){s!==void 0&&clearTimeout(s),f=0,r=a=l=s=void 0}function C(){return s===void 0?o:p(Ao())}function T(){var j=Ao(),O=I(j);if(r=arguments,l=this,a=j,O){if(s===void 0)return k(a);if(w)return s=setTimeout(h,t),x(a)}return s===void 0&&(s=setTimeout(h,t)),o}return T.cancel=g,T.flush=C,T}function Fu(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function lv(e){return!!e&&typeof e=="object"}function iv(e){return typeof e=="symbol"||lv(e)&&ev.call(e)==Wg}function kc(e){if(typeof e=="number")return e;if(iv(e))return Sc;if(Fu(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Fu(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Qg,"");var n=Zg.test(e);return n||Gg.test(e)?Yg(e.slice(2),n?2:8):Kg.test(e)?Sc:+e}var ov=rv;const uv=il(ov),sv=({span:e})=>{let t=Object.entries(e).filter(([n,r])=>n!="name");return t.length==0?null:d.jsxs(d.Fragment,{children:["{",t.map(([n,r])=>d.jsxs("span",{children:[n," = ",r]},n)).reduce((n,r)=>d.jsxs(d.Fragment,{children:[n,", ",r]})),"}"]})},av=({span:e})=>d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"font-bold",children:e.name}),d.jsx(sv,{span:e}),d.jsx("span",{className:"font-bold",children:":"})]}),cv=({fields:e})=>d.jsxs("span",{className:`m-1 ${e.message.match(/error|fail/g)?"text-red-500":"text-slate-500 dark:text-slate-200"}`,children:[e.message,Object.entries(e).filter(([t,n])=>t!="message").map(([t,n])=>d.jsxs("span",{className:"m-1",children:[d.jsx("span",{className:"italic font-bold",children:t}),"=",n]},t))]}),fv=Et.memo(({line:e})=>{var r;const t=e,n=l=>{switch(l){case"DEBUG":return"text-blue-500";case"INFO":return"text-green-500";case"WARN":return"text-amber-500";case"ERROR":return"text-red-500";default:return"text-slate-500"}};return d.jsxs("p",{className:"font-mono m-0 text-break text-[10px]",children:[d.jsx("span",{className:"m-1 text-slate-500 dark:text-slate-400",children:t.timestamp}),d.jsx("span",{className:`m-1 ${n(t.level)}`,children:t.level}),d.jsx("span",{className:"m-1",children:(r=t.spans)==null?void 0:r.map((l,i)=>d.jsx(av,{span:l},i))}),d.jsx("span",{className:"m-1 text-slate-500 dark:text-slate-400",children:t.target}),d.jsx(cv,{fields:t.fields})]})}),t0=({children:e})=>d.jsx("form",{children:e}),Fs=({autoFocus:e,value:t,name:n,disabled:r,onChange:l,onKeyDown:i,label:o,help:s,inputType:a,placeholder:f})=>d.jsxs("div",{className:"flex flex-col gap-2 text-sm mb-2",children:[d.jsx("label",{htmlFor:n,className:"dark:text-white",children:o}),d.jsx("input",{autoFocus:e,type:a,className:"block border rounded bg-transparent py-1.5 pl-2 text-gray-800 focus:ring-0 sm:text-sm sm:leading-6 dark:text-slate-300",id:n,name:n,disabled:r,placeholder:f,value:t,onKeyDown:i,onChange:l}),s&&d.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-300",children:s})]}),dv=(e,t)=>{if(e.length===0)return t;if(t.length===0)return e;const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n},pv=(e,t,n)=>{const r=new AbortController,l=r.signal;let i=!1;const o=()=>{console.log("cancelling fetch"),i=!0,r.abort()},s=async()=>{let f=await fetch(e,{signal:l});if(!f.ok){let y=await f.text();throw n({text:"error fetching logs",details:{statusText:f.statusText,text:y}}),null}if(!f.body){n({text:"error fetching logs: ReadableStream not supported."});return}n(null);const v=f.body.getReader();let w=new Uint8Array;for(;;){const{done:y,value:x}=await v.read();if(y)throw n({text:"log stream terminated"}),null;w=dv(w,x);for(let k;(k=w.indexOf(10))!==-1;){let S=w.slice(0,k),I=new TextDecoder().decode(S);t(I),w=w.slice(k+1)}}};let a=$d(()=>s().then(()=>{},f=>{if(!i&&f!==null)throw n({text:"error streaming logs",details:{text:f.toString()}}),f}),1e3);return()=>{o(),a()}},hv=({url:e,maxLines:t})=>{const[n,r]=_.useState([]),[l,i]=_.useState(null),[o,s]=_.useState(""),a=_.useRef(null),f=t??1e3,v=_.useCallback(k=>{r(S=>[{id:S.length==0?0:S[0].id+1,content:k,parsed:JSON.parse(k),show:a.current?!!k.match(a.current):!0},...S.slice(0,f-1)])},[a.current,t]),w=_.useRef(v);w.current=v;const y=uv(k=>{let S=null;try{S=new RegExp(k)}catch{return}a.current=S,r(I=>{let h=[...I];for(let p of h)p.show=!!p.content.match(S);return h})},200),x=k=>{s(k),y(k)};return _.useEffect(()=>y.cancel,[]),_.useEffect(()=>pv(e,k=>w.current(k),i),[e]),d.jsxs("div",{children:[d.jsx(En,{error:l}),d.jsxs("div",{className:"mb-3",children:["Showing last ",f," logs since this window was opened"]}),d.jsx(t0,{children:d.jsx(Fs,{value:o,name:"filter",placeholder:"Enter filter (regex)",onChange:k=>x(k.target.value)})}),n.map(k=>d.jsx("div",{hidden:!k.show,children:d.jsx(fv,{line:k.parsed})},k.id))]})},mv=({show:e,onClose:t})=>{let r=_.useContext(Lt).getStreamLogsUrl();return d.jsxs(Hi,{isOpen:e,onClose:t,title:"rqbit server logs",className:"max-w-7xl",children:[d.jsx(Vi,{children:r?d.jsx(hv,{url:r}):d.jsx(En,{error:{text:"HTTP API not available to stream logs"}})}),d.jsx(Wi,{children:d.jsx(en,{variant:"primary",onClick:t,children:"Close"})})]})},gv=({children:e,label:t,help:n,className:r})=>d.jsxs("fieldset",{className:`mb-4 ${r}`,children:[t&&d.jsx("label",{className:"text-md font-md mb-3 block pb-1 border-b",children:t}),e]}),vv=e=>{let{onHide:t,listTorrentResponse:n,listTorrentError:r,listTorrentLoading:l,data:i}=e;const[o,s]=_.useState(new Set),[a,f]=_.useState(!1),[v,w]=_.useState(null),[y,x]=_.useState(!1),[k,S]=_.useState(""),I=vn(T=>T.refreshTorrents),h=_.useContext(Lt);_.useEffect(()=>{s(new Set(n==null?void 0:n.details.files.map((T,j)=>j))),S((n==null?void 0:n.output_folder)||"")},[n]);const p=()=>{t(),s(new Set),w(null),f(!1)},g=async()=>{if(!n)return;f(!0);let T=n.seen_peers?n.seen_peers.slice(0,32):null,j={overwrite:!0,only_files:Array.from(o),initial_peers:T,output_folder:k};y&&(j.peer_opts={connect_timeout:20,read_write_timeout:60}),h.uploadTorrent(i,j).then(()=>{t(),I()},O=>{w({text:"Error starting torrent",details:O})}).finally(()=>f(!1))},C=()=>{if(l)return d.jsx(Ei,{label:"Loading torrent contents"});if(r)return d.jsx(En,{error:r});if(n)return d.jsxs(t0,{children:[d.jsx(Fs,{label:"Output folder",name:"output_folder",inputType:"text",value:k,onChange:T=>S(T.target.value)}),d.jsx(gv,{children:d.jsx(e0,{selectedFiles:o,setSelectedFiles:s,torrentDetails:n.details,torrentStats:null})})]})};return d.jsxs(Hi,{isOpen:!0,onClose:p,title:"Add Torrent",children:[d.jsxs(Vi,{children:[C(),d.jsx(En,{error:v})]}),d.jsxs(Wi,{children:[a&&d.jsx(Ei,{}),d.jsx(en,{onClick:p,variant:"cancel",children:"Cancel"}),d.jsx(en,{onClick:g,variant:"primary",disabled:l||a||o.size==0,children:"OK"})]})]})},n0=({onClick:e,data:t,resetData:n,children:r,className:l})=>{const[i,o]=_.useState(!1),[s,a]=_.useState(null),[f,v]=_.useState(null),w=_.useContext(Lt);_.useEffect(()=>{if(t===null)return;let x=setTimeout(async()=>{o(!0);try{const k=await w.uploadTorrent(t,{list_only:!0});a(k)}catch(k){v({text:"Error listing torrent files",details:k})}finally{o(!1)}},0);return()=>clearTimeout(x)},[t]);const y=()=>{n(),v(null),a(null),o(!1)};return d.jsxs(d.Fragment,{children:[d.jsx(en,{onClick:e,className:l,children:r}),t&&d.jsx(vv,{onHide:y,listTorrentError:f,listTorrentResponse:s,data:t,listTorrentLoading:i})]})};function yv(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M10 18V16H8V14H10V12H12V14H14V16H12V18H10Z",fill:"currentColor"}},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2C4.34315 2 3 3.34315 3 5V19C3 20.6569 4.34315 22 6 22H18C19.6569 22 21 20.6569 21 19V9C21 5.13401 17.866 2 14 2H6ZM6 4H13V9H19V19C19 19.5523 18.5523 20 18 20H6C5.44772 20 5 19.5523 5 19V5C5 4.44772 5.44772 4 6 4ZM15 4.10002C16.6113 4.4271 17.9413 5.52906 18.584 7H15V4.10002Z",fill:"currentColor"}}]})(e)}function wv(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M14.8284 12L16.2426 13.4142L19.071 10.5858C20.6331 9.02365 20.6331 6.49099 19.071 4.9289C17.509 3.3668 14.9763 3.3668 13.4142 4.9289L10.5858 7.75732L12 9.17154L14.8284 6.34311C15.6095 5.56206 16.8758 5.56206 17.6568 6.34311C18.4379 7.12416 18.4379 8.39049 17.6568 9.17154L14.8284 12Z",fill:"currentColor"}},{tag:"path",attr:{d:"M12 14.8285L13.4142 16.2427L10.5858 19.0711C9.02372 20.6332 6.49106 20.6332 4.92896 19.0711C3.36686 17.509 3.36686 14.9764 4.92896 13.4143L7.75739 10.5858L9.1716 12L6.34317 14.8285C5.56212 15.6095 5.56212 16.8758 6.34317 17.6569C7.12422 18.4379 8.39055 18.4379 9.1716 17.6569L12 14.8285Z",fill:"currentColor"}},{tag:"path",attr:{d:"M14.8285 10.5857C15.219 10.1952 15.219 9.56199 14.8285 9.17147C14.4379 8.78094 13.8048 8.78094 13.4142 9.17147L9.1716 13.4141C8.78107 13.8046 8.78107 14.4378 9.1716 14.8283C9.56212 15.2188 10.1953 15.2188 10.5858 14.8283L14.8285 10.5857Z",fill:"currentColor"}}]})(e)}const xv=({className:e})=>{const t=_.useRef(),[n,r]=_.useState(null),l=async()=>{var a;if(!((a=t==null?void 0:t.current)!=null&&a.files))return;const s=t.current.files[0];r(s)},i=()=>{t!=null&&t.current&&(t.current.value="",r(null))},o=()=>{t!=null&&t.current&&t.current.click()};return d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"file",ref:t,accept:".torrent",onChange:l,hidden:!0}),d.jsxs(n0,{onClick:o,data:n,resetData:i,className:`group ${e}`,children:[d.jsx(yv,{className:"text-blue-500 group-hover:text-white dark:text-white"}),d.jsx("div",{children:"Upload .torrent File"})]})]})},Sv=({className:e})=>{const[t,n]=_.useState(null),[r,l]=_.useState(""),[i,o]=_.useState(!1),s=()=>{n(r),l(""),o(!1)},a=()=>{o(!1),n(null)};return d.jsxs(d.Fragment,{children:[d.jsxs(n0,{onClick:()=>{o(!0)},data:t,className:`group ${e}`,resetData:()=>n(null),children:[d.jsx(wv,{className:"text-blue-500 group-hover:text-white dark:text-white"}),d.jsx("div",{children:"Add Torrent from Magnet / URL"})]}),d.jsxs(Hi,{isOpen:i,onClose:a,title:"Add torrent",children:[d.jsx(Vi,{children:d.jsx(Fs,{autoFocus:!0,value:r,name:"magnet",onChange:f=>l(f.target.value),onKeyDown:f=>{f.key==="Enter"&&r&&s()},placeholder:"magnet:?xt=urn:btih:...",help:"Enter magnet or HTTP(S) URL to the .torrent"})}),d.jsxs(Wi,{children:[d.jsx(en,{variant:"cancel",onClick:a,children:"Cancel"}),d.jsx(en,{disabled:!r,variant:"primary",onClick:s,children:"Add"})]})]})]})},kv=e=>_.createElement("svg",{width:"64mm",height:"64mm",viewBox:"0 0 64 64",id:"svg1",xmlSpace:"preserve","inkscape:version":"1.3.1 (91b66b0, 2023-11-16)","sodipodi:docname":"logo.svg","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",...e},_.createElement("sodipodi:namedview",{id:"namedview1",pagecolor:"#ffffff",bordercolor:"#000000",borderopacity:.25,"inkscape:showpageshadow":2,"inkscape:pageopacity":0,"inkscape:pagecheckerboard":0,"inkscape:deskcolor":"#d1d1d1","inkscape:document-units":"mm","inkscape:zoom":1.4936372,"inkscape:cx":134.90559,"inkscape:cy":139.92689,"inkscape:window-width":1440,"inkscape:window-height":847,"inkscape:window-x":0,"inkscape:window-y":25,"inkscape:window-maximized":0,"inkscape:current-layer":"layer1"}),_.createElement("defs",{id:"defs1"},_.createElement("inkscape:perspective",{"sodipodi:type":"inkscape:persp3d","inkscape:vp_x":"3.1042448 : 18.147022 : 1","inkscape:vp_y":"0 : 999.99994 : 0","inkscape:vp_z":"303.94612 : 54.05812 : 1","inkscape:persp3d-origin":"105 : -134 : 1",id:"perspective4"})),_.createElement("g",{"inkscape:label":"Layer 1","inkscape:groupmode":"layer",id:"layer1",transform:"translate(-56.674541,-85.911432)"},_.createElement("path",{style:{fill:"#0d6efd",fillOpacity:1,strokeWidth:.610041},d:"m 81.603814,145.5382 -7.433116,-4.36986 -6.018097,-3.54529 -6.018099,-3.54529 -0.09405,-0.35761 -0.09406,-0.3576 v -15.31979 -15.31979 l 0.09451,-0.35939 0.09451,-0.35938 6.017643,-3.544433 6.017641,-3.544428 7.432805,-4.369167 7.432803,-4.369166 0.240089,0.09331 0.240083,0.09331 13.292394,7.826122 13.29241,7.826122 0.093,0.35355 0.093,0.35355 v 15.31979 15.31979 l -0.0928,0.35267 -0.0928,0.35266 -13.29682,7.82802 -13.296819,7.82803 -0.235583,0.0921 -0.235588,0.0921 z m 19.758596,-5.88315 12.13185,-7.15306 v -14.45996 -14.45994 l -5.11526,-3.01603 -5.11526,-3.016035 -7.017048,-4.136312 -7.017053,-4.13631 h -0.112738 -0.11273 l -7.097035,4.182089 -7.09703,4.18209 -5.035336,2.971548 -5.035335,2.97155 v 14.45761 14.45762 l 5.275113,3.11051 5.275113,3.11051 6.793709,4.02813 6.793702,4.02812 0.176743,0.0155 0.176742,0.0155 z",id:"path15","sodipodi:nodetypes":"cccccccccccccccccccccccccccccccccccccccccccccccccccc"}),_.createElement("path",{style:{fill:"#000000"},id:"path1",d:""}),_.createElement("path",{d:"m 84.161856,133.76725 -4.567369,-2.5483 -0.700367,0.28585 -0.700376,0.28584 -0.495731,0.11427 -0.495731,0.11426 -3.168791,-1.75603 -3.168782,-1.75603 -0.515321,-0.57002 -0.515323,-0.57002 0.0161,-3.59449 0.0161,-3.59448 0.164041,-0.41611 0.164042,-0.41611 1.480342,-0.85565 1.480346,-0.85565 0.06276,-3.67919 0.06276,-3.67921 0.39653,-0.35884 0.396521,-0.35886 3.663275,-2.04111 3.663267,-2.04112 0.114523,-1.62785 0.114506,-1.62786 0.229029,-0.21764 0.229038,-0.21765 3.341459,-1.854383 3.341467,-1.854382 h 0.301682 0.301682 l 2.476951,1.380374 2.476959,1.380381 1.151673,0.57845 1.151674,0.57845 0.02969,0.27424 0.02969,0.27423 0.02753,1.46272 0.02753,1.46273 3.663258,2.04521 3.66327,2.04521 0.40205,0.36386 0.40206,0.36385 v 3.60098 3.60097 l 0.28629,0.23408 0.28628,0.23408 1.43146,0.72479 1.43145,0.72479 v 3.9806 3.98059 l -0.51533,0.56995 -0.51532,0.56994 -3.19072,1.75191 -3.19072,1.75191 -0.47379,-0.11007 -0.473797,-0.11007 -0.699654,-0.28558 -0.699656,-0.28558 -4.589745,2.5527 -4.589746,2.55269 -0.321886,-0.004 -0.321886,-0.004 z m 8.681258,-1.65766 3.426793,-1.91645 0.06536,-0.19784 0.06535,-0.19785 -1.315884,-0.68709 -1.315885,-0.6871 -0.401264,-0.40081 -0.401265,-0.4008 v -3.79409 -3.79409 l 0.221568,-0.41401 0.221567,-0.414 3.411065,-1.86126 3.411061,-1.86126 h 0.38456 0.38455 l 0.91435,0.46646 0.91435,0.46646 -0.0646,-2.66249 -0.0646,-2.66248 -2.829977,-1.58148 -2.829984,-1.58149 -0.204696,0.12651 -0.204688,0.12651 v 1.11999 1.11999 l -0.744359,0.54975 -0.744358,0.54977 -2.773906,1.52318 -2.773906,1.52319 h -0.526565 -0.526565 l -3.34145,-1.85945 -3.341467,-1.85945 -0.168271,-0.2591 -0.16827,-0.25909 -0.0035,-1.07439 -0.0035,-1.07439 -0.204688,-0.12651 -0.204697,-0.12651 -2.82999,1.58149 -2.829982,1.58148 -0.06458,2.66248 -0.06458,2.66249 0.914351,-0.46646 0.914343,-0.46646 h 0.378551 0.37855 l 3.638639,1.97495 3.63864,1.97495 v 4.0944 4.09441 l -0.401265,0.4008 -0.401264,0.40081 -1.315885,0.6871 -1.315884,0.68709 0.06535,0.19785 0.06536,0.19784 3.426792,1.91645 3.426785,1.91644 h 0.343552 0.343544 z m -16.416873,-5.4431 -0.06475,-2.55838 -2.046125,-1.10985 -2.046124,-1.10984 -0.195677,0.19567 -0.195685,0.19568 0.06596,2.2656 0.06596,2.2656 2.06129,1.18713 2.06129,1.18713 0.179282,0.0198 0.179273,0.0198 z m 4.515881,1.34369 2.061291,-1.19456 0.06527,-2.48747 0.06527,-2.48748 -0.408821,0.15589 -0.408848,0.15589 -1.889514,1.02885 -1.889514,1.02885 v 2.50736 2.50736 l 0.171777,-0.01 0.171767,-0.01 z m 18.666131,-1.29267 v -2.50736 l -1.889509,-1.02885 -1.889522,-1.02885 -0.40883,-0.15589 -0.408839,-0.15589 0.06527,2.48748 0.06527,2.48747 2.061291,1.19456 2.061288,1.19456 0.171777,0.01 0.171774,0.01 z m 4.466127,1.28059 2.06129,-1.18713 0.0661,-2.2656 0.066,-2.2656 -0.19568,-0.19568 -0.19568,-0.19567 -2.04613,1.10984 -2.04612,1.10985 -0.0647,2.55838 -0.0648,2.55838 0.17927,-0.0198 0.17927,-0.0198 z m -24.281888,-6.71835 1.960418,-1.07415 -0.07566,-0.22693 -0.07566,-0.22691 -2.049423,-1.09443 -2.049431,-1.09442 -2.116604,1.14523 -2.116613,1.14523 v 0.17781 0.17782 l 2.004029,1.06709 2.004037,1.06711 0.277236,0.005 0.277237,0.005 z m 23.056528,4.3e-4 2.03643,-1.07372 -0.0708,-0.21245 -0.0708,-0.21244 -2.09332,-1.13015 -2.09332,-1.13016 -2.077692,1.17124 -2.077685,1.17123 v 0.17384 0.17386 l 1.889522,1.0551 1.889505,1.0551 0.31588,0.0161 0.31587,0.0161 z m -14.742004,-11.90808 0.06492,-2.2946 -0.293917,-0.23052 -0.293926,-0.2305 -2.011741,-1.08631 -2.01175,-1.08629 0.06501,2.57478 0.06501,2.57476 1.946776,1.09773 1.946767,1.09773 0.229038,-0.0611 0.229029,-0.0611 z m 4.401245,1.31989 1.946767,-1.09857 0.06501,-2.57476 0.06501,-2.57478 -2.01175,1.08629 -2.011741,1.08631 -0.286291,0.22417 -0.286291,0.22418 v 2.22411 2.2241 l 0.152689,0.15269 0.152689,0.15269 0.133602,-0.0139 0.133602,-0.0139 z m -1.021015,-6.79999 1.952048,-1.05546 -0.224347,-0.26147 -0.224337,-0.26149 -1.958921,-1.03065 -1.958911,-1.03064 -1.958912,1.03064 -1.958912,1.03065 -0.224303,0.26142 -0.224277,0.26141 1.896915,1.04261 1.896906,1.04261 0.517494,0.0129 0.517501,0.0129 z",style:{fill:"#0d6efd",fillOpacity:1,strokeWidth:.865634},id:"path1-8"}))),Ev=({title:e,version:t})=>d.jsxs("header",{className:"bg-slate-50 drop-shadow-lg flex flex-wrap justify-center lg:justify-between items-center dark:bg-slate-800 mb-3",children:[d.jsxs("div",{className:"flex flex-nowrap items-center justify-between m-2",children:[d.jsx(kv,{className:"w-10 h-10 p-1",alt:"logo"}),d.jsxs("h1",{className:"flex items-center dark:text-white",children:[d.jsx("div",{className:"text-3xl",children:e}),d.jsxs("div",{className:"bg-blue-100 text-blue-800 text-xl font-semibold me-2 px-2.5 py-0.5 rounded ms-2 dark:bg-blue-900 dark:text-white",children:["v",t]})]})]}),d.jsxs("div",{className:"flex flex-wrap gap-1 m-2",children:[d.jsx(Sv,{className:"flex-grow justify-center dark:text-white"}),d.jsx(xv,{className:"flex-grow justify-center dark:text-white"})]})]});let Fn=window.matchMedia("(prefers-color-scheme: dark)").matches;window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{Ki.setDark(e.matches)});const Ki={isDark:()=>Fn,setDark:e=>(Fn=e,document.body.classList.toggle("dark",Fn),Fn),toggle:()=>{Ki.setDark(!Fn)}};Ki.setDark(Fn);const _v=e=>{let[t,n]=_.useState(!1);const r=bn(f=>f.setOtherError),l=_.useContext(Lt),i=vn(f=>f.setTorrents),o=vn(f=>f.setTorrentsLoading),s=vn(f=>f.setRefreshTorrents),a=async()=>{o(!0);let f=await l.listTorrents().finally(()=>o(!1));i(f.torrents)};return s(a),_.useEffect(()=>Os(async()=>a().then(()=>(r(null),5e3),f=>(r({text:"Error refreshing torrents",details:f}),console.error(f),5e3)),0),[]),d.jsxs("div",{className:"dark:bg-gray-900 dark:text-gray-200 min-h-screen",children:[d.jsx(Ev,{title:e.title,version:e.version}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"absolute top-0 start-0 pl-2 z-10",children:[e.menuButtons&&e.menuButtons.map((f,v)=>d.jsx("span",{children:f},v)),d.jsx(hn,{onClick:()=>n(!0),children:d.jsx(fm,{})}),d.jsx(hn,{onClick:Ki.toggle,children:d.jsx(dm,{})})]}),d.jsx(Hg,{})]}),d.jsx(mv,{show:t,onClose:()=>n(!1)})]})},r0=window.origin==="null"||window.origin==="http://localhost:3031"?"http://localhost:3030":"",ot=async(e,t,n,r)=>{console.log(e,t);const l=r0+t;let i={method:e,headers:{Accept:"application/json"}};r?(i.headers={Accept:"application/json","Content-Type":"application/json"},i.body=JSON.stringify(n)):i.body=n;let o={method:e,path:t,text:""},s;try{s=await fetch(l,i)}catch{return o.text="network error",Promise.reject(o)}if(o.status=s.status,o.statusText=`${s.status} ${s.statusText}`,!s.ok){const f=await s.text();try{const v=JSON.parse(f);o.text=v.human_readable!==void 0?v.human_readable:JSON.stringify(v,null,2)}catch{o.text=f}return Promise.reject(o)}return await s.json()},Ec={getStreamLogsUrl:()=>r0+"/stream_logs",listTorrents:()=>ot("GET","/torrents"),getTorrentDetails:e=>ot("GET",`/torrents/${e}`),getTorrentStats:e=>ot("GET",`/torrents/${e}/stats/v1`),uploadTorrent:(e,t)=>{var r,l;let n="/torrents?&overwrite=true";return t!=null&&t.list_only&&(n+="&list_only=true"),(t==null?void 0:t.only_files)!=null&&(n+=`&only_files=${t.only_files.join(",")}`),(r=t==null?void 0:t.peer_opts)!=null&&r.connect_timeout&&(n+=`&peer_connect_timeout=${t.peer_opts.connect_timeout}`),(l=t==null?void 0:t.peer_opts)!=null&&l.read_write_timeout&&(n+=`&peer_read_write_timeout=${t.peer_opts.read_write_timeout}`),t!=null&&t.initial_peers&&(n+=`&initial_peers=${t.initial_peers.join(",")}`),t!=null&&t.output_folder&&(n+=`&output_folder=${t.output_folder}`),typeof e=="string"&&(n+="&is_url=true"),ot("POST",n,e)},updateOnlyFiles:(e,t)=>{let n=`/torrents/${e}/update_only_files`;return ot("POST",n,{only_files:t},!0)},pause:e=>ot("POST",`/torrents/${e}/pause`),start:e=>ot("POST",`/torrents/${e}/start`),forget:e=>ot("POST",`/torrents/${e}/forget`),delete:e=>ot("POST",`/torrents/${e}/delete`),getVersion:async()=>(await ot("GET","/")).version},Cv=()=>{let[e,t]=_.useState("");return _.useEffect(()=>Os(()=>Ec.getVersion().then(r=>{t(r);const l=`rqbit web UI - v${r}`;return document.title=l,1e4},r=>1e3),0),[]),d.jsx(Lt.Provider,{value:Ec,children:d.jsx(_v,{title:"rqbit web UI",version:e})})};$o.createRoot(document.getElementById("app")).render(d.jsx(_.StrictMode,{children:d.jsx(Cv,{})})); + */var Qi=C,cg=ag;function fg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dg=typeof Object.is=="function"?Object.is:fg,pg=cg.useSyncExternalStore,hg=Qi.useRef,mg=Qi.useEffect,gg=Qi.useMemo,vg=Qi.useDebugValue;Gd.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var i=hg(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=gg(function(){function a(w){if(!f){if(f=!0,y=w,w=r(w),l!==void 0&&o.hasValue){var S=o.value;if(l(S,w))return x=S}return x=w}if(S=x,dg(y,w))return S;var k=r(w);return l!==void 0&&l(S,k)?S:(y=w,x=k)}var f=!1,y,x,v=n===void 0?null:n;return[function(){return a(t())},v===null?void 0:function(){return a(v())}]},[t,n,r,l]);var s=pg(e,i[0],i[1]);return mg(function(){o.hasValue=!0,o.value=s},[s]),vg(s),s};Zd.exports=Gd;var yg=Zd.exports;const xg=il(yg),{useDebugValue:wg}=Et,{useSyncExternalStoreWithSelector:Sg}=xg;const kg=e=>e;function Eg(e,t=kg,n){const r=Sg(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return wg(r),r}const yc=e=>{const t=typeof e=="function"?bm(e):e,n=(r,l)=>Eg(t,r,l);return Object.assign(n,t),n},Jd=e=>e?yc(e):yc,Cg=(e,t)=>e.id==t.id&&e.info_hash==t.info_hash,_g=(e,t)=>e===null&&t===null?!0:e===null||t===null?!1:e.length===t.length&&e.every((n,r)=>Cg(n,t[r])),vn=Jd(e=>({torrents:null,torrentsLoading:!1,torrentsInitiallyLoading:!1,setTorrentsLoading:t=>e(n=>n.torrents==null?{torrentsInitiallyLoading:t,torrentsLoading:t}:{torrentsInitiallyLoading:!1,torrentsLoading:t}),setTorrents:t=>e(n=>_g(n.torrents,t)?{}:{torrents:t}),refreshTorrents:()=>{},setRefreshTorrents:t=>e({refreshTorrents:t})})),Tg=({id:e,show:t,onHide:n})=>{if(!t)return null;const[r,l]=C.useState(!1),[i,o]=C.useState(null),[s,a]=C.useState(!1),f=C.useContext(Lt),y=vn(w=>w.refreshTorrents),x=()=>{l(!1),o(null),a(!1),n()},v=()=>{a(!0),(r?f.delete:f.forget)(e).then(()=>{y(),x()}).catch(S=>{o({text:`Error deleting torrent id=${e}`,details:S}),a(!1)})};return d.jsxs(Hi,{isOpen:t,onClose:n,title:"Delete torrent",children:[d.jsxs(Vi,{children:[d.jsx("p",{className:"text-gray-700 dark:text-slate-300",children:"Are you sure you want to delete the torrent?"}),d.jsxs("div",{className:"mt-4 flex items-center",children:[d.jsx("input",{type:"checkbox",id:"deleteFiles",className:"form-checkbox h-4 w-4 text-blue-500",onChange:()=>l(!r),checked:r,placeholder:"Also delete files"}),d.jsx("label",{htmlFor:"deleteFiles",className:"ml-2 text-gray-700 dark:text-slate-300",children:"Also delete files"})]}),i&&d.jsx(En,{error:i})]}),d.jsxs(Wi,{children:[s&&d.jsx(Ei,{}),d.jsx(en,{variant:"cancel",onClick:x,children:"Cancel"}),d.jsx(en,{variant:"danger",onClick:v,disabled:s,children:"Delete Torrent"})]})]})};function jg(e){return ae({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.4 315.7l-42.6-24.6c4.3-23.2 4.3-47 0-70.2l42.6-24.6c4.9-2.8 7.1-8.6 5.5-14-11.1-35.6-30-67.8-54.7-94.6-3.8-4.1-10-5.1-14.8-2.3L380.8 110c-17.9-15.4-38.5-27.3-60.8-35.1V25.8c0-5.6-3.9-10.5-9.4-11.7-36.7-8.2-74.3-7.8-109.2 0-5.5 1.2-9.4 6.1-9.4 11.7V75c-22.2 7.9-42.8 19.8-60.8 35.1L88.7 85.5c-4.9-2.8-11-1.9-14.8 2.3-24.7 26.7-43.6 58.9-54.7 94.6-1.7 5.4.6 11.2 5.5 14L67.3 221c-4.3 23.2-4.3 47 0 70.2l-42.6 24.6c-4.9 2.8-7.1 8.6-5.5 14 11.1 35.6 30 67.8 54.7 94.6 3.8 4.1 10 5.1 14.8 2.3l42.6-24.6c17.9 15.4 38.5 27.3 60.8 35.1v49.2c0 5.6 3.9 10.5 9.4 11.7 36.7 8.2 74.3 7.8 109.2 0 5.5-1.2 9.4-6.1 9.4-11.7v-49.2c22.2-7.9 42.8-19.8 60.8-35.1l42.6 24.6c4.9 2.8 11 1.9 14.8-2.3 24.7-26.7 43.6-58.9 54.7-94.6 1.5-5.5-.7-11.3-5.6-14.1zM256 336c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"}}]})(e)}function Ng(e){return ae({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"}}]})(e)}function Pg(e){return ae({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function Lg(e){return ae({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}const bn=Jd(e=>({closeableError:null,setCloseableError:t=>e(()=>({closeableError:t})),otherError:null,setOtherError:t=>e(()=>({otherError:t}))})),Og=({id:e,statsResponse:t,extendedView:n,setExtendedView:r})=>{let l=t.state,[i,o]=C.useState(!1),[s,a]=C.useState(!1),f=C.useContext(Ps);const y=l=="live",x=l=="paused"||l=="error",v=l=="paused"||l=="live",w=bn(m=>m.setCloseableError),S=C.useContext(Lt),k=()=>{o(!0),S.start(e).then(()=>{f.refresh()},m=>{w({text:`Error starting torrent id=${e}`,details:m})}).finally(()=>o(!1))},z=()=>{o(!0),S.pause(e).then(()=>{f.refresh()},m=>{w({text:`Error pausing torrent id=${e}`,details:m})}).finally(()=>o(!1))},h=()=>{o(!0),a(!0)},p=()=>{o(!1),a(!1)};return d.jsxs("div",{className:"flex w-full justify-center gap-2 dark:text-slate-300",children:[x&&d.jsx(hn,{onClick:k,disabled:i,children:d.jsx(Pg,{className:"hover:text-green-600"})}),y&&d.jsx(hn,{onClick:z,disabled:i,children:d.jsx(Ng,{className:"hover:text-amber-500"})}),v&&d.jsx(hn,{onClick:()=>r(!n),disabled:i,children:d.jsx(jg,{className:"hover:text-green-600"})}),d.jsx(hn,{onClick:h,disabled:i,children:d.jsx(Lg,{className:"hover:text-red-500"})}),d.jsx(Tg,{id:e,show:s,onHide:p})]})},xc={warn:"bg-amber-500 text-white",info:"bg-blue-500 text-white",success:"bg-green-700 text-white",error:"bg-red-500 text-white"},qd=({now:e,variant:t,label:n,classNames:r})=>{const l=n??`${e.toFixed(2)}%`,i=xc[t??"info"]??xc.info;return d.jsx("div",{className:`w-full bg-gray-200 rounded-full mb-1 dark:bg-gray-500 ${r}`,children:d.jsx("div",{className:`text-xs font-medium transition-all text-center leading-none py-0.5 px-2 rounded-full ${i} ${e<1&&"bg-transparent"}`,style:{width:`${e}%`},children:l})})};function ll(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]}const Mg=({statsResponse:e})=>{var t,n;switch(e.state){case rm:return"Paused";case Ls:return"Checking files";case im:return"Error"}return e.state!="live"||e.live===null?e.state:d.jsxs(d.Fragment,{children:[!e.finished&&d.jsxs("div",{className:"download-speed",children:["↓ ",(t=e.live.download_speed)==null?void 0:t.human_readable]}),d.jsxs("div",{className:"upload-speed",children:["↑ ",(n=e.live.upload_speed)==null?void 0:n.human_readable,e.live.snapshot.uploaded_bytes>0&&d.jsxs("span",{children:["(",ll(e.live.snapshot.uploaded_bytes),")"]})]})]})};function zg(e){return e.files.filter(n=>n.included).reduce((n,r)=>n.length>r.length?n:r).name}function Fg(e){return e.name??zg(e)}function Ig(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60,l=(i,o)=>i>0?`${i}${o}`:"";return t>0?`${l(t,"h")} ${l(n,"m")}`.trim():n>0?`${l(n,"m")} ${l(r,"s")}`.trim():`${l(r,"s")}`.trim()}function Dg(e){var n,r,l;let t=(l=(r=(n=e==null?void 0:e.live)==null?void 0:n.time_remaining)==null?void 0:r.duration)==null?void 0:l.secs;return t==null?"N/A":Ig(t)}function Rg(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}}]})(e)}function Ag(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}}]})(e)}function $g(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"}}]})(e)}function Ug(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M9 16h6v-6h4l-7-7-7 7h4v6zm3-10.17L14.17 8H13v6h-2V8H9.83L12 5.83zM5 18h14v2H5z"}}]})(e)}function Bg(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 12c0 5.52-4.48 10-10 10S2 17.52 2 12c0-1.19.22-2.32.6-3.38l1.88.68C4.17 10.14 4 11.05 4 12c0 4.41 3.59 8 8 8s8-3.59 8-8-3.59-8-8-8c-.95 0-1.85.17-2.69.48l-.68-1.89C9.69 2.22 10.82 2 12 2c5.52 0 10 4.48 10 10zM5.5 4C4.67 4 4 4.67 4 5.5S4.67 7 5.5 7 7 6.33 7 5.5 6.33 4 5.5 4zM11 16V8H9v8h2zm4 0V8h-2v8h2z"}}]})(e)}const Hg=({className:e,finished:t,live:n,error:r})=>{const l=t&&n;return r?d.jsx(Ag,{className:e,color:"red"}):l?d.jsx(Ug,{className:e,color:"green"}):t?d.jsx(Rg,{className:e,color:"green"}):n?d.jsx($g,{className:`text-blue-500 ${e}`}):d.jsx(Bg,{className:e})},wc=({checked:e,name:t,disabled:n,onChange:r,label:l,help:i,inputType:o,children:s})=>d.jsxs("div",{className:"flex gap-3 items-start",children:[d.jsx("div",{className:"flex",children:d.jsx("input",{type:o||"checkbox",className:"block mt-1",id:t,name:t,disabled:n,checked:e,onChange:r})}),d.jsxs("div",{className:"text-sm flex flex-col gap-1",children:[d.jsx("label",{htmlFor:t,children:l}),i&&d.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-300 mb-3",children:i})]}),s]});function Vg(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Square_Minus"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M18.438,20.938H5.564a2.5,2.5,0,0,1-2.5-2.5V5.564a2.5,2.5,0,0,1,2.5-2.5H18.438a2.5,2.5,0,0,1,2.5,2.5V18.438A2.5,2.5,0,0,1,18.438,20.938ZM5.564,4.064a1.5,1.5,0,0,0-1.5,1.5V18.438a1.5,1.5,0,0,0,1.5,1.5H18.438a1.5,1.5,0,0,0,1.5-1.5V5.564a1.5,1.5,0,0,0-1.5-1.5Z"}},{tag:"path",attr:{d:"M9,12.5a.5.5,0,0,1,0-1h6a.5.5,0,0,1,0,1Z"}}]}]}]})(e)}function Wg(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Square_Plus"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M18.438,20.938H5.563a2.5,2.5,0,0,1-2.5-2.5V5.564a2.5,2.5,0,0,1,2.5-2.5H18.438a2.5,2.5,0,0,1,2.5,2.5V18.438A2.5,2.5,0,0,1,18.438,20.938ZM5.563,4.064a1.5,1.5,0,0,0-1.5,1.5V18.438a1.5,1.5,0,0,0,1.5,1.5H18.438a1.5,1.5,0,0,0,1.5-1.5V5.564a1.5,1.5,0,0,0-1.5-1.5Z"}},{tag:"path",attr:{d:"M15,12.5H12.5V15a.5.5,0,0,1-1,0V12.5H9a.5.5,0,0,1,0-1h2.5V9a.5.5,0,0,1,1,0v2.5H15A.5.5,0,0,1,15,12.5Z"}}]}]}]})(e)}var Ci={exports:{}};Ci.exports;(function(e,t){var n=200,r="Expected a function",l="__lodash_hash_undefined__",i=1,o=2,s=1/0,a=9007199254740991,f="[object Arguments]",y="[object Array]",x="[object Boolean]",v="[object Date]",w="[object Error]",S="[object Function]",k="[object GeneratorFunction]",z="[object Map]",h="[object Number]",p="[object Object]",m="[object Promise]",_="[object RegExp]",T="[object Set]",j="[object String]",O="[object Symbol]",F="[object WeakMap]",W="[object ArrayBuffer]",A="[object DataView]",we="[object Float32Array]",ft="[object Float64Array]",dt="[object Int8Array]",Tn="[object Int16Array]",fr="[object Int32Array]",Ae="[object Uint8Array]",rt="[object Uint8ClampedArray]",P="[object Uint16Array]",R="[object Uint32Array]",$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/,ee=/^\./,Ge=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$e=/[\\^$.*+?()[\]{}|]/g,pt=/\\(\\)?/g,Ye=/^\[object .+?Constructor\]$/,Ot=/^(?:0|[1-9]\d*)$/,Z={};Z[we]=Z[ft]=Z[dt]=Z[Tn]=Z[fr]=Z[Ae]=Z[rt]=Z[P]=Z[R]=!0,Z[f]=Z[y]=Z[W]=Z[x]=Z[A]=Z[v]=Z[w]=Z[S]=Z[z]=Z[h]=Z[p]=Z[_]=Z[T]=Z[j]=Z[F]=!1;var jn=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,dr=typeof self=="object"&&self&&self.Object===Object&&self,lt=jn||dr||Function("return this")(),pr=t&&!t.nodeType&&t,Nn=pr&&!0&&e&&!e.nodeType&&e,Pn=Nn&&Nn.exports===pr,q=Pn&&jn.process,hr=function(){try{return q&&q.binding("util")}catch{}}(),Ln=hr&&hr.isTypedArray;function l0(u,c,g){switch(g.length){case 0:return u.call(c);case 1:return u.call(c,g[0]);case 2:return u.call(c,g[0],g[1]);case 3:return u.call(c,g[0],g[1],g[2])}return u.apply(c,g)}function Ds(u,c){for(var g=-1,E=u?u.length:0,M=Array(E);++g-1}function F0(u,c){var g=this.__data__,E=ml(g,u);return E<0?g.push([u,c]):g[E][1]=c,this}mt.prototype.clear=L0,mt.prototype.delete=O0,mt.prototype.get=M0,mt.prototype.has=z0,mt.prototype.set=F0;function gt(u){var c=-1,g=u?u.length:0;for(this.clear();++c0&&g(U)?c>1?Ws(U,c-1,g,E,M):i0(M,U):E||(M[M.length]=U)}return M}var Y0=m1();function X0(u,c){return u&&Y0(u,c,wl)}function Qs(u,c){c=vl(c,u)?[c]:Ks(c);for(var g=0,E=c.length;u!=null&&gc||L&&D&&H&&!U&&!G||E&&D&&H||!g&&H||!M)return 1;if(!E&&!L&&!G&&u=U)return H;var G=g[E];return H*(G=="desc"?-1:1)}}return u.index-c.index}function h1(u,c){return function(g,E){if(g==null)return g;if(!vr(g))return u(g,E);for(var M=g.length,L=c?M:-1,D=Object(g);(c?L--:++LU))return!1;var G=L.get(u);if(G&&L.get(c))return G==c;var Se=-1,Te=!0,ce=M&i?new hl:void 0;for(L.set(u,c),L.set(c,u);++Se-1&&u%1==0&&u1&&Gs(u,c[0],c[1])?c=[]:g>2&&Gs(c[0],c[1],c[2])&&(c=[c[0]]),s1(u,Ws(c,1),[])});function no(u,c){if(typeof u!="function"||c&&typeof c!="function")throw new TypeError(r);var g=function(){var E=arguments,M=c?c.apply(this,E):E[0],L=g.cache;if(L.has(M))return L.get(M);var D=u.apply(this,E);return g.cache=L.set(M,D),D};return g.cache=new(no.Cache||gt),g}no.Cache=gt;function ro(u,c){return u===c||u!==u&&c!==c}function lo(u){return T1(u)&&ht.call(u,"callee")&&(!v0.call(u,"callee")||On.call(u)==f)}var zt=Array.isArray;function vr(u){return u!=null&&io(u.length)&&!Js(u)}function T1(u){return xl(u)&&vr(u)}function Js(u){var c=yr(u)?On.call(u):"";return c==S||c==k}function io(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=a}function yr(u){var c=typeof u;return!!u&&(c=="object"||c=="function")}function xl(u){return!!u&&typeof u=="object"}function xr(u){return typeof u=="symbol"||xl(u)&&On.call(u)==O}var j1=Ln?Rs(Ln):n1;function N1(u){return u==null?"":f1(u)}function P1(u,c,g){var E=u==null?void 0:Qs(u,c);return E===void 0?g:E}function L1(u,c){return u!=null&&x1(u,c,q0)}function wl(u){return vr(u)?Z0(u):l1(u)}function qs(u){return u}function O1(u){return vl(u)?u0(yl(u)):a1(u)}e.exports=_1})(Ci,Ci.exports);var Qg=Ci.exports;const Sc=il(Qg),Kg=(e,t)=>{const n=(r,l,i,o)=>{let s=[],a=[],f={};const y=w=>(f[w]=f[w]||[],f[w]);i.forEach(w=>{if(o==w.pathComponents.length-1){s.push(w);return}y(w.pathComponents[0]).push(w)}),s=Sc(s,w=>w.filename);let x=Sc(Object.entries(f),([w,S])=>w),v=0;for(const[w,S]of x)a.push(n(w,l+"."+v,S,o+1)),v+=1;return{name:r,id:l,dirs:a,files:s}};return n("","filetree-root",e.files.map((r,l)=>({id:l,filename:r.components[r.components.length-1],pathComponents:r.components,length:r.length,have_bytes:t?t.file_progress[l]??0:0})),0)},bd=({tree:e,selectedFiles:t,setSelectedFiles:n,initialExpanded:r,torrentDetails:l,torrentStats:i,showProgressBar:o,disabled:s})=>{let[a,f]=C.useState(r),y=C.useMemo(()=>{let k=z=>{let h=z.dirs.flatMap(k);return h.push(...z.files.map(p=>p.id)),h};return k(e)},[e]);const x=k=>{if(k.target.checked){let z=new Set(t);y.forEach(h=>z.add(h)),n(z)}else{let z=new Set(t);y.forEach(h=>z.delete(h)),n(z)}},v=k=>{if(t.has(k)){let z=new Set(t);z.delete(k),n(z)}else{let z=new Set(t);z.add(k),n(z)}},w=()=>y.filter(k=>t.has(k)).length,S=()=>y.filter(k=>t.has(k)).map(k=>l.files[k].length).reduce((k,z)=>k+z,0);return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center",children:[d.jsx(hn,{onClick:()=>f(!a),children:a?d.jsx(Vg,{}):d.jsx(Wg,{})}),d.jsx(wc,{checked:y.every(k=>t.has(k)),label:`${e.name?e.name+", ":""} ${w()} files, ${ll(S())}`,name:e.id,onChange:x})]}),d.jsxs("div",{className:"pl-5",hidden:!a,children:[e.dirs.map(k=>d.jsx(bd,{torrentDetails:l,torrentStats:i,tree:k,selectedFiles:t,setSelectedFiles:n,initialExpanded:!1},k.name)),d.jsx("div",{className:"pl-1",children:e.files.map(k=>d.jsxs("div",{className:`${o?"grid grid-cols-1 gap-1 items-start lg:grid-cols-2 mb-2 lg:mb-0":""}`,children:[d.jsx(wc,{checked:t.has(k.id),label:`${k.filename} (${ll(k.length)})`,name:`file-${k.id}`,disabled:s,onChange:()=>v(k.id)}),o&&d.jsx(qd,{now:k.have_bytes/k.length*100,variant:k.have_bytes==k.length?"success":"info"})]},k.id))})]})]})},e0=({torrentDetails:e,selectedFiles:t,setSelectedFiles:n,torrentStats:r,showProgressBar:l,disabled:i})=>{let o=C.useMemo(()=>Kg(e,r),[e,r]);return d.jsx(bd,{torrentDetails:e,torrentStats:r,tree:o,selectedFiles:t,setSelectedFiles:n,initialExpanded:!0,showProgressBar:l,disabled:i})},Zg=({id:e,detailsResponse:t,statsResponse:n})=>{const r=(n==null?void 0:n.state)??"",l=(n==null?void 0:n.error)??null,i=(n==null?void 0:n.total_bytes)??1,o=(n==null?void 0:n.progress_bytes)??0,s=(n==null?void 0:n.finished)||!1,a=l||i==0?100:o/i*100,f=()=>{var j;let T=(j=n==null?void 0:n.live)==null?void 0:j.snapshot.peer_stats;return T?`${T.live} / ${T.seen}`:""},y=T=>d.jsx(Hg,{className:T,error:!!l,live:!!(n!=null&&n.live),finished:s}),[x,v]=C.useState(new Set);C.useEffect(()=>{v(new Set((t==null?void 0:t.files.map((T,j)=>({f:T,id:j})).filter(({f:T})=>T.included).map(({id:T})=>T))??[]))},[t]);const w=C.useContext(Lt),S=C.useContext(Ps),[k,z]=C.useState(!1);let h=bn(T=>T.setCloseableError);const p=T=>{z(!0),w.updateOnlyFiles(e,Array.from(T)).then(()=>{S.refresh(),h(null)},j=>{h({text:"Error configuring torrent",details:j})}).finally(()=>z(!1))},[m,_]=C.useState(!1);return d.jsxs("div",{className:"flex flex-col border p-2 border-gray-200 rounded-xl shadow-xs hover:drop-shadow-sm dark:bg-slate-800 dark:border-slate-900",children:[d.jsxs("section",{className:"flex flex-col lg:flex-row items-center gap-2",children:[d.jsx("div",{className:"hidden md:block",children:y("w-10 h-10")}),d.jsxs("div",{className:"w-full flex flex-col gap-2",children:[t&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"md:hidden",children:y("w-5 h-5")}),d.jsx("div",{className:"text-left text-lg text-gray-900 text-ellipsis break-all dark:text-slate-200",children:Fg(t)})]}),l?d.jsxs("p",{className:"text-red-500 text-sm",children:[d.jsx("strong",{children:"Error:"})," ",l]}):d.jsxs(d.Fragment,{children:[d.jsx("div",{children:d.jsx(qd,{now:a,label:l,variant:r==Ls?"warn":s?"success":"info"})}),d.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-2 sm:flex-wrap items-center text-sm text-nowrap font-medium text-gray-500",children:[d.jsxs("div",{className:"flex gap-2 items-center",children:[d.jsx(cm,{})," ",f().toString()]}),d.jsxs("div",{className:"flex gap-2 items-center",children:[d.jsx(am,{}),d.jsxs("div",{children:[ll(o),"/",ll(i)]})]}),n&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex gap-2 items-center",children:[d.jsx(sm,{}),Dg(n)]}),d.jsx("div",{className:"flex gap-2 items-center",children:d.jsx(Mg,{statsResponse:n})})]})]})]})]}),n&&d.jsx("div",{className:"",children:d.jsx(Og,{id:e,statsResponse:n,extendedView:m,setExtendedView:_})})]}),t&&m&&d.jsx("div",{className:"",children:d.jsx(e0,{torrentDetails:t,torrentStats:n,selectedFiles:x,setSelectedFiles:p,disabled:k,showProgressBar:!0})})]})},Gg=({id:e,torrent:t})=>{const[n,r]=C.useState(null),[l,i]=C.useState(null),[o,s]=C.useState(0),a=C.useContext(Lt),f=()=>{s(o+1)};return C.useEffect(()=>Ud(async()=>{await a.getTorrentDetails(t.id).then(r)},1e3),[o]),C.useEffect(()=>Os(async()=>a.getTorrentStats(t.id).then(w=>(i(w),w)).then(w=>w.state==Ls||w.state==lm?1e3:1e4,()=>1e4),0),[o]),d.jsx(Ps.Provider,{value:{refresh:f},children:d.jsx(Zg,{id:e,detailsResponse:n,statsResponse:l})})},Yg=e=>d.jsx("div",{className:"flex flex-col gap-2 mx-2 pb-3 sm:px-7",children:e.torrents===null?e.loading?d.jsx(Ei,{className:"justify-center m-5",label:"Loading torrent list"}):null:e.torrents.length===0?d.jsx("p",{className:"text-center",children:"No existing torrents found."}):e.torrents.map(t=>d.jsx(Gg,{id:t.id,torrent:t},t.id))}),Xg=e=>{let t=bn(o=>o.closeableError),n=bn(o=>o.setCloseableError),r=bn(o=>o.otherError),l=vn(o=>o.torrents),i=vn(o=>o.torrentsInitiallyLoading);return d.jsxs("div",{className:"container mx-auto",children:[d.jsx(En,{error:t,remove:()=>n(null)}),d.jsx(En,{error:r}),d.jsx(Yg,{torrents:l,loading:i})]})};var Jg="Expected a function",kc=0/0,qg="[object Symbol]",bg=/^\s+|\s+$/g,ev=/^[-+]0x[0-9a-f]+$/i,tv=/^0b[01]+$/i,nv=/^0o[0-7]+$/i,rv=parseInt,lv=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,iv=typeof self=="object"&&self&&self.Object===Object&&self,ov=lv||iv||Function("return this")(),uv=Object.prototype,sv=uv.toString,av=Math.max,cv=Math.min,Ao=function(){return ov.Date.now()};function fv(e,t,n){var r,l,i,o,s,a,f=0,y=!1,x=!1,v=!0;if(typeof e!="function")throw new TypeError(Jg);t=Ec(t)||0,Fu(n)&&(y=!!n.leading,x="maxWait"in n,i=x?av(Ec(n.maxWait)||0,t):i,v="trailing"in n?!!n.trailing:v);function w(j){var O=r,F=l;return r=l=void 0,f=j,o=e.apply(F,O),o}function S(j){return f=j,s=setTimeout(h,t),y?w(j):o}function k(j){var O=j-a,F=j-f,W=t-O;return x?cv(W,i-F):W}function z(j){var O=j-a,F=j-f;return a===void 0||O>=t||O<0||x&&F>=i}function h(){var j=Ao();if(z(j))return p(j);s=setTimeout(h,k(j))}function p(j){return s=void 0,v&&r?w(j):(r=l=void 0,o)}function m(){s!==void 0&&clearTimeout(s),f=0,r=a=l=s=void 0}function _(){return s===void 0?o:p(Ao())}function T(){var j=Ao(),O=z(j);if(r=arguments,l=this,a=j,O){if(s===void 0)return S(a);if(x)return s=setTimeout(h,t),w(a)}return s===void 0&&(s=setTimeout(h,t)),o}return T.cancel=m,T.flush=_,T}function Fu(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function dv(e){return!!e&&typeof e=="object"}function pv(e){return typeof e=="symbol"||dv(e)&&sv.call(e)==qg}function Ec(e){if(typeof e=="number")return e;if(pv(e))return kc;if(Fu(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Fu(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(bg,"");var n=tv.test(e);return n||nv.test(e)?rv(e.slice(2),n?2:8):ev.test(e)?kc:+e}var hv=fv;const mv=il(hv),gv=({span:e})=>{let t=Object.entries(e).filter(([n,r])=>n!="name");return t.length==0?null:d.jsxs(d.Fragment,{children:["{",t.map(([n,r])=>d.jsxs("span",{children:[n," = ",r]},n)).reduce((n,r)=>d.jsxs(d.Fragment,{children:[n,", ",r]})),"}"]})},vv=({span:e})=>d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"font-bold",children:e.name}),d.jsx(gv,{span:e}),d.jsx("span",{className:"font-bold",children:":"})]}),yv=({fields:e})=>d.jsxs("span",{className:`m-1 ${e.message.match(/error|fail/g)?"text-red-500":"text-slate-500 dark:text-slate-200"}`,children:[e.message,Object.entries(e).filter(([t,n])=>t!="message").map(([t,n])=>d.jsxs("span",{className:"m-1",children:[d.jsx("span",{className:"italic font-bold",children:t}),"=",n]},t))]}),xv=Et.memo(({line:e})=>{var r;const t=e,n=l=>{switch(l){case"DEBUG":return"text-blue-500";case"INFO":return"text-green-500";case"WARN":return"text-amber-500";case"ERROR":return"text-red-500";default:return"text-slate-500"}};return d.jsxs("p",{className:"font-mono m-0 text-break text-[10px]",children:[d.jsx("span",{className:"m-1 text-slate-500 dark:text-slate-400",children:t.timestamp}),d.jsx("span",{className:`m-1 ${n(t.level)}`,children:t.level}),d.jsx("span",{className:"m-1",children:(r=t.spans)==null?void 0:r.map((l,i)=>d.jsx(vv,{span:l},i))}),d.jsx("span",{className:"m-1 text-slate-500 dark:text-slate-400",children:t.target}),d.jsx(yv,{fields:t.fields})]})}),t0=({children:e})=>d.jsx("form",{children:e}),Is=({autoFocus:e,value:t,name:n,disabled:r,onChange:l,onKeyDown:i,label:o,help:s,inputType:a,placeholder:f})=>d.jsxs("div",{className:"flex flex-col gap-2 text-sm mb-2",children:[d.jsx("label",{htmlFor:n,className:"dark:text-white",children:o}),d.jsx("input",{autoFocus:e,type:a,className:"block border rounded bg-transparent py-1.5 pl-2 text-gray-800 focus:ring-0 sm:text-sm sm:leading-6 dark:text-slate-300",id:n,name:n,disabled:r,placeholder:f,value:t,onKeyDown:i,onChange:l}),s&&d.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-300",children:s})]}),wv=(e,t)=>{if(e.length===0)return t;if(t.length===0)return e;const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n},Sv=(e,t,n)=>{const r=new AbortController,l=r.signal;let i=!1;const o=()=>{console.log("cancelling fetch"),i=!0,r.abort()},s=async()=>{let f=await fetch(e,{signal:l});if(!f.ok){let v=await f.text();throw n({text:"error fetching logs",details:{statusText:f.statusText,text:v}}),null}if(!f.body){n({text:"error fetching logs: ReadableStream not supported."});return}n(null);const y=f.body.getReader();let x=new Uint8Array;for(;;){const{done:v,value:w}=await y.read();if(v)throw n({text:"log stream terminated"}),null;x=wv(x,w);for(let S;(S=x.indexOf(10))!==-1;){let k=x.slice(0,S),z=new TextDecoder().decode(k);t(z),x=x.slice(S+1)}}};let a=Ud(()=>s().then(()=>{},f=>{if(!i&&f!==null)throw n({text:"error streaming logs",details:{text:f.toString()}}),f}),1e3);return()=>{o(),a()}},kv=({url:e,maxLines:t})=>{const[n,r]=C.useState([]),[l,i]=C.useState(null),[o,s]=C.useState(""),a=C.useRef(null),f=t??1e3,y=C.useCallback(S=>{r(k=>[{id:k.length==0?0:k[0].id+1,content:S,parsed:JSON.parse(S),show:a.current?!!S.match(a.current):!0},...k.slice(0,f-1)])},[a.current,t]),x=C.useRef(y);x.current=y;const v=mv(S=>{let k=null;try{k=new RegExp(S)}catch{return}a.current=k,r(z=>{let h=[...z];for(let p of h)p.show=!!p.content.match(k);return h})},200),w=S=>{s(S),v(S)};return C.useEffect(()=>v.cancel,[]),C.useEffect(()=>Sv(e,S=>x.current(S),i),[e]),d.jsxs("div",{children:[d.jsx(En,{error:l}),d.jsxs("div",{className:"mb-3",children:["Showing last ",f," logs since this window was opened"]}),d.jsx(t0,{children:d.jsx(Is,{value:o,name:"filter",placeholder:"Enter filter (regex)",onChange:S=>w(S.target.value)})}),n.map(S=>d.jsx("div",{hidden:!S.show,children:d.jsx(xv,{line:S.parsed})},S.id))]})},Ev=({show:e,onClose:t})=>{let r=C.useContext(Lt).getStreamLogsUrl();return d.jsxs(Hi,{isOpen:e,onClose:t,title:"rqbit server logs",className:"max-w-7xl",children:[d.jsx(Vi,{children:r?d.jsx(kv,{url:r}):d.jsx(En,{error:{text:"HTTP API not available to stream logs"}})}),d.jsx(Wi,{children:d.jsx(en,{variant:"primary",onClick:t,children:"Close"})})]})},Cv=({children:e,label:t,help:n,className:r})=>d.jsxs("fieldset",{className:`mb-4 ${r}`,children:[t&&d.jsx("label",{className:"text-md font-md mb-3 block pb-1 border-b",children:t}),e]}),_v=e=>{let{onHide:t,listTorrentResponse:n,listTorrentError:r,listTorrentLoading:l,data:i}=e;const[o,s]=C.useState(new Set),[a,f]=C.useState(!1),[y,x]=C.useState(null),[v,w]=C.useState(!1),[S,k]=C.useState(""),z=vn(T=>T.refreshTorrents),h=C.useContext(Lt);C.useEffect(()=>{s(new Set(n==null?void 0:n.details.files.map((T,j)=>j))),k((n==null?void 0:n.output_folder)||"")},[n]);const p=()=>{t(),s(new Set),x(null),f(!1)},m=async()=>{if(!n)return;f(!0);let T=n.seen_peers?n.seen_peers.slice(0,32):null,j={overwrite:!0,only_files:Array.from(o),initial_peers:T,output_folder:S};v&&(j.peer_opts={connect_timeout:20,read_write_timeout:60}),h.uploadTorrent(i,j).then(()=>{t(),z()},O=>{x({text:"Error starting torrent",details:O})}).finally(()=>f(!1))},_=()=>{if(l)return d.jsx(Ei,{label:"Loading torrent contents"});if(r)return d.jsx(En,{error:r});if(n)return d.jsxs(t0,{children:[d.jsx(Is,{label:"Output folder",name:"output_folder",inputType:"text",value:S,onChange:T=>k(T.target.value)}),d.jsx(Cv,{children:d.jsx(e0,{selectedFiles:o,setSelectedFiles:s,torrentDetails:n.details,torrentStats:null})})]})};return d.jsxs(Hi,{isOpen:!0,onClose:p,title:"Add Torrent",children:[d.jsxs(Vi,{children:[_(),d.jsx(En,{error:y})]}),d.jsxs(Wi,{children:[a&&d.jsx(Ei,{}),d.jsx(en,{onClick:p,variant:"cancel",children:"Cancel"}),d.jsx(en,{onClick:m,variant:"primary",disabled:l||a||o.size==0,children:"OK"})]})]})},n0=({onClick:e,data:t,resetData:n,children:r,className:l})=>{const[i,o]=C.useState(!1),[s,a]=C.useState(null),[f,y]=C.useState(null),x=C.useContext(Lt);C.useEffect(()=>{if(t===null)return;let w=setTimeout(async()=>{o(!0);try{const S=await x.uploadTorrent(t,{list_only:!0});a(S)}catch(S){y({text:"Error listing torrent files",details:S})}finally{o(!1)}},0);return()=>clearTimeout(w)},[t]);const v=()=>{n(),y(null),a(null),o(!1)};return d.jsxs(d.Fragment,{children:[d.jsx(en,{onClick:e,className:l,children:r}),t&&d.jsx(_v,{onHide:v,listTorrentError:f,listTorrentResponse:s,data:t,listTorrentLoading:i})]})};function Tv(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M10 18V16H8V14H10V12H12V14H14V16H12V18H10Z",fill:"currentColor"}},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2C4.34315 2 3 3.34315 3 5V19C3 20.6569 4.34315 22 6 22H18C19.6569 22 21 20.6569 21 19V9C21 5.13401 17.866 2 14 2H6ZM6 4H13V9H19V19C19 19.5523 18.5523 20 18 20H6C5.44772 20 5 19.5523 5 19V5C5 4.44772 5.44772 4 6 4ZM15 4.10002C16.6113 4.4271 17.9413 5.52906 18.584 7H15V4.10002Z",fill:"currentColor"}}]})(e)}function jv(e){return ae({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M14.8284 12L16.2426 13.4142L19.071 10.5858C20.6331 9.02365 20.6331 6.49099 19.071 4.9289C17.509 3.3668 14.9763 3.3668 13.4142 4.9289L10.5858 7.75732L12 9.17154L14.8284 6.34311C15.6095 5.56206 16.8758 5.56206 17.6568 6.34311C18.4379 7.12416 18.4379 8.39049 17.6568 9.17154L14.8284 12Z",fill:"currentColor"}},{tag:"path",attr:{d:"M12 14.8285L13.4142 16.2427L10.5858 19.0711C9.02372 20.6332 6.49106 20.6332 4.92896 19.0711C3.36686 17.509 3.36686 14.9764 4.92896 13.4143L7.75739 10.5858L9.1716 12L6.34317 14.8285C5.56212 15.6095 5.56212 16.8758 6.34317 17.6569C7.12422 18.4379 8.39055 18.4379 9.1716 17.6569L12 14.8285Z",fill:"currentColor"}},{tag:"path",attr:{d:"M14.8285 10.5857C15.219 10.1952 15.219 9.56199 14.8285 9.17147C14.4379 8.78094 13.8048 8.78094 13.4142 9.17147L9.1716 13.4141C8.78107 13.8046 8.78107 14.4378 9.1716 14.8283C9.56212 15.2188 10.1953 15.2188 10.5858 14.8283L14.8285 10.5857Z",fill:"currentColor"}}]})(e)}const Nv=({className:e})=>{const t=C.useRef(),[n,r]=C.useState(null),l=async()=>{var a;if(!((a=t==null?void 0:t.current)!=null&&a.files))return;const s=t.current.files[0];r(s)},i=()=>{t!=null&&t.current&&(t.current.value="",r(null))},o=()=>{t!=null&&t.current&&t.current.click()};return d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"file",ref:t,accept:".torrent",onChange:l,hidden:!0}),d.jsxs(n0,{onClick:o,data:n,resetData:i,className:`group ${e}`,children:[d.jsx(Tv,{className:"text-blue-500 group-hover:text-white dark:text-white"}),d.jsx("div",{children:"Upload .torrent File"})]})]})},Pv=({className:e})=>{const[t,n]=C.useState(null),[r,l]=C.useState(""),[i,o]=C.useState(!1),s=()=>{n(r),l(""),o(!1)},a=()=>{o(!1),n(null)};return d.jsxs(d.Fragment,{children:[d.jsxs(n0,{onClick:()=>{o(!0)},data:t,className:`group ${e}`,resetData:()=>n(null),children:[d.jsx(jv,{className:"text-blue-500 group-hover:text-white dark:text-white"}),d.jsx("div",{children:"Add Torrent from Magnet / URL"})]}),d.jsxs(Hi,{isOpen:i,onClose:a,title:"Add torrent",children:[d.jsx(Vi,{children:d.jsx(Is,{autoFocus:!0,value:r,name:"magnet",onChange:f=>l(f.target.value),onKeyDown:f=>{f.key==="Enter"&&r&&s()},placeholder:"magnet:?xt=urn:btih:...",help:"Enter magnet or HTTP(S) URL to the .torrent"})}),d.jsxs(Wi,{children:[d.jsx(en,{variant:"cancel",onClick:a,children:"Cancel"}),d.jsx(en,{disabled:!r,variant:"primary",onClick:s,children:"Add"})]})]})]})},Lv=e=>C.createElement("svg",{width:"64mm",height:"64mm",viewBox:"0 0 64 64",id:"svg1",xmlSpace:"preserve","inkscape:version":"1.3.1 (91b66b0, 2023-11-16)","sodipodi:docname":"logo.svg","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",...e},C.createElement("sodipodi:namedview",{id:"namedview1",pagecolor:"#ffffff",bordercolor:"#000000",borderopacity:.25,"inkscape:showpageshadow":2,"inkscape:pageopacity":0,"inkscape:pagecheckerboard":0,"inkscape:deskcolor":"#d1d1d1","inkscape:document-units":"mm","inkscape:zoom":1.4936372,"inkscape:cx":134.90559,"inkscape:cy":139.92689,"inkscape:window-width":1440,"inkscape:window-height":847,"inkscape:window-x":0,"inkscape:window-y":25,"inkscape:window-maximized":0,"inkscape:current-layer":"layer1"}),C.createElement("defs",{id:"defs1"},C.createElement("inkscape:perspective",{"sodipodi:type":"inkscape:persp3d","inkscape:vp_x":"3.1042448 : 18.147022 : 1","inkscape:vp_y":"0 : 999.99994 : 0","inkscape:vp_z":"303.94612 : 54.05812 : 1","inkscape:persp3d-origin":"105 : -134 : 1",id:"perspective4"})),C.createElement("g",{"inkscape:label":"Layer 1","inkscape:groupmode":"layer",id:"layer1",transform:"translate(-56.674541,-85.911432)"},C.createElement("path",{style:{fill:"#0d6efd",fillOpacity:1,strokeWidth:.610041},d:"m 81.603814,145.5382 -7.433116,-4.36986 -6.018097,-3.54529 -6.018099,-3.54529 -0.09405,-0.35761 -0.09406,-0.3576 v -15.31979 -15.31979 l 0.09451,-0.35939 0.09451,-0.35938 6.017643,-3.544433 6.017641,-3.544428 7.432805,-4.369167 7.432803,-4.369166 0.240089,0.09331 0.240083,0.09331 13.292394,7.826122 13.29241,7.826122 0.093,0.35355 0.093,0.35355 v 15.31979 15.31979 l -0.0928,0.35267 -0.0928,0.35266 -13.29682,7.82802 -13.296819,7.82803 -0.235583,0.0921 -0.235588,0.0921 z m 19.758596,-5.88315 12.13185,-7.15306 v -14.45996 -14.45994 l -5.11526,-3.01603 -5.11526,-3.016035 -7.017048,-4.136312 -7.017053,-4.13631 h -0.112738 -0.11273 l -7.097035,4.182089 -7.09703,4.18209 -5.035336,2.971548 -5.035335,2.97155 v 14.45761 14.45762 l 5.275113,3.11051 5.275113,3.11051 6.793709,4.02813 6.793702,4.02812 0.176743,0.0155 0.176742,0.0155 z",id:"path15","sodipodi:nodetypes":"cccccccccccccccccccccccccccccccccccccccccccccccccccc"}),C.createElement("path",{style:{fill:"#000000"},id:"path1",d:""}),C.createElement("path",{d:"m 84.161856,133.76725 -4.567369,-2.5483 -0.700367,0.28585 -0.700376,0.28584 -0.495731,0.11427 -0.495731,0.11426 -3.168791,-1.75603 -3.168782,-1.75603 -0.515321,-0.57002 -0.515323,-0.57002 0.0161,-3.59449 0.0161,-3.59448 0.164041,-0.41611 0.164042,-0.41611 1.480342,-0.85565 1.480346,-0.85565 0.06276,-3.67919 0.06276,-3.67921 0.39653,-0.35884 0.396521,-0.35886 3.663275,-2.04111 3.663267,-2.04112 0.114523,-1.62785 0.114506,-1.62786 0.229029,-0.21764 0.229038,-0.21765 3.341459,-1.854383 3.341467,-1.854382 h 0.301682 0.301682 l 2.476951,1.380374 2.476959,1.380381 1.151673,0.57845 1.151674,0.57845 0.02969,0.27424 0.02969,0.27423 0.02753,1.46272 0.02753,1.46273 3.663258,2.04521 3.66327,2.04521 0.40205,0.36386 0.40206,0.36385 v 3.60098 3.60097 l 0.28629,0.23408 0.28628,0.23408 1.43146,0.72479 1.43145,0.72479 v 3.9806 3.98059 l -0.51533,0.56995 -0.51532,0.56994 -3.19072,1.75191 -3.19072,1.75191 -0.47379,-0.11007 -0.473797,-0.11007 -0.699654,-0.28558 -0.699656,-0.28558 -4.589745,2.5527 -4.589746,2.55269 -0.321886,-0.004 -0.321886,-0.004 z m 8.681258,-1.65766 3.426793,-1.91645 0.06536,-0.19784 0.06535,-0.19785 -1.315884,-0.68709 -1.315885,-0.6871 -0.401264,-0.40081 -0.401265,-0.4008 v -3.79409 -3.79409 l 0.221568,-0.41401 0.221567,-0.414 3.411065,-1.86126 3.411061,-1.86126 h 0.38456 0.38455 l 0.91435,0.46646 0.91435,0.46646 -0.0646,-2.66249 -0.0646,-2.66248 -2.829977,-1.58148 -2.829984,-1.58149 -0.204696,0.12651 -0.204688,0.12651 v 1.11999 1.11999 l -0.744359,0.54975 -0.744358,0.54977 -2.773906,1.52318 -2.773906,1.52319 h -0.526565 -0.526565 l -3.34145,-1.85945 -3.341467,-1.85945 -0.168271,-0.2591 -0.16827,-0.25909 -0.0035,-1.07439 -0.0035,-1.07439 -0.204688,-0.12651 -0.204697,-0.12651 -2.82999,1.58149 -2.829982,1.58148 -0.06458,2.66248 -0.06458,2.66249 0.914351,-0.46646 0.914343,-0.46646 h 0.378551 0.37855 l 3.638639,1.97495 3.63864,1.97495 v 4.0944 4.09441 l -0.401265,0.4008 -0.401264,0.40081 -1.315885,0.6871 -1.315884,0.68709 0.06535,0.19785 0.06536,0.19784 3.426792,1.91645 3.426785,1.91644 h 0.343552 0.343544 z m -16.416873,-5.4431 -0.06475,-2.55838 -2.046125,-1.10985 -2.046124,-1.10984 -0.195677,0.19567 -0.195685,0.19568 0.06596,2.2656 0.06596,2.2656 2.06129,1.18713 2.06129,1.18713 0.179282,0.0198 0.179273,0.0198 z m 4.515881,1.34369 2.061291,-1.19456 0.06527,-2.48747 0.06527,-2.48748 -0.408821,0.15589 -0.408848,0.15589 -1.889514,1.02885 -1.889514,1.02885 v 2.50736 2.50736 l 0.171777,-0.01 0.171767,-0.01 z m 18.666131,-1.29267 v -2.50736 l -1.889509,-1.02885 -1.889522,-1.02885 -0.40883,-0.15589 -0.408839,-0.15589 0.06527,2.48748 0.06527,2.48747 2.061291,1.19456 2.061288,1.19456 0.171777,0.01 0.171774,0.01 z m 4.466127,1.28059 2.06129,-1.18713 0.0661,-2.2656 0.066,-2.2656 -0.19568,-0.19568 -0.19568,-0.19567 -2.04613,1.10984 -2.04612,1.10985 -0.0647,2.55838 -0.0648,2.55838 0.17927,-0.0198 0.17927,-0.0198 z m -24.281888,-6.71835 1.960418,-1.07415 -0.07566,-0.22693 -0.07566,-0.22691 -2.049423,-1.09443 -2.049431,-1.09442 -2.116604,1.14523 -2.116613,1.14523 v 0.17781 0.17782 l 2.004029,1.06709 2.004037,1.06711 0.277236,0.005 0.277237,0.005 z m 23.056528,4.3e-4 2.03643,-1.07372 -0.0708,-0.21245 -0.0708,-0.21244 -2.09332,-1.13015 -2.09332,-1.13016 -2.077692,1.17124 -2.077685,1.17123 v 0.17384 0.17386 l 1.889522,1.0551 1.889505,1.0551 0.31588,0.0161 0.31587,0.0161 z m -14.742004,-11.90808 0.06492,-2.2946 -0.293917,-0.23052 -0.293926,-0.2305 -2.011741,-1.08631 -2.01175,-1.08629 0.06501,2.57478 0.06501,2.57476 1.946776,1.09773 1.946767,1.09773 0.229038,-0.0611 0.229029,-0.0611 z m 4.401245,1.31989 1.946767,-1.09857 0.06501,-2.57476 0.06501,-2.57478 -2.01175,1.08629 -2.011741,1.08631 -0.286291,0.22417 -0.286291,0.22418 v 2.22411 2.2241 l 0.152689,0.15269 0.152689,0.15269 0.133602,-0.0139 0.133602,-0.0139 z m -1.021015,-6.79999 1.952048,-1.05546 -0.224347,-0.26147 -0.224337,-0.26149 -1.958921,-1.03065 -1.958911,-1.03064 -1.958912,1.03064 -1.958912,1.03065 -0.224303,0.26142 -0.224277,0.26141 1.896915,1.04261 1.896906,1.04261 0.517494,0.0129 0.517501,0.0129 z",style:{fill:"#0d6efd",fillOpacity:1,strokeWidth:.865634},id:"path1-8"}))),Ov=({title:e,version:t})=>d.jsxs("header",{className:"bg-slate-50 drop-shadow-lg flex flex-wrap justify-center lg:justify-between items-center dark:bg-slate-800 mb-3",children:[d.jsxs("div",{className:"flex flex-nowrap items-center justify-between m-2",children:[d.jsx(Lv,{className:"w-10 h-10 p-1",alt:"logo"}),d.jsxs("h1",{className:"flex items-center dark:text-white",children:[d.jsx("div",{className:"text-3xl",children:e}),d.jsxs("div",{className:"bg-blue-100 text-blue-800 text-xl font-semibold me-2 px-2.5 py-0.5 rounded ms-2 dark:bg-blue-900 dark:text-white",children:["v",t]})]})]}),d.jsxs("div",{className:"flex flex-wrap gap-1 m-2",children:[d.jsx(Pv,{className:"flex-grow justify-center dark:text-white"}),d.jsx(Nv,{className:"flex-grow justify-center dark:text-white"})]})]});let Fn=window.matchMedia("(prefers-color-scheme: dark)").matches;window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{Ki.setDark(e.matches)});const Ki={isDark:()=>Fn,setDark:e=>(Fn=e,document.body.classList.toggle("dark",Fn),Fn),toggle:()=>{Ki.setDark(!Fn)}};Ki.setDark(Fn);const Mv=e=>{let[t,n]=C.useState(!1);const r=bn(f=>f.setOtherError),l=C.useContext(Lt),i=vn(f=>f.setTorrents),o=vn(f=>f.setTorrentsLoading),s=vn(f=>f.setRefreshTorrents),a=async()=>{o(!0);let f=await l.listTorrents().finally(()=>o(!1));i(f.torrents)};return s(a),C.useEffect(()=>Os(async()=>a().then(()=>(r(null),5e3),f=>(r({text:"Error refreshing torrents",details:f}),console.error(f),5e3)),0),[]),d.jsxs("div",{className:"dark:bg-gray-900 dark:text-gray-200 min-h-screen",children:[d.jsx(Ov,{title:e.title,version:e.version}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"absolute top-0 start-0 pl-2 z-10",children:[e.menuButtons&&e.menuButtons.map((f,y)=>d.jsx("span",{children:f},y)),d.jsx(hn,{onClick:()=>n(!0),children:d.jsx(fm,{})}),d.jsx(hn,{onClick:Ki.toggle,children:d.jsx(dm,{})})]}),d.jsx(Xg,{})]}),d.jsx(Ev,{show:t,onClose:()=>n(!1)})]})},r0=window.origin==="null"||window.origin==="http://localhost:3031"?"http://localhost:3030":"",ot=async(e,t,n,r)=>{console.log(e,t);const l=r0+t;let i={method:e,headers:{Accept:"application/json"}};r?(i.headers={Accept:"application/json","Content-Type":"application/json"},i.body=JSON.stringify(n)):i.body=n;let o={method:e,path:t,text:""},s;try{s=await fetch(l,i)}catch{return o.text="network error",Promise.reject(o)}if(o.status=s.status,o.statusText=`${s.status} ${s.statusText}`,!s.ok){const f=await s.text();try{const y=JSON.parse(f);o.text=y.human_readable!==void 0?y.human_readable:JSON.stringify(y,null,2)}catch{o.text=f}return Promise.reject(o)}return await s.json()},Cc={getStreamLogsUrl:()=>r0+"/stream_logs",listTorrents:()=>ot("GET","/torrents"),getTorrentDetails:e=>ot("GET",`/torrents/${e}`),getTorrentStats:e=>ot("GET",`/torrents/${e}/stats/v1`),uploadTorrent:(e,t)=>{var r,l;let n="/torrents?&overwrite=true";return t!=null&&t.list_only&&(n+="&list_only=true"),(t==null?void 0:t.only_files)!=null&&(n+=`&only_files=${t.only_files.join(",")}`),(r=t==null?void 0:t.peer_opts)!=null&&r.connect_timeout&&(n+=`&peer_connect_timeout=${t.peer_opts.connect_timeout}`),(l=t==null?void 0:t.peer_opts)!=null&&l.read_write_timeout&&(n+=`&peer_read_write_timeout=${t.peer_opts.read_write_timeout}`),t!=null&&t.initial_peers&&(n+=`&initial_peers=${t.initial_peers.join(",")}`),t!=null&&t.output_folder&&(n+=`&output_folder=${t.output_folder}`),typeof e=="string"&&(n+="&is_url=true"),ot("POST",n,e)},updateOnlyFiles:(e,t)=>{let n=`/torrents/${e}/update_only_files`;return ot("POST",n,{only_files:t},!0)},pause:e=>ot("POST",`/torrents/${e}/pause`),start:e=>ot("POST",`/torrents/${e}/start`),forget:e=>ot("POST",`/torrents/${e}/forget`),delete:e=>ot("POST",`/torrents/${e}/delete`),getVersion:async()=>(await ot("GET","/")).version},zv=()=>{let[e,t]=C.useState("");return C.useEffect(()=>Os(()=>Cc.getVersion().then(r=>{t(r);const l=`rqbit web UI - v${r}`;return document.title=l,1e4},r=>1e3),0),[]),d.jsx(Lt.Provider,{value:Cc,children:d.jsx(Mv,{title:"rqbit web UI",version:e})})};$o.createRoot(document.getElementById("app")).render(d.jsx(C.StrictMode,{children:d.jsx(zv,{})})); diff --git a/crates/librqbit/webui/dist/manifest.json b/crates/librqbit/webui/dist/manifest.json index e9710d5a..39ab03b1 100644 --- a/crates/librqbit/webui/dist/manifest.json +++ b/crates/librqbit/webui/dist/manifest.json @@ -4,14 +4,14 @@ "src": "assets/logo.svg" }, "index.css": { - "file": "assets/index-58bde067.css", + "file": "assets/index-144bafe5.css", "src": "index.css" }, "index.html": { "css": [ - "assets/index-58bde067.css" + "assets/index-144bafe5.css" ], - "file": "assets/index-3519fca6.js", + "file": "assets/index-14bf0ca9.js", "isEntry": true, "src": "index.html" } diff --git a/desktop/package-lock.json b/desktop/package-lock.json index 245e22a0..e6f13b73 100644 --- a/desktop/package-lock.json +++ b/desktop/package-lock.json @@ -28,6 +28,7 @@ } }, "../crates/librqbit/webui": { + "name": "rqbit-webui", "dependencies": { "@restart/ui": "^1.6.6", "lodash.debounce": "^4.0.8",