@arudovwen/form-builder-react 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -20
- package/dist/form-builder.es.js +2407 -2357
- package/dist/form-builder.umd.js +25 -25
- package/dist/index.css +1 -1
- package/package.json +1 -1
- package/types/components/Loader.d.ts +1 -1
- package/types/components/editor/layout.d.ts +11 -9
- package/types/components/editor/topbar.d.ts +4 -3
- package/types/pages/builder/index.d.ts +3 -3
package/dist/form-builder.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(Pt,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],p):(Pt=typeof globalThis<"u"?globalThis:Pt||self,p(Pt.FormBuilder={},Pt.React,Pt.ReactDOM))})(this,function(Pt,p,_t){"use strict";var Qs=document.createElement("style");Qs.textContent=`@import"https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&display=swap";@import"https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&family=Onest:wght@100..900&display=swap";.form-control{display:block;width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1));background-color:transparent;padding:10px 14px;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.form-control::-moz-placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.form-control::placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.form-control:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(71 85 105 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.form-label{margin-bottom:.5rem;display:block;width:100%;cursor:pointer;font-size:.875rem;font-weight:500;text-transform:capitalize;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.input-control{display:block;width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1));background-color:transparent;padding:10px 14px;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.input-control::-moz-placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.input-control::placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.input-control:focus{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1));outline:2px solid transparent;outline-offset:2px;--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);--tw-ring-opacity: .9}.input-label{margin-bottom:6px;cursor:pointer;font-size:.875rem;font-weight:500;text-transform:capitalize;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.formGroup.has-error .input-control{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.formGroup.has-error .input-control:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.formGroup.is-valid .input-control{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.formGroup.is-valid .input-control:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(34 197 94 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.input-control[readonly]{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.input-control[disabled]{cursor:not-allowed;--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.input-control[disabled]::-moz-placeholder{--tw-text-opacity: .6}.input-control[disabled]::placeholder{--tw-text-opacity: .6}label{color:#475467!important}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.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}}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-top-\\[10px\\]{top:-10px}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[40\\]{z-index:40}.z-\\[77\\]{z-index:77}.z-\\[999\\]{z-index:999}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-ml-1{margin-left:-.25rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\\[5px\\]{margin-bottom:5px}.mb-\\[6px\\]{margin-bottom:6px}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[6px\\]{margin-top:6px}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-11{height:2.75rem}.h-14{height:3.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\\[60px\\]{height:60px}.h-\\[60vh\\]{height:60vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[86vh\\]{max-height:86vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-full{max-height:100%}.min-h-\\[110px\\]{min-height:110px}.min-h-\\[250px\\]{min-height:250px}.min-h-\\[300px\\]{min-height:300px}.min-h-\\[600px\\]{min-height:600px}.min-h-\\[60px\\]{min-height:60px}.w-14{width:3.5rem}.w-20{width:5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-\\[150px\\]{width:150px}.w-\\[270px\\]{width:270px}.w-full{width:100%}.w-screen{width:100vw}.min-w-\\[24px\\]{min-width:24px}.min-w-\\[600px\\]{min-width:600px}.max-w-\\[800px\\]{max-width:800px}.max-w-\\[80vw\\]{max-width:80vw}.max-w-\\[90vw\\]{max-width:90vw}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-x-\\[10px\\]{-moz-column-gap:10px;column-gap:10px}.gap-y-1{row-gap:.25rem}.gap-y-12{row-gap:3rem}.gap-y-2{row-gap:.5rem}.gap-y-6{row-gap:1.5rem}.gap-y-\\[1px\\]{row-gap:1px}.gap-y-\\[6px\\]{row-gap:6px}.gap-y-\\[8px\\]{row-gap:8px}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.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-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\\[\\#98A2B3\\]{--tw-border-opacity: 1;border-color:rgb(152 162 179 / var(--tw-border-opacity, 1))}.border-\\[\\#D0D5DD\\]{--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1))}.border-\\[\\#E4E7EC\\]{--tw-border-opacity: 1;border-color:rgb(228 231 236 / var(--tw-border-opacity, 1))}.border-\\[\\#EAECF0\\]{--tw-border-opacity: 1;border-color:rgb(234 236 240 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-\\[\\#2563EB\\]{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E4E7EC\\]{--tw-bg-opacity: 1;background-color:rgb(228 231 236 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F2F4F7\\]{--tw-bg-opacity: 1;background-color:rgb(242 244 247 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F9F9FB\\]{--tw-bg-opacity: 1;background-color:rgb(249 249 251 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F9FAFB\\]{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f7f8fa\\]{--tw-bg-opacity: 1;background-color:rgb(247 248 250 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.\\!py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.\\!py-\\[10px\\]{padding-top:10px!important;padding-bottom:10px!important}.px-1{padding-left:.25rem;padding-right:.25rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\\[14px\\]{padding-left:14px;padding-right:14px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-\\[10px\\]{padding-top:10px;padding-bottom:10px}.py-\\[2px\\]{padding-top:2px;padding-bottom:2px}.\\!pl-1{padding-left:.25rem!important}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-\\[14px\\]{padding-bottom:14px}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.\\!text-left{text-align:left!important}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-onest{font-family:Onest,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[20px\\]{font-size:20px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.\\!font-medium{font-weight:500!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.\\!uppercase{text-transform:uppercase!important}.capitalize{text-transform:capitalize}.leading-\\[0\\]{line-height:0}.leading-normal{line-height:1.5}.\\!text-blue-700{--tw-text-opacity: 1 !important;color:rgb(29 78 216 / var(--tw-text-opacity, 1))!important}.\\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.\\!text-white\\/60{color:#fff9!important}.text-\\[\\#344054\\]{--tw-text-opacity: 1;color:rgb(52 64 84 / var(--tw-text-opacity, 1))}.text-\\[\\#454745\\]{--tw-text-opacity: 1;color:rgb(69 71 69 / var(--tw-text-opacity, 1))}.text-\\[\\#475467\\]{--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.text-\\[\\#667085\\]{--tw-text-opacity: 1;color:rgb(102 112 133 / var(--tw-text-opacity, 1))}.text-\\[\\#686878\\]{--tw-text-opacity: 1;color:rgb(104 104 120 / var(--tw-text-opacity, 1))}.text-\\[\\#98A2B3\\]{--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow-\\[rgba\\(149\\,157\\,165\\,0\\.2\\)_0px_2px_4px\\]{--tw-shadow: rgba(149,157,165,.2) 0px 2px 4px;--tw-shadow-colored: 0px 2px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline-0{outline-width:0px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity, 1))}.ring-opacity-5{--tw-ring-opacity: .05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-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}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html,body{margin:0;padding:0}:root{font-family:Onest,serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.no-drag{-webkit-user-drag:none;user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.loader{width:48px;height:48px;display:inline-block;position:relative}.loader:after,.loader:before{content:"";box-sizing:border-box;width:48px;height:48px;border-radius:50%;border:2px solid var(--loader-color, #333);position:absolute;left:0;top:0;animation:animloader 2s linear infinite}.loader:after{animation-delay:1s}@keyframes animloader{0%{transform:scale(0);opacity:1}to{transform:scale(1);opacity:0}}.text-green{color:green}.file\\:mr-4::file-selector-button{margin-right:1rem}.file\\:rounded-\\[6px\\]::file-selector-button{border-radius:6px}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-blue-50::file-selector-button{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.file\\:px-4::file-selector-button{padding-left:1rem;padding-right:1rem}.file\\:py-\\[6px\\]::file-selector-button{padding-top:6px;padding-bottom:6px}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-semibold::file-selector-button{font-weight:600}.file\\:text-blue-700::file-selector-button{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.hover\\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(147 197 253 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\\:opacity-80:hover{opacity:.8}.hover\\:shadow:hover{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:file\\:bg-blue-100::file-selector-button:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-0:focus{outline-width:0px}.active\\:opacity-50:active{opacity:.5}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.group:last-child .group-last\\:hidden{display:none}@media (min-width: 640px){.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\\:min-w-\\[800px\\]{min-width:800px}}:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(
|
|
1
|
+
(function(Pt,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],p):(Pt=typeof globalThis<"u"?globalThis:Pt||self,p(Pt.FormBuilder={},Pt.React,Pt.ReactDOM))})(this,function(Pt,p,_t){"use strict";var ea=document.createElement("style");ea.textContent=`@import"https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&display=swap";@import"https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&family=Onest:wght@100..900&display=swap";.form-control{display:block;width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1));background-color:transparent;padding:10px 14px;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.form-control::-moz-placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.form-control::placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.form-control:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(71 85 105 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.form-label{margin-bottom:.5rem;display:block;width:100%;cursor:pointer;font-size:.875rem;font-weight:500;text-transform:capitalize;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.input-control{display:block;width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1));background-color:transparent;padding:10px 14px;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.input-control::-moz-placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.input-control::placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.input-control:focus{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1));outline:2px solid transparent;outline-offset:2px;--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);--tw-ring-opacity: .9}.input-label{margin-bottom:6px;cursor:pointer;font-size:.875rem;font-weight:500;text-transform:capitalize;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.formGroup.has-error .input-control{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.formGroup.has-error .input-control:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.formGroup.is-valid .input-control{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.formGroup.is-valid .input-control:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(34 197 94 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.input-control[readonly]{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.input-control[disabled]{cursor:not-allowed;--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.input-control[disabled]::-moz-placeholder{--tw-text-opacity: .6}.input-control[disabled]::placeholder{--tw-text-opacity: .6}label{color:#475467!important}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.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}}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-top-\\[10px\\]{top:-10px}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[40\\]{z-index:40}.z-\\[77\\]{z-index:77}.z-\\[999\\]{z-index:999}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-ml-1{margin-left:-.25rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\\[5px\\]{margin-bottom:5px}.mb-\\[6px\\]{margin-bottom:6px}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[6px\\]{margin-top:6px}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.\\!h-\\[800px\\]{height:800px!important}.h-11{height:2.75rem}.h-14{height:3.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\\[60px\\]{height:60px}.h-\\[60vh\\]{height:60vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[86vh\\]{max-height:86vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-full{max-height:100%}.min-h-\\[110px\\]{min-height:110px}.min-h-\\[250px\\]{min-height:250px}.min-h-\\[300px\\]{min-height:300px}.min-h-\\[600px\\]{min-height:600px}.min-h-\\[60px\\]{min-height:60px}.\\!w-full{width:100%!important}.w-14{width:3.5rem}.w-20{width:5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-\\[150px\\]{width:150px}.w-\\[270px\\]{width:270px}.w-full{width:100%}.w-screen{width:100vw}.min-w-\\[24px\\]{min-width:24px}.min-w-\\[600px\\]{min-width:600px}.max-w-\\[800px\\]{max-width:800px}.max-w-\\[80vw\\]{max-width:80vw}.max-w-\\[90vw\\]{max-width:90vw}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-x-\\[10px\\]{-moz-column-gap:10px;column-gap:10px}.gap-x-\\[6px\\]{-moz-column-gap:6px;column-gap:6px}.gap-y-1{row-gap:.25rem}.gap-y-12{row-gap:3rem}.gap-y-2{row-gap:.5rem}.gap-y-6{row-gap:1.5rem}.gap-y-\\[1px\\]{row-gap:1px}.gap-y-\\[6px\\]{row-gap:6px}.gap-y-\\[8px\\]{row-gap:8px}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.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-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\\[\\#98A2B3\\]{--tw-border-opacity: 1;border-color:rgb(152 162 179 / var(--tw-border-opacity, 1))}.border-\\[\\#D0D5DD\\]{--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1))}.border-\\[\\#E4E7EC\\]{--tw-border-opacity: 1;border-color:rgb(228 231 236 / var(--tw-border-opacity, 1))}.border-\\[\\#EAECF0\\]{--tw-border-opacity: 1;border-color:rgb(234 236 240 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-\\[\\#2563EB\\]{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E4E7EC\\]{--tw-bg-opacity: 1;background-color:rgb(228 231 236 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F2F4F7\\]{--tw-bg-opacity: 1;background-color:rgb(242 244 247 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F9F9FB\\]{--tw-bg-opacity: 1;background-color:rgb(249 249 251 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F9FAFB\\]{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f7f8fa\\]{--tw-bg-opacity: 1;background-color:rgb(247 248 250 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.\\!py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.\\!py-\\[10px\\]{padding-top:10px!important;padding-bottom:10px!important}.px-1{padding-left:.25rem;padding-right:.25rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\\[14px\\]{padding-left:14px;padding-right:14px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-\\[10px\\]{padding-top:10px;padding-bottom:10px}.py-\\[2px\\]{padding-top:2px;padding-bottom:2px}.\\!pl-1{padding-left:.25rem!important}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-\\[14px\\]{padding-bottom:14px}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.\\!text-left{text-align:left!important}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-onest{font-family:Onest,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[20px\\]{font-size:20px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.\\!font-medium{font-weight:500!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.\\!uppercase{text-transform:uppercase!important}.capitalize{text-transform:capitalize}.leading-\\[0\\]{line-height:0}.leading-normal{line-height:1.5}.\\!text-blue-700{--tw-text-opacity: 1 !important;color:rgb(29 78 216 / var(--tw-text-opacity, 1))!important}.\\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.\\!text-white\\/60{color:#fff9!important}.text-\\[\\#344054\\]{--tw-text-opacity: 1;color:rgb(52 64 84 / var(--tw-text-opacity, 1))}.text-\\[\\#454745\\]{--tw-text-opacity: 1;color:rgb(69 71 69 / var(--tw-text-opacity, 1))}.text-\\[\\#475467\\]{--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.text-\\[\\#667085\\]{--tw-text-opacity: 1;color:rgb(102 112 133 / var(--tw-text-opacity, 1))}.text-\\[\\#686878\\]{--tw-text-opacity: 1;color:rgb(104 104 120 / var(--tw-text-opacity, 1))}.text-\\[\\#98A2B3\\]{--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow-\\[rgba\\(149\\,157\\,165\\,0\\.2\\)_0px_2px_4px\\]{--tw-shadow: rgba(149,157,165,.2) 0px 2px 4px;--tw-shadow-colored: 0px 2px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline-0{outline-width:0px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity, 1))}.ring-opacity-5{--tw-ring-opacity: .05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-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}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html,body{margin:0;padding:0}:root{font-family:Onest,serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.no-drag{-webkit-user-drag:none;user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.loader{width:48px;height:48px;display:inline-block;position:relative}.loader:after,.loader:before{content:"";box-sizing:border-box;width:48px;height:48px;border-radius:50%;border:2px solid var(--loader-color, #333);position:absolute;left:0;top:0;animation:animloader 2s linear infinite}.loader:after{animation-delay:1s}@keyframes animloader{0%{transform:scale(0);opacity:1}to{transform:scale(1);opacity:0}}.text-green{color:green}.file\\:mr-4::file-selector-button{margin-right:1rem}.file\\:rounded-\\[6px\\]::file-selector-button{border-radius:6px}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-blue-50::file-selector-button{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.file\\:px-4::file-selector-button{padding-left:1rem;padding-right:1rem}.file\\:py-\\[6px\\]::file-selector-button{padding-top:6px;padding-bottom:6px}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-semibold::file-selector-button{font-weight:600}.file\\:text-blue-700::file-selector-button{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.hover\\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(147 197 253 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\\:opacity-80:hover{opacity:.8}.hover\\:shadow:hover{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:file\\:bg-blue-100::file-selector-button:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-0:focus{outline-width:0px}.active\\:opacity-50:active{opacity:.5}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.group:last-child .group-last\\:hidden{display:none}@media (min-width: 640px){.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\\:min-w-\\[800px\\]{min-width:800px}}:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(ea);function ta(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const A=ta(p),$n=ta(_t);function wf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nn={exports:{}},Hr={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.min.js
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var
|
|
10
|
+
*/var ra;function Ef(){if(ra)return Hr;ra=1;var e=p,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(a,l,u){var c,f={},h=null,m=null;u!==void 0&&(h=""+u),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(m=l.ref);for(c in l)n.call(l,c)&&!i.hasOwnProperty(c)&&(f[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:t,type:a,key:h,ref:m,props:f,_owner:o.current}}return Hr.Fragment=r,Hr.jsx=s,Hr.jsxs=s,Hr}var Wr={};/**
|
|
11
11
|
* @license React
|
|
12
12
|
* react-jsx-runtime.development.js
|
|
13
13
|
*
|
|
@@ -15,21 +15,21 @@
|
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var
|
|
19
|
-
`+$e+_}}var
|
|
18
|
+
*/var na;function Tf(){return na||(na=1,process.env.NODE_ENV!=="production"&&function(){var e=p,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),d=Symbol.iterator,y="@@iterator";function x(_){if(_===null||typeof _!="object")return null;var I=d&&_[d]||_[y];return typeof I=="function"?I:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(_){{for(var I=arguments.length,q=new Array(I>1?I-1:0),Z=1;Z<I;Z++)q[Z-1]=arguments[Z];v("error",_,q)}}function v(_,I,q){{var Z=b.ReactDebugCurrentFrame,ue=Z.getStackAddendum();ue!==""&&(I+="%s",q=q.concat([ue]));var pe=q.map(function(ie){return String(ie)});pe.unshift("Warning: "+I),Function.prototype.apply.call(console[_],console,pe)}}var E=!1,k=!1,T=!1,C=!1,O=!1,j;j=Symbol.for("react.module.reference");function D(_){return!!(typeof _=="string"||typeof _=="function"||_===n||_===i||O||_===o||_===u||_===c||C||_===m||E||k||T||typeof _=="object"&&_!==null&&(_.$$typeof===h||_.$$typeof===f||_.$$typeof===s||_.$$typeof===a||_.$$typeof===l||_.$$typeof===j||_.getModuleId!==void 0))}function N(_,I,q){var Z=_.displayName;if(Z)return Z;var ue=I.displayName||I.name||"";return ue!==""?q+"("+ue+")":q}function L(_){return _.displayName||"Context"}function R(_){if(_==null)return null;if(typeof _.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof _=="function")return _.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof _=="object")switch(_.$$typeof){case a:var I=_;return L(I)+".Consumer";case s:var q=_;return L(q._context)+".Provider";case l:return N(_,_.render,"ForwardRef");case f:var Z=_.displayName||null;return Z!==null?Z:R(_.type)||"Memo";case h:{var ue=_,pe=ue._payload,ie=ue._init;try{return R(ie(pe))}catch{return null}}}return null}var H=Object.assign,J=0,z,X,K,Q,re,je,Le;function W(){}W.__reactDisabledLog=!0;function we(){{if(J===0){z=console.log,X=console.info,K=console.warn,Q=console.error,re=console.group,je=console.groupCollapsed,Le=console.groupEnd;var _={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:_,log:_,warn:_,error:_,group:_,groupCollapsed:_,groupEnd:_})}J++}}function _e(){{if(J--,J===0){var _={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},_,{value:z}),info:H({},_,{value:X}),warn:H({},_,{value:K}),error:H({},_,{value:Q}),group:H({},_,{value:re}),groupCollapsed:H({},_,{value:je}),groupEnd:H({},_,{value:Le})})}J<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var le=b.ReactCurrentDispatcher,$e;function Se(_,I,q){{if($e===void 0)try{throw Error()}catch(ue){var Z=ue.stack.trim().match(/\n( *(at )?)/);$e=Z&&Z[1]||""}return`
|
|
19
|
+
`+$e+_}}var Ie=!1,wt;{var Ce=typeof WeakMap=="function"?WeakMap:Map;wt=new Ce}function oe(_,I){if(!_||Ie)return"";{var q=wt.get(_);if(q!==void 0)return q}var Z;Ie=!0;var ue=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var pe;pe=le.current,le.current=null,we();try{if(I){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(it){Z=it}Reflect.construct(_,[],ie)}else{try{ie.call()}catch(it){Z=it}_.call(ie.prototype)}}else{try{throw Error()}catch(it){Z=it}_()}}catch(it){if(it&&Z&&typeof it.stack=="string"){for(var ne=it.stack.split(`
|
|
20
20
|
`),Ze=Z.stack.split(`
|
|
21
|
-
`),
|
|
22
|
-
`+ne[
|
|
21
|
+
`),ke=ne.length-1,Fe=Ze.length-1;ke>=1&&Fe>=0&&ne[ke]!==Ze[Fe];)Fe--;for(;ke>=1&&Fe>=0;ke--,Fe--)if(ne[ke]!==Ze[Fe]){if(ke!==1||Fe!==1)do if(ke--,Fe--,Fe<0||ne[ke]!==Ze[Fe]){var ht=`
|
|
22
|
+
`+ne[ke].replace(" at new "," at ");return _.displayName&&ht.includes("<anonymous>")&&(ht=ht.replace("<anonymous>",_.displayName)),typeof _=="function"&&wt.set(_,ht),ht}while(ke>=1&&Fe>=0);break}}}finally{Ie=!1,le.current=pe,_e(),Error.prepareStackTrace=ue}var qr=_?_.displayName||_.name:"",kr=qr?Se(qr):"";return typeof _=="function"&&wt.set(_,kr),kr}function ye(_,I,q){return oe(_,!1)}function Ne(_){var I=_.prototype;return!!(I&&I.isReactComponent)}function qt(_,I,q){if(_==null)return"";if(typeof _=="function")return oe(_,Ne(_));if(typeof _=="string")return Se(_);switch(_){case u:return Se("Suspense");case c:return Se("SuspenseList")}if(typeof _=="object")switch(_.$$typeof){case l:return ye(_.render);case f:return qt(_.type,I,q);case h:{var Z=_,ue=Z._payload,pe=Z._init;try{return qt(pe(ue),I,q)}catch{}}}return""}var Ht=Object.prototype.hasOwnProperty,Tr={},S=b.ReactDebugCurrentFrame;function F(_){if(_){var I=_._owner,q=qt(_.type,_._source,I?I.type:null);S.setExtraStackFrame(q)}else S.setExtraStackFrame(null)}function P(_,I,q,Z,ue){{var pe=Function.call.bind(Ht);for(var ie in _)if(pe(_,ie)){var ne=void 0;try{if(typeof _[ie]!="function"){var Ze=Error((Z||"React class")+": "+q+" type `"+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof _[ie]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ze.name="Invariant Violation",Ze}ne=_[ie](I,ie,Z,q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ke){ne=ke}ne&&!(ne instanceof Error)&&(F(ue),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Z||"React class",q,ie,typeof ne),F(null)),ne instanceof Error&&!(ne.message in Tr)&&(Tr[ne.message]=!0,F(ue),w("Failed %s type: %s",q,ne.message),F(null))}}}var B=Array.isArray;function V(_){return B(_)}function M(_){{var I=typeof Symbol=="function"&&Symbol.toStringTag,q=I&&_[Symbol.toStringTag]||_.constructor.name||"Object";return q}}function Y(_){try{return G(_),!1}catch{return!0}}function G(_){return""+_}function xe(_){if(Y(_))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",M(_)),G(_)}var he=b.ReactCurrentOwner,Et={key:!0,ref:!0,__self:!0,__source:!0},zr,tr,Wt;Wt={};function Fn(_){if(Ht.call(_,"ref")){var I=Object.getOwnPropertyDescriptor(_,"ref").get;if(I&&I.isReactWarning)return!1}return _.ref!==void 0}function _r(_){if(Ht.call(_,"key")){var I=Object.getOwnPropertyDescriptor(_,"key").get;if(I&&I.isReactWarning)return!1}return _.key!==void 0}function An(_,I){if(typeof _.ref=="string"&&he.current&&I&&he.current.stateNode!==I){var q=R(he.current.type);Wt[q]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(he.current.type),_.ref),Wt[q]=!0)}}function ve(_,I){{var q=function(){zr||(zr=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",I))};q.isReactWarning=!0,Object.defineProperty(_,"key",{get:q,configurable:!0})}}function We(_,I){{var q=function(){tr||(tr=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",I))};q.isReactWarning=!0,Object.defineProperty(_,"ref",{get:q,configurable:!0})}}var Be=function(_,I,q,Z,ue,pe,ie){var ne={$$typeof:t,type:_,key:I,ref:q,props:ie,_owner:pe};return ne._store={},Object.defineProperty(ne._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ne,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Z}),Object.defineProperty(ne,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ue}),Object.freeze&&(Object.freeze(ne.props),Object.freeze(ne)),ne};function Ke(_,I,q,Z,ue){{var pe,ie={},ne=null,Ze=null;q!==void 0&&(xe(q),ne=""+q),_r(I)&&(xe(I.key),ne=""+I.key),Fn(I)&&(Ze=I.ref,An(I,ue));for(pe in I)Ht.call(I,pe)&&!Et.hasOwnProperty(pe)&&(ie[pe]=I[pe]);if(_&&_.defaultProps){var ke=_.defaultProps;for(pe in ke)ie[pe]===void 0&&(ie[pe]=ke[pe])}if(ne||Ze){var Fe=typeof _=="function"?_.displayName||_.name||"Unknown":_;ne&&ve(ie,Fe),Ze&&We(ie,Fe)}return Be(_,ne,Ze,ue,Z,he.current,ie)}}var Ue=b.ReactCurrentOwner,Xe=b.ReactDebugCurrentFrame;function Tt(_){if(_){var I=_._owner,q=qt(_.type,_._source,I?I.type:null);Xe.setExtraStackFrame(q)}else Xe.setExtraStackFrame(null)}var jn;jn=!1;function Sr(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function Cr(){{if(Ue.current){var _=R(Ue.current.type);if(_)return`
|
|
23
23
|
|
|
24
|
-
Check the render method of \``+_+"`."}return""}}function
|
|
24
|
+
Check the render method of \``+_+"`."}return""}}function Zs(_){return""}var gf={};function ow(_){{var I=Cr();if(!I){var q=typeof _=="string"?_:_.displayName||_.name;q&&(I=`
|
|
25
25
|
|
|
26
|
-
Check the top-level render call using <`+q+">.")}return I}}function
|
|
26
|
+
Check the top-level render call using <`+q+">.")}return I}}function yf(_,I){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var q=ow(I);if(gf[q])return;gf[q]=!0;var Z="";_&&_._owner&&_._owner!==Ue.current&&(Z=" It was passed a child from "+R(_._owner.type)+"."),Tt(_),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',q,Z),Tt(null)}}function bf(_,I){{if(typeof _!="object")return;if(V(_))for(var q=0;q<_.length;q++){var Z=_[q];Sr(Z)&&yf(Z,I)}else if(Sr(_))_._store&&(_._store.validated=!0);else if(_){var ue=x(_);if(typeof ue=="function"&&ue!==_.entries)for(var pe=ue.call(_),ie;!(ie=pe.next()).done;)Sr(ie.value)&&yf(ie.value,I)}}}function iw(_){{var I=_.type;if(I==null||typeof I=="string")return;var q;if(typeof I=="function")q=I.propTypes;else if(typeof I=="object"&&(I.$$typeof===l||I.$$typeof===f))q=I.propTypes;else return;if(q){var Z=R(I);P(q,_.props,"prop",Z,_)}else if(I.PropTypes!==void 0&&!jn){jn=!0;var ue=R(I);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ue||"Unknown")}typeof I.getDefaultProps=="function"&&!I.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sw(_){{for(var I=Object.keys(_.props),q=0;q<I.length;q++){var Z=I[q];if(Z!=="children"&&Z!=="key"){Tt(_),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Z),Tt(null);break}}_.ref!==null&&(Tt(_),w("Invalid attribute `ref` supplied to `React.Fragment`."),Tt(null))}}var xf={};function vf(_,I,q,Z,ue,pe){{var ie=D(_);if(!ie){var ne="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(ne+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ze=Zs();Ze?ne+=Ze:ne+=Cr();var ke;_===null?ke="null":V(_)?ke="array":_!==void 0&&_.$$typeof===t?(ke="<"+(R(_.type)||"Unknown")+" />",ne=" Did you accidentally export a JSX literal instead of a component?"):ke=typeof _,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ke,ne)}var Fe=Ke(_,I,q,ue,pe);if(Fe==null)return Fe;if(ie){var ht=I.children;if(ht!==void 0)if(Z)if(V(ht)){for(var qr=0;qr<ht.length;qr++)bf(ht[qr],_);Object.freeze&&Object.freeze(ht)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else bf(ht,_)}if(Ht.call(I,"key")){var kr=R(_),it=Object.keys(I).filter(function(dw){return dw!=="key"}),Qs=it.length>0?"{key: someKey, "+it.join(": ..., ")+": ...}":"{key: someKey}";if(!xf[kr+Qs]){var fw=it.length>0?"{"+it.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
|
|
27
27
|
let props = %s;
|
|
28
28
|
<%s {...props} />
|
|
29
29
|
React keys must be passed directly to JSX without using spread:
|
|
30
30
|
let props = %s;
|
|
31
|
-
<%s key={someKey} {...props} />`,Zs,kr,cw,kr),yf[kr+Zs]=!0}}return _===n?iw(Fe):ow(Fe),Fe}}function sw(_,I,q){return bf(_,I,q,!0)}function aw(_,I,q){return bf(_,I,q,!1)}var lw=aw,uw=sw;Hr.Fragment=n,Hr.jsx=lw,Hr.jsxs=uw}()),Hr}var na;function Ef(){return na||(na=1,process.env.NODE_ENV==="production"?$n.exports=vf():$n.exports=wf()),$n.exports}var g=Ef();function oa(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=oa(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ue(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=oa(e))&&(n&&(n+=" "),n+=t);return n}function Tf(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Tf(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
32
|
-
`);var Wr=e=>typeof e=="number"&&!isNaN(e),rr=e=>typeof e=="string",Dt=e=>typeof e=="function",_f=e=>rr(e)||Wr(e),zo=e=>rr(e)||Dt(e)?e:null,Sf=(e,t)=>e===!1||Wr(e)&&e>0?e:t,qo=e=>p.isValidElement(e)||rr(e)||Dt(e)||Wr(e);function kf(e,t,r=300){let{scrollHeight:n,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=n+"px",o.transition=`all ${r}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,r)})})}function Cf({enter:e,exit:t,appendPosition:r=!1,collapse:n=!0,collapseDuration:o=300}){return function({children:i,position:s,preventExitTransition:a,done:l,nodeRef:u,isIn:c,playToast:f}){let h=r?`${e}--${s}`:e,m=r?`${t}--${s}`:t,d=p.useRef(0);return p.useLayoutEffect(()=>{let y=u.current,x=h.split(" "),b=w=>{w.target===u.current&&(f(),y.removeEventListener("animationend",b),y.removeEventListener("animationcancel",b),d.current===0&&w.type!=="animationcancel"&&y.classList.remove(...x))};y.classList.add(...x),y.addEventListener("animationend",b),y.addEventListener("animationcancel",b)},[]),p.useEffect(()=>{let y=u.current,x=()=>{y.removeEventListener("animationend",x),n?kf(y,l,o):l()};c||(a?x():(d.current=1,y.className+=` ${m}`,y.addEventListener("animationend",x)))},[c]),p.createElement(p.Fragment,null,i)}}function ia(e,t){return{content:sa(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function sa(e,t,r=!1){return p.isValidElement(e)&&!rr(e.type)?p.cloneElement(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):Dt(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):e}function Of({closeToast:e,theme:t,ariaLabel:r="close"}){return p.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:n=>{n.stopPropagation(),e(!0)},"aria-label":r},p.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},p.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Ff({delay:e,isRunning:t,closeToast:r,type:n="default",hide:o,className:i,controlledProgress:s,progress:a,rtl:l,isIn:u,theme:c}){let f=o||s&&a===0,h={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};s&&(h.transform=`scaleX(${a})`);let m=ue("Toastify__progress-bar",s?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${c}`,`Toastify__progress-bar--${n}`,{"Toastify__progress-bar--rtl":l}),d=Dt(i)?i({rtl:l,type:n,defaultClassName:m}):ue(m,i),y={[s&&a>=1?"onTransitionEnd":"onAnimationEnd"]:s&&a<1?null:()=>{u&&r()}};return p.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":f},p.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${c} Toastify__progress-bar--${n}`}),p.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:d,style:h,...y}))}var Af=1,aa=()=>`${Af++}`;function jf(e,t,r){let n=1,o=0,i=[],s=[],a=t,l=new Map,u=new Set,c=w=>(u.add(w),()=>u.delete(w)),f=()=>{s=Array.from(l.values()),u.forEach(w=>w())},h=({containerId:w,toastId:v,updateId:E})=>{let C=w?w!==e:e!==1,T=l.has(v)&&E==null;return C||T},m=(w,v)=>{l.forEach(E=>{var C;(v==null||v===E.props.toastId)&&((C=E.toggle)==null||C.call(E,w))})},d=w=>{var v,E;(E=(v=w.props)==null?void 0:v.onClose)==null||E.call(v,w.removalReason),w.isActive=!1},y=w=>{if(w==null)l.forEach(d);else{let v=l.get(w);v&&d(v)}f()},x=()=>{o-=i.length,i=[]},b=w=>{var v,E;let{toastId:C,updateId:T}=w.props,k=T==null;w.staleId&&l.delete(w.staleId),w.isActive=!0,l.set(C,w),f(),r(ia(w,k?"added":"updated")),k&&((E=(v=w.props).onOpen)==null||E.call(v))};return{id:e,props:a,observe:c,toggle:m,removeToast:y,toasts:l,clearQueue:x,buildToast:(w,v)=>{if(h(v))return;let{toastId:E,updateId:C,data:T,staleId:k,delay:O}=v,j=C==null;j&&o++;let D={...a,style:a.toastStyle,key:n++,...Object.fromEntries(Object.entries(v).filter(([L,R])=>R!=null)),toastId:E,updateId:C,data:T,isIn:!1,className:zo(v.className||a.toastClassName),progressClassName:zo(v.progressClassName||a.progressClassName),autoClose:v.isLoading?!1:Sf(v.autoClose,a.autoClose),closeToast(L){l.get(E).removalReason=L,y(E)},deleteToast(){let L=l.get(E);if(L!=null){if(r(ia(L,"removed")),l.delete(E),o--,o<0&&(o=0),i.length>0){b(i.shift());return}f()}}};D.closeButton=a.closeButton,v.closeButton===!1||qo(v.closeButton)?D.closeButton=v.closeButton:v.closeButton===!0&&(D.closeButton=qo(a.closeButton)?a.closeButton:!0);let N={content:w,props:D,staleId:k};a.limit&&a.limit>0&&o>a.limit&&j?i.push(N):Wr(O)?setTimeout(()=>{b(N)},O):b(N)},setProps(w){a=w},setToggle:(w,v)=>{let E=l.get(w);E&&(E.toggle=v)},isToastActive:w=>{var v;return(v=l.get(w))==null?void 0:v.isActive},getSnapshot:()=>s}}var Ye=new Map,Kr=[],Ho=new Set,$f=e=>Ho.forEach(t=>t(e)),la=()=>Ye.size>0;function Nf(){Kr.forEach(e=>ca(e.content,e.options)),Kr=[]}var Pf=(e,{containerId:t})=>{var r;return(r=Ye.get(t||1))==null?void 0:r.toasts.get(e)};function ua(e,t){var r;if(t)return!!((r=Ye.get(t))!=null&&r.isToastActive(e));let n=!1;return Ye.forEach(o=>{o.isToastActive(e)&&(n=!0)}),n}function Df(e){if(!la()){Kr=Kr.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||_f(e))Ye.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=Ye.get(e.containerId);t?t.removeToast(e.id):Ye.forEach(r=>{r.removeToast(e.id)})}}var Lf=(e={})=>{Ye.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function ca(e,t){qo(e)&&(la()||Kr.push({content:e,options:t}),Ye.forEach(r=>{r.buildToast(e,t)}))}function If(e){var t;(t=Ye.get(e.containerId||1))==null||t.setToggle(e.id,e.fn)}function fa(e,t){Ye.forEach(r=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===r.id)&&r.toggle(e,t==null?void 0:t.id)})}function Mf(e){let t=e.containerId||1;return{subscribe(r){let n=jf(t,e,$f);Ye.set(t,n);let o=n.observe(r);return Nf(),()=>{o(),Ye.delete(t)}},setProps(r){var n;(n=Ye.get(t))==null||n.setProps(r)},getSnapshot(){var r;return(r=Ye.get(t))==null?void 0:r.getSnapshot()}}}function Rf(e){return Ho.add(e),()=>{Ho.delete(e)}}function Vf(e){return e&&(rr(e.toastId)||Wr(e.toastId))?e.toastId:aa()}function Yr(e,t){return ca(e,t),t.toastId}function Nn(e,t){return{...t,type:t&&t.type||e,toastId:Vf(t)}}function Pn(e){return(t,r)=>Yr(t,Nn(e,r))}function ce(e,t){return Yr(e,Nn("default",t))}ce.loading=(e,t)=>Yr(e,Nn("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function Bf(e,{pending:t,error:r,success:n},o){let i;t&&(i=rr(t)?ce.loading(t,o):ce.loading(t.render,{...o,...t}));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},a=(u,c,f)=>{if(c==null){ce.dismiss(i);return}let h={type:u,...s,...o,data:f},m=rr(c)?{render:c}:c;return i?ce.update(i,{...h,...m}):ce(m.render,{...h,...m}),f},l=Dt(e)?e():e;return l.then(u=>a("success",n,u)).catch(u=>a("error",r,u)),l}ce.promise=Bf,ce.success=Pn("success"),ce.info=Pn("info"),ce.error=Pn("error"),ce.warning=Pn("warning"),ce.warn=ce.warning,ce.dark=(e,t)=>Yr(e,Nn("default",{theme:"dark",...t}));function Uf(e){Df(e)}ce.dismiss=Uf,ce.clearWaitingQueue=Lf,ce.isActive=ua,ce.update=(e,t={})=>{let r=Pf(e,t);if(r){let{props:n,content:o}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:aa()};i.toastId!==e&&(i.staleId=e);let s=i.render||o;delete i.render,Yr(s,i)}},ce.done=e=>{ce.update(e,{progress:1})},ce.onChange=Rf,ce.play=e=>fa(!0,e),ce.pause=e=>fa(!1,e);function zf(e){var t;let{subscribe:r,getSnapshot:n,setProps:o}=p.useRef(Mf(e)).current;o(e);let i=(t=p.useSyncExternalStore(r,n,n))==null?void 0:t.slice();function s(a){if(!i)return[];let l=new Map;return e.newestOnTop&&i.reverse(),i.forEach(u=>{let{position:c}=u.props;l.has(c)||l.set(c,[]),l.get(c).push(u)}),Array.from(l,u=>a(u[0],u[1]))}return{getToastToRender:s,isToastActive:ua,count:i==null?void 0:i.length}}function qf(e){let[t,r]=p.useState(!1),[n,o]=p.useState(!1),i=p.useRef(null),s=p.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:l,closeToast:u,onClick:c,closeOnClick:f}=e;If({id:e.toastId,containerId:e.containerId,fn:r}),p.useEffect(()=>{if(e.pauseOnFocusLoss)return h(),()=>{m()}},[e.pauseOnFocusLoss]);function h(){document.hasFocus()||b(),window.addEventListener("focus",x),window.addEventListener("blur",b)}function m(){window.removeEventListener("focus",x),window.removeEventListener("blur",b)}function d(k){if(e.draggable===!0||e.draggable===k.pointerType){w();let O=i.current;s.canCloseOnClick=!0,s.canDrag=!0,O.style.transition="none",e.draggableDirection==="x"?(s.start=k.clientX,s.removalDistance=O.offsetWidth*(e.draggablePercent/100)):(s.start=k.clientY,s.removalDistance=O.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent)/100)}}function y(k){let{top:O,bottom:j,left:D,right:N}=i.current.getBoundingClientRect();k.nativeEvent.type!=="touchend"&&e.pauseOnHover&&k.clientX>=D&&k.clientX<=N&&k.clientY>=O&&k.clientY<=j?b():x()}function x(){r(!0)}function b(){r(!1)}function w(){s.didMove=!1,document.addEventListener("pointermove",E),document.addEventListener("pointerup",C)}function v(){document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",C)}function E(k){let O=i.current;if(s.canDrag&&O){s.didMove=!0,t&&b(),e.draggableDirection==="x"?s.delta=k.clientX-s.start:s.delta=k.clientY-s.start,s.start!==k.clientX&&(s.canCloseOnClick=!1);let j=e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`;O.style.transform=`translate3d(${j},0)`,O.style.opacity=`${1-Math.abs(s.delta/s.removalDistance)}`}}function C(){v();let k=i.current;if(s.canDrag&&s.didMove&&k){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance){o(!0),e.closeToast(!0),e.collapseAll();return}k.style.transition="transform 0.2s, opacity 0.2s",k.style.removeProperty("transform"),k.style.removeProperty("opacity")}}let T={onPointerDown:d,onPointerUp:y};return a&&l&&(T.onMouseEnter=b,e.stacked||(T.onMouseLeave=x)),f&&(T.onClick=k=>{c&&c(k),s.canCloseOnClick&&u(!0)}),{playToast:x,pauseToast:b,isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:T}}var Hf=typeof window<"u"?p.useLayoutEffect:p.useEffect,Dn=({theme:e,type:t,isLoading:r,...n})=>p.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...n});function Wf(e){return p.createElement(Dn,{...e},p.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function Kf(e){return p.createElement(Dn,{...e},p.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function Yf(e){return p.createElement(Dn,{...e},p.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function Jf(e){return p.createElement(Dn,{...e},p.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function Gf(){return p.createElement("div",{className:"Toastify__spinner"})}var Wo={info:Kf,warning:Wf,success:Yf,error:Jf,spinner:Gf},Xf=e=>e in Wo;function Zf({theme:e,type:t,isLoading:r,icon:n}){let o=null,i={theme:e,type:t};return n===!1||(Dt(n)?o=n({...i,isLoading:r}):p.isValidElement(n)?o=p.cloneElement(n,i):r?o=Wo.spinner():Xf(t)&&(o=Wo[t](i))),o}var Qf=e=>{let{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:o,playToast:i}=qf(e),{closeButton:s,children:a,autoClose:l,onClick:u,type:c,hideProgressBar:f,closeToast:h,transition:m,position:d,className:y,style:x,progressClassName:b,updateId:w,role:v,progress:E,rtl:C,toastId:T,deleteToast:k,isIn:O,isLoading:j,closeOnClick:D,theme:N,ariaLabel:L}=e,R=ue("Toastify__toast",`Toastify__toast-theme--${N}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":C},{"Toastify__toast--close-on-click":D}),H=Dt(y)?y({rtl:C,position:d,type:c,defaultClassName:R}):ue(R,y),J=Zf(e),z=!!E||!l,X={closeToast:h,type:c,theme:N},K=null;return s===!1||(Dt(s)?K=s(X):p.isValidElement(s)?K=p.cloneElement(s,X):K=Of(X)),p.createElement(m,{isIn:O,done:k,position:d,preventExitTransition:r,nodeRef:n,playToast:i},p.createElement("div",{id:T,tabIndex:0,onClick:u,"data-in":O,className:H,...o,style:x,ref:n,...O&&{role:v,"aria-label":L}},J!=null&&p.createElement("div",{className:ue("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!j})},J),sa(a,e,!t),K,!e.customProgressBar&&p.createElement(Ff,{...w&&!z?{key:`p-${w}`}:{},rtl:C,theme:N,delay:l,isRunning:t,isIn:O,closeToast:h,hide:f,type:c,className:b,controlledProgress:z,progress:E||0})))},ed=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),td=Cf(ed("bounce",!0)),rd={position:"top-right",transition:td,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&e.code==="KeyT"};function nd(e){let t={...rd,...e},r=e.stacked,[n,o]=p.useState(!0),i=p.useRef(null),{getToastToRender:s,isToastActive:a,count:l}=zf(t),{className:u,style:c,rtl:f,containerId:h,hotKeys:m}=t;function d(x){let b=ue("Toastify__toast-container",`Toastify__toast-container--${x}`,{"Toastify__toast-container--rtl":f});return Dt(u)?u({position:x,rtl:f,defaultClassName:b}):ue(b,zo(u))}function y(){r&&(o(!0),ce.play())}return Hf(()=>{var x;if(r){let b=i.current.querySelectorAll('[data-in="true"]'),w=12,v=(x=t.position)==null?void 0:x.includes("top"),E=0,C=0;Array.from(b).reverse().forEach((T,k)=>{let O=T;O.classList.add("Toastify__toast--stacked"),k>0&&(O.dataset.collapsed=`${n}`),O.dataset.pos||(O.dataset.pos=v?"top":"bot");let j=E*(n?.2:1)+(n?0:w*k);O.style.setProperty("--y",`${v?j:j*-1}px`),O.style.setProperty("--g",`${w}`),O.style.setProperty("--s",`${1-(n?C:0)}`),E+=O.offsetHeight,C+=.025})}},[n,l,r]),p.useEffect(()=>{function x(b){var w;let v=i.current;m(b)&&((w=v.querySelector('[tabIndex="0"]'))==null||w.focus(),o(!1),ce.pause()),b.key==="Escape"&&(document.activeElement===v||v!=null&&v.contains(document.activeElement))&&(o(!0),ce.play())}return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[m]),p.createElement("section",{ref:i,className:"Toastify",id:h,onMouseEnter:()=>{r&&(o(!1),ce.pause())},onMouseLeave:y,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},s((x,b)=>{let w=b.length?{...c}:{...c,pointerEvents:"none"};return p.createElement("div",{tabIndex:-1,className:d(x),"data-stacked":r,style:w,key:`c-${x}`},b.map(({content:v,props:E})=>p.createElement(Qf,{...E,stacked:r,collapseAll:y,isIn:a(E.toastId,E.containerId),key:`t-${E.key}`},v)))}))}var Jr={},da;function od(){if(da)return Jr;da=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.parse=s,Jr.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const h=function(){};return h.prototype=Object.create(null),h})();function s(h,m){const d=new i,y=h.length;if(y<2)return d;const x=(m==null?void 0:m.decode)||c;let b=0;do{const w=h.indexOf("=",b);if(w===-1)break;const v=h.indexOf(";",b),E=v===-1?y:v;if(w>E){b=h.lastIndexOf(";",w-1)+1;continue}const C=a(h,b,w),T=l(h,w,C),k=h.slice(C,T);if(d[k]===void 0){let O=a(h,w+1,E),j=l(h,E,O);const D=x(h.slice(O,j));d[k]=D}b=E+1}while(b<y);return d}function a(h,m,d){do{const y=h.charCodeAt(m);if(y!==32&&y!==9)return m}while(++m<d);return d}function l(h,m,d){for(;m>d;){const y=h.charCodeAt(--m);if(y!==32&&y!==9)return m+1}return d}function u(h,m,d){const y=(d==null?void 0:d.encode)||encodeURIComponent;if(!e.test(h))throw new TypeError(`argument name is invalid: ${h}`);const x=y(m);if(!t.test(x))throw new TypeError(`argument val is invalid: ${m}`);let b=h+"="+x;if(!d)return b;if(d.maxAge!==void 0){if(!Number.isInteger(d.maxAge))throw new TypeError(`option maxAge is invalid: ${d.maxAge}`);b+="; Max-Age="+d.maxAge}if(d.domain){if(!r.test(d.domain))throw new TypeError(`option domain is invalid: ${d.domain}`);b+="; Domain="+d.domain}if(d.path){if(!n.test(d.path))throw new TypeError(`option path is invalid: ${d.path}`);b+="; Path="+d.path}if(d.expires){if(!f(d.expires)||!Number.isFinite(d.expires.valueOf()))throw new TypeError(`option expires is invalid: ${d.expires}`);b+="; Expires="+d.expires.toUTCString()}if(d.httpOnly&&(b+="; HttpOnly"),d.secure&&(b+="; Secure"),d.partitioned&&(b+="; Partitioned"),d.priority)switch(typeof d.priority=="string"?d.priority.toLowerCase():void 0){case"low":b+="; Priority=Low";break;case"medium":b+="; Priority=Medium";break;case"high":b+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${d.priority}`)}if(d.sameSite)switch(typeof d.sameSite=="string"?d.sameSite.toLowerCase():d.sameSite){case!0:case"strict":b+="; SameSite=Strict";break;case"lax":b+="; SameSite=Lax";break;case"none":b+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${d.sameSite}`)}return b}function c(h){if(h.indexOf("%")===-1)return h;try{return decodeURIComponent(h)}catch{return h}}function f(h){return o.call(h)==="[object Date]"}return Jr}od();/**
|
|
31
|
+
<%s key={someKey} {...props} />`,Qs,kr,fw,kr),xf[kr+Qs]=!0}}return _===n?sw(Fe):iw(Fe),Fe}}function aw(_,I,q){return vf(_,I,q,!0)}function lw(_,I,q){return vf(_,I,q,!1)}var uw=lw,cw=aw;Wr.Fragment=n,Wr.jsx=uw,Wr.jsxs=cw}()),Wr}var oa;function _f(){return oa||(oa=1,process.env.NODE_ENV==="production"?Nn.exports=Ef():Nn.exports=Tf()),Nn.exports}var g=_f();function ia(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=ia(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function se(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=ia(e))&&(n&&(n+=" "),n+=t);return n}function Sf(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Sf(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
32
|
+
`);var Kr=e=>typeof e=="number"&&!isNaN(e),rr=e=>typeof e=="string",Dt=e=>typeof e=="function",Cf=e=>rr(e)||Kr(e),zo=e=>rr(e)||Dt(e)?e:null,kf=(e,t)=>e===!1||Kr(e)&&e>0?e:t,qo=e=>p.isValidElement(e)||rr(e)||Dt(e)||Kr(e);function Of(e,t,r=300){let{scrollHeight:n,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=n+"px",o.transition=`all ${r}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,r)})})}function Ff({enter:e,exit:t,appendPosition:r=!1,collapse:n=!0,collapseDuration:o=300}){return function({children:i,position:s,preventExitTransition:a,done:l,nodeRef:u,isIn:c,playToast:f}){let h=r?`${e}--${s}`:e,m=r?`${t}--${s}`:t,d=p.useRef(0);return p.useLayoutEffect(()=>{let y=u.current,x=h.split(" "),b=w=>{w.target===u.current&&(f(),y.removeEventListener("animationend",b),y.removeEventListener("animationcancel",b),d.current===0&&w.type!=="animationcancel"&&y.classList.remove(...x))};y.classList.add(...x),y.addEventListener("animationend",b),y.addEventListener("animationcancel",b)},[]),p.useEffect(()=>{let y=u.current,x=()=>{y.removeEventListener("animationend",x),n?Of(y,l,o):l()};c||(a?x():(d.current=1,y.className+=` ${m}`,y.addEventListener("animationend",x)))},[c]),p.createElement(p.Fragment,null,i)}}function sa(e,t){return{content:aa(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function aa(e,t,r=!1){return p.isValidElement(e)&&!rr(e.type)?p.cloneElement(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):Dt(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):e}function Af({closeToast:e,theme:t,ariaLabel:r="close"}){return p.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:n=>{n.stopPropagation(),e(!0)},"aria-label":r},p.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},p.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function jf({delay:e,isRunning:t,closeToast:r,type:n="default",hide:o,className:i,controlledProgress:s,progress:a,rtl:l,isIn:u,theme:c}){let f=o||s&&a===0,h={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};s&&(h.transform=`scaleX(${a})`);let m=se("Toastify__progress-bar",s?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${c}`,`Toastify__progress-bar--${n}`,{"Toastify__progress-bar--rtl":l}),d=Dt(i)?i({rtl:l,type:n,defaultClassName:m}):se(m,i),y={[s&&a>=1?"onTransitionEnd":"onAnimationEnd"]:s&&a<1?null:()=>{u&&r()}};return p.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":f},p.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${c} Toastify__progress-bar--${n}`}),p.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:d,style:h,...y}))}var $f=1,la=()=>`${$f++}`;function Nf(e,t,r){let n=1,o=0,i=[],s=[],a=t,l=new Map,u=new Set,c=w=>(u.add(w),()=>u.delete(w)),f=()=>{s=Array.from(l.values()),u.forEach(w=>w())},h=({containerId:w,toastId:v,updateId:E})=>{let k=w?w!==e:e!==1,T=l.has(v)&&E==null;return k||T},m=(w,v)=>{l.forEach(E=>{var k;(v==null||v===E.props.toastId)&&((k=E.toggle)==null||k.call(E,w))})},d=w=>{var v,E;(E=(v=w.props)==null?void 0:v.onClose)==null||E.call(v,w.removalReason),w.isActive=!1},y=w=>{if(w==null)l.forEach(d);else{let v=l.get(w);v&&d(v)}f()},x=()=>{o-=i.length,i=[]},b=w=>{var v,E;let{toastId:k,updateId:T}=w.props,C=T==null;w.staleId&&l.delete(w.staleId),w.isActive=!0,l.set(k,w),f(),r(sa(w,C?"added":"updated")),C&&((E=(v=w.props).onOpen)==null||E.call(v))};return{id:e,props:a,observe:c,toggle:m,removeToast:y,toasts:l,clearQueue:x,buildToast:(w,v)=>{if(h(v))return;let{toastId:E,updateId:k,data:T,staleId:C,delay:O}=v,j=k==null;j&&o++;let D={...a,style:a.toastStyle,key:n++,...Object.fromEntries(Object.entries(v).filter(([L,R])=>R!=null)),toastId:E,updateId:k,data:T,isIn:!1,className:zo(v.className||a.toastClassName),progressClassName:zo(v.progressClassName||a.progressClassName),autoClose:v.isLoading?!1:kf(v.autoClose,a.autoClose),closeToast(L){l.get(E).removalReason=L,y(E)},deleteToast(){let L=l.get(E);if(L!=null){if(r(sa(L,"removed")),l.delete(E),o--,o<0&&(o=0),i.length>0){b(i.shift());return}f()}}};D.closeButton=a.closeButton,v.closeButton===!1||qo(v.closeButton)?D.closeButton=v.closeButton:v.closeButton===!0&&(D.closeButton=qo(a.closeButton)?a.closeButton:!0);let N={content:w,props:D,staleId:C};a.limit&&a.limit>0&&o>a.limit&&j?i.push(N):Kr(O)?setTimeout(()=>{b(N)},O):b(N)},setProps(w){a=w},setToggle:(w,v)=>{let E=l.get(w);E&&(E.toggle=v)},isToastActive:w=>{var v;return(v=l.get(w))==null?void 0:v.isActive},getSnapshot:()=>s}}var Ye=new Map,Yr=[],Ho=new Set,Pf=e=>Ho.forEach(t=>t(e)),ua=()=>Ye.size>0;function Df(){Yr.forEach(e=>fa(e.content,e.options)),Yr=[]}var Lf=(e,{containerId:t})=>{var r;return(r=Ye.get(t||1))==null?void 0:r.toasts.get(e)};function ca(e,t){var r;if(t)return!!((r=Ye.get(t))!=null&&r.isToastActive(e));let n=!1;return Ye.forEach(o=>{o.isToastActive(e)&&(n=!0)}),n}function If(e){if(!ua()){Yr=Yr.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||Cf(e))Ye.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=Ye.get(e.containerId);t?t.removeToast(e.id):Ye.forEach(r=>{r.removeToast(e.id)})}}var Mf=(e={})=>{Ye.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function fa(e,t){qo(e)&&(ua()||Yr.push({content:e,options:t}),Ye.forEach(r=>{r.buildToast(e,t)}))}function Rf(e){var t;(t=Ye.get(e.containerId||1))==null||t.setToggle(e.id,e.fn)}function da(e,t){Ye.forEach(r=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===r.id)&&r.toggle(e,t==null?void 0:t.id)})}function Vf(e){let t=e.containerId||1;return{subscribe(r){let n=Nf(t,e,Pf);Ye.set(t,n);let o=n.observe(r);return Df(),()=>{o(),Ye.delete(t)}},setProps(r){var n;(n=Ye.get(t))==null||n.setProps(r)},getSnapshot(){var r;return(r=Ye.get(t))==null?void 0:r.getSnapshot()}}}function Bf(e){return Ho.add(e),()=>{Ho.delete(e)}}function Uf(e){return e&&(rr(e.toastId)||Kr(e.toastId))?e.toastId:la()}function Jr(e,t){return fa(e,t),t.toastId}function Pn(e,t){return{...t,type:t&&t.type||e,toastId:Uf(t)}}function Dn(e){return(t,r)=>Jr(t,Pn(e,r))}function ce(e,t){return Jr(e,Pn("default",t))}ce.loading=(e,t)=>Jr(e,Pn("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function zf(e,{pending:t,error:r,success:n},o){let i;t&&(i=rr(t)?ce.loading(t,o):ce.loading(t.render,{...o,...t}));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},a=(u,c,f)=>{if(c==null){ce.dismiss(i);return}let h={type:u,...s,...o,data:f},m=rr(c)?{render:c}:c;return i?ce.update(i,{...h,...m}):ce(m.render,{...h,...m}),f},l=Dt(e)?e():e;return l.then(u=>a("success",n,u)).catch(u=>a("error",r,u)),l}ce.promise=zf,ce.success=Dn("success"),ce.info=Dn("info"),ce.error=Dn("error"),ce.warning=Dn("warning"),ce.warn=ce.warning,ce.dark=(e,t)=>Jr(e,Pn("default",{theme:"dark",...t}));function qf(e){If(e)}ce.dismiss=qf,ce.clearWaitingQueue=Mf,ce.isActive=ca,ce.update=(e,t={})=>{let r=Lf(e,t);if(r){let{props:n,content:o}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:la()};i.toastId!==e&&(i.staleId=e);let s=i.render||o;delete i.render,Jr(s,i)}},ce.done=e=>{ce.update(e,{progress:1})},ce.onChange=Bf,ce.play=e=>da(!0,e),ce.pause=e=>da(!1,e);function Hf(e){var t;let{subscribe:r,getSnapshot:n,setProps:o}=p.useRef(Vf(e)).current;o(e);let i=(t=p.useSyncExternalStore(r,n,n))==null?void 0:t.slice();function s(a){if(!i)return[];let l=new Map;return e.newestOnTop&&i.reverse(),i.forEach(u=>{let{position:c}=u.props;l.has(c)||l.set(c,[]),l.get(c).push(u)}),Array.from(l,u=>a(u[0],u[1]))}return{getToastToRender:s,isToastActive:ca,count:i==null?void 0:i.length}}function Wf(e){let[t,r]=p.useState(!1),[n,o]=p.useState(!1),i=p.useRef(null),s=p.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:l,closeToast:u,onClick:c,closeOnClick:f}=e;Rf({id:e.toastId,containerId:e.containerId,fn:r}),p.useEffect(()=>{if(e.pauseOnFocusLoss)return h(),()=>{m()}},[e.pauseOnFocusLoss]);function h(){document.hasFocus()||b(),window.addEventListener("focus",x),window.addEventListener("blur",b)}function m(){window.removeEventListener("focus",x),window.removeEventListener("blur",b)}function d(C){if(e.draggable===!0||e.draggable===C.pointerType){w();let O=i.current;s.canCloseOnClick=!0,s.canDrag=!0,O.style.transition="none",e.draggableDirection==="x"?(s.start=C.clientX,s.removalDistance=O.offsetWidth*(e.draggablePercent/100)):(s.start=C.clientY,s.removalDistance=O.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent)/100)}}function y(C){let{top:O,bottom:j,left:D,right:N}=i.current.getBoundingClientRect();C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&C.clientX>=D&&C.clientX<=N&&C.clientY>=O&&C.clientY<=j?b():x()}function x(){r(!0)}function b(){r(!1)}function w(){s.didMove=!1,document.addEventListener("pointermove",E),document.addEventListener("pointerup",k)}function v(){document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",k)}function E(C){let O=i.current;if(s.canDrag&&O){s.didMove=!0,t&&b(),e.draggableDirection==="x"?s.delta=C.clientX-s.start:s.delta=C.clientY-s.start,s.start!==C.clientX&&(s.canCloseOnClick=!1);let j=e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`;O.style.transform=`translate3d(${j},0)`,O.style.opacity=`${1-Math.abs(s.delta/s.removalDistance)}`}}function k(){v();let C=i.current;if(s.canDrag&&s.didMove&&C){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance){o(!0),e.closeToast(!0),e.collapseAll();return}C.style.transition="transform 0.2s, opacity 0.2s",C.style.removeProperty("transform"),C.style.removeProperty("opacity")}}let T={onPointerDown:d,onPointerUp:y};return a&&l&&(T.onMouseEnter=b,e.stacked||(T.onMouseLeave=x)),f&&(T.onClick=C=>{c&&c(C),s.canCloseOnClick&&u(!0)}),{playToast:x,pauseToast:b,isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:T}}var Kf=typeof window<"u"?p.useLayoutEffect:p.useEffect,Ln=({theme:e,type:t,isLoading:r,...n})=>p.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...n});function Yf(e){return p.createElement(Ln,{...e},p.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function Jf(e){return p.createElement(Ln,{...e},p.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function Gf(e){return p.createElement(Ln,{...e},p.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function Xf(e){return p.createElement(Ln,{...e},p.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function Zf(){return p.createElement("div",{className:"Toastify__spinner"})}var Wo={info:Jf,warning:Yf,success:Gf,error:Xf,spinner:Zf},Qf=e=>e in Wo;function ed({theme:e,type:t,isLoading:r,icon:n}){let o=null,i={theme:e,type:t};return n===!1||(Dt(n)?o=n({...i,isLoading:r}):p.isValidElement(n)?o=p.cloneElement(n,i):r?o=Wo.spinner():Qf(t)&&(o=Wo[t](i))),o}var td=e=>{let{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:o,playToast:i}=Wf(e),{closeButton:s,children:a,autoClose:l,onClick:u,type:c,hideProgressBar:f,closeToast:h,transition:m,position:d,className:y,style:x,progressClassName:b,updateId:w,role:v,progress:E,rtl:k,toastId:T,deleteToast:C,isIn:O,isLoading:j,closeOnClick:D,theme:N,ariaLabel:L}=e,R=se("Toastify__toast",`Toastify__toast-theme--${N}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":k},{"Toastify__toast--close-on-click":D}),H=Dt(y)?y({rtl:k,position:d,type:c,defaultClassName:R}):se(R,y),J=ed(e),z=!!E||!l,X={closeToast:h,type:c,theme:N},K=null;return s===!1||(Dt(s)?K=s(X):p.isValidElement(s)?K=p.cloneElement(s,X):K=Af(X)),p.createElement(m,{isIn:O,done:C,position:d,preventExitTransition:r,nodeRef:n,playToast:i},p.createElement("div",{id:T,tabIndex:0,onClick:u,"data-in":O,className:H,...o,style:x,ref:n,...O&&{role:v,"aria-label":L}},J!=null&&p.createElement("div",{className:se("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!j})},J),aa(a,e,!t),K,!e.customProgressBar&&p.createElement(jf,{...w&&!z?{key:`p-${w}`}:{},rtl:k,theme:N,delay:l,isRunning:t,isIn:O,closeToast:h,hide:f,type:c,className:b,controlledProgress:z,progress:E||0})))},rd=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),nd=Ff(rd("bounce",!0)),od={position:"top-right",transition:nd,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&e.code==="KeyT"};function id(e){let t={...od,...e},r=e.stacked,[n,o]=p.useState(!0),i=p.useRef(null),{getToastToRender:s,isToastActive:a,count:l}=Hf(t),{className:u,style:c,rtl:f,containerId:h,hotKeys:m}=t;function d(x){let b=se("Toastify__toast-container",`Toastify__toast-container--${x}`,{"Toastify__toast-container--rtl":f});return Dt(u)?u({position:x,rtl:f,defaultClassName:b}):se(b,zo(u))}function y(){r&&(o(!0),ce.play())}return Kf(()=>{var x;if(r){let b=i.current.querySelectorAll('[data-in="true"]'),w=12,v=(x=t.position)==null?void 0:x.includes("top"),E=0,k=0;Array.from(b).reverse().forEach((T,C)=>{let O=T;O.classList.add("Toastify__toast--stacked"),C>0&&(O.dataset.collapsed=`${n}`),O.dataset.pos||(O.dataset.pos=v?"top":"bot");let j=E*(n?.2:1)+(n?0:w*C);O.style.setProperty("--y",`${v?j:j*-1}px`),O.style.setProperty("--g",`${w}`),O.style.setProperty("--s",`${1-(n?k:0)}`),E+=O.offsetHeight,k+=.025})}},[n,l,r]),p.useEffect(()=>{function x(b){var w;let v=i.current;m(b)&&((w=v.querySelector('[tabIndex="0"]'))==null||w.focus(),o(!1),ce.pause()),b.key==="Escape"&&(document.activeElement===v||v!=null&&v.contains(document.activeElement))&&(o(!0),ce.play())}return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[m]),p.createElement("section",{ref:i,className:"Toastify",id:h,onMouseEnter:()=>{r&&(o(!1),ce.pause())},onMouseLeave:y,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},s((x,b)=>{let w=b.length?{...c}:{...c,pointerEvents:"none"};return p.createElement("div",{tabIndex:-1,className:d(x),"data-stacked":r,style:w,key:`c-${x}`},b.map(({content:v,props:E})=>p.createElement(td,{...E,stacked:r,collapseAll:y,isIn:a(E.toastId,E.containerId),key:`t-${E.key}`},v)))}))}var Gr={},pa;function sd(){if(pa)return Gr;pa=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.parse=s,Gr.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const h=function(){};return h.prototype=Object.create(null),h})();function s(h,m){const d=new i,y=h.length;if(y<2)return d;const x=(m==null?void 0:m.decode)||c;let b=0;do{const w=h.indexOf("=",b);if(w===-1)break;const v=h.indexOf(";",b),E=v===-1?y:v;if(w>E){b=h.lastIndexOf(";",w-1)+1;continue}const k=a(h,b,w),T=l(h,w,k),C=h.slice(k,T);if(d[C]===void 0){let O=a(h,w+1,E),j=l(h,E,O);const D=x(h.slice(O,j));d[C]=D}b=E+1}while(b<y);return d}function a(h,m,d){do{const y=h.charCodeAt(m);if(y!==32&&y!==9)return m}while(++m<d);return d}function l(h,m,d){for(;m>d;){const y=h.charCodeAt(--m);if(y!==32&&y!==9)return m+1}return d}function u(h,m,d){const y=(d==null?void 0:d.encode)||encodeURIComponent;if(!e.test(h))throw new TypeError(`argument name is invalid: ${h}`);const x=y(m);if(!t.test(x))throw new TypeError(`argument val is invalid: ${m}`);let b=h+"="+x;if(!d)return b;if(d.maxAge!==void 0){if(!Number.isInteger(d.maxAge))throw new TypeError(`option maxAge is invalid: ${d.maxAge}`);b+="; Max-Age="+d.maxAge}if(d.domain){if(!r.test(d.domain))throw new TypeError(`option domain is invalid: ${d.domain}`);b+="; Domain="+d.domain}if(d.path){if(!n.test(d.path))throw new TypeError(`option path is invalid: ${d.path}`);b+="; Path="+d.path}if(d.expires){if(!f(d.expires)||!Number.isFinite(d.expires.valueOf()))throw new TypeError(`option expires is invalid: ${d.expires}`);b+="; Expires="+d.expires.toUTCString()}if(d.httpOnly&&(b+="; HttpOnly"),d.secure&&(b+="; Secure"),d.partitioned&&(b+="; Partitioned"),d.priority)switch(typeof d.priority=="string"?d.priority.toLowerCase():void 0){case"low":b+="; Priority=Low";break;case"medium":b+="; Priority=Medium";break;case"high":b+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${d.priority}`)}if(d.sameSite)switch(typeof d.sameSite=="string"?d.sameSite.toLowerCase():d.sameSite){case!0:case"strict":b+="; SameSite=Strict";break;case"lax":b+="; SameSite=Lax";break;case"none":b+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${d.sameSite}`)}return b}function c(h){if(h.indexOf("%")===-1)return h;try{return decodeURIComponent(h)}catch{return h}}function f(h){return o.call(h)==="[object Date]"}return Gr}sd();/**
|
|
33
33
|
* react-router v7.1.1
|
|
34
34
|
*
|
|
35
35
|
* Copyright (c) Remix Software Inc.
|
|
@@ -38,31 +38,31 @@ React keys must be passed directly to JSX without using spread:
|
|
|
38
38
|
* LICENSE.md file in the root directory of this source tree.
|
|
39
39
|
*
|
|
40
40
|
* @license MIT
|
|
41
|
-
*/function
|
|
41
|
+
*/function Me(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Lt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ko({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Yo(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ma(e,t,r="/"){return ad(e,t,r,!1)}function ad(e,t,r,n){let o=typeof t=="string"?Yo(t):t,i=nr(o.pathname||"/",r);if(i==null)return null;let s=ha(e);ld(s);let a=null;for(let l=0;a==null&&l<s.length;++l){let u=xd(i);a=yd(s[l],u,n)}return a}function ha(e,t=[],r=[],n=""){let o=(i,s,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(Me(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length));let u=It([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(Me(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),ha(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:hd(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of ga(i.path))o(i,s,l)}),t}function ga(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let s=ga(n.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function ld(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:gd(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var ud=/^:[\w-]+$/,cd=3,fd=2,dd=1,pd=10,md=-2,ya=e=>e==="*";function hd(e,t){let r=e.split("/"),n=r.length;return r.some(ya)&&(n+=md),t&&(n+=fd),r.filter(o=>!ya(o)).reduce((o,i)=>o+(ud.test(i)?cd:i===""?dd:pd),n)}function gd(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function yd(e,t,r=!1){let{routesMeta:n}=e,o={},i="/",s=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=In({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=In({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!f)return null;Object.assign(o,f.params),s.push({params:o,pathname:It([i,f.pathname]),pathnameBase:Td(It([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=It([i,f.pathnameBase]))}return s}function In(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=bd(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:n.reduce((u,{paramName:c,isOptional:f},h)=>{if(c==="*"){let d=a[h]||"";s=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}const m=a[h];return f&&!m?u[c]=void 0:u[c]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function bd(e,t=!1,r=!0){Lt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function xd(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Lt(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function nr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function vd(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Yo(e):e;return{pathname:r?r.startsWith("/")?r:wd(r,t):t,search:_d(n),hash:Sd(o)}}function wd(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Jo(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ed(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ba(e){let t=Ed(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function xa(e,t,r,n=!1){let o;typeof e=="string"?o=Yo(e):(o={...e},Me(!o.pathname||!o.pathname.includes("?"),Jo("?","pathname","search",o)),Me(!o.pathname||!o.pathname.includes("#"),Jo("#","pathname","hash",o)),Me(!o.search||!o.search.includes("#"),Jo("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(s==null)a=r;else{let f=t.length-1;if(!n&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}a=f>=0?t[f]:"/"}let l=vd(o,a),u=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var It=e=>e.join("/").replace(/\/\/+/g,"/"),Td=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_d=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Sd=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Cd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var va=["POST","PUT","PATCH","DELETE"];new Set(va);var kd=["GET",...va];new Set(kd);var Or=A.createContext(null);Or.displayName="DataRouter";var Mn=A.createContext(null);Mn.displayName="DataRouterState";var wa=A.createContext({isTransitioning:!1});wa.displayName="ViewTransition";var Od=A.createContext(new Map);Od.displayName="Fetchers";var Fd=A.createContext(null);Fd.displayName="Await";var Mt=A.createContext(null);Mt.displayName="Navigation";var Go=A.createContext(null);Go.displayName="Location";var Rt=A.createContext({outlet:null,matches:[],isDataRoute:!1});Rt.displayName="Route";var Xo=A.createContext(null);Xo.displayName="RouteError";function Ad(e,{relative:t}={}){Me(Rn(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=A.useContext(Mt),{hash:o,pathname:i,search:s}=Xr(e,{relative:t}),a=i;return r!=="/"&&(a=i==="/"?r:It([r,i])),n.createHref({pathname:a,search:s,hash:o})}function Rn(){return A.useContext(Go)!=null}function or(){return Me(Rn(),"useLocation() may be used only in the context of a <Router> component."),A.useContext(Go).location}var Ea="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ta(e){A.useContext(Mt).static||A.useLayoutEffect(e)}function jd(){let{isDataRoute:e}=A.useContext(Rt);return e?qd():$d()}function $d(){Me(Rn(),"useNavigate() may be used only in the context of a <Router> component.");let e=A.useContext(Or),{basename:t,navigator:r}=A.useContext(Mt),{matches:n}=A.useContext(Rt),{pathname:o}=or(),i=JSON.stringify(ba(n)),s=A.useRef(!1);return Ta(()=>{s.current=!0}),A.useCallback((l,u={})=>{if(Lt(s.current,Ea),!s.current)return;if(typeof l=="number"){r.go(l);return}let c=xa(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:It([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,o,e])}A.createContext(null);function Xr(e,{relative:t}={}){let{matches:r}=A.useContext(Rt),{pathname:n}=or(),o=JSON.stringify(ba(r));return A.useMemo(()=>xa(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}function Nd(e,t,r,n){Me(Rn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=A.useContext(Mt),{matches:i}=A.useContext(Rt),s=i[i.length-1],a=s?s.params:{},l=s?s.pathname:"/",u=s?s.pathnameBase:"/",c=s&&s.route;{let b=c&&c.path||"";Sa(l,!c||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
42
42
|
|
|
43
|
-
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let f=or(),h;h=f;let m=h.pathname||"/",d=m;if(u!=="/"){let b=u.replace(/^\//,"").split("/");d="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=pa(e,{pathname:d});return Lt(c||y!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Lt(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Ld(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:It([u,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:It([u,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,r,n)}function $d(){let e=Bd(),t=_d(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:i},"ErrorBoundary")," or"," ",A.createElement("code",{style:i},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),r?A.createElement("pre",{style:o},r):null,s)}var Nd=A.createElement($d,null),Pd=class extends A.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?A.createElement(Rt.Provider,{value:this.props.routeContext},A.createElement(Xo.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Dd({routeContext:e,match:t,children:r}){let n=A.useContext(Cr);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(Rt.Provider,{value:e},r)}function Ld(e,t=[],r=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r==null?void 0:r.errors;if(i!=null){let l=o.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id])!==void 0);Ie(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let s=!1,a=-1;if(r)for(let l=0;l<o.length;l++){let u=o[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(a=l),u.route.id){let{loaderData:c,errors:f}=r,h=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||h){s=!0,a>=0?o=o.slice(0,a+1):o=[o[0]];break}}}return o.reduceRight((l,u,c)=>{let f,h=!1,m=null,d=null;r&&(f=i&&u.route.id?i[u.route.id]:void 0,m=u.route.errorElement||Nd,s&&(a<0&&c===0?(_a("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,d=null):a===c&&(h=!0,d=u.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,c+1)),x=()=>{let b;return f?b=m:h?b=d:u.route.Component?b=A.createElement(u.route.Component,null):u.route.element?b=u.route.element:b=l,A.createElement(Dd,{match:u,routeContext:{outlet:l,matches:y,isDataRoute:r!=null},children:b})};return r&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?A.createElement(Pd,{location:r.location,revalidation:r.revalidation,component:m,error:f,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}function Zo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Id(e){let t=A.useContext(Cr);return Ie(t,Zo(e)),t}function Md(e){let t=A.useContext(In);return Ie(t,Zo(e)),t}function Rd(e){let t=A.useContext(Rt);return Ie(t,Zo(e)),t}function Qo(e){let t=Rd(e),r=t.matches[t.matches.length-1];return Ie(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Vd(){return Qo("useRouteId")}function Bd(){var n;let e=A.useContext(Xo),t=Md("useRouteError"),r=Qo("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Ud(){let{router:e}=Id("useNavigate"),t=Qo("useNavigate"),r=A.useRef(!1);return Ea(()=>{r.current=!0}),A.useCallback(async(o,i={})=>{Lt(r.current,wa),r.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var Ta={};function _a(e,t,r){!t&&!Ta[e]&&(Ta[e]=!0,Lt(!1,r))}A.memo(zd);function zd({routes:e,future:t,state:r}){return jd(e,void 0,r,t)}var Rn="get",Vn="application/x-www-form-urlencoded";function Bn(e){return e!=null&&typeof e.tagName=="string"}function qd(e){return Bn(e)&&e.tagName.toLowerCase()==="button"}function Hd(e){return Bn(e)&&e.tagName.toLowerCase()==="form"}function Wd(e){return Bn(e)&&e.tagName.toLowerCase()==="input"}function Kd(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yd(e,t){return e.button===0&&(!t||t==="_self")&&!Kd(e)}var Un=null;function Jd(){if(Un===null)try{new FormData(document.createElement("form"),0),Un=!1}catch{Un=!0}return Un}var Gd=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ei(e){return e!=null&&!Gd.has(e)?(Lt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vn}"`),null):e}function Xd(e,t){let r,n,o,i,s;if(Hd(e)){let a=e.getAttribute("action");n=a?nr(a,t):null,r=e.getAttribute("method")||Rn,o=ei(e.getAttribute("enctype"))||Vn,i=new FormData(e)}else if(qd(e)||Wd(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(n=l?nr(l,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Rn,o=ei(e.getAttribute("formenctype"))||ei(a.getAttribute("enctype"))||Vn,i=new FormData(a,e),!Jd()){let{name:u,type:c,value:f}=e;if(c==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,f)}}else{if(Bn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Rn,n=null,o=Vn,s=e}return i&&o==="text/plain"&&(s=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:s}}function ti(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function Zd(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Qd(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function ep(e,t,r){let n=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let s=await Zd(i,r);return s.links?s.links():[]}return[]}));return op(n.flat(1).filter(Qd).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Sa(e,t,r,n,o,i){let s=(l,u)=>r[u]?l.route.id!==r[u].route.id:!0,a=(l,u)=>{var c;return r[u].pathname!==l.pathname||((c=r[u].route.path)==null?void 0:c.endsWith("*"))&&r[u].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,u)=>s(l,u)||a(l,u)):i==="data"?t.filter((l,u)=>{var f;let c=n.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(s(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((f=r[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function tp(e,t){return rp(e.map(r=>{let n=t.routes[r.route.id];if(!n)return[];let o=[n.module];return n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function rp(e){return[...new Set(e)]}function np(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function op(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let i=JSON.stringify(np(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}function ip(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function sp(){let e=A.useContext(Cr);return ti(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ap(){let e=A.useContext(In);return ti(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ri=A.createContext(void 0);ri.displayName="FrameworkContext";function ka(){let e=A.useContext(ri);return ti(e,"You must render this element inside a <HydratedRouter> element"),e}function lp(e,t){let r=A.useContext(ri),[n,o]=A.useState(!1),[i,s]=A.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:f}=t,h=A.useRef(null);A.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let y=b=>{b.forEach(w=>{s(w.isIntersecting)})},x=new IntersectionObserver(y,{threshold:.5});return h.current&&x.observe(h.current),()=>{x.disconnect()}}},[e]),A.useEffect(()=>{if(n){let y=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(y)}}},[n]);let m=()=>{o(!0)},d=()=>{o(!1),s(!1)};return r?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Xr(a,m),onBlur:Xr(l,d),onMouseEnter:Xr(u,m),onMouseLeave:Xr(c,d),onTouchStart:Xr(f,m)}]:[!1,h,{}]}function Xr(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function up({page:e,...t}){let{router:r}=sp(),n=A.useMemo(()=>pa(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?A.createElement(fp,{page:e,matches:n,...t}):null}function cp(e){let{manifest:t,routeModules:r}=ka(),[n,o]=A.useState([]);return A.useEffect(()=>{let i=!1;return ep(e,t,r).then(s=>{i||o(s)}),()=>{i=!0}},[e,t,r]),n}function fp({page:e,matches:t,...r}){let n=or(),{manifest:o,routeModules:i}=ka(),{loaderData:s,matches:a}=ap(),l=A.useMemo(()=>Sa(e,t,a,o,n,"data"),[e,t,a,o,n]),u=A.useMemo(()=>Sa(e,t,a,o,n,"assets"),[e,t,a,o,n]),c=A.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let m=new Set,d=!1;if(t.forEach(x=>{var w;let b=o.routes[x.route.id];!b||!b.hasLoader||(!l.some(v=>v.route.id===x.route.id)&&x.route.id in s&&((w=i[x.route.id])!=null&&w.shouldRevalidate)||b.hasClientLoader?d=!0:m.add(x.route.id))}),m.size===0)return[];let y=ip(e);return d&&m.size>0&&y.searchParams.set("_routes",t.filter(x=>m.has(x.route.id)).map(x=>x.route.id).join(",")),[y.pathname+y.search]},[s,n,o,l,t,e,i]),f=A.useMemo(()=>tp(u,o),[u,o]),h=cp(u);return A.createElement(A.Fragment,null,c.map(m=>A.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...r})),f.map(m=>A.createElement("link",{key:m,rel:"modulepreload",href:m,...r})),h.map(({key:m,link:d})=>A.createElement("link",{key:m,...d})))}function dp(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ca=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ca&&(window.__reactRouterVersion="7.1.1")}catch{}var Oa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ni=A.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:i,replace:s,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f,...h},m){let{basename:d}=A.useContext(Mt),y=typeof u=="string"&&Oa.test(u),x,b=!1;if(typeof u=="string"&&y&&(x=u,Ca))try{let j=new URL(window.location.href),D=u.startsWith("//")?new URL(j.protocol+u):new URL(u),N=nr(D.pathname,d);D.origin===j.origin&&N!=null?u=N+D.search+D.hash:b=!0}catch{Lt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=Od(u,{relative:o}),[v,E,C]=lp(n,h),T=gp(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:o,viewTransition:f});function k(j){t&&t(j),j.defaultPrevented||T(j)}let O=A.createElement("a",{...h,...C,href:x||w,onClick:b||i?t:k,ref:dp(m,E),target:l,"data-discover":!y&&r==="render"?"true":void 0});return v&&!y?A.createElement(A.Fragment,null,O,A.createElement(up,{page:w})):O});ni.displayName="Link";var pp=A.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:i,to:s,viewTransition:a,children:l,...u},c){let f=Gr(s,{relative:u.relative}),h=or(),m=A.useContext(In),{navigator:d,basename:y}=A.useContext(Mt),x=m!=null&&wp(f)&&a===!0,b=d.encodeLocation?d.encodeLocation(f).pathname:f.pathname,w=h.pathname,v=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;r||(w=w.toLowerCase(),v=v?v.toLowerCase():null,b=b.toLowerCase()),v&&y&&(v=nr(v,y)||v);const E=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let C=w===b||!o&&w.startsWith(b)&&w.charAt(E)==="/",T=v!=null&&(v===b||!o&&v.startsWith(b)&&v.charAt(b.length)==="/"),k={isActive:C,isPending:T,isTransitioning:x},O=C?t:void 0,j;typeof n=="function"?j=n(k):j=[n,C?"active":null,T?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let D=typeof i=="function"?i(k):i;return A.createElement(ni,{...u,"aria-current":O,className:j,ref:c,style:D,to:s,viewTransition:a},typeof l=="function"?l(k):l)});pp.displayName="NavLink";var mp=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:s=Rn,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:f,...h},m)=>{let d=xp(),y=vp(a,{relative:u}),x=s.toLowerCase()==="get"?"get":"post",b=typeof a=="string"&&Oa.test(a),w=v=>{if(l&&l(v),v.defaultPrevented)return;v.preventDefault();let E=v.nativeEvent.submitter,C=(E==null?void 0:E.getAttribute("formmethod"))||s;d(E||v.currentTarget,{fetcherKey:t,method:C,navigate:r,replace:o,state:i,relative:u,preventScrollReset:c,viewTransition:f})};return A.createElement("form",{ref:m,method:x,action:y,onSubmit:n?l:w,...h,"data-discover":!b&&e==="render"?"true":void 0})});mp.displayName="Form";function hp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fa(e){let t=A.useContext(Cr);return Ie(t,hp(e)),t}function gp(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:s}={}){let a=Fd(),l=or(),u=Gr(e,{relative:i});return A.useCallback(c=>{if(Yd(c,t)){c.preventDefault();let f=r!==void 0?r:Ko(l)===Ko(u);a(e,{replace:f,state:n,preventScrollReset:o,relative:i,viewTransition:s})}},[l,a,u,r,n,t,e,o,i,s])}var yp=0,bp=()=>`__${String(++yp)}__`;function xp(){let{router:e}=Fa("useSubmit"),{basename:t}=A.useContext(Mt),r=Vd();return A.useCallback(async(n,o={})=>{let{action:i,method:s,encType:a,formData:l,body:u}=Xd(n,t);if(o.navigate===!1){let c=o.fetcherKey||bp();await e.fetch(c,r,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||a,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||a,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,r])}function vp(e,{relative:t}={}){let{basename:r}=A.useContext(Mt),n=A.useContext(Rt);Ie(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Gr(e||".",{relative:t})},s=or();if(e==null){i.search=s.search;let a=new URLSearchParams(i.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let c=a.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:It([r,i.pathname])),Ko(i)}function wp(e,t={}){let r=A.useContext(va);Ie(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Fa("useViewTransitionState"),o=Gr(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=nr(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=nr(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Ln(o.pathname,s)!=null||Ln(o.pathname,i)!=null}new TextEncoder;const Aa=Object.freeze({left:0,top:0,width:16,height:16}),zn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),oi=Object.freeze({...Aa,...zn}),ii=Object.freeze({...oi,body:"",hidden:!1});function Ep(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}function ja(e,t){const r=Ep(e,t);for(const n in ii)n in zn?n in e&&!(n in r)&&(r[n]=zn[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function Tp(e,t){const r=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function i(s){if(r[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=n[s]&&n[s].parent,l=a&&i(a);l&&(o[s]=[a].concat(l))}return o[s]}return Object.keys(r).concat(Object.keys(n)).forEach(i),o}function _p(e,t,r){const n=e.icons,o=e.aliases||Object.create(null);let i={};function s(a){i=ja(n[a]||o[a],i)}return s(t),r.forEach(s),ja(e,i)}function $a(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),r.push(o)});const n=Tp(e);for(const o in n){const i=n[o];i&&(t(o,_p(e,o,i)),r.push(o))}return r}const Sp={provider:"",aliases:{},not_found:{},...Aa};function si(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function Na(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!si(e,Sp))return null;const r=t.icons;for(const o in r){const i=r[o];if(!o||typeof i.body!="string"||!si(i,ii))return null}const n=t.aliases||Object.create(null);for(const o in n){const i=n[o],s=i.parent;if(!o||typeof s!="string"||!r[s]&&!n[s]||!si(i,ii))return null}return t}const Pa=/^[a-z0-9]+(-[a-z0-9]+)*$/,qn=(e,t,r,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:n,prefix:l,name:a};return t&&!Hn(u)?null:u}const i=o[0],s=i.split("-");if(s.length>1){const a={provider:n,prefix:s.shift(),name:s.join("-")};return t&&!Hn(a)?null:a}if(r&&n===""){const a={provider:n,prefix:"",name:i};return t&&!Hn(a,r)?null:a}return null},Hn=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Da=Object.create(null);function kp(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ir(e,t){const r=Da[e]||(Da[e]=Object.create(null));return r[t]||(r[t]=kp(e,t))}function ai(e,t){return Na(t)?$a(t,(r,n)=>{n?e.icons[r]=n:e.missing.add(r)}):[]}function Cp(e,t,r){try{if(typeof r.body=="string")return e.icons[t]={...r},!0}catch{}return!1}let Zr=!1;function La(e){return typeof e=="boolean"&&(Zr=e),Zr}function Ia(e){const t=typeof e=="string"?qn(e,!0,Zr):e;if(t){const r=ir(t.provider,t.prefix),n=t.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function Op(e,t){const r=qn(e,!0,Zr);if(!r)return!1;const n=ir(r.provider,r.prefix);return t?Cp(n,r.name,t):(n.missing.add(r.name),!0)}function Fp(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Zr&&!t&&!e.prefix){let o=!1;return Na(e)&&(e.prefix="",$a(e,(i,s)=>{Op(i,s)&&(o=!0)})),o}const r=e.prefix;if(!Hn({provider:t,prefix:r,name:"a"}))return!1;const n=ir(t,r);return!!ai(n,e)}const Ma=Object.freeze({width:null,height:null}),Ra=Object.freeze({...Ma,...zn}),Ap=/(-?[0-9.]*[0-9]+[0-9.]*)/g,jp=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Va(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const n=e.split(Ap);if(n===null||!n.length)return e;const o=[];let i=n.shift(),s=jp.test(i);for(;;){if(s){const a=parseFloat(i);isNaN(a)?o.push(i):o.push(Math.ceil(a*t*r)/r)}else o.push(i);if(i=n.shift(),i===void 0)return o.join("");s=!s}}function $p(e,t="defs"){let r="";const n=e.indexOf("<"+t);for(;n>=0;){const o=e.indexOf(">",n),i=e.indexOf("</"+t);if(o===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;r+=e.slice(o+1,i).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:r,content:e}}function Np(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Pp(e,t,r){const n=$p(e);return Np(n.defs,t+n.content+r)}const Dp=e=>e==="unset"||e==="undefined"||e==="none";function Lp(e,t){const r={...oi,...e},n={...Ra,...t},o={left:r.left,top:r.top,width:r.width,height:r.height};let i=r.body;[r,n].forEach(y=>{const x=[],b=y.hFlip,w=y.vFlip;let v=y.rotate;b?w?v+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):w&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let E;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:E=o.height/2+o.top,x.unshift("rotate(90 "+E.toString()+" "+E.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:E=o.width/2+o.left,x.unshift("rotate(-90 "+E.toString()+" "+E.toString()+")");break}v%2===1&&(o.left!==o.top&&(E=o.left,o.left=o.top,o.top=E),o.width!==o.height&&(E=o.width,o.width=o.height,o.height=E)),x.length&&(i=Pp(i,'<g transform="'+x.join(" ")+'">',"</g>"))});const s=n.width,a=n.height,l=o.width,u=o.height;let c,f;s===null?(f=a===null?"1em":a==="auto"?u:a,c=Va(f,l/u)):(c=s==="auto"?l:s,f=a===null?Va(c,u/l):a==="auto"?u:a);const h={},m=(y,x)=>{Dp(x)||(h[y]=x.toString())};m("width",c),m("height",f);const d=[o.left,o.top,l,u];return h.viewBox=d.join(" "),{attributes:h,viewBox:d,body:i}}const Ip=/\sid="(\S+)"/g,Mp="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Rp=0;function Vp(e,t=Mp){const r=[];let n;for(;n=Ip.exec(e);)r.push(n[1]);if(!r.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(i=>{const s=typeof t=="function"?t(i):t+(Rp++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const li=Object.create(null);function Bp(e,t){li[e]=t}function ui(e){return li[e]||li[""]}function ci(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const fi=Object.create(null),Qr=["https://api.simplesvg.com","https://api.unisvg.com"],Wn=[];for(;Qr.length>0;)Qr.length===1||Math.random()>.5?Wn.push(Qr.shift()):Wn.push(Qr.pop());fi[""]=ci({resources:["https://api.iconify.design"].concat(Wn)});function Up(e,t){const r=ci(t);return r===null?!1:(fi[e]=r,!0)}function di(e){return fi[e]}let Ba=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function zp(e,t){const r=di(e);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let o=0;r.resources.forEach(s=>{o=Math.max(o,s.length)});const i=t+".json?icons=";n=r.maxURL-o-r.path.length-i.length}return n}function qp(e){return e===404}const Hp=(e,t,r)=>{const n=[],o=zp(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},a=0;return r.forEach((l,u)=>{a+=l.length+1,a>=o&&u>0&&(n.push(s),s={type:i,provider:e,prefix:t,icons:[]},a=l.length),s.icons.push(l)}),n.push(s),n};function Wp(e){if(typeof e=="string"){const t=di(e);if(t)return t.path}return"/"}const Kp={prepare:Hp,send:(e,t,r)=>{if(!Ba){r("abort",424);return}let n=Wp(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});n+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;n+=i.slice(0,1)==="/"?i.slice(1):i;break}default:r("abort",400);return}let o=503;Ba(e+n).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{r(qp(s)?"abort":"next",s)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?r("abort",i):r("next",o)});return}setTimeout(()=>{r("success",i)})}).catch(()=>{r("next",o)})}};function Yp(e){const t={loaded:[],missing:[],pending:[]},r=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const i=o.provider,s=o.prefix,a=o.name,l=r[i]||(r[i]=Object.create(null)),u=l[s]||(l[s]=ir(i,s));let c;a in u.icons?c=t.loaded:s===""||u.missing.has(a)?c=t.missing:c=t.pending;const f={provider:i,prefix:s,name:a};c.push(f)}),t}function Ua(e,t){e.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(o=>o.id!==t))})}function Jp(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let r=!1;const n=e.provider,o=e.prefix;t.forEach(i=>{const s=i.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])s.loaded.push({provider:n,prefix:o,name:u});else if(e.missing.has(u))s.missing.push({provider:n,prefix:o,name:u});else return r=!0,!0;return!1}),s.pending.length!==a&&(r||Ua([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let Gp=0;function Xp(e,t,r){const n=Gp++,o=Ua.bind(null,r,n);if(!t.pending.length)return o;const i={id:n,icons:t,callback:e,abort:o};return r.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),o}function Zp(e,t=!0,r=!1){const n=[];return e.forEach(o=>{const i=typeof o=="string"?qn(o,t,r):o;i&&n.push(i)}),n}var Qp={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function em(e,t,r,n){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let T=e.resources.slice(0);for(s=[];T.length>1;){const k=Math.floor(Math.random()*T.length);s.push(T[k]),T=T.slice(0,k).concat(T.slice(k+1))}s=s.concat(T)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",u=0,c,f=null,h=[],m=[];typeof n=="function"&&m.push(n);function d(){f&&(clearTimeout(f),f=null)}function y(){l==="pending"&&(l="aborted"),d(),h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function x(T,k){k&&(m=[]),typeof T=="function"&&m.push(T)}function b(){return{startTime:a,payload:t,status:l,queriesSent:u,queriesPending:h.length,subscribe:x,abort:y}}function w(){l="failed",m.forEach(T=>{T(void 0,c)})}function v(){h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function E(T,k,O){const j=k!=="success";switch(h=h.filter(D=>D!==T),l){case"pending":break;case"failed":if(j||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){c=O,w();return}if(j){c=O,h.length||(s.length?C():w());return}if(d(),v(),!e.random){const D=e.resources.indexOf(T.resource);D!==-1&&D!==e.index&&(e.index=D)}l="completed",m.forEach(D=>{D(O)})}function C(){if(l!=="pending")return;d();const T=s.shift();if(T===void 0){if(h.length){f=setTimeout(()=>{d(),l==="pending"&&(v(),w())},e.timeout);return}w();return}const k={status:"pending",resource:T,callback:(O,j)=>{E(k,O,j)}};h.push(k),u++,f=setTimeout(C,e.rotate),r(T,t,k.callback)}return setTimeout(C),b}function za(e){const t={...Qp,...e};let r=[];function n(){r=r.filter(a=>a().status==="pending")}function o(a,l,u){const c=em(t,a,l,(f,h)=>{n(),u&&u(f,h)});return r.push(c),c}function i(a){return r.find(l=>a(l))||null}return{query:o,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:n}}function qa(){}const pi=Object.create(null);function tm(e){if(!pi[e]){const t=di(e);if(!t)return;const r=za(t),n={config:t,redundancy:r};pi[e]=n}return pi[e]}function rm(e,t,r){let n,o;if(typeof e=="string"){const i=ui(e);if(!i)return r(void 0,424),qa;o=i.send;const s=tm(e);s&&(n=s.redundancy)}else{const i=ci(e);if(i){n=za(i);const s=e.resources?e.resources[0]:"",a=ui(s);a&&(o=a.send)}}return!n||!o?(r(void 0,424),qa):n.query(t,o,r)().abort}const Ha="iconify2",en="iconify",Wa=en+"-count",Ka=en+"-version",Ya=36e5,nm=168,om=50;function mi(e,t){try{return e.getItem(t)}catch{}}function hi(e,t,r){try{return e.setItem(t,r),!0}catch{}}function Ja(e,t){try{e.removeItem(t)}catch{}}function gi(e,t){return hi(e,Wa,t.toString())}function yi(e){return parseInt(mi(e,Wa))||0}const Kn={local:!0,session:!0},Ga={local:new Set,session:new Set};let bi=!1;function im(e){bi=e}let Yn=typeof window>"u"?{}:window;function Xa(e){const t=e+"Storage";try{if(Yn&&Yn[t]&&typeof Yn[t].length=="number")return Yn[t]}catch{}Kn[e]=!1}function Za(e,t){const r=Xa(e);if(!r)return;const n=mi(r,Ka);if(n!==Ha){if(n){const a=yi(r);for(let l=0;l<a;l++)Ja(r,en+l.toString())}hi(r,Ka,Ha),gi(r,0);return}const o=Math.floor(Date.now()/Ya)-nm,i=a=>{const l=en+a.toString(),u=mi(r,l);if(typeof u=="string"){try{const c=JSON.parse(u);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>o&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,a))return!0}catch{}Ja(r,l)}};let s=yi(r);for(let a=s-1;a>=0;a--)i(a)||(a===s-1?(s--,gi(r,s)):Ga[e].add(a))}function Qa(){if(!bi){im(!0);for(const e in Kn)Za(e,t=>{const r=t.data,n=t.provider,o=r.prefix,i=ir(n,o);if(!ai(i,r).length)return!1;const s=r.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,s):s,!0})}}function sm(e,t){const r=e.lastModifiedCached;if(r&&r>=t)return r===t;if(e.lastModifiedCached=t,r)for(const n in Kn)Za(n,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function am(e,t){bi||Qa();function r(n){let o;if(!Kn[n]||!(o=Xa(n)))return;const i=Ga[n];let s;if(i.size)i.delete(s=Array.from(i).shift());else if(s=yi(o),s>=om||!gi(o,s+1))return;const a={cached:Math.floor(Date.now()/Ya),provider:e.provider,data:t};return hi(o,en+s.toString(),JSON.stringify(a))}t.lastModified&&!sm(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),r("local")||r("session"))}function el(){}function lm(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Jp(e)}))}function um(e){const t=[],r=[];return e.forEach(n=>{(n.match(Pa)?t:r).push(n)}),{valid:t,invalid:r}}function tn(e,t,r,n){function o(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(r&&typeof r=="object")try{if(!ai(e,r).length){o();return}n&&am(e,r)}catch(i){console.error(i)}o(),lm(e)}function tl(e,t){e instanceof Promise?e.then(r=>{t(r)}).catch(()=>{t(null)}):t(e)}function cm(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:r,prefix:n}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const i=e.loadIcon;if(e.loadIcons&&(o.length>1||!i)){tl(e.loadIcons(o,n,r),c=>{tn(e,o,c,!1)});return}if(i){o.forEach(c=>{const f=i(c,n,r);tl(f,h=>{const m=h?{prefix:n,icons:{[c]:h}}:null;tn(e,[c],m,!1)})});return}const{valid:s,invalid:a}=um(o);if(a.length&&tn(e,a,null,!1),!s.length)return;const l=n.match(Pa)?ui(r):null;if(!l){tn(e,s,null,!1);return}l.prepare(r,n,s).forEach(c=>{rm(r,c,f=>{tn(e,c.icons,f,!0)})})}))}const fm=(e,t)=>{const r=Zp(e,!0,La()),n=Yp(r);if(!n.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(n.loaded,n.missing,n.pending,el)}),()=>{l=!1}}const o=Object.create(null),i=[];let s,a;return n.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===a&&u===s)return;s=u,a=c,i.push(ir(u,c));const f=o[u]||(o[u]=Object.create(null));f[c]||(f[c]=[])}),n.pending.forEach(l=>{const{provider:u,prefix:c,name:f}=l,h=ir(u,c),m=h.pendingIcons||(h.pendingIcons=new Set);m.has(f)||(m.add(f),o[u][c].push(f))}),i.forEach(l=>{const u=o[l.provider][l.prefix];u.length&&cm(l,u)}),t?Xp(t,n,i):el};function dm(e,t){const r={...e};for(const n in t){const o=t[n],i=typeof o;n in Ma?(o===null||o&&(i==="string"||i==="number"))&&(r[n]=o):i===typeof r[n]&&(r[n]=n==="rotate"?o%4:o)}return r}const pm=/[\s,]+/;function mm(e,t){t.split(pm).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function hm(e,t=0){const r=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(r===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(r!==e){let o=0;switch(r){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-r.length));return isNaN(i)?0:(i=i/o,i%1===0?n(i):0)}}return t}function gm(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function ym(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function bm(e){return"data:image/svg+xml,"+ym(e)}function xm(e){return'url("'+bm(e)+'")'}let rn;function vm(){try{rn=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{rn=null}}function wm(e){return rn===void 0&&vm(),rn?rn.createHTML(e):e}const rl={...Ra,inline:!1},Em={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Tm={display:"inline-block"},xi={backgroundColor:"currentColor"},nl={backgroundColor:"transparent"},ol={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},il={WebkitMask:xi,mask:xi,background:nl};for(const e in il){const t=il[e];for(const r in ol)t[e+r]=ol[r]}const _m={...rl,inline:!0};function sl(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Sm=(e,t,r)=>{const n=t.inline?_m:rl,o=dm(n,t),i=t.mode||"svg",s={},a=t.style||{},l={...i==="svg"?Em:{}};if(r){const x=qn(r,!1,!0);if(x){const b=["iconify"],w=["provider","prefix"];for(const v of w)x[v]&&b.push("iconify--"+x[v]);l.className=b.join(" ")}}for(let x in t){const b=t[x];if(b!==void 0)switch(x){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":l.ref=b;break;case"className":l[x]=(l[x]?l[x]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":o[x]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&mm(o,b);break;case"color":s.color=b;break;case"rotate":typeof b=="string"?o[x]=hm(b):typeof b=="number"&&(o[x]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete l["aria-hidden"];break;default:n[x]===void 0&&(l[x]=b)}}const u=Lp(e,o),c=u.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),i==="svg"){l.style={...s,...a},Object.assign(l,c);let x=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:wm(Vp(u.body,b?()=>b+"ID"+x++:"iconifyReact"))},p.createElement("svg",l)}const{body:f,width:h,height:m}=e,d=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),y=gm(f,{...c,width:h+"",height:m+""});return l.style={...s,"--svg":xm(y),width:sl(c.width),height:sl(c.height),...Tm,...d?xi:nl,...a},p.createElement("span",l)};if(La(!0),Bp("",Kp),typeof document<"u"&&typeof window<"u"){Qa();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Fp(n))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let r in t){const n="IconifyProviders["+r+"] is invalid.";try{const o=t[r];if(typeof o!="object"||!o||o.resources===void 0)continue;Up(r,o)||console.error(n)}catch{console.error(n)}}}}function al(e){const[t,r]=p.useState(!!e.ssr),[n,o]=p.useState({});function i(m){if(m){const d=e.icon;if(typeof d=="object")return{name:"",data:d};const y=Ia(d);if(y)return{name:d,data:y}}return{name:""}}const[s,a]=p.useState(i(!!e.ssr));function l(){const m=n.callback;m&&(m(),o({}))}function u(m){if(JSON.stringify(s)!==JSON.stringify(m))return l(),a(m),!0}function c(){var m;const d=e.icon;if(typeof d=="object"){u({name:"",data:d});return}const y=Ia(d);if(u({name:d,data:y}))if(y===void 0){const x=fm([d],c);o({callback:x})}else y&&((m=e.onLoad)===null||m===void 0||m.call(e,d))}p.useEffect(()=>(r(!0),l),[]),p.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:h}=s;return h?Sm({...oi,...h},e,f):e.children?e.children:p.createElement("span",{})}const km=p.forwardRef((e,t)=>al({...e,_ref:t}));p.forwardRef((e,t)=>al({inline:!0,...e,_ref:t}));function Me({icon:e,iconClass:t}){return g.jsx(g.Fragment,{children:g.jsx(km,{icon:e,className:t})})}const Or=({text:e="",isDisabled:t=!1,isLoading:r=!1,btnClass:n="bg-primary-500 text-white",icon:o="",iconPosition:i="left",iconClass:s="text-[20px]",loadingClass:a="",link:l="",div:u=!1,type:c="button",style:f,onClick:h})=>{const m=`
|
|
43
|
+
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let f=or(),h;h=f;let m=h.pathname||"/",d=m;if(u!=="/"){let b=u.replace(/^\//,"").split("/");d="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=ma(e,{pathname:d});return Lt(c||y!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Lt(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Md(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:It([u,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:It([u,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,r,n)}function Pd(){let e=zd(),t=Cd(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:i},"ErrorBoundary")," or"," ",A.createElement("code",{style:i},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),r?A.createElement("pre",{style:o},r):null,s)}var Dd=A.createElement(Pd,null),Ld=class extends A.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?A.createElement(Rt.Provider,{value:this.props.routeContext},A.createElement(Xo.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Id({routeContext:e,match:t,children:r}){let n=A.useContext(Or);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(Rt.Provider,{value:e},r)}function Md(e,t=[],r=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r==null?void 0:r.errors;if(i!=null){let l=o.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id])!==void 0);Me(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let s=!1,a=-1;if(r)for(let l=0;l<o.length;l++){let u=o[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(a=l),u.route.id){let{loaderData:c,errors:f}=r,h=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||h){s=!0,a>=0?o=o.slice(0,a+1):o=[o[0]];break}}}return o.reduceRight((l,u,c)=>{let f,h=!1,m=null,d=null;r&&(f=i&&u.route.id?i[u.route.id]:void 0,m=u.route.errorElement||Dd,s&&(a<0&&c===0?(Sa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,d=null):a===c&&(h=!0,d=u.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,c+1)),x=()=>{let b;return f?b=m:h?b=d:u.route.Component?b=A.createElement(u.route.Component,null):u.route.element?b=u.route.element:b=l,A.createElement(Id,{match:u,routeContext:{outlet:l,matches:y,isDataRoute:r!=null},children:b})};return r&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?A.createElement(Ld,{location:r.location,revalidation:r.revalidation,component:m,error:f,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}function Zo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rd(e){let t=A.useContext(Or);return Me(t,Zo(e)),t}function Vd(e){let t=A.useContext(Mn);return Me(t,Zo(e)),t}function Bd(e){let t=A.useContext(Rt);return Me(t,Zo(e)),t}function Qo(e){let t=Bd(e),r=t.matches[t.matches.length-1];return Me(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Ud(){return Qo("useRouteId")}function zd(){var n;let e=A.useContext(Xo),t=Vd("useRouteError"),r=Qo("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function qd(){let{router:e}=Rd("useNavigate"),t=Qo("useNavigate"),r=A.useRef(!1);return Ta(()=>{r.current=!0}),A.useCallback(async(o,i={})=>{Lt(r.current,Ea),r.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var _a={};function Sa(e,t,r){!t&&!_a[e]&&(_a[e]=!0,Lt(!1,r))}A.memo(Hd);function Hd({routes:e,future:t,state:r}){return Nd(e,void 0,r,t)}var Vn="get",Bn="application/x-www-form-urlencoded";function Un(e){return e!=null&&typeof e.tagName=="string"}function Wd(e){return Un(e)&&e.tagName.toLowerCase()==="button"}function Kd(e){return Un(e)&&e.tagName.toLowerCase()==="form"}function Yd(e){return Un(e)&&e.tagName.toLowerCase()==="input"}function Jd(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Gd(e,t){return e.button===0&&(!t||t==="_self")&&!Jd(e)}var zn=null;function Xd(){if(zn===null)try{new FormData(document.createElement("form"),0),zn=!1}catch{zn=!0}return zn}var Zd=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ei(e){return e!=null&&!Zd.has(e)?(Lt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Bn}"`),null):e}function Qd(e,t){let r,n,o,i,s;if(Kd(e)){let a=e.getAttribute("action");n=a?nr(a,t):null,r=e.getAttribute("method")||Vn,o=ei(e.getAttribute("enctype"))||Bn,i=new FormData(e)}else if(Wd(e)||Yd(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(n=l?nr(l,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Vn,o=ei(e.getAttribute("formenctype"))||ei(a.getAttribute("enctype"))||Bn,i=new FormData(a,e),!Xd()){let{name:u,type:c,value:f}=e;if(c==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,f)}}else{if(Un(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Vn,n=null,o=Bn,s=e}return i&&o==="text/plain"&&(s=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:s}}function ti(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function ep(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function tp(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function rp(e,t,r){let n=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let s=await ep(i,r);return s.links?s.links():[]}return[]}));return sp(n.flat(1).filter(tp).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Ca(e,t,r,n,o,i){let s=(l,u)=>r[u]?l.route.id!==r[u].route.id:!0,a=(l,u)=>{var c;return r[u].pathname!==l.pathname||((c=r[u].route.path)==null?void 0:c.endsWith("*"))&&r[u].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,u)=>s(l,u)||a(l,u)):i==="data"?t.filter((l,u)=>{var f;let c=n.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(s(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((f=r[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function np(e,t){return op(e.map(r=>{let n=t.routes[r.route.id];if(!n)return[];let o=[n.module];return n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function op(e){return[...new Set(e)]}function ip(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function sp(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let i=JSON.stringify(ip(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}function ap(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function lp(){let e=A.useContext(Or);return ti(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function up(){let e=A.useContext(Mn);return ti(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ri=A.createContext(void 0);ri.displayName="FrameworkContext";function ka(){let e=A.useContext(ri);return ti(e,"You must render this element inside a <HydratedRouter> element"),e}function cp(e,t){let r=A.useContext(ri),[n,o]=A.useState(!1),[i,s]=A.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:f}=t,h=A.useRef(null);A.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let y=b=>{b.forEach(w=>{s(w.isIntersecting)})},x=new IntersectionObserver(y,{threshold:.5});return h.current&&x.observe(h.current),()=>{x.disconnect()}}},[e]),A.useEffect(()=>{if(n){let y=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(y)}}},[n]);let m=()=>{o(!0)},d=()=>{o(!1),s(!1)};return r?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Zr(a,m),onBlur:Zr(l,d),onMouseEnter:Zr(u,m),onMouseLeave:Zr(c,d),onTouchStart:Zr(f,m)}]:[!1,h,{}]}function Zr(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function fp({page:e,...t}){let{router:r}=lp(),n=A.useMemo(()=>ma(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?A.createElement(pp,{page:e,matches:n,...t}):null}function dp(e){let{manifest:t,routeModules:r}=ka(),[n,o]=A.useState([]);return A.useEffect(()=>{let i=!1;return rp(e,t,r).then(s=>{i||o(s)}),()=>{i=!0}},[e,t,r]),n}function pp({page:e,matches:t,...r}){let n=or(),{manifest:o,routeModules:i}=ka(),{loaderData:s,matches:a}=up(),l=A.useMemo(()=>Ca(e,t,a,o,n,"data"),[e,t,a,o,n]),u=A.useMemo(()=>Ca(e,t,a,o,n,"assets"),[e,t,a,o,n]),c=A.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let m=new Set,d=!1;if(t.forEach(x=>{var w;let b=o.routes[x.route.id];!b||!b.hasLoader||(!l.some(v=>v.route.id===x.route.id)&&x.route.id in s&&((w=i[x.route.id])!=null&&w.shouldRevalidate)||b.hasClientLoader?d=!0:m.add(x.route.id))}),m.size===0)return[];let y=ap(e);return d&&m.size>0&&y.searchParams.set("_routes",t.filter(x=>m.has(x.route.id)).map(x=>x.route.id).join(",")),[y.pathname+y.search]},[s,n,o,l,t,e,i]),f=A.useMemo(()=>np(u,o),[u,o]),h=dp(u);return A.createElement(A.Fragment,null,c.map(m=>A.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...r})),f.map(m=>A.createElement("link",{key:m,rel:"modulepreload",href:m,...r})),h.map(({key:m,link:d})=>A.createElement("link",{key:m,...d})))}function mp(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Oa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Oa&&(window.__reactRouterVersion="7.1.1")}catch{}var Fa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ni=A.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:i,replace:s,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f,...h},m){let{basename:d}=A.useContext(Mt),y=typeof u=="string"&&Fa.test(u),x,b=!1;if(typeof u=="string"&&y&&(x=u,Oa))try{let j=new URL(window.location.href),D=u.startsWith("//")?new URL(j.protocol+u):new URL(u),N=nr(D.pathname,d);D.origin===j.origin&&N!=null?u=N+D.search+D.hash:b=!0}catch{Lt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=Ad(u,{relative:o}),[v,E,k]=cp(n,h),T=bp(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:o,viewTransition:f});function C(j){t&&t(j),j.defaultPrevented||T(j)}let O=A.createElement("a",{...h,...k,href:x||w,onClick:b||i?t:C,ref:mp(m,E),target:l,"data-discover":!y&&r==="render"?"true":void 0});return v&&!y?A.createElement(A.Fragment,null,O,A.createElement(fp,{page:w})):O});ni.displayName="Link";var hp=A.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:i,to:s,viewTransition:a,children:l,...u},c){let f=Xr(s,{relative:u.relative}),h=or(),m=A.useContext(Mn),{navigator:d,basename:y}=A.useContext(Mt),x=m!=null&&Tp(f)&&a===!0,b=d.encodeLocation?d.encodeLocation(f).pathname:f.pathname,w=h.pathname,v=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;r||(w=w.toLowerCase(),v=v?v.toLowerCase():null,b=b.toLowerCase()),v&&y&&(v=nr(v,y)||v);const E=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let k=w===b||!o&&w.startsWith(b)&&w.charAt(E)==="/",T=v!=null&&(v===b||!o&&v.startsWith(b)&&v.charAt(b.length)==="/"),C={isActive:k,isPending:T,isTransitioning:x},O=k?t:void 0,j;typeof n=="function"?j=n(C):j=[n,k?"active":null,T?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let D=typeof i=="function"?i(C):i;return A.createElement(ni,{...u,"aria-current":O,className:j,ref:c,style:D,to:s,viewTransition:a},typeof l=="function"?l(C):l)});hp.displayName="NavLink";var gp=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:s=Vn,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:f,...h},m)=>{let d=wp(),y=Ep(a,{relative:u}),x=s.toLowerCase()==="get"?"get":"post",b=typeof a=="string"&&Fa.test(a),w=v=>{if(l&&l(v),v.defaultPrevented)return;v.preventDefault();let E=v.nativeEvent.submitter,k=(E==null?void 0:E.getAttribute("formmethod"))||s;d(E||v.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:o,state:i,relative:u,preventScrollReset:c,viewTransition:f})};return A.createElement("form",{ref:m,method:x,action:y,onSubmit:n?l:w,...h,"data-discover":!b&&e==="render"?"true":void 0})});gp.displayName="Form";function yp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Aa(e){let t=A.useContext(Or);return Me(t,yp(e)),t}function bp(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:s}={}){let a=jd(),l=or(),u=Xr(e,{relative:i});return A.useCallback(c=>{if(Gd(c,t)){c.preventDefault();let f=r!==void 0?r:Ko(l)===Ko(u);a(e,{replace:f,state:n,preventScrollReset:o,relative:i,viewTransition:s})}},[l,a,u,r,n,t,e,o,i,s])}var xp=0,vp=()=>`__${String(++xp)}__`;function wp(){let{router:e}=Aa("useSubmit"),{basename:t}=A.useContext(Mt),r=Ud();return A.useCallback(async(n,o={})=>{let{action:i,method:s,encType:a,formData:l,body:u}=Qd(n,t);if(o.navigate===!1){let c=o.fetcherKey||vp();await e.fetch(c,r,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||a,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||a,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,r])}function Ep(e,{relative:t}={}){let{basename:r}=A.useContext(Mt),n=A.useContext(Rt);Me(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Xr(e||".",{relative:t})},s=or();if(e==null){i.search=s.search;let a=new URLSearchParams(i.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let c=a.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:It([r,i.pathname])),Ko(i)}function Tp(e,t={}){let r=A.useContext(wa);Me(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Aa("useViewTransitionState"),o=Xr(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=nr(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=nr(r.nextLocation.pathname,n)||r.nextLocation.pathname;return In(o.pathname,s)!=null||In(o.pathname,i)!=null}new TextEncoder;const ja=Object.freeze({left:0,top:0,width:16,height:16}),qn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),oi=Object.freeze({...ja,...qn}),ii=Object.freeze({...oi,body:"",hidden:!1});function _p(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}function $a(e,t){const r=_p(e,t);for(const n in ii)n in qn?n in e&&!(n in r)&&(r[n]=qn[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function Sp(e,t){const r=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function i(s){if(r[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=n[s]&&n[s].parent,l=a&&i(a);l&&(o[s]=[a].concat(l))}return o[s]}return Object.keys(r).concat(Object.keys(n)).forEach(i),o}function Cp(e,t,r){const n=e.icons,o=e.aliases||Object.create(null);let i={};function s(a){i=$a(n[a]||o[a],i)}return s(t),r.forEach(s),$a(e,i)}function Na(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),r.push(o)});const n=Sp(e);for(const o in n){const i=n[o];i&&(t(o,Cp(e,o,i)),r.push(o))}return r}const kp={provider:"",aliases:{},not_found:{},...ja};function si(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function Pa(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!si(e,kp))return null;const r=t.icons;for(const o in r){const i=r[o];if(!o||typeof i.body!="string"||!si(i,ii))return null}const n=t.aliases||Object.create(null);for(const o in n){const i=n[o],s=i.parent;if(!o||typeof s!="string"||!r[s]&&!n[s]||!si(i,ii))return null}return t}const Da=/^[a-z0-9]+(-[a-z0-9]+)*$/,Hn=(e,t,r,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:n,prefix:l,name:a};return t&&!Wn(u)?null:u}const i=o[0],s=i.split("-");if(s.length>1){const a={provider:n,prefix:s.shift(),name:s.join("-")};return t&&!Wn(a)?null:a}if(r&&n===""){const a={provider:n,prefix:"",name:i};return t&&!Wn(a,r)?null:a}return null},Wn=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,La=Object.create(null);function Op(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ir(e,t){const r=La[e]||(La[e]=Object.create(null));return r[t]||(r[t]=Op(e,t))}function ai(e,t){return Pa(t)?Na(t,(r,n)=>{n?e.icons[r]=n:e.missing.add(r)}):[]}function Fp(e,t,r){try{if(typeof r.body=="string")return e.icons[t]={...r},!0}catch{}return!1}let Qr=!1;function Ia(e){return typeof e=="boolean"&&(Qr=e),Qr}function Ma(e){const t=typeof e=="string"?Hn(e,!0,Qr):e;if(t){const r=ir(t.provider,t.prefix),n=t.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function Ap(e,t){const r=Hn(e,!0,Qr);if(!r)return!1;const n=ir(r.provider,r.prefix);return t?Fp(n,r.name,t):(n.missing.add(r.name),!0)}function jp(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Qr&&!t&&!e.prefix){let o=!1;return Pa(e)&&(e.prefix="",Na(e,(i,s)=>{Ap(i,s)&&(o=!0)})),o}const r=e.prefix;if(!Wn({provider:t,prefix:r,name:"a"}))return!1;const n=ir(t,r);return!!ai(n,e)}const Ra=Object.freeze({width:null,height:null}),Va=Object.freeze({...Ra,...qn}),$p=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Np=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ba(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const n=e.split($p);if(n===null||!n.length)return e;const o=[];let i=n.shift(),s=Np.test(i);for(;;){if(s){const a=parseFloat(i);isNaN(a)?o.push(i):o.push(Math.ceil(a*t*r)/r)}else o.push(i);if(i=n.shift(),i===void 0)return o.join("");s=!s}}function Pp(e,t="defs"){let r="";const n=e.indexOf("<"+t);for(;n>=0;){const o=e.indexOf(">",n),i=e.indexOf("</"+t);if(o===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;r+=e.slice(o+1,i).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:r,content:e}}function Dp(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Lp(e,t,r){const n=Pp(e);return Dp(n.defs,t+n.content+r)}const Ip=e=>e==="unset"||e==="undefined"||e==="none";function Mp(e,t){const r={...oi,...e},n={...Va,...t},o={left:r.left,top:r.top,width:r.width,height:r.height};let i=r.body;[r,n].forEach(y=>{const x=[],b=y.hFlip,w=y.vFlip;let v=y.rotate;b?w?v+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):w&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let E;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:E=o.height/2+o.top,x.unshift("rotate(90 "+E.toString()+" "+E.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:E=o.width/2+o.left,x.unshift("rotate(-90 "+E.toString()+" "+E.toString()+")");break}v%2===1&&(o.left!==o.top&&(E=o.left,o.left=o.top,o.top=E),o.width!==o.height&&(E=o.width,o.width=o.height,o.height=E)),x.length&&(i=Lp(i,'<g transform="'+x.join(" ")+'">',"</g>"))});const s=n.width,a=n.height,l=o.width,u=o.height;let c,f;s===null?(f=a===null?"1em":a==="auto"?u:a,c=Ba(f,l/u)):(c=s==="auto"?l:s,f=a===null?Ba(c,u/l):a==="auto"?u:a);const h={},m=(y,x)=>{Ip(x)||(h[y]=x.toString())};m("width",c),m("height",f);const d=[o.left,o.top,l,u];return h.viewBox=d.join(" "),{attributes:h,viewBox:d,body:i}}const Rp=/\sid="(\S+)"/g,Vp="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Bp=0;function Up(e,t=Vp){const r=[];let n;for(;n=Rp.exec(e);)r.push(n[1]);if(!r.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(i=>{const s=typeof t=="function"?t(i):t+(Bp++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const li=Object.create(null);function zp(e,t){li[e]=t}function ui(e){return li[e]||li[""]}function ci(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const fi=Object.create(null),en=["https://api.simplesvg.com","https://api.unisvg.com"],Kn=[];for(;en.length>0;)en.length===1||Math.random()>.5?Kn.push(en.shift()):Kn.push(en.pop());fi[""]=ci({resources:["https://api.iconify.design"].concat(Kn)});function qp(e,t){const r=ci(t);return r===null?!1:(fi[e]=r,!0)}function di(e){return fi[e]}let Ua=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function Hp(e,t){const r=di(e);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let o=0;r.resources.forEach(s=>{o=Math.max(o,s.length)});const i=t+".json?icons=";n=r.maxURL-o-r.path.length-i.length}return n}function Wp(e){return e===404}const Kp=(e,t,r)=>{const n=[],o=Hp(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},a=0;return r.forEach((l,u)=>{a+=l.length+1,a>=o&&u>0&&(n.push(s),s={type:i,provider:e,prefix:t,icons:[]},a=l.length),s.icons.push(l)}),n.push(s),n};function Yp(e){if(typeof e=="string"){const t=di(e);if(t)return t.path}return"/"}const Jp={prepare:Kp,send:(e,t,r)=>{if(!Ua){r("abort",424);return}let n=Yp(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});n+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;n+=i.slice(0,1)==="/"?i.slice(1):i;break}default:r("abort",400);return}let o=503;Ua(e+n).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{r(Wp(s)?"abort":"next",s)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?r("abort",i):r("next",o)});return}setTimeout(()=>{r("success",i)})}).catch(()=>{r("next",o)})}};function Gp(e){const t={loaded:[],missing:[],pending:[]},r=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const i=o.provider,s=o.prefix,a=o.name,l=r[i]||(r[i]=Object.create(null)),u=l[s]||(l[s]=ir(i,s));let c;a in u.icons?c=t.loaded:s===""||u.missing.has(a)?c=t.missing:c=t.pending;const f={provider:i,prefix:s,name:a};c.push(f)}),t}function za(e,t){e.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(o=>o.id!==t))})}function Xp(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let r=!1;const n=e.provider,o=e.prefix;t.forEach(i=>{const s=i.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])s.loaded.push({provider:n,prefix:o,name:u});else if(e.missing.has(u))s.missing.push({provider:n,prefix:o,name:u});else return r=!0,!0;return!1}),s.pending.length!==a&&(r||za([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let Zp=0;function Qp(e,t,r){const n=Zp++,o=za.bind(null,r,n);if(!t.pending.length)return o;const i={id:n,icons:t,callback:e,abort:o};return r.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),o}function em(e,t=!0,r=!1){const n=[];return e.forEach(o=>{const i=typeof o=="string"?Hn(o,t,r):o;i&&n.push(i)}),n}var tm={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function rm(e,t,r,n){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let T=e.resources.slice(0);for(s=[];T.length>1;){const C=Math.floor(Math.random()*T.length);s.push(T[C]),T=T.slice(0,C).concat(T.slice(C+1))}s=s.concat(T)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",u=0,c,f=null,h=[],m=[];typeof n=="function"&&m.push(n);function d(){f&&(clearTimeout(f),f=null)}function y(){l==="pending"&&(l="aborted"),d(),h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function x(T,C){C&&(m=[]),typeof T=="function"&&m.push(T)}function b(){return{startTime:a,payload:t,status:l,queriesSent:u,queriesPending:h.length,subscribe:x,abort:y}}function w(){l="failed",m.forEach(T=>{T(void 0,c)})}function v(){h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function E(T,C,O){const j=C!=="success";switch(h=h.filter(D=>D!==T),l){case"pending":break;case"failed":if(j||!e.dataAfterTimeout)return;break;default:return}if(C==="abort"){c=O,w();return}if(j){c=O,h.length||(s.length?k():w());return}if(d(),v(),!e.random){const D=e.resources.indexOf(T.resource);D!==-1&&D!==e.index&&(e.index=D)}l="completed",m.forEach(D=>{D(O)})}function k(){if(l!=="pending")return;d();const T=s.shift();if(T===void 0){if(h.length){f=setTimeout(()=>{d(),l==="pending"&&(v(),w())},e.timeout);return}w();return}const C={status:"pending",resource:T,callback:(O,j)=>{E(C,O,j)}};h.push(C),u++,f=setTimeout(k,e.rotate),r(T,t,C.callback)}return setTimeout(k),b}function qa(e){const t={...tm,...e};let r=[];function n(){r=r.filter(a=>a().status==="pending")}function o(a,l,u){const c=rm(t,a,l,(f,h)=>{n(),u&&u(f,h)});return r.push(c),c}function i(a){return r.find(l=>a(l))||null}return{query:o,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:n}}function Ha(){}const pi=Object.create(null);function nm(e){if(!pi[e]){const t=di(e);if(!t)return;const r=qa(t),n={config:t,redundancy:r};pi[e]=n}return pi[e]}function om(e,t,r){let n,o;if(typeof e=="string"){const i=ui(e);if(!i)return r(void 0,424),Ha;o=i.send;const s=nm(e);s&&(n=s.redundancy)}else{const i=ci(e);if(i){n=qa(i);const s=e.resources?e.resources[0]:"",a=ui(s);a&&(o=a.send)}}return!n||!o?(r(void 0,424),Ha):n.query(t,o,r)().abort}const Wa="iconify2",tn="iconify",Ka=tn+"-count",Ya=tn+"-version",Ja=36e5,im=168,sm=50;function mi(e,t){try{return e.getItem(t)}catch{}}function hi(e,t,r){try{return e.setItem(t,r),!0}catch{}}function Ga(e,t){try{e.removeItem(t)}catch{}}function gi(e,t){return hi(e,Ka,t.toString())}function yi(e){return parseInt(mi(e,Ka))||0}const Yn={local:!0,session:!0},Xa={local:new Set,session:new Set};let bi=!1;function am(e){bi=e}let Jn=typeof window>"u"?{}:window;function Za(e){const t=e+"Storage";try{if(Jn&&Jn[t]&&typeof Jn[t].length=="number")return Jn[t]}catch{}Yn[e]=!1}function Qa(e,t){const r=Za(e);if(!r)return;const n=mi(r,Ya);if(n!==Wa){if(n){const a=yi(r);for(let l=0;l<a;l++)Ga(r,tn+l.toString())}hi(r,Ya,Wa),gi(r,0);return}const o=Math.floor(Date.now()/Ja)-im,i=a=>{const l=tn+a.toString(),u=mi(r,l);if(typeof u=="string"){try{const c=JSON.parse(u);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>o&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,a))return!0}catch{}Ga(r,l)}};let s=yi(r);for(let a=s-1;a>=0;a--)i(a)||(a===s-1?(s--,gi(r,s)):Xa[e].add(a))}function el(){if(!bi){am(!0);for(const e in Yn)Qa(e,t=>{const r=t.data,n=t.provider,o=r.prefix,i=ir(n,o);if(!ai(i,r).length)return!1;const s=r.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,s):s,!0})}}function lm(e,t){const r=e.lastModifiedCached;if(r&&r>=t)return r===t;if(e.lastModifiedCached=t,r)for(const n in Yn)Qa(n,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function um(e,t){bi||el();function r(n){let o;if(!Yn[n]||!(o=Za(n)))return;const i=Xa[n];let s;if(i.size)i.delete(s=Array.from(i).shift());else if(s=yi(o),s>=sm||!gi(o,s+1))return;const a={cached:Math.floor(Date.now()/Ja),provider:e.provider,data:t};return hi(o,tn+s.toString(),JSON.stringify(a))}t.lastModified&&!lm(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),r("local")||r("session"))}function tl(){}function cm(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Xp(e)}))}function fm(e){const t=[],r=[];return e.forEach(n=>{(n.match(Da)?t:r).push(n)}),{valid:t,invalid:r}}function rn(e,t,r,n){function o(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(r&&typeof r=="object")try{if(!ai(e,r).length){o();return}n&&um(e,r)}catch(i){console.error(i)}o(),cm(e)}function rl(e,t){e instanceof Promise?e.then(r=>{t(r)}).catch(()=>{t(null)}):t(e)}function dm(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:r,prefix:n}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const i=e.loadIcon;if(e.loadIcons&&(o.length>1||!i)){rl(e.loadIcons(o,n,r),c=>{rn(e,o,c,!1)});return}if(i){o.forEach(c=>{const f=i(c,n,r);rl(f,h=>{const m=h?{prefix:n,icons:{[c]:h}}:null;rn(e,[c],m,!1)})});return}const{valid:s,invalid:a}=fm(o);if(a.length&&rn(e,a,null,!1),!s.length)return;const l=n.match(Da)?ui(r):null;if(!l){rn(e,s,null,!1);return}l.prepare(r,n,s).forEach(c=>{om(r,c,f=>{rn(e,c.icons,f,!0)})})}))}const pm=(e,t)=>{const r=em(e,!0,Ia()),n=Gp(r);if(!n.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(n.loaded,n.missing,n.pending,tl)}),()=>{l=!1}}const o=Object.create(null),i=[];let s,a;return n.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===a&&u===s)return;s=u,a=c,i.push(ir(u,c));const f=o[u]||(o[u]=Object.create(null));f[c]||(f[c]=[])}),n.pending.forEach(l=>{const{provider:u,prefix:c,name:f}=l,h=ir(u,c),m=h.pendingIcons||(h.pendingIcons=new Set);m.has(f)||(m.add(f),o[u][c].push(f))}),i.forEach(l=>{const u=o[l.provider][l.prefix];u.length&&dm(l,u)}),t?Qp(t,n,i):tl};function mm(e,t){const r={...e};for(const n in t){const o=t[n],i=typeof o;n in Ra?(o===null||o&&(i==="string"||i==="number"))&&(r[n]=o):i===typeof r[n]&&(r[n]=n==="rotate"?o%4:o)}return r}const hm=/[\s,]+/;function gm(e,t){t.split(hm).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function ym(e,t=0){const r=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(r===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(r!==e){let o=0;switch(r){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-r.length));return isNaN(i)?0:(i=i/o,i%1===0?n(i):0)}}return t}function bm(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function xm(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function vm(e){return"data:image/svg+xml,"+xm(e)}function wm(e){return'url("'+vm(e)+'")'}let nn;function Em(){try{nn=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{nn=null}}function Tm(e){return nn===void 0&&Em(),nn?nn.createHTML(e):e}const nl={...Va,inline:!1},_m={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Sm={display:"inline-block"},xi={backgroundColor:"currentColor"},ol={backgroundColor:"transparent"},il={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},sl={WebkitMask:xi,mask:xi,background:ol};for(const e in sl){const t=sl[e];for(const r in il)t[e+r]=il[r]}const Cm={...nl,inline:!0};function al(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const km=(e,t,r)=>{const n=t.inline?Cm:nl,o=mm(n,t),i=t.mode||"svg",s={},a=t.style||{},l={...i==="svg"?_m:{}};if(r){const x=Hn(r,!1,!0);if(x){const b=["iconify"],w=["provider","prefix"];for(const v of w)x[v]&&b.push("iconify--"+x[v]);l.className=b.join(" ")}}for(let x in t){const b=t[x];if(b!==void 0)switch(x){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":l.ref=b;break;case"className":l[x]=(l[x]?l[x]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":o[x]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&gm(o,b);break;case"color":s.color=b;break;case"rotate":typeof b=="string"?o[x]=ym(b):typeof b=="number"&&(o[x]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete l["aria-hidden"];break;default:n[x]===void 0&&(l[x]=b)}}const u=Mp(e,o),c=u.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),i==="svg"){l.style={...s,...a},Object.assign(l,c);let x=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:Tm(Up(u.body,b?()=>b+"ID"+x++:"iconifyReact"))},p.createElement("svg",l)}const{body:f,width:h,height:m}=e,d=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),y=bm(f,{...c,width:h+"",height:m+""});return l.style={...s,"--svg":wm(y),width:al(c.width),height:al(c.height),...Sm,...d?xi:ol,...a},p.createElement("span",l)};if(Ia(!0),zp("",Jp),typeof document<"u"&&typeof window<"u"){el();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!jp(n))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let r in t){const n="IconifyProviders["+r+"] is invalid.";try{const o=t[r];if(typeof o!="object"||!o||o.resources===void 0)continue;qp(r,o)||console.error(n)}catch{console.error(n)}}}}function ll(e){const[t,r]=p.useState(!!e.ssr),[n,o]=p.useState({});function i(m){if(m){const d=e.icon;if(typeof d=="object")return{name:"",data:d};const y=Ma(d);if(y)return{name:d,data:y}}return{name:""}}const[s,a]=p.useState(i(!!e.ssr));function l(){const m=n.callback;m&&(m(),o({}))}function u(m){if(JSON.stringify(s)!==JSON.stringify(m))return l(),a(m),!0}function c(){var m;const d=e.icon;if(typeof d=="object"){u({name:"",data:d});return}const y=Ma(d);if(u({name:d,data:y}))if(y===void 0){const x=pm([d],c);o({callback:x})}else y&&((m=e.onLoad)===null||m===void 0||m.call(e,d))}p.useEffect(()=>(r(!0),l),[]),p.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:h}=s;return h?km({...oi,...h},e,f):e.children?e.children:p.createElement("span",{})}const Om=p.forwardRef((e,t)=>ll({...e,_ref:t}));p.forwardRef((e,t)=>ll({inline:!0,...e,_ref:t}));function Pe({icon:e,iconClass:t}){return g.jsx(g.Fragment,{children:g.jsx(Om,{icon:e,className:t})})}const Fr=({text:e="",isDisabled:t=!1,isLoading:r=!1,btnClass:n="bg-primary-500 text-white",icon:o="",iconPosition:i="left",iconClass:s="text-[20px]",loadingClass:a="",link:l="",div:u=!1,type:c="button",style:f,onClick:h})=>{const m=`
|
|
44
44
|
btn inline-flex justify-center
|
|
45
45
|
${r?" pointer-events-none":""}
|
|
46
46
|
${t?" opacity-40 cursor-not-allowed":""}
|
|
47
47
|
${n}
|
|
48
|
-
`,d=()=>r?g.jsxs(g.Fragment,{children:[g.jsxs("svg",{className:`animate-spin -ml-1 mr-3 h-5 w-5 ${a}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[g.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):g.jsxs("span",{className:"flex items-center",children:[o&&i==="left"&&g.jsx("span",{className:`mr-2 ${s}`,children:g.jsx(Me,{icon:o})}),e&&g.jsx("span",{children:e}),o&&i==="right"&&g.jsx("span",{className:`ml-2 ${s}`,children:g.jsx(Me,{icon:o})})]});return u?g.jsx("div",{className:m,children:d()}):l?g.jsx(ni,{to:l,className:m,children:d()}):g.jsx("button",{disabled:t,type:c,className:m,"data-testid":"btn",onClick:h,style:f,children:d()})},Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function Cm(e,t=0){return(Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]).toLowerCase()}let vi;const Om=new Uint8Array(16);function Fm(){if(!vi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");vi=crypto.getRandomValues.bind(crypto)}return vi(Om)}const ll={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Qe(e,t,r){if(ll.randomUUID&&!t&&!e)return ll.randomUUID();e=e||{};const n=e.random||(e.rng||Fm)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Cm(n)}const ft=p.createContext(void 0),ul={title:"",description:"",id:Qe(),questionData:[]},cl=({children:e})=>{const[t,r]=p.useState({}),[n,o]=p.useState([ul]),[i,s]=p.useState(!1),[a,l]=p.useState(null),[u,c]=p.useState([0]),f=p.useCallback(()=>{},[]),h=p.useCallback(()=>{const T=Qe();o(k=>[...k,{...ul,id:T}]),l(T),c([n.length])},[n]),m=p.useCallback(T=>{o(k=>k.filter(O=>O.id!==T)),l(null)},[]),d=p.useCallback((T,k)=>{const O=n.find(D=>D.id===k),j=O==null?void 0:O.questionData.find(D=>D.id===T);j&&o(D=>D.map(N=>N.id===k?{...N,questionData:N.questionData.filter(L=>j.type==="grid"?L.gridId!==j.id&&L.id!==j.id:L.id!==T)}:N))},[n,o]),y=p.useCallback((T,k)=>{o(O=>O.map(j=>j.id===k?{...j,questionData:T}:j))},[]),x=p.useCallback((T,k)=>{o(O=>O.map(j=>j.id===k?{...j,questionData:[...j.questionData,T]}:j))},[]),b=p.useCallback((T,k,O)=>{o(j=>j.map(D=>D.id===k?{...D,questionData:[...D.questionData.slice(0,O),T,...D.questionData.slice(O)]}:D))},[]),w=p.useCallback((T,k,O)=>{o(j=>j.map(D=>D.id===O?{...D,questionData:D.questionData.map(N=>N.type==="grid"&&N.gridData?{...N,gridData:N.gridData.map((L,R)=>R===T?{...L,...k}:L).concat(T>=N.gridData.length?{...k}:[])}:N)}:D))},[]),v=p.useCallback((T,k)=>{o(O=>O.map(j=>j.id===k?{...j,questionData:j.questionData.map(D=>D.id===T.id?{...D,...T}:D)}:j))},[]),E=p.useCallback((T,k)=>{o(O=>O.map(j=>j.id===k?{...j,...T}:j))},[]);p.useEffect(()=>{console.log("Form Data Updated:",n)},[n]);const C=p.useMemo(()=>({formData:n,setFormData:o,handleDragStop:f,removeElement:d,elementData:t,setElementData:r,updateElementPosition:y,addElement:x,addElementInPosition:b,updateElement:v,addSection:h,removeSection:m,updateSection:E,isDragging:i,setIsDragging:s,selectedSection:a,setSelectedSection:l,activeSections:u,setActiveSections:c,updateGridElement:w}),[n,f,d,t,y,x,b,v,h,m,E,i,a,u,w]);return g.jsx(ft.Provider,{value:C,children:e})},Jn=e=>{const t=typeof window<"u"?localStorage.getItem(e):"";try{return JSON.parse(t)}catch{return t}},fl=(e,t)=>{const r=typeof t!="string"?JSON.stringify(t):t;return localStorage.setItem(e,r)};function Am({onSubmit:e}){const{formData:t}=p.useContext(ft),r=Jn("config");function n(){localStorage.setItem("formData",JSON.stringify(t)),e(t),ce.success("Saved successfully")}return g.jsx("div",{className:"px-[30px] py-4 flex justify-end items-center",children:g.jsx(Or,{onClick:()=>n(),text:"Save Form",style:{background:(r==null?void 0:r.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})})}function jm({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:ue("input-control",e==null?void 0:e.customClass),...r(e.id)})}function dl({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("div",{children:g.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:ue("input-control",e==null?void 0:e.customClass),...r(e==null?void 0:e.id)})})}const pl=typeof document<"u"?p.useLayoutEffect:()=>{};function $m(e){const t=p.useRef(null);return pl(()=>{t.current=e},[e]),p.useCallback((...r)=>{const n=t.current;return n==null?void 0:n(...r)},[])}const nn=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},sr=e=>e&&"window"in e&&e.window===e?e:nn(e).defaultView||window;function Nm(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function Pm(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function ml(e){let t=null;return()=>(t==null&&(t=e()),t)}const Dm=ml(function(){return Pm(/^Mac/i)}),Lm=ml(function(){return Nm(/Android/i)});function Im(e){return e.mozInputSource===0&&e.isTrusted?!0:Lm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class Mm{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=t}}function hl(e){let t=p.useRef({isFocused:!1,observer:null});pl(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]);let r=$m(n=>{e==null||e(n)});return p.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=n.target,i=s=>{t.current.isFocused=!1,o.disabled&&r(new Mm("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[r])}function Rm(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e;const i=p.useCallback(l=>{if(l.target===l.currentTarget)return n&&n(l),o&&o(!1),!0},[n,o]),s=hl(i),a=p.useCallback(l=>{const u=nn(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(r&&r(l),o&&o(!0),s(l))},[o,r,s]);return{focusProps:{onFocus:!t&&(r||o||n)?a:void 0,onBlur:!t&&(n||o)?i:void 0}}}let on=null,wi=new Set,sn=new Map,ar=!1,Ei=!1;const Vm={Tab:!0,Escape:!0};function Ti(e,t){for(let r of wi)r(e,t)}function Bm(e){return!(e.metaKey||!Dm()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Gn(e){ar=!0,Bm(e)&&(on="keyboard",Ti("keyboard",e))}function dt(e){on="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(ar=!0,Ti("pointer",e))}function gl(e){Im(e)&&(ar=!0,on="virtual")}function yl(e){e.target===window||e.target===document||(!ar&&!Ei&&(on="virtual",Ti("virtual",e)),ar=!1,Ei=!1)}function bl(){ar=!1,Ei=!0}function _i(e){if(typeof window>"u"||sn.get(sr(e)))return;const t=sr(e),r=nn(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ar=!0,n.apply(this,arguments)},r.addEventListener("keydown",Gn,!0),r.addEventListener("keyup",Gn,!0),r.addEventListener("click",gl,!0),t.addEventListener("focus",yl,!0),t.addEventListener("blur",bl,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",dt,!0),r.addEventListener("pointermove",dt,!0),r.addEventListener("pointerup",dt,!0)):(r.addEventListener("mousedown",dt,!0),r.addEventListener("mousemove",dt,!0),r.addEventListener("mouseup",dt,!0)),t.addEventListener("beforeunload",()=>{xl(e)},{once:!0}),sn.set(t,{focus:n})}const xl=(e,t)=>{const r=sr(e),n=nn(e);t&&n.removeEventListener("DOMContentLoaded",t),sn.has(r)&&(r.HTMLElement.prototype.focus=sn.get(r).focus,n.removeEventListener("keydown",Gn,!0),n.removeEventListener("keyup",Gn,!0),n.removeEventListener("click",gl,!0),r.removeEventListener("focus",yl,!0),r.removeEventListener("blur",bl,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",dt,!0),n.removeEventListener("pointermove",dt,!0),n.removeEventListener("pointerup",dt,!0)):(n.removeEventListener("mousedown",dt,!0),n.removeEventListener("mousemove",dt,!0),n.removeEventListener("mouseup",dt,!0)),sn.delete(r))};function Um(e){const t=nn(e);let r;return t.readyState!=="loading"?_i(e):(r=()=>{_i(e)},t.addEventListener("DOMContentLoaded",r)),()=>xl(e,r)}typeof document<"u"&&Um();function vl(){return on!=="pointer"}const zm=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function qm(e,t,r){var n;const o=typeof window<"u"?sr(r==null?void 0:r.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?sr(r==null?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?sr(r==null?void 0:r.target).HTMLElement:HTMLElement,a=typeof window<"u"?sr(r==null?void 0:r.target).KeyboardEvent:KeyboardEvent;return e=e||(r==null?void 0:r.target)instanceof o&&!zm.has(r==null||(n=r.target)===null||n===void 0?void 0:n.type)||(r==null?void 0:r.target)instanceof i||(r==null?void 0:r.target)instanceof s&&(r==null?void 0:r.target.isContentEditable),!(e&&t==="keyboard"&&r instanceof a&&!Vm[r.key])}function Hm(e,t,r){_i(),p.useEffect(()=>{let n=(o,i)=>{qm(!!(r!=null&&r.isTextInput),o,i)&&e(vl())};return wi.add(n),()=>{wi.delete(n)}},t)}function Wm(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=p.useRef({isFocusWithin:!1}),s=p.useCallback(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(u),o&&o(!1))},[r,o,i]),a=hl(s),l=p.useCallback(u=>{!i.current.isFocusWithin&&document.activeElement===u.target&&(n&&n(u),o&&o(!0),i.current.isFocusWithin=!0,a(u))},[n,o,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let Xn=!1,Si=0;function ki(){Xn=!0,setTimeout(()=>{Xn=!1},50)}function wl(e){e.pointerType==="touch"&&ki()}function Km(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",wl):document.addEventListener("touchend",ki),Si++,()=>{Si--,!(Si>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",wl):document.removeEventListener("touchend",ki))}}function Ym(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,s]=p.useState(!1),a=p.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;p.useEffect(Km,[]);let{hoverProps:l,triggerHoverEnd:u}=p.useMemo(()=>{let c=(m,d)=>{if(a.pointerType=d,o||d==="touch"||a.isHovered||!m.currentTarget.contains(m.target))return;a.isHovered=!0;let y=m.currentTarget;a.target=y,t&&t({type:"hoverstart",target:y,pointerType:d}),r&&r(!0),s(!0)},f=(m,d)=>{if(a.pointerType="",a.target=null,d==="touch"||!a.isHovered)return;a.isHovered=!1;let y=m.currentTarget;n&&n({type:"hoverend",target:y,pointerType:d}),r&&r(!1),s(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=m=>{Xn&&m.pointerType==="mouse"||c(m,m.pointerType)},h.onPointerLeave=m=>{!o&&m.currentTarget.contains(m.target)&&f(m,m.pointerType)}):(h.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=m=>{!a.ignoreEmulatedMouseEvents&&!Xn&&c(m,"mouse"),a.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=m=>{!o&&m.currentTarget.contains(m.target)&&f(m,"mouse")}),{hoverProps:h,triggerHoverEnd:f}},[t,r,n,o,a]);return p.useEffect(()=>{o&&u({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:l,isHovered:i}}function Jm(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,o=p.useRef({isFocused:!1,isFocusVisible:t||vl()}),[i,s]=p.useState(!1),[a,l]=p.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=p.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),c=p.useCallback(m=>{o.current.isFocused=m,s(m),u()},[u]);Hm(m=>{o.current.isFocusVisible=m,u()},[],{isTextInput:r});let{focusProps:f}=Rm({isDisabled:n,onFocusChange:c}),{focusWithinProps:h}=Wm({isDisabled:!n,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:a,focusProps:n?h:f}}var Gm=Object.defineProperty,Xm=(e,t,r)=>t in e?Gm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ci=(e,t,r)=>(Xm(e,typeof t!="symbol"?t+"":t,r),r);let Zm=class{constructor(){Ci(this,"current",this.detect()),Ci(this,"handoffState","pending"),Ci(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},lr=new Zm;function an(e){return lr.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function El(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Vt(){let e=[],t={addEventListener(r,n,o,i){return r.addEventListener(n,o,i),t.add(()=>r.removeEventListener(n,o,i))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return El(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,o){let i=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:o}),this.add(()=>{Object.assign(r.style,{[n]:i})})},group(r){let n=Vt();return r(n),this.add(()=>n.dispose())},add(r){return e.includes(r)||e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let o of e.splice(n,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function ur(){let[e]=p.useState(Vt);return p.useEffect(()=>()=>e.dispose(),[e]),e}let be=(e,t)=>{lr.isServer?p.useEffect(e,t):p.useLayoutEffect(e,t)};function cr(e){let t=p.useRef(e);return be(()=>{t.current=e},[e]),t}let te=function(e){let t=cr(e);return p.useCallback((...r)=>t.current(...r),[t])};function Qm(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function eh(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function th({disabled:e=!1}={}){let t=p.useRef(null),[r,n]=p.useState(!1),o=ur(),i=te(()=>{t.current=null,n(!1),o.dispose()}),s=te(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,n(!0);{let l=an(a.currentTarget);o.addEventListener(l,"pointerup",i,!1),o.addEventListener(l,"pointermove",u=>{if(t.current){let c=Qm(u);n(eh(c,t.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",i,!1)}}});return{pressed:r,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}let rh=p.createContext(void 0);function Oi(){return p.useContext(rh)}function Fi(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function gt(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,gt),n}var Zn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Zn||{}),Kt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Kt||{});function st(){let e=oh();return p.useCallback(t=>nh({mergeRefs:e,...t}),[e])}function nh({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??ih;let l=Tl(t,e);if(i)return Qn(l,r,n,s,a);let u=o??0;if(u&2){let{static:c=!1,...f}=l;if(c)return Qn(f,r,n,s,a)}if(u&1){let{unmount:c=!0,...f}=l;return gt(c?0:1,{0(){return null},1(){return Qn({...f,hidden:!0,style:{display:"none"}},r,n,s,a)}})}return Qn(l,r,n,s,a)}function Qn(e,t={},r,n,o){let{as:i=r,children:s,refName:a="ref",...l}=Ai(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},c=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(t){let h=!1,m=[];for(let[d,y]of Object.entries(t))typeof y=="boolean"&&(h=!0),y===!0&&m.push(d.replace(/([A-Z])/g,x=>`-${x.toLowerCase()}`));if(h){f["data-headlessui-state"]=m.join(" ");for(let d of m)f[`data-${d}`]=""}}if(i===p.Fragment&&(Object.keys(Yt(l)).length>0||Object.keys(Yt(f)).length>0))if(!p.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(Yt(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Yt(l)).concat(Object.keys(Yt(f))).map(h=>` - ${h}`).join(`
|
|
48
|
+
`,d=()=>r?g.jsxs(g.Fragment,{children:[g.jsxs("svg",{className:`animate-spin -ml-1 mr-3 h-5 w-5 ${a}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[g.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):g.jsxs("span",{className:"flex items-center",children:[o&&i==="left"&&g.jsx("span",{className:`mr-2 ${s}`,children:g.jsx(Pe,{icon:o})}),e&&g.jsx("span",{children:e}),o&&i==="right"&&g.jsx("span",{className:`ml-2 ${s}`,children:g.jsx(Pe,{icon:o})})]});return u?g.jsx("div",{className:m,children:d()}):l?g.jsx(ni,{to:l,className:m,children:d()}):g.jsx("button",{disabled:t,type:c,className:m,"data-testid":"btn",onClick:h,style:f,children:d()})},Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function Fm(e,t=0){return(Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]).toLowerCase()}let vi;const Am=new Uint8Array(16);function jm(){if(!vi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");vi=crypto.getRandomValues.bind(crypto)}return vi(Am)}const ul={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Qe(e,t,r){if(ul.randomUUID&&!t&&!e)return ul.randomUUID();e=e||{};const n=e.random||(e.rng||jm)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Fm(n)}const ft=p.createContext(void 0),cl={title:"",description:"",id:Qe(),questionData:[]},fl=({children:e})=>{const[t,r]=p.useState({}),[n,o]=p.useState([cl]),[i,s]=p.useState(!1),[a,l]=p.useState(null),[u,c]=p.useState([0]),f=p.useCallback(()=>{},[]),h=p.useCallback(()=>{const T=Qe();o(C=>[...C,{...cl,id:T}]),l(T),c([n.length])},[n]),m=p.useCallback(T=>{o(C=>C.filter(O=>O.id!==T)),l(null)},[]),d=p.useCallback((T,C)=>{const O=n.find(D=>D.id===C),j=O==null?void 0:O.questionData.find(D=>D.id===T);j&&o(D=>D.map(N=>N.id===C?{...N,questionData:N.questionData.filter(L=>j.type==="grid"?L.gridId!==j.id&&L.id!==j.id:L.id!==T)}:N))},[n,o]),y=p.useCallback((T,C)=>{o(O=>O.map(j=>j.id===C?{...j,questionData:T}:j))},[]),x=p.useCallback((T,C)=>{o(O=>O.map(j=>j.id===C?{...j,questionData:[...j.questionData,T]}:j))},[]),b=p.useCallback((T,C,O)=>{o(j=>j.map(D=>D.id===C?{...D,questionData:[...D.questionData.slice(0,O),T,...D.questionData.slice(O)]}:D))},[]),w=p.useCallback((T,C,O)=>{o(j=>j.map(D=>D.id===O?{...D,questionData:D.questionData.map(N=>N.type==="grid"&&N.gridData?{...N,gridData:N.gridData.map((L,R)=>R===T?{...L,...C}:L).concat(T>=N.gridData.length?{...C}:[])}:N)}:D))},[]),v=p.useCallback((T,C)=>{o(O=>O.map(j=>j.id===C?{...j,questionData:j.questionData.map(D=>D.id===T.id?{...D,...T}:D)}:j))},[]),E=p.useCallback((T,C)=>{o(O=>O.map(j=>j.id===C?{...j,...T}:j))},[]);p.useEffect(()=>{console.log("Form Data Updated:",n)},[n]);const k=p.useMemo(()=>({formData:n,setFormData:o,handleDragStop:f,removeElement:d,elementData:t,setElementData:r,updateElementPosition:y,addElement:x,addElementInPosition:b,updateElement:v,addSection:h,removeSection:m,updateSection:E,isDragging:i,setIsDragging:s,selectedSection:a,setSelectedSection:l,activeSections:u,setActiveSections:c,updateGridElement:w}),[n,f,d,t,y,x,b,v,h,m,E,i,a,u,w]);return g.jsx(ft.Provider,{value:k,children:e})},sr=e=>{const t=typeof window<"u"?localStorage.getItem(e):"";try{return JSON.parse(t)}catch{return t}},dl=(e,t)=>{const r=typeof t!="string"?JSON.stringify(t):t;return localStorage.setItem(e,r)};function $m({onSubmit:e}){const{formData:t}=p.useContext(ft),r=sr("config");function n(){localStorage.setItem("formData",JSON.stringify(t)),e(t),ce.success("Saved successfully")}return g.jsx("div",{className:"px-[30px] py-4 flex justify-end items-center",children:g.jsx(Fr,{onClick:()=>n(),text:"Save Form",style:{background:(r==null?void 0:r.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})})}function Nm({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:se("input-control",e==null?void 0:e.customClass),...r(e.id)})}function pl({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("div",{children:g.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:se("input-control",e==null?void 0:e.customClass),...r(e==null?void 0:e.id)})})}const ml=typeof document<"u"?p.useLayoutEffect:()=>{};function Pm(e){const t=p.useRef(null);return ml(()=>{t.current=e},[e]),p.useCallback((...r)=>{const n=t.current;return n==null?void 0:n(...r)},[])}const on=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},ar=e=>e&&"window"in e&&e.window===e?e:on(e).defaultView||window;function Dm(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function Lm(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function hl(e){let t=null;return()=>(t==null&&(t=e()),t)}const Im=hl(function(){return Lm(/^Mac/i)}),Mm=hl(function(){return Dm(/Android/i)});function Rm(e){return e.mozInputSource===0&&e.isTrusted?!0:Mm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class Vm{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=t}}function gl(e){let t=p.useRef({isFocused:!1,observer:null});ml(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]);let r=Pm(n=>{e==null||e(n)});return p.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=n.target,i=s=>{t.current.isFocused=!1,o.disabled&&r(new Vm("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[r])}function Bm(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e;const i=p.useCallback(l=>{if(l.target===l.currentTarget)return n&&n(l),o&&o(!1),!0},[n,o]),s=gl(i),a=p.useCallback(l=>{const u=on(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(r&&r(l),o&&o(!0),s(l))},[o,r,s]);return{focusProps:{onFocus:!t&&(r||o||n)?a:void 0,onBlur:!t&&(n||o)?i:void 0}}}let sn=null,wi=new Set,an=new Map,lr=!1,Ei=!1;const Um={Tab:!0,Escape:!0};function Ti(e,t){for(let r of wi)r(e,t)}function zm(e){return!(e.metaKey||!Im()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Gn(e){lr=!0,zm(e)&&(sn="keyboard",Ti("keyboard",e))}function dt(e){sn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(lr=!0,Ti("pointer",e))}function yl(e){Rm(e)&&(lr=!0,sn="virtual")}function bl(e){e.target===window||e.target===document||(!lr&&!Ei&&(sn="virtual",Ti("virtual",e)),lr=!1,Ei=!1)}function xl(){lr=!1,Ei=!0}function _i(e){if(typeof window>"u"||an.get(ar(e)))return;const t=ar(e),r=on(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){lr=!0,n.apply(this,arguments)},r.addEventListener("keydown",Gn,!0),r.addEventListener("keyup",Gn,!0),r.addEventListener("click",yl,!0),t.addEventListener("focus",bl,!0),t.addEventListener("blur",xl,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",dt,!0),r.addEventListener("pointermove",dt,!0),r.addEventListener("pointerup",dt,!0)):(r.addEventListener("mousedown",dt,!0),r.addEventListener("mousemove",dt,!0),r.addEventListener("mouseup",dt,!0)),t.addEventListener("beforeunload",()=>{vl(e)},{once:!0}),an.set(t,{focus:n})}const vl=(e,t)=>{const r=ar(e),n=on(e);t&&n.removeEventListener("DOMContentLoaded",t),an.has(r)&&(r.HTMLElement.prototype.focus=an.get(r).focus,n.removeEventListener("keydown",Gn,!0),n.removeEventListener("keyup",Gn,!0),n.removeEventListener("click",yl,!0),r.removeEventListener("focus",bl,!0),r.removeEventListener("blur",xl,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",dt,!0),n.removeEventListener("pointermove",dt,!0),n.removeEventListener("pointerup",dt,!0)):(n.removeEventListener("mousedown",dt,!0),n.removeEventListener("mousemove",dt,!0),n.removeEventListener("mouseup",dt,!0)),an.delete(r))};function qm(e){const t=on(e);let r;return t.readyState!=="loading"?_i(e):(r=()=>{_i(e)},t.addEventListener("DOMContentLoaded",r)),()=>vl(e,r)}typeof document<"u"&&qm();function wl(){return sn!=="pointer"}const Hm=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Wm(e,t,r){var n;const o=typeof window<"u"?ar(r==null?void 0:r.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?ar(r==null?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?ar(r==null?void 0:r.target).HTMLElement:HTMLElement,a=typeof window<"u"?ar(r==null?void 0:r.target).KeyboardEvent:KeyboardEvent;return e=e||(r==null?void 0:r.target)instanceof o&&!Hm.has(r==null||(n=r.target)===null||n===void 0?void 0:n.type)||(r==null?void 0:r.target)instanceof i||(r==null?void 0:r.target)instanceof s&&(r==null?void 0:r.target.isContentEditable),!(e&&t==="keyboard"&&r instanceof a&&!Um[r.key])}function Km(e,t,r){_i(),p.useEffect(()=>{let n=(o,i)=>{Wm(!!(r!=null&&r.isTextInput),o,i)&&e(wl())};return wi.add(n),()=>{wi.delete(n)}},t)}function Ym(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=p.useRef({isFocusWithin:!1}),s=p.useCallback(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(u),o&&o(!1))},[r,o,i]),a=gl(s),l=p.useCallback(u=>{!i.current.isFocusWithin&&document.activeElement===u.target&&(n&&n(u),o&&o(!0),i.current.isFocusWithin=!0,a(u))},[n,o,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let Xn=!1,Si=0;function Ci(){Xn=!0,setTimeout(()=>{Xn=!1},50)}function El(e){e.pointerType==="touch"&&Ci()}function Jm(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",El):document.addEventListener("touchend",Ci),Si++,()=>{Si--,!(Si>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",El):document.removeEventListener("touchend",Ci))}}function Gm(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,s]=p.useState(!1),a=p.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;p.useEffect(Jm,[]);let{hoverProps:l,triggerHoverEnd:u}=p.useMemo(()=>{let c=(m,d)=>{if(a.pointerType=d,o||d==="touch"||a.isHovered||!m.currentTarget.contains(m.target))return;a.isHovered=!0;let y=m.currentTarget;a.target=y,t&&t({type:"hoverstart",target:y,pointerType:d}),r&&r(!0),s(!0)},f=(m,d)=>{if(a.pointerType="",a.target=null,d==="touch"||!a.isHovered)return;a.isHovered=!1;let y=m.currentTarget;n&&n({type:"hoverend",target:y,pointerType:d}),r&&r(!1),s(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=m=>{Xn&&m.pointerType==="mouse"||c(m,m.pointerType)},h.onPointerLeave=m=>{!o&&m.currentTarget.contains(m.target)&&f(m,m.pointerType)}):(h.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=m=>{!a.ignoreEmulatedMouseEvents&&!Xn&&c(m,"mouse"),a.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=m=>{!o&&m.currentTarget.contains(m.target)&&f(m,"mouse")}),{hoverProps:h,triggerHoverEnd:f}},[t,r,n,o,a]);return p.useEffect(()=>{o&&u({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:l,isHovered:i}}function Xm(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,o=p.useRef({isFocused:!1,isFocusVisible:t||wl()}),[i,s]=p.useState(!1),[a,l]=p.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=p.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),c=p.useCallback(m=>{o.current.isFocused=m,s(m),u()},[u]);Km(m=>{o.current.isFocusVisible=m,u()},[],{isTextInput:r});let{focusProps:f}=Bm({isDisabled:n,onFocusChange:c}),{focusWithinProps:h}=Ym({isDisabled:!n,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:a,focusProps:n?h:f}}var Zm=Object.defineProperty,Qm=(e,t,r)=>t in e?Zm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ki=(e,t,r)=>(Qm(e,typeof t!="symbol"?t+"":t,r),r);let eh=class{constructor(){ki(this,"current",this.detect()),ki(this,"handoffState","pending"),ki(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ur=new eh;function ln(e){return ur.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function Tl(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Vt(){let e=[],t={addEventListener(r,n,o,i){return r.addEventListener(n,o,i),t.add(()=>r.removeEventListener(n,o,i))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return Tl(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,o){let i=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:o}),this.add(()=>{Object.assign(r.style,{[n]:i})})},group(r){let n=Vt();return r(n),this.add(()=>n.dispose())},add(r){return e.includes(r)||e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let o of e.splice(n,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function cr(){let[e]=p.useState(Vt);return p.useEffect(()=>()=>e.dispose(),[e]),e}let be=(e,t)=>{ur.isServer?p.useEffect(e,t):p.useLayoutEffect(e,t)};function fr(e){let t=p.useRef(e);return be(()=>{t.current=e},[e]),t}let te=function(e){let t=fr(e);return p.useCallback((...r)=>t.current(...r),[t])};function th(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function rh(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function nh({disabled:e=!1}={}){let t=p.useRef(null),[r,n]=p.useState(!1),o=cr(),i=te(()=>{t.current=null,n(!1),o.dispose()}),s=te(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,n(!0);{let l=ln(a.currentTarget);o.addEventListener(l,"pointerup",i,!1),o.addEventListener(l,"pointermove",u=>{if(t.current){let c=th(u);n(rh(c,t.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",i,!1)}}});return{pressed:r,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}let oh=p.createContext(void 0);function Oi(){return p.useContext(oh)}function Fi(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function gt(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,gt),n}var Zn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Zn||{}),Kt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Kt||{});function st(){let e=sh();return p.useCallback(t=>ih({mergeRefs:e,...t}),[e])}function ih({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??ah;let l=_l(t,e);if(i)return Qn(l,r,n,s,a);let u=o??0;if(u&2){let{static:c=!1,...f}=l;if(c)return Qn(f,r,n,s,a)}if(u&1){let{unmount:c=!0,...f}=l;return gt(c?0:1,{0(){return null},1(){return Qn({...f,hidden:!0,style:{display:"none"}},r,n,s,a)}})}return Qn(l,r,n,s,a)}function Qn(e,t={},r,n,o){let{as:i=r,children:s,refName:a="ref",...l}=Ai(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},c=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(t){let h=!1,m=[];for(let[d,y]of Object.entries(t))typeof y=="boolean"&&(h=!0),y===!0&&m.push(d.replace(/([A-Z])/g,x=>`-${x.toLowerCase()}`));if(h){f["data-headlessui-state"]=m.join(" ");for(let d of m)f[`data-${d}`]=""}}if(i===p.Fragment&&(Object.keys(Yt(l)).length>0||Object.keys(Yt(f)).length>0))if(!p.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(Yt(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Yt(l)).concat(Object.keys(Yt(f))).map(h=>` - ${h}`).join(`
|
|
49
49
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(h=>` - ${h}`).join(`
|
|
50
50
|
`)].join(`
|
|
51
|
-
`))}else{let h=c.props,m=h==null?void 0:h.className,d=typeof m=="function"?(...b)=>Fi(m(...b),l.className):Fi(m,l.className),y=d?{className:d}:{},x=Tl(c.props,Yt(Ai(l,["ref"])));for(let b in f)b in x&&delete f[b];return p.cloneElement(c,Object.assign({},x,f,u,{ref:o(sh(c),u.ref)},y))}return p.createElement(i,Object.assign({},Ai(l,["ref"]),i!==p.Fragment&&u,i!==p.Fragment&&f),c)}function oh(){let e=p.useRef([]),t=p.useCallback(r=>{for(let n of e.current)n!=null&&(typeof n=="function"?n(r):n.current=r)},[]);return(...r)=>{if(!r.every(n=>n==null))return e.current=r,t}}function ih(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function Tl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let n in r)Object.assign(t,{[n](o,...i){let s=r[n];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function _l(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];for(let n in r)Object.assign(t,{[n](...o){let i=r[n];for(let s of i)s==null||s(...o)}});return t}function et(e){var t;return Object.assign(p.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Yt(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Ai(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function sh(e){return p.version.split(".")[0]>="19"?e.props.ref:e.ref}function ah(e,t,r){let[n,o]=p.useState(r),i=e!==void 0,s=p.useRef(i),a=p.useRef(!1),l=p.useRef(!1);return i&&!s.current&&!a.current?(a.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&s.current&&!l.current&&(l.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:n,te(u=>(i||o(u),t==null?void 0:t(u)))]}function lh(e){let[t]=p.useState(e);return t}function Sl(e={},t=null,r=[]){for(let[n,o]of Object.entries(e))Cl(r,kl(t,n),o);return r}function kl(e,t){return e?e+"["+t+"]":t}function Cl(e,t,r){if(Array.isArray(r))for(let[n,o]of r.entries())Cl(e,kl(t,n.toString()),o);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):Sl(r,t,e)}function uh(e){var t,r;let n=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(n){for(let o of n.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(r=n.requestSubmit)==null||r.call(n)}}let ch="span";var ji=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ji||{});function fh(e,t){var r;let{features:n=1,...o}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:(r=o["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return st()({ourProps:i,theirProps:o,slot:{},defaultTag:ch,name:"Hidden"})}let Ol=et(fh),dh=p.createContext(null);function ph({children:e}){let t=p.useContext(dh);if(!t)return p.createElement(p.Fragment,null,e);let{target:r}=t;return r?_t.createPortal(p.createElement(p.Fragment,null,e),r):null}function mh({data:e,form:t,disabled:r,onReset:n,overrides:o}){let[i,s]=p.useState(null),a=ur();return p.useEffect(()=>{if(n&&i)return a.addEventListener(i,"reset",n)},[i,t,n]),p.createElement(ph,null,p.createElement(hh,{setForm:s,formId:t}),Sl(e).map(([l,u])=>p.createElement(Ol,{features:ji.Hidden,...Yt({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:r,name:l,value:u,...o})})))}function hh({setForm:e,formId:t}){return p.useEffect(()=>{if(t){let r=document.getElementById(t);r&&e(r)}},[e,t]),t?null:p.createElement(Ol,{features:ji.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:r=>{if(!r)return;let n=r.closest("form");n&&e(n)}})}let gh=p.createContext(void 0);function Fl(){return p.useContext(gh)}function yh(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&bh(r)?!1:n}function bh(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Al=Symbol();function xh(e,t=!0){return Object.assign(e,{[Al]:t})}function pt(...e){let t=p.useRef(e);p.useEffect(()=>{t.current=e},[e]);let r=te(n=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return e.every(n=>n==null||(n==null?void 0:n[Al]))?void 0:r}let $i=p.createContext(null);$i.displayName="DescriptionContext";function jl(){let e=p.useContext($i);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,jl),t}return e}function vh(){var e,t;return(t=(e=p.useContext($i))==null?void 0:e.value)!=null?t:void 0}let wh="p";function Eh(e,t){let r=p.useId(),n=Oi(),{id:o=`headlessui-description-${r}`,...i}=e,s=jl(),a=pt(t);be(()=>s.register(o),[o,s.register]);let l=n||!1,u=p.useMemo(()=>({...s.slot,disabled:l}),[s.slot,l]),c={ref:a,...s.props,id:o};return st()({ourProps:c,theirProps:i,slot:u,defaultTag:wh,name:s.name||"Description"})}let Th=et(Eh);Object.assign(Th,{});var Pe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Pe||{});let eo=p.createContext(null);eo.displayName="LabelContext";function $l(){let e=p.useContext(eo);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,$l),t}return e}function Nl(e){var t,r,n;let o=(r=(t=p.useContext(eo))==null?void 0:t.value)!=null?r:void 0;return((n=e==null?void 0:e.length)!=null?n:0)>0?[o,...e].filter(Boolean).join(" "):o}function _h({inherit:e=!1}={}){let t=Nl(),[r,n]=p.useState([]),o=e?[t,...r].filter(Boolean):r;return[o.length>0?o.join(" "):void 0,p.useMemo(()=>function(i){let s=te(l=>(n(u=>[...u,l]),()=>n(u=>{let c=u.slice(),f=c.indexOf(l);return f!==-1&&c.splice(f,1),c}))),a=p.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return p.createElement(eo.Provider,{value:a},i.children)},[n])]}let Sh="label";function kh(e,t){var r;let n=p.useId(),o=$l(),i=Fl(),s=Oi(),{id:a=`headlessui-label-${n}`,htmlFor:l=i??((r=o.props)==null?void 0:r.htmlFor),passive:u=!1,...c}=e,f=pt(t);be(()=>o.register(a),[a,o.register]);let h=te(x=>{let b=x.currentTarget;if(b instanceof HTMLLabelElement&&x.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(x),b instanceof HTMLLabelElement){let w=document.getElementById(b.htmlFor);if(w){let v=w.getAttribute("disabled");if(v==="true"||v==="")return;let E=w.getAttribute("aria-disabled");if(E==="true"||E==="")return;(w instanceof HTMLInputElement&&(w.type==="radio"||w.type==="checkbox")||w.role==="radio"||w.role==="checkbox"||w.role==="switch")&&w.click(),w.focus({preventScroll:!0})}}}),m=s||!1,d=p.useMemo(()=>({...o.slot,disabled:m}),[o.slot,m]),y={ref:f,...o.props,id:a,htmlFor:l,onClick:h};return u&&("onClick"in y&&(delete y.htmlFor,delete y.onClick),"onClick"in c&&delete c.onClick),st()({ourProps:y,theirProps:c,slot:d,defaultTag:l?Sh:"div",name:o.name||"Label"})}let Ch=et(kh),Oh=Object.assign(Ch,{});function Fh(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Ah(e=Fh){return p.useCallback((t,r)=>{if(typeof e=="string"){let n=e;return(t==null?void 0:t[n])===(r==null?void 0:r[n])}return e(t,r)},[e])}function jh(e){if(e===null)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}function $h(e,t=!1){let[r,n]=p.useReducer(()=>({}),{}),o=p.useMemo(()=>jh(e),[e,r]);return be(()=>{if(!e)return;let i=new ResizeObserver(n);return i.observe(e),()=>{i.disconnect()}},[e]),t?{width:`${o.width}px`,height:`${o.height}px`}:o}let Nh=class extends Map{constructor(t){super(),this.factory=t}get(t){let r=super.get(t);return r===void 0&&(r=this.factory(t),this.set(t,r)),r}};function Pl(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...i){let s=t[o].call(r,...i);s&&(r=s,n.forEach(a=>a()))}}}function Dl(e){return p.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}let Ph=new Nh(()=>Pl(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let r=this.slice();return r.splice(t,1),r}}));function Ni(e,t){let r=Ph.get(t),n=p.useId(),o=Dl(r);if(be(()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)},[r,e]),!e)return!1;let i=o.indexOf(n),s=o.length;return i===-1&&(i=s,s+=1),i===s-1}let Pi=new Map,ln=new Map;function Ll(e){var t;let r=(t=ln.get(e))!=null?t:0;return ln.set(e,r+1),r!==0?()=>Il(e):(Pi.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Il(e))}function Il(e){var t;let r=(t=ln.get(e))!=null?t:1;if(r===1?ln.delete(e):ln.set(e,r-1),r!==1)return;let n=Pi.get(e);n&&(n["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,Pi.delete(e))}function Dh(e,{allowed:t,disallowed:r}={}){let n=Ni(e,"inert-others");be(()=>{var o,i;if(!n)return;let s=Vt();for(let l of(o=r==null?void 0:r())!=null?o:[])l&&s.add(Ll(l));let a=(i=t==null?void 0:t())!=null?i:[];for(let l of a){if(!l)continue;let u=an(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let f of c.children)a.some(h=>f.contains(h))||s.add(Ll(f));c=c.parentElement}}return s.dispose},[n,t,r])}function Lh(e,t,r){let n=cr(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&r()});p.useEffect(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=Vt();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,n,e])}let Di=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Ih=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Li=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Li||{}),Mh=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Mh||{}),Rh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Rh||{});function Ml(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Di)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function Vh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ih)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ii=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ii||{});function Rl(e,t=0){var r;return e===((r=an(e))==null?void 0:r.body)?!1:gt(t,{0(){return e.matches(Di)},1(){let n=e;for(;n!==null;){if(n.matches(Di))return!0;n=n.parentElement}return!1}})}var Bh=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Bh||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Uh=["textarea","input"].join(",");function zh(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Uh))!=null?r:!1}function Vl(e,t=r=>r){return e.slice().sort((r,n)=>{let o=t(r),i=t(n);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function qh(e,t){return Hh(Ml(),t,{relativeTo:e})}function Hh(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?r?Vl(e):e:t&64?Vh(e):Ml(e);o.length>0&&s.length>1&&(s=s.filter(m=>!o.some(d=>d!=null&&"current"in d?(d==null?void 0:d.current)===m:d===m))),n=n??i.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(n))-1;if(t&4)return Math.max(0,s.indexOf(n))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,f=s.length,h;do{if(c>=f||c+f<=0)return 0;let m=l+c;if(t&16)m=(m+f)%f;else{if(m<0)return 3;if(m>=f)return 1}h=s[m],h==null||h.focus(u),c+=a}while(h!==i.activeElement);return t&6&&zh(h)&&h.select(),2}function Bl(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Wh(){return/Android/gi.test(window.navigator.userAgent)}function Kh(){return Bl()||Wh()}function un(e,t,r,n){let o=cr(r);p.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,n),()=>document.removeEventListener(t,i,n)},[e,t,n])}function Yh(e,t,r,n){let o=cr(r);p.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,n),()=>window.removeEventListener(t,i,n)},[e,t,n])}const Ul=30;function Jh(e,t,r){let n=Ni(e,"outside-click"),o=cr(r),i=p.useCallback(function(l,u){if(l.defaultPrevented)return;let c=u(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(m){return typeof m=="function"?h(m()):Array.isArray(m)||m instanceof Set?m:[m]}(t);for(let h of f)if(h!==null&&(h.contains(c)||l.composed&&l.composedPath().includes(h)))return;return!Rl(c,Ii.Loose)&&c.tabIndex!==-1&&l.preventDefault(),o.current(l,c)},[o,t]),s=p.useRef(null);un(n,"pointerdown",l=>{var u,c;s.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),un(n,"mousedown",l=>{var u,c;s.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),un(n,"click",l=>{Kh()||s.current&&(i(l,()=>s.current),s.current=null)},!0);let a=p.useRef({x:0,y:0});un(n,"touchstart",l=>{a.current.x=l.touches[0].clientX,a.current.y=l.touches[0].clientY},!0),un(n,"touchend",l=>{let u={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(u.x-a.current.x)>=Ul||Math.abs(u.y-a.current.y)>=Ul))return i(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),Yh(n,"blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Mi(...e){return p.useMemo(()=>an(...e),[...e])}function Gh(e,t){return p.useMemo(()=>{var r;if(e.type)return e.type;let n=(r=e.as)!=null?r:"button";if(typeof n=="string"&&n.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function Xh(){let e;return{before({doc:t}){var r;let n=t.documentElement,o=(r=t.defaultView)!=null?r:window;e=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),i=Math.max(0,e-o);r.style(n,"paddingRight",`${i}px`)}}}function Zh(){return Bl()?{before({doc:e,d:t,meta:r}){function n(o){return r.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Vt();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=e.querySelector(u);c&&!n(c)&&(s=c)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(n(a.target)){let l=a.target;for(;l.parentElement&&n(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(n(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;i!==l&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function Qh(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function eg(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let fr=Pl(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Vt(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:eg(r)},o=[Zh(),Xh(),Qh()];o.forEach(({before:i})=>i==null?void 0:i(n)),o.forEach(({after:i})=>i==null?void 0:i(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});fr.subscribe(()=>{let e=fr.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!n||!o&&n)&&fr.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&fr.dispatch("TEARDOWN",r)}});function tg(e,t,r=()=>({containers:[]})){let n=Dl(fr),o=t?n.get(t):void 0,i=o?o.count>0:!1;return be(()=>{if(!(!t||!e))return fr.dispatch("PUSH",t,r),()=>fr.dispatch("POP",t,r)},[e,t]),i}function rg(e,t,r=()=>[document.body]){let n=Ni(e,"scroll-lock");tg(n,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],r]}})}function zl(e){return[e.screenX,e.screenY]}function ng(){let e=p.useRef([-1,-1]);return{wasMoved(t){let r=zl(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=zl(t)}}}function og(e=0){let[t,r]=p.useState(e),n=p.useCallback(l=>r(l),[t]),o=p.useCallback(l=>r(u=>u|l),[t]),i=p.useCallback(l=>(t&l)===l,[t]),s=p.useCallback(l=>r(u=>u&~l),[r]),a=p.useCallback(l=>r(u=>u^l),[r]);return{flags:t,setFlag:n,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var ql,Hl;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((ql=process==null?void 0:process.env)==null?void 0:ql.NODE_ENV)==="test"&&typeof((Hl=Element==null?void 0:Element.prototype)==null?void 0:Hl.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
52
|
-
`)),[]});var ig=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(ig||{});function Wl(e){let t={};for(let r in e)e[r]===!0&&(t[`data-${r}`]="");return t}function Kl(e,t,r,n){let[o,i]=p.useState(r),{hasFlag:s,addFlag:a,removeFlag:l}=og(e&&o?3:0),u=p.useRef(!1),c=p.useRef(!1),f=ur();return be(()=>{var h;if(e){if(r&&i(!0),!t){r&&a(3);return}return(h=n==null?void 0:n.start)==null||h.call(n,r),sg(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(r?(a(3),l(4)):(a(4),l(2)))},run(){c.current?r?(l(3),a(4)):(l(4),a(3)):r?l(1):a(1)},done(){var m;c.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),r||i(!1),(m=n==null?void 0:n.end)==null||m.call(n,r))}})}},[e,r,t,f]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function sg(e,{prepare:t,run:r,done:n,inFlight:o}){let i=Vt();return lg(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{r(),i.requestAnimationFrame(()=>{i.add(ag(e,n))})}),i.dispose}function ag(e,t){var r,n;let o=Vt();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let s=(n=(r=e.getAnimations)==null?void 0:r.call(e).filter(a=>a instanceof CSSTransition))!=null?n:[];return s.length===0?(t(),o.dispose):(Promise.allSettled(s.map(a=>a.finished)).then(()=>{i||t()}),o.dispose)}function lg(e,{inFlight:t,prepare:r}){if(t!=null&&t.current){r();return}let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}function to(){return typeof window<"u"}function Fr(e){return Yl(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(Yl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Yl(e){return to()?e instanceof Node||e instanceof at(e).Node:!1}function ze(e){return to()?e instanceof Element||e instanceof at(e).Element:!1}function kt(e){return to()?e instanceof HTMLElement||e instanceof at(e).HTMLElement:!1}function Jl(e){return!to()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}function cn(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function ug(e){return["table","td","th"].includes(Fr(e))}function ro(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ri(e){const t=Vi(),r=ze(e)?yt(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function cg(e){let t=Jt(e);for(;kt(t)&&!Ar(t);){if(Ri(t))return t;if(ro(t))return null;t=Jt(t)}return null}function Vi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ar(e){return["html","body","#document"].includes(Fr(e))}function yt(e){return at(e).getComputedStyle(e)}function no(e){return ze(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jt(e){if(Fr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jl(e)&&e.host||St(e);return Jl(t)?t.host:t}function Gl(e){const t=Jt(e);return Ar(t)?e.ownerDocument?e.ownerDocument.body:e.body:kt(t)&&cn(t)?t:Gl(t)}function fn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Gl(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=at(o);if(i){const a=Bi(s);return t.concat(s,s.visualViewport||[],cn(o)?o:[],a&&r?fn(a):[])}return t.concat(o,fn(o,[],r))}function Bi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fg(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}const dr=Math.min,qe=Math.max,dn=Math.round,oo=Math.floor,Ct=e=>({x:e,y:e}),dg={left:"right",right:"left",bottom:"top",top:"bottom"},pg={start:"end",end:"start"};function Xl(e,t,r){return qe(e,dr(t,r))}function jr(e,t){return typeof e=="function"?e(t):e}function Gt(e){return e.split("-")[0]}function pn(e){return e.split("-")[1]}function Zl(e){return e==="x"?"y":"x"}function Ql(e){return e==="y"?"height":"width"}function pr(e){return["top","bottom"].includes(Gt(e))?"y":"x"}function eu(e){return Zl(pr(e))}function mg(e,t,r){r===void 0&&(r=!1);const n=pn(e),o=eu(e),i=Ql(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=io(s)),[s,io(s)]}function hg(e){const t=io(e);return[Ui(e),t,Ui(t)]}function Ui(e){return e.replace(/start|end/g,t=>pg[t])}function gg(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:s;default:return[]}}function yg(e,t,r,n){const o=pn(e);let i=gg(Gt(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ui)))),i}function io(e){return e.replace(/left|right|bottom|top/g,t=>dg[t])}function bg(e){return{top:0,right:0,bottom:0,left:0,...e}}function xg(e){return typeof e!="number"?bg(e):{top:e,right:e,bottom:e,left:e}}function so(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function tu(e,t,r){let{reference:n,floating:o}=e;const i=pr(t),s=eu(t),a=Ql(s),l=Gt(t),u=i==="y",c=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let m;switch(l){case"top":m={x:c,y:n.y-o.height};break;case"bottom":m={x:c,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-o.width,y:f};break;default:m={x:n.x,y:n.y}}switch(pn(t)){case"start":m[s]-=h*(r&&u?-1:1);break;case"end":m[s]+=h*(r&&u?-1:1);break}return m}const vg=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=tu(u,n,l),h=n,m={},d=0;for(let y=0;y<a.length;y++){const{name:x,fn:b}=a[y],{x:w,y:v,data:E,reset:C}=await b({x:c,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});c=w??c,f=v??f,m={...m,[x]:{...m[x],...E}},C&&d<=50&&(d++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:c,y:f}=tu(u,h,l)),y=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:m}};async function ao(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=jr(t,e),d=xg(m),x=a[h?f==="floating"?"reference":"floating":f],b=so(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),w=f==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),E=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},C=so(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(b.top-C.top+d.top)/E.y,bottom:(C.bottom-b.bottom+d.bottom)/E.y,left:(b.left-C.left+d.left)/E.x,right:(C.right-b.right+d.right)/E.x}}const wg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:y=!0,...x}=jr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const b=Gt(o),w=pr(a),v=Gt(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=h||(v||!y?[io(a)]:hg(a)),T=d!=="none";!h&&T&&C.push(...yg(a,y,d,E));const k=[a,...C],O=await ao(t,x),j=[];let D=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&j.push(O[b]),f){const H=mg(o,s,E);j.push(O[H[0]],O[H[1]])}if(D=[...D,{placement:o,overflows:j}],!j.every(H=>H<=0)){var N,L;const H=(((N=i.flip)==null?void 0:N.index)||0)+1,J=k[H];if(J)return{data:{index:H,overflows:D},reset:{placement:J}};let z=(L=D.filter(X=>X.overflows[0]<=0).sort((X,K)=>X.overflows[1]-K.overflows[1])[0])==null?void 0:L.placement;if(!z)switch(m){case"bestFit":{var R;const X=(R=D.filter(K=>{if(T){const Q=pr(K.placement);return Q===w||Q==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(Q=>Q>0).reduce((Q,re)=>Q+re,0)]).sort((K,Q)=>K[1]-Q[1])[0])==null?void 0:R[0];X&&(z=X);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};async function Eg(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Gt(r),a=pn(r),l=pr(r)==="y",u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,f=jr(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof d=="number"&&(m=a==="end"?d*-1:d),l?{x:m*c,y:h*u}:{x:h*u,y:m*c}}const Tg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Eg(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},_g=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:x=>{let{x:b,y:w}=x;return{x:b,y:w}}},...l}=jr(e,t),u={x:r,y:n},c=await ao(t,l),f=pr(Gt(o)),h=Zl(f);let m=u[h],d=u[f];if(i){const x=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=m+c[x],v=m-c[b];m=Xl(w,m,v)}if(s){const x=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=d+c[x],v=d-c[b];d=Xl(w,d,v)}const y=a.fn({...t,[h]:m,[f]:d});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[h]:i,[f]:s}}}}}},Sg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=jr(e,t),c=await ao(t,u),f=Gt(o),h=pn(o),m=pr(o)==="y",{width:d,height:y}=i.floating;let x,b;f==="top"||f==="bottom"?(x=f,b=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,x=h==="end"?"top":"bottom");const w=y-c.top-c.bottom,v=d-c.left-c.right,E=dr(y-c[x],w),C=dr(d-c[b],v),T=!t.middlewareData.shift;let k=E,O=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(O=v),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=w),T&&!h){const D=qe(c.left,0),N=qe(c.right,0),L=qe(c.top,0),R=qe(c.bottom,0);m?O=d-2*(D!==0||N!==0?D+N:qe(c.left,c.right)):k=y-2*(L!==0||R!==0?L+R:qe(c.top,c.bottom))}await l({...t,availableWidth:O,availableHeight:k});const j=await s.getDimensions(a.floating);return d!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}};function ru(e){const t=yt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=kt(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=dn(r)!==i||dn(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function zi(e){return ze(e)?e:e.contextElement}function $r(e){const t=zi(e);if(!kt(t))return Ct(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=ru(t);let s=(i?dn(r.width):r.width)/n,a=(i?dn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const kg=Ct(0);function nu(e){const t=at(e);return!Vi()||!t.visualViewport?kg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cg(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==at(e)?!1:t}function mr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=zi(e);let s=Ct(1);t&&(n?ze(n)&&(s=$r(n)):s=$r(e));const a=Cg(i,r,n)?nu(i):Ct(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,f=o.height/s.y;if(i){const h=at(i),m=n&&ze(n)?at(n):n;let d=h,y=Bi(d);for(;y&&n&&m!==d;){const x=$r(y),b=y.getBoundingClientRect(),w=yt(y),v=b.left+(y.clientLeft+parseFloat(w.paddingLeft))*x.x,E=b.top+(y.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=v,u+=E,d=at(y),y=Bi(d)}}return so({width:c,height:f,x:l,y:u})}function qi(e,t){const r=no(e).scrollLeft;return t?t.left+r:mr(St(e)).left+r}function ou(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:qi(e,n)),i=n.top+t.scrollTop;return{x:o,y:i}}function Og(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=St(n),a=t?ro(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Ct(1);const c=Ct(0),f=kt(n);if((f||!f&&!i)&&((Fr(n)!=="body"||cn(s))&&(l=no(n)),kt(n))){const m=mr(n);u=$r(n),c.x=m.x+n.clientLeft,c.y=m.y+n.clientTop}const h=s&&!f&&!i?ou(s,l,!0):Ct(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:r.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Fg(e){return Array.from(e.getClientRects())}function Ag(e){const t=St(e),r=no(e),n=e.ownerDocument.body,o=qe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=qe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+qi(e);const a=-r.scrollTop;return yt(n).direction==="rtl"&&(s+=qe(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}function jg(e,t){const r=at(e),n=St(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Vi();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function $g(e,t){const r=mr(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=kt(e)?$r(e):Ct(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=n*i.y;return{width:s,height:a,x:l,y:u}}function iu(e,t,r){let n;if(t==="viewport")n=jg(e,r);else if(t==="document")n=Ag(St(e));else if(ze(t))n=$g(t,r);else{const o=nu(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return so(n)}function su(e,t){const r=Jt(e);return r===t||!ze(r)||Ar(r)?!1:yt(r).position==="fixed"||su(r,t)}function Ng(e,t){const r=t.get(e);if(r)return r;let n=fn(e,[],!1).filter(a=>ze(a)&&Fr(a)!=="body"),o=null;const i=yt(e).position==="fixed";let s=i?Jt(e):e;for(;ze(s)&&!Ar(s);){const a=yt(s),l=Ri(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||cn(s)&&!l&&su(e,s))?n=n.filter(c=>c!==s):o=a,s=Jt(s)}return t.set(e,n),n}function Pg(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?ro(t)?[]:Ng(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((u,c)=>{const f=iu(t,c,o);return u.top=qe(f.top,u.top),u.right=dr(f.right,u.right),u.bottom=dr(f.bottom,u.bottom),u.left=qe(f.left,u.left),u},iu(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Dg(e){const{width:t,height:r}=ru(e);return{width:t,height:r}}function Lg(e,t,r){const n=kt(t),o=St(t),i=r==="fixed",s=mr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ct(0);if(n||!n&&!i)if((Fr(t)!=="body"||cn(o))&&(a=no(t)),n){const h=mr(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=qi(o));const u=o&&!n&&!i?ou(o,a):Ct(0),c=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:c,y:f,width:s.width,height:s.height}}function Hi(e){return yt(e).position==="static"}function au(e,t){if(!kt(e)||yt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return St(e)===r&&(r=r.ownerDocument.body),r}function lu(e,t){const r=at(e);if(ro(e))return r;if(!kt(e)){let o=Jt(e);for(;o&&!Ar(o);){if(ze(o)&&!Hi(o))return o;o=Jt(o)}return r}let n=au(e,t);for(;n&&ug(n)&&Hi(n);)n=au(n,t);return n&&Ar(n)&&Hi(n)&&!Ri(n)?r:n||cg(e)||r}const Ig=async function(e){const t=this.getOffsetParent||lu,r=this.getDimensions,n=await r(e.floating);return{reference:Lg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Mg(e){return yt(e).direction==="rtl"}const Rg={convertOffsetParentRelativeRectToViewportRelativeRect:Og,getDocumentElement:St,getClippingRect:Pg,getOffsetParent:lu,getElementRects:Ig,getClientRects:Fg,getDimensions:Dg,getScale:$r,isElement:ze,isRTL:Mg};function Vg(e,t){let r=null,n;const o=St(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const m=oo(c),d=oo(o.clientWidth-(u+f)),y=oo(o.clientHeight-(c+h)),x=oo(u),w={rootMargin:-m+"px "+-d+"px "+-y+"px "+-x+"px",threshold:qe(0,dr(1,l))||1};let v=!0;function E(C){const T=C[0].intersectionRatio;if(T!==l){if(!v)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}v=!1}try{r=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(E,w)}r.observe(e)}return s(!0),i}function Bg(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=zi(e),c=o||i?[...u?fn(u):[],...fn(t)]:[];c.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const f=u&&a?Vg(u,r):null;let h=-1,m=null;s&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(t)})),r()}),u&&!l&&m.observe(u),m.observe(t));let d,y=l?mr(e):null;l&&x();function x(){const b=mr(e);y&&(b.x!==y.x||b.y!==y.y||b.width!==y.width||b.height!==y.height)&&r(),y=b,d=requestAnimationFrame(x)}return r(),()=>{var b;c.forEach(w=>{o&&w.removeEventListener("scroll",r),i&&w.removeEventListener("resize",r)}),f==null||f(),(b=m)==null||b.disconnect(),m=null,l&&cancelAnimationFrame(d)}}const Wi=ao,Ug=Tg,zg=_g,qg=wg,Hg=Sg,Wg=(e,t,r)=>{const n=new Map,o={platform:Rg,...r},i={...o.platform,_c:n};return vg(e,t,{...o,platform:i})};var lo=typeof document<"u"?p.useLayoutEffect:p.useEffect;function uo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!uo(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!uo(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function uu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cu(e,t){const r=uu(e);return Math.round(t*r)/r}function Ki(e){const t=A.useRef(e);return lo(()=>{t.current=e}),t}function Kg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=A.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=A.useState(n);uo(h,n)||m(n);const[d,y]=A.useState(null),[x,b]=A.useState(null),w=A.useCallback(K=>{K!==T.current&&(T.current=K,y(K))},[]),v=A.useCallback(K=>{K!==k.current&&(k.current=K,b(K))},[]),E=i||d,C=s||x,T=A.useRef(null),k=A.useRef(null),O=A.useRef(c),j=l!=null,D=Ki(l),N=Ki(o),L=Ki(u),R=A.useCallback(()=>{if(!T.current||!k.current)return;const K={placement:t,strategy:r,middleware:h};N.current&&(K.platform=N.current),Wg(T.current,k.current,K).then(Q=>{const re={...Q,isPositioned:L.current!==!1};H.current&&!uo(O.current,re)&&(O.current=re,jn.flushSync(()=>{f(re)}))})},[h,t,r,N,L]);lo(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(K=>({...K,isPositioned:!1})))},[u]);const H=A.useRef(!1);lo(()=>(H.current=!0,()=>{H.current=!1}),[]),lo(()=>{if(E&&(T.current=E),C&&(k.current=C),E&&C){if(D.current)return D.current(E,C,R);R()}},[E,C,R,D,j]);const J=A.useMemo(()=>({reference:T,floating:k,setReference:w,setFloating:v}),[w,v]),z=A.useMemo(()=>({reference:E,floating:C}),[E,C]),X=A.useMemo(()=>{const K={position:r,left:0,top:0};if(!z.floating)return K;const Q=cu(z.floating,c.x),re=cu(z.floating,c.y);return a?{...K,transform:"translate("+Q+"px, "+re+"px)",...uu(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:re}},[r,a,z.floating,c.x,c.y]);return A.useMemo(()=>({...c,update:R,refs:J,elements:z,floatingStyles:X}),[c,R,J,z,X])}const fu=(e,t)=>({...Ug(e),options:[e,t]}),Yg=(e,t)=>({...zg(e),options:[e,t]}),Jg=(e,t)=>({...qg(e),options:[e,t]}),Gg=(e,t)=>({...Hg(e),options:[e,t]}),du={...A},Xg=du.useInsertionEffect||(e=>e());function pu(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Xg(()=>{t.current=e}),A.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var Yi=typeof document<"u"?p.useLayoutEffect:p.useEffect;let mu=!1,Zg=0;const hu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Zg++;function Qg(){const[e,t]=A.useState(()=>mu?hu():void 0);return Yi(()=>{e==null&&t(hu())},[]),A.useEffect(()=>{mu=!0},[]),e}const ey=du.useId||Qg;let mn;process.env.NODE_ENV!=="production"&&(mn=new Set);function ty(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=mn)!=null&&e.has(o))){var i;(i=mn)==null||i.add(o),console.warn(o)}}function ry(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=mn)!=null&&e.has(o))){var i;(i=mn)==null||i.add(o),console.error(o)}}function ny(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const oy=A.createContext(null),iy=A.createContext(null),sy=()=>{var e;return((e=A.useContext(oy))==null?void 0:e.id)||null},ay=()=>A.useContext(iy),ly="data-floating-ui-focusable";function uy(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=ey(),i=A.useRef({}),[s]=A.useState(()=>ny()),a=sy()!=null;if(process.env.NODE_ENV!=="production"){const m=n.reference;m&&!ze(m)&&ry("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=A.useState(n.reference),c=pu((m,d,y)=>{i.current.openEvent=m?d:void 0,s.emit("openchange",{open:m,event:d,reason:y,nested:a}),r==null||r(m,d,y)}),f=A.useMemo(()=>({setPositionReference:u}),[]),h=A.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:c,elements:h,events:s,floatingId:o,refs:f}),[t,c,h,s,o,f])}function cy(e){e===void 0&&(e={});const{nodeId:t}=e,r=uy({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,s]=A.useState(null),[a,l]=A.useState(null),c=(o==null?void 0:o.domReference)||i,f=A.useRef(null),h=ay();Yi(()=>{c&&(f.current=c)},[c]);const m=Kg({...e,elements:{...o,...a&&{reference:a}}}),d=A.useCallback(v=>{const E=ze(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;l(E),m.refs.setReference(E)},[m.refs]),y=A.useCallback(v=>{(ze(v)||v===null)&&(f.current=v,s(v)),(ze(m.refs.reference.current)||m.refs.reference.current===null||v!==null&&!ze(v))&&m.refs.setReference(v)},[m.refs]),x=A.useMemo(()=>({...m.refs,setReference:y,setPositionReference:d,domReference:f}),[m.refs,y,d]),b=A.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),w=A.useMemo(()=>({...m,...n,refs:x,elements:b,nodeId:t}),[m,x,b,t,n]);return Yi(()=>{n.dataRef.current.floatingContext=w;const v=h==null?void 0:h.nodesRef.current.find(E=>E.id===t);v&&(v.context=w)}),A.useMemo(()=>({...m,context:w,refs:x,elements:b}),[m,x,b,w])}const gu="active",yu="selected";function Ji(e,t,r){const n=new Map,o=r==="item";let i=e;if(o&&e){const{[gu]:s,[yu]:a,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[ly]:""},...i,...t.map(s=>{const a=s?s[r]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[u,c]=l;if(!(o&&[gu,yu].includes(u)))if(u.indexOf("on")===0){if(n.has(u)||n.set(u,[]),typeof c=="function"){var f;(f=n.get(u))==null||f.push(c),s[u]=function(){for(var h,m=arguments.length,d=new Array(m),y=0;y<m;y++)d[y]=arguments[y];return(h=n.get(u))==null?void 0:h.map(x=>x(...d)).find(x=>x!==void 0)}}}else s[u]=c}),s),{})}}function fy(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),r=e.map(a=>a==null?void 0:a.floating),n=e.map(a=>a==null?void 0:a.item),o=A.useCallback(a=>Ji(a,e,"reference"),t),i=A.useCallback(a=>Ji(a,e,"floating"),r),s=A.useCallback(a=>Ji(a,e,"item"),n);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function bu(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const dy=e=>({name:"inner",options:e,async fn(t){const{listRef:r,overflowRef:n,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=jr(e,t),{rects:f,elements:{floating:h}}=t,m=r.current[s],d=(u==null?void 0:u.current)||h,y=h.clientTop||d.clientTop,x=h.clientTop!==0,b=d.clientTop!==0,w=h===d;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||ty('`placement` side must be "bottom" when using the `inner`',"middleware.")),!m)return{};const v={...t,...await fu(-m.offsetTop-h.clientTop-f.reference.height/2-m.offsetHeight/2-i).fn(t)},E=await Wi(bu(v,d.scrollHeight+y+h.clientTop),c),C=await Wi(v,{...c,elementContext:"reference"}),T=qe(0,E.top),k=v.y+T,D=(d.scrollHeight>d.clientHeight?N=>N:dn)(qe(0,d.scrollHeight+(x&&w||b?y*2:0)-T-qe(0,E.bottom)));if(d.style.maxHeight=D+"px",d.scrollTop=T,o){const N=d.offsetHeight<m.offsetHeight*dr(a,r.current.length)-1||C.top>=-l||C.bottom>=-l;jn.flushSync(()=>o(N))}return n&&(n.current=await Wi(bu({...v,y:k},d.offsetHeight+y+h.clientTop),c)),{y:k}}});function py(e,t){const{open:r,elements:n}=e,{enabled:o=!0,overflowRef:i,scrollRef:s,onChange:a}=t,l=pu(a),u=A.useRef(!1),c=A.useRef(null),f=A.useRef(null);A.useEffect(()=>{if(!o)return;function m(y){if(y.ctrlKey||!d||i.current==null)return;const x=y.deltaY,b=i.current.top>=-.5,w=i.current.bottom>=-.5,v=d.scrollHeight-d.clientHeight,E=x<0?-1:1,C=x<0?"max":"min";d.scrollHeight<=d.clientHeight||(!b&&x>0||!w&&x<0?(y.preventDefault(),jn.flushSync(()=>{l(T=>T+Math[C](x,v*E))})):/firefox/i.test(fg())&&(d.scrollTop+=x))}const d=(s==null?void 0:s.current)||n.floating;if(r&&d)return d.addEventListener("wheel",m),requestAnimationFrame(()=>{c.current=d.scrollTop,i.current!=null&&(f.current={...i.current})}),()=>{c.current=null,f.current=null,d.removeEventListener("wheel",m)}},[o,r,n.floating,i,s,l]);const h=A.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const m=(s==null?void 0:s.current)||n.floating;if(!(!i.current||!m||!u.current)){if(c.current!==null){const d=m.scrollTop-c.current;(i.current.bottom<-.5&&d<-1||i.current.top<-.5&&d>1)&&jn.flushSync(()=>l(y=>y+d))}requestAnimationFrame(()=>{c.current=m.scrollTop})}}}),[n.floating,l,i,s]);return A.useMemo(()=>o?{floating:h}:{},[o,h])}let Nr=p.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Nr.displayName="FloatingContext";let Gi=p.createContext(null);Gi.displayName="PlacementContext";function my(e){return p.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function hy(){return p.useContext(Nr).setReference}function gy(){return p.useContext(Nr).getReferenceProps}function yy(){let{getFloatingProps:e,slot:t}=p.useContext(Nr);return p.useCallback((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor}),[e,t])}function by(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=p.useContext(Gi),r=p.useMemo(()=>e,[JSON.stringify(e,(o,i)=>{var s;return(s=i==null?void 0:i.outerHTML)!=null?s:i})]);be(()=>{t==null||t(r??null)},[t,r]);let n=p.useContext(Nr);return p.useMemo(()=>[n.setFloating,e?n.styles:{}],[n.setFloating,e,n.styles])}let xu=4;function xy({children:e,enabled:t=!0}){let[r,n]=p.useState(null),[o,i]=p.useState(0),s=p.useRef(null),[a,l]=p.useState(null);vy(a);let u=t&&r!==null&&a!==null,{to:c="bottom",gap:f=0,offset:h=0,padding:m=0,inner:d}=wy(r,a),[y,x="center"]=c.split(" ");be(()=>{u&&i(0)},[u]);let{refs:b,floatingStyles:w,context:v}=cy({open:u,placement:y==="selection"?x==="center"?"bottom":`bottom-${x}`:x==="center"?`${y}`:`${y}-${x}`,strategy:"absolute",transform:!1,middleware:[fu({mainAxis:y==="selection"?0:f,crossAxis:h}),Yg({padding:m}),y!=="selection"&&Jg({padding:m}),y==="selection"&&d?dy({...d,padding:m,overflowRef:s,offset:o,minItemsVisible:xu,referenceOverflowThreshold:m,onFallbackChange(N){var L,R;if(!N)return;let H=v.elements.floating;if(!H)return;let J=parseFloat(getComputedStyle(H).scrollPaddingBottom)||0,z=Math.min(xu,H.childElementCount),X=0,K=0;for(let Q of(R=(L=v.elements.floating)==null?void 0:L.childNodes)!=null?R:[])if(Q instanceof HTMLElement){let re=Q.offsetTop,je=re+Q.clientHeight+J,De=H.scrollTop,W=De+H.clientHeight;if(re>=De&&je<=W)z--;else{K=Math.max(0,Math.min(je,W)-Math.max(re,De)),X=Q.clientHeight;break}}z>=1&&i(Q=>{let re=X*z-K+J;return Q>=re?Q:re})}}):null,Gg({padding:m,apply({availableWidth:N,availableHeight:L,elements:R}){Object.assign(R.floating.style,{overflow:"auto",maxWidth:`${N}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${L}px)`})}})].filter(Boolean),whileElementsMounted:Bg}),[E=y,C=x]=v.placement.split("-");y==="selection"&&(E="selection");let T=p.useMemo(()=>({anchor:[E,C].filter(Boolean).join(" ")}),[E,C]),k=py(v,{overflowRef:s,onChange:i}),{getReferenceProps:O,getFloatingProps:j}=fy([k]),D=te(N=>{l(N),b.setFloating(N)});return A.createElement(Gi.Provider,{value:n},A.createElement(Nr.Provider,{value:{setFloating:D,setReference:b.setReference,styles:w,getReferenceProps:O,getFloatingProps:j,slot:T}},e))}function vy(e){be(()=>{if(!e)return;let t=new MutationObserver(()=>{let r=window.getComputedStyle(e).maxHeight,n=parseFloat(r);if(isNaN(n))return;let o=parseInt(r);isNaN(o)||n!==o&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function wy(e,t){var r,n,o;let i=Xi((r=e==null?void 0:e.gap)!=null?r:"var(--anchor-gap, 0)",t),s=Xi((n=e==null?void 0:e.offset)!=null?n:"var(--anchor-offset, 0)",t),a=Xi((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}function Xi(e,t,r=void 0){let n=ur(),o=te((l,u)=>{if(l==null)return[r,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[r,null];let c=wu(l,u);return[c,f=>{let h=vu(l);{let m=h.map(d=>window.getComputedStyle(u).getPropertyValue(d));n.requestAnimationFrame(function d(){n.nextFrame(d);let y=!1;for(let[b,w]of h.entries()){let v=window.getComputedStyle(u).getPropertyValue(w);if(m[b]!==v){m[b]=v,y=!0;break}}if(!y)return;let x=wu(l,u);c!==x&&(f(x),c=x)})}return n.dispose}]}return[r,null]}),i=p.useMemo(()=>o(e,t)[0],[e,t]),[s=i,a]=p.useState();return be(()=>{let[l,u]=o(e,t);if(a(l),!!u)return u(a)},[e,t]),s}function vu(e){let t=/var\((.*)\)/.exec(e);if(t){let r=t[1].indexOf(",");if(r===-1)return[t[1]];let n=t[1].slice(0,r).trim(),o=t[1].slice(r+1).trim();return o?[n,...vu(o)]:[n]}return[]}function wu(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}function Ey(e,t){let[r,n]=p.useState(t);return!e&&r!==t&&n(t),e?r:t}let Zi=p.createContext(null);Zi.displayName="OpenClosedContext";var bt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(bt||{});function Qi(){return p.useContext(Zi)}function Eu({value:e,children:t}){return p.createElement(Zi.Provider,{value:e},t)}function Ty(e){throw new Error("Unexpected object: "+e)}var Ae=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Ae||{});function es(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),o=n??-1;switch(e.focus){case 0:{for(let i=0;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 1:{o===-1&&(o=r.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 2:{for(let i=o+1;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 3:{for(let i=r.length-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 4:{for(let i=0;i<r.length;++i)if(t.resolveId(r[i],i,r)===e.id)return i;return n}case 5:return null;default:Ty(e)}}function _y(e){let t=te(e),r=p.useRef(!1);p.useEffect(()=>(r.current=!1,()=>{r.current=!0,El(()=>{r.current&&t()})}),[t])}function Sy(){let e=typeof document>"u";return"useSyncExternalStore"in A?(t=>t.useSyncExternalStore)(A)(()=>()=>{},()=>!1,()=>!e):!1}function ts(){let e=Sy(),[t,r]=A.useState(lr.isHandoffComplete);return t&&lr.isHandoffComplete===!1&&r(!1),A.useEffect(()=>{t!==!0&&r(!0)},[t]),A.useEffect(()=>lr.handoff(),[]),e?!1:t}let ky=p.createContext(!1);function Cy(){return p.useContext(ky)}function Oy(e){let t=Cy(),r=p.useContext(_u),n=Mi(e),[o,i]=p.useState(()=>{var s;if(!t&&r!==null)return(s=r.current)!=null?s:null;if(lr.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let l=n.createElement("div");return l.setAttribute("id","headlessui-portal-root"),n.body.appendChild(l)});return p.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),p.useEffect(()=>{t||r!==null&&i(r.current)},[r,i,t]),o}let Tu=p.Fragment,Fy=et(function(e,t){let r=e,n=p.useRef(null),o=pt(xh(f=>{n.current=f}),t),i=Mi(n),s=Oy(n),[a]=p.useState(()=>{var f;return lr.isServer?null:(f=i==null?void 0:i.createElement("div"))!=null?f:null}),l=p.useContext(Ny),u=ts();be(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),be(()=>{if(a&&l)return l.register(a)},[l,a]),_y(()=>{var f;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((f=s.parentElement)==null||f.removeChild(s)))});let c=st();return u?!s||!a?null:_t.createPortal(c({ourProps:{ref:o},theirProps:r,slot:{},defaultTag:Tu,name:"Portal"}),a):null});function Ay(e,t){let r=pt(t),{enabled:n=!0,...o}=e,i=st();return n?p.createElement(Fy,{...o,ref:r}):i({ourProps:{ref:r},theirProps:o,slot:{},defaultTag:Tu,name:"Portal"})}let jy=p.Fragment,_u=p.createContext(null);function $y(e,t){let{target:r,...n}=e,o={ref:pt(t)},i=st();return p.createElement(_u.Provider,{value:r},i({ourProps:o,theirProps:n,defaultTag:jy,name:"Popover.Group"}))}let Ny=p.createContext(null),Py=et(Ay),Dy=et($y),Ly=Object.assign(Py,{Group:Dy});function Iy(){let e=p.useRef(!1);return be(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Su(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:Cu)!==p.Fragment||p.Children.count(e.children)===1}let co=p.createContext(null);co.displayName="TransitionContext";var My=(e=>(e.Visible="visible",e.Hidden="hidden",e))(My||{});function Ry(){let e=p.useContext(co);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Vy(){let e=p.useContext(fo);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let fo=p.createContext(null);fo.displayName="NestingContext";function po(e){return"children"in e?po(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function ku(e,t){let r=cr(e),n=p.useRef([]),o=Iy(),i=ur(),s=te((m,d=Kt.Hidden)=>{let y=n.current.findIndex(({el:x})=>x===m);y!==-1&&(gt(d,{[Kt.Unmount](){n.current.splice(y,1)},[Kt.Hidden](){n.current[y].state="hidden"}}),i.microTask(()=>{var x;!po(n)&&o.current&&((x=r.current)==null||x.call(r))}))}),a=te(m=>{let d=n.current.find(({el:y})=>y===m);return d?d.state!=="visible"&&(d.state="visible"):n.current.push({el:m,state:"visible"}),()=>s(m,Kt.Unmount)}),l=p.useRef([]),u=p.useRef(Promise.resolve()),c=p.useRef({enter:[],leave:[]}),f=te((m,d,y)=>{l.current.splice(0),t&&(t.chains.current[d]=t.chains.current[d].filter(([x])=>x!==m)),t==null||t.chains.current[d].push([m,new Promise(x=>{l.current.push(x)})]),t==null||t.chains.current[d].push([m,new Promise(x=>{Promise.all(c.current[d].map(([b,w])=>w)).then(()=>x())})]),d==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>y(d)):y(d)}),h=te((m,d,y)=>{Promise.all(c.current[d].splice(0).map(([x,b])=>b)).then(()=>{var x;(x=l.current.shift())==null||x()}).then(()=>y(d))});return p.useMemo(()=>({children:n,register:a,unregister:s,onStart:f,onStop:h,wait:u,chains:c}),[a,s,n,f,h,c,u])}let Cu=p.Fragment,Ou=Zn.RenderStrategy;function By(e,t){var r,n;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:c,enterTo:f,entered:h,leave:m,leaveFrom:d,leaveTo:y,...x}=e,[b,w]=p.useState(null),v=p.useRef(null),E=Su(e),C=pt(...E?[v,t,w]:t===null?[]:[t]),T=(r=x.unmount)==null||r?Kt.Unmount:Kt.Hidden,{show:k,appear:O,initial:j}=Ry(),[D,N]=p.useState(k?"visible":"hidden"),L=Vy(),{register:R,unregister:H}=L;be(()=>R(v),[R,v]),be(()=>{if(T===Kt.Hidden&&v.current){if(k&&D!=="visible"){N("visible");return}return gt(D,{hidden:()=>H(v),visible:()=>R(v)})}},[D,v,R,H,k,T]);let J=ts();be(()=>{if(E&&J&&D==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,D,J,E]);let z=j&&!O,X=O&&k&&j,K=p.useRef(!1),Q=ku(()=>{K.current||(N("hidden"),H(v))},L),re=te($e=>{K.current=!0;let Se=$e?"enter":"leave";Q.onStart(v,Se,Le=>{Le==="enter"?i==null||i():Le==="leave"&&(a==null||a())})}),je=te($e=>{let Se=$e?"enter":"leave";K.current=!1,Q.onStop(v,Se,Le=>{Le==="enter"?s==null||s():Le==="leave"&&(l==null||l())}),Se==="leave"&&!po(Q)&&(N("hidden"),H(v))});p.useEffect(()=>{E&&o||(re(k),je(k))},[k,E,o]);let De=!(!o||!E||!J||z),[,W]=Kl(De,b,k,{start:re,end:je}),we=Yt({ref:C,className:((n=Fi(x.className,X&&u,X&&c,W.enter&&u,W.enter&&W.closed&&c,W.enter&&!W.closed&&f,W.leave&&m,W.leave&&!W.closed&&d,W.leave&&W.closed&&y,!W.transition&&k&&h))==null?void 0:n.trim())||void 0,...Wl(W)}),_e=0;D==="visible"&&(_e|=bt.Open),D==="hidden"&&(_e|=bt.Closed),W.enter&&(_e|=bt.Opening),W.leave&&(_e|=bt.Closing);let ae=st();return p.createElement(fo.Provider,{value:Q},p.createElement(Eu,{value:_e},ae({ourProps:we,theirProps:x,defaultTag:Cu,features:Ou,visible:D==="visible",name:"Transition.Child"})))}function Uy(e,t){let{show:r,appear:n=!1,unmount:o=!0,...i}=e,s=p.useRef(null),a=Su(e),l=pt(...a?[s,t]:t===null?[]:[t]);ts();let u=Qi();if(r===void 0&&u!==null&&(r=(u&bt.Open)===bt.Open),r===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=p.useState(r?"visible":"hidden"),h=ku(()=>{r||f("hidden")}),[m,d]=p.useState(!0),y=p.useRef([r]);be(()=>{m!==!1&&y.current[y.current.length-1]!==r&&(y.current.push(r),d(!1))},[y,r]);let x=p.useMemo(()=>({show:r,appear:n,initial:m}),[r,n,m]);be(()=>{r?f("visible"):!po(h)&&s.current!==null&&f("hidden")},[r,h]);let b={unmount:o},w=te(()=>{var C;m&&d(!1),(C=e.beforeEnter)==null||C.call(e)}),v=te(()=>{var C;m&&d(!1),(C=e.beforeLeave)==null||C.call(e)}),E=st();return p.createElement(fo.Provider,{value:h},p.createElement(co.Provider,{value:x},E({ourProps:{...b,as:p.Fragment,children:p.createElement(Fu,{ref:l,...b,...i,beforeEnter:w,beforeLeave:v})},theirProps:{},defaultTag:p.Fragment,features:Ou,visible:c==="visible",name:"Transition"})))}function zy(e,t){let r=p.useContext(co)!==null,n=Qi()!==null;return p.createElement(p.Fragment,null,!r&&n?p.createElement(rs,{ref:t,...e}):p.createElement(Fu,{ref:t,...e}))}let rs=et(Uy),Fu=et(By),qy=et(zy),Au=Object.assign(rs,{Child:qy,Root:rs});function Hy(e,t){let r=p.useRef({left:0,top:0});if(be(()=>{if(!t)return;let o=t.getBoundingClientRect();o&&(r.current=o)},[e,t]),t==null||!e||t===document.activeElement)return!1;let n=t.getBoundingClientRect();return n.top!==r.current.top||n.left!==r.current.left}let ju=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function $u(e){var t,r;let n=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return n;let i=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),i=!0;let s=i?(r=o.innerText)!=null?r:"":n;return ju.test(s)&&(s=s.replace(ju,"")),s}function Wy(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(o=>{let i=document.getElementById(o);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():$u(i).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return $u(e).trim()}function Ky(e){let t=p.useRef(""),r=p.useRef("");return te(()=>{let n=e.current;if(!n)return"";let o=n.innerText;if(t.current===o)return r.current;let i=Wy(n).trim().toLowerCase();return t.current=o,r.current=i,i})}var Yy=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Yy||{}),Jy=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Jy||{}),Gy=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Gy||{}),Xy=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(Xy||{});function ns(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=Vl(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=r?n.indexOf(r):null;return o===-1&&(o=null),{options:n,activeOptionIndex:o}}let Zy={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,n=e.options.findIndex(o=>r(o.dataRef.current.value));return n!==-1&&(t=n),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var r,n,o,i,s;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===Ae.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Ae.Specific)return{...a,activeOptionIndex:e.options.findIndex(c=>c.id===t.id)};if(t.focus===Ae.Previous){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=es(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled});if(h!==null){let m=e.options[h].dataRef.current.domRef;if(((n=f.current)==null?void 0:n.previousElementSibling)===m.current||((o=m.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeOptionIndex:h}}}}else if(t.focus===Ae.Next){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=es(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled});if(h!==null){let m=e.options[h].dataRef.current.domRef;if(((i=f.current)==null?void 0:i.nextElementSibling)===m.current||((s=m.current)==null?void 0:s.nextElementSibling)===null)return{...a,activeOptionIndex:h}}}}let l=ns(e),u=es(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(s=>{var a;return!s.dataRef.current.disabled&&((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(n))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},n=ns(e,o=>[...o,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(r)),{...e,...n}},6:(e,t)=>{let r=ns(e,n=>{let o=n.findIndex(i=>i.id===t.id);return o!==-1&&n.splice(o,1),n});return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},os=p.createContext(null);os.displayName="ListboxActionsContext";function mo(e){let t=p.useContext(os);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,mo),r}return t}let ho=p.createContext(null);ho.displayName="ListboxDataContext";function hn(e){let t=p.useContext(ho);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,hn),r}return t}function Qy(e,t){return gt(t.type,Zy,e,t)}let e0=p.Fragment;function t0(e,t){var r;let n=Oi(),{value:o,defaultValue:i,form:s,name:a,onChange:l,by:u,invalid:c=!1,disabled:f=n||!1,horizontal:h=!1,multiple:m=!1,__demoMode:d=!1,...y}=e;const x=h?"horizontal":"vertical";let b=pt(t),w=lh(i),[v=m?[]:void 0,E]=ah(o,l,w),[C,T]=p.useReducer(Qy,{dataRef:p.createRef(),listboxState:d?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:d}),k=p.useRef({static:!1,hold:!1}),O=p.useRef(new Map),j=Ah(u),D=p.useCallback(oe=>gt(N.mode,{1:()=>v.some(ye=>j(ye,oe)),0:()=>j(v,oe)}),[v]),N=p.useMemo(()=>({...C,value:v,disabled:f,invalid:c,mode:m?1:0,orientation:x,compare:j,isSelected:D,optionsPropsRef:k,listRef:O}),[v,f,c,m,C,O]);be(()=>{C.dataRef.current=N},[N]);let L=N.listboxState===0;Jh(L,[N.buttonElement,N.optionsElement],(oe,ye)=>{var Ne;T({type:1}),Rl(ye,Ii.Loose)||(oe.preventDefault(),(Ne=N.buttonElement)==null||Ne.focus())});let R=p.useMemo(()=>({open:N.listboxState===0,disabled:f,invalid:c,value:v}),[N,f,v,c]),H=te(oe=>{let ye=N.options.find(Ne=>Ne.id===oe);ye&&je(ye.dataRef.current.value)}),J=te(()=>{if(N.activeOptionIndex!==null){let{dataRef:oe,id:ye}=N.options[N.activeOptionIndex];je(oe.current.value),T({type:2,focus:Ae.Specific,id:ye})}}),z=te(()=>T({type:0})),X=te(()=>T({type:1})),K=ur(),Q=te((oe,ye,Ne)=>{K.dispose(),K.microTask(()=>oe===Ae.Specific?T({type:2,focus:Ae.Specific,id:ye,trigger:Ne}):T({type:2,focus:oe,trigger:Ne}))}),re=te((oe,ye)=>(T({type:5,id:oe,dataRef:ye}),()=>T({type:6,id:oe}))),je=te(oe=>gt(N.mode,{0(){return E==null?void 0:E(oe)},1(){let ye=N.value.slice(),Ne=ye.findIndex(qt=>j(qt,oe));return Ne===-1?ye.push(oe):ye.splice(Ne,1),E==null?void 0:E(ye)}})),De=te(oe=>T({type:3,value:oe})),W=te(()=>T({type:4})),we=te(oe=>{T({type:7,element:oe})}),_e=te(oe=>{T({type:8,element:oe})}),ae=p.useMemo(()=>({onChange:je,registerOption:re,goToOption:Q,closeListbox:X,openListbox:z,selectActiveOption:J,selectOption:H,search:De,clearSearch:W,setButtonElement:we,setOptionsElement:_e}),[]),[$e,Se]=_h({inherit:!0}),Le={ref:b},wt=p.useCallback(()=>{if(w!==void 0)return E==null?void 0:E(w)},[E,w]),ke=st();return p.createElement(Se,{value:$e,props:{htmlFor:(r=N.buttonElement)==null?void 0:r.id},slot:{open:N.listboxState===0,disabled:f}},p.createElement(xy,null,p.createElement(os.Provider,{value:ae},p.createElement(ho.Provider,{value:N},p.createElement(Eu,{value:gt(N.listboxState,{0:bt.Open,1:bt.Closed})},a!=null&&v!=null&&p.createElement(mh,{disabled:f,data:{[a]:v},form:s,onReset:wt}),ke({ourProps:Le,theirProps:y,slot:R,defaultTag:e0,name:"Listbox"}))))))}let r0="button";function n0(e,t){var r;let n=hn("Listbox.Button"),o=mo("Listbox.Button"),i=p.useId(),s=Fl(),{id:a=s||`headlessui-listbox-button-${i}`,disabled:l=n.disabled||!1,autoFocus:u=!1,...c}=e,f=pt(t,hy(),o.setButtonElement),h=gy(),m=te(N=>{switch(N.key){case Pe.Enter:uh(N.currentTarget);break;case Pe.Space:case Pe.ArrowDown:N.preventDefault(),_t.flushSync(()=>o.openListbox()),n.value||o.goToOption(Ae.First);break;case Pe.ArrowUp:N.preventDefault(),_t.flushSync(()=>o.openListbox()),n.value||o.goToOption(Ae.Last);break}}),d=te(N=>{switch(N.key){case Pe.Space:N.preventDefault();break}}),y=te(N=>{var L;if(yh(N.currentTarget))return N.preventDefault();n.listboxState===0?(_t.flushSync(()=>o.closeListbox()),(L=n.buttonElement)==null||L.focus({preventScroll:!0})):(N.preventDefault(),o.openListbox())}),x=te(N=>N.preventDefault()),b=Nl([a]),w=vh(),{isFocusVisible:v,focusProps:E}=Jm({autoFocus:u}),{isHovered:C,hoverProps:T}=Ym({isDisabled:l}),{pressed:k,pressProps:O}=th({disabled:l}),j=p.useMemo(()=>({open:n.listboxState===0,active:k||n.listboxState===0,disabled:l,invalid:n.invalid,value:n.value,hover:C,focus:v,autofocus:u}),[n.listboxState,n.value,l,C,v,k,n.invalid,u]),D=_l(h(),{ref:f,id:a,type:Gh(e,n.buttonElement),"aria-haspopup":"listbox","aria-controls":(r=n.optionsElement)==null?void 0:r.id,"aria-expanded":n.listboxState===0,"aria-labelledby":b,"aria-describedby":w,disabled:l||void 0,autoFocus:u,onKeyDown:m,onKeyUp:d,onKeyPress:x,onClick:y},E,T,O);return st()({ourProps:D,theirProps:c,slot:j,defaultTag:r0,name:"Listbox.Button"})}let Nu=p.createContext(!1),o0="div",i0=Zn.RenderStrategy|Zn.Static;function s0(e,t){var r,n;let o=p.useId(),{id:i=`headlessui-listbox-options-${o}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=e,f=my(s),[h,m]=p.useState(null);f&&(a=!0);let d=hn("Listbox.Options"),y=mo("Listbox.Options"),x=Mi(d.optionsElement),b=Qi(),[w,v]=Kl(u,h,b!==null?(b&bt.Open)===bt.Open:d.listboxState===0);Lh(w,d.buttonElement,y.closeListbox);let E=d.__demoMode?!1:l&&d.listboxState===0;rg(E,x);let C=d.__demoMode?!1:l&&d.listboxState===0;Dh(C,{allowed:p.useCallback(()=>[d.buttonElement,d.optionsElement],[d.buttonElement,d.optionsElement])});let T=d.listboxState!==0,k=Hy(T,d.buttonElement)?!1:w,O=w&&d.listboxState===1,j=Ey(O,d.value),D=te(W=>d.compare(j,W)),N=p.useMemo(()=>{var W;if(f==null||!((W=f==null?void 0:f.to)!=null&&W.includes("selection")))return null;let we=d.options.findIndex(_e=>D(_e.dataRef.current.value));return we===-1&&(we=0),we},[f,d.options]),L=(()=>{if(f==null)return;if(N===null)return{...f,inner:void 0};let W=Array.from(d.listRef.current.values());return{...f,inner:{listRef:{current:W},index:N}}})(),[R,H]=by(L),J=yy(),z=pt(t,f?R:null,y.setOptionsElement,m),X=ur();p.useEffect(()=>{var W;let we=d.optionsElement;we&&d.listboxState===0&&we!==((W=an(we))==null?void 0:W.activeElement)&&(we==null||we.focus({preventScroll:!0}))},[d.listboxState,d.optionsElement]);let K=te(W=>{var we,_e;switch(X.dispose(),W.key){case Pe.Space:if(d.searchQuery!=="")return W.preventDefault(),W.stopPropagation(),y.search(W.key);case Pe.Enter:if(W.preventDefault(),W.stopPropagation(),d.activeOptionIndex!==null){let{dataRef:ae}=d.options[d.activeOptionIndex];y.onChange(ae.current.value)}d.mode===0&&(_t.flushSync(()=>y.closeListbox()),(we=d.buttonElement)==null||we.focus({preventScroll:!0}));break;case gt(d.orientation,{vertical:Pe.ArrowDown,horizontal:Pe.ArrowRight}):return W.preventDefault(),W.stopPropagation(),y.goToOption(Ae.Next);case gt(d.orientation,{vertical:Pe.ArrowUp,horizontal:Pe.ArrowLeft}):return W.preventDefault(),W.stopPropagation(),y.goToOption(Ae.Previous);case Pe.Home:case Pe.PageUp:return W.preventDefault(),W.stopPropagation(),y.goToOption(Ae.First);case Pe.End:case Pe.PageDown:return W.preventDefault(),W.stopPropagation(),y.goToOption(Ae.Last);case Pe.Escape:W.preventDefault(),W.stopPropagation(),_t.flushSync(()=>y.closeListbox()),(_e=d.buttonElement)==null||_e.focus({preventScroll:!0});return;case Pe.Tab:W.preventDefault(),W.stopPropagation(),_t.flushSync(()=>y.closeListbox()),qh(d.buttonElement,W.shiftKey?Li.Previous:Li.Next);break;default:W.key.length===1&&(y.search(W.key),X.setTimeout(()=>y.clearSearch(),350));break}}),Q=(r=d.buttonElement)==null?void 0:r.id,re=p.useMemo(()=>({open:d.listboxState===0}),[d.listboxState]),je=_l(f?J():{},{id:i,ref:z,"aria-activedescendant":d.activeOptionIndex===null||(n=d.options[d.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":d.mode===1?!0:void 0,"aria-labelledby":Q,"aria-orientation":d.orientation,onKeyDown:K,role:"listbox",tabIndex:d.listboxState===0?0:void 0,style:{...c.style,...H,"--button-width":$h(d.buttonElement,!0).width},...Wl(v)}),De=st();return p.createElement(Ly,{enabled:a?e.static||w:!1},p.createElement(ho.Provider,{value:d.mode===1?d:{...d,isSelected:D}},De({ourProps:je,theirProps:c,slot:re,defaultTag:o0,features:i0,visible:k,name:"Listbox.Options"})))}let a0="div";function l0(e,t){let r=p.useId(),{id:n=`headlessui-listbox-option-${r}`,disabled:o=!1,value:i,...s}=e,a=p.useContext(Nu)===!0,l=hn("Listbox.Option"),u=mo("Listbox.Option"),c=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===n:!1,f=l.isSelected(i),h=p.useRef(null),m=Ky(h),d=cr({disabled:o,value:i,domRef:h,get textValue(){return m()}}),y=pt(t,h,j=>{j?l.listRef.current.set(n,j):l.listRef.current.delete(n)});be(()=>{if(!l.__demoMode&&l.listboxState===0&&c&&l.activationTrigger!==0)return Vt().requestAnimationFrame(()=>{var j,D;(D=(j=h.current)==null?void 0:j.scrollIntoView)==null||D.call(j,{block:"nearest"})})},[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),be(()=>{if(!a)return u.registerOption(n,d)},[d,n,a]);let x=te(j=>{var D;if(o)return j.preventDefault();u.onChange(i),l.mode===0&&(_t.flushSync(()=>u.closeListbox()),(D=l.buttonElement)==null||D.focus({preventScroll:!0}))}),b=te(()=>{if(o)return u.goToOption(Ae.Nothing);u.goToOption(Ae.Specific,n)}),w=ng(),v=te(j=>{w.update(j),!o&&(c||u.goToOption(Ae.Specific,n,0))}),E=te(j=>{w.wasMoved(j)&&(o||c||u.goToOption(Ae.Specific,n,0))}),C=te(j=>{w.wasMoved(j)&&(o||c&&u.goToOption(Ae.Nothing))}),T=p.useMemo(()=>({active:c,focus:c,selected:f,disabled:o,selectedOption:f&&a}),[c,f,o,a]),k=a?{}:{id:n,ref:y,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:x,onFocus:b,onPointerEnter:v,onMouseEnter:v,onPointerMove:E,onMouseMove:E,onPointerLeave:C,onMouseLeave:C},O=st();return!f&&a?null:O({ourProps:k,theirProps:s,slot:T,defaultTag:a0,name:"Listbox.Option"})}let u0=p.Fragment;function c0(e,t){let{options:r,placeholder:n,...o}=e,i={ref:pt(t)},s=hn("ListboxSelectedOption"),a=p.useMemo(()=>({}),[]),l=s.value===void 0||s.value===null||s.mode===1&&Array.isArray(s.value)&&s.value.length===0,u=st();return p.createElement(Nu.Provider,{value:!0},u({ourProps:i,theirProps:{...o,children:p.createElement(p.Fragment,null,n&&l?n:r)},slot:a,defaultTag:u0,name:"ListboxSelectedOption"}))}let f0=et(t0),d0=et(n0),p0=Oh,m0=et(s0),h0=et(l0),g0=et(c0),Xt=Object.assign(f0,{Button:d0,Label:p0,Options:m0,Option:h0,SelectedOption:g0});function y0({element:e,validationData:t}){var l;const[r,n]=p.useState(e.value||[]),{register:o=()=>({}),setValue:i,getValues:s}=t||{},a=s&&s(e==null?void 0:e.id);return p.useEffect(()=>{o(e.id)},[e.id,o]),p.useEffect(()=>{i&&i(e.id,r)},[e.id,r,i]),p.useEffect(()=>{a!=null&&a.length&&!(r!=null&&r.length)&&n(a)},[a,r==null?void 0:r.length]),g.jsx("div",{className:"w-full z-10",children:g.jsx(Xt,{value:r,onChange:n,multiple:!0,children:g.jsxs("div",{className:"relative",children:[g.jsx(Xt.Button,{className:"w-full py-2 pl-3 pr-10 text-left bg-white input-control cursor-default ",children:(r==null?void 0:r.length)>0?r==null?void 0:r.map(u=>u.label).join(", "):"Select options"}),g.jsx(Au,{as:p.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx(Xt.Options,{className:"absolute w-full py-1 mt-1 grid gap-y-[1px] bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:(l=e==null?void 0:e.options)==null?void 0:l.map((u,c)=>g.jsx(Xt.Option,{className:({active:f})=>`cursor-default select-none relative w-full flex justify-between ${f?"text-gray-700 bg-gray-100":"text-gray-700"}`,value:u,children:({selected:f})=>g.jsxs("div",{className:`flex items-center justify-between py-2 pl-4 pr-4 w-full ${f?"bg-gray-100":""}`,children:[g.jsx("span",{className:`block truncate ${f?"font-medium":"font-normal"}`,children:u==null?void 0:u.label}),f?g.jsx("span",{className:"absolute inset-y-0 right-3 flex items-center pl-3 text-gray-600",children:"✓"}):null]})},c))})})]})})})}function b0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:ue("input-control",e==null?void 0:e.customClass),...r(e.id)})}function x0({onFileLoaded:e,disabled:t}){const[r,n]=p.useState(null),o=i=>{var l;const s=(l=i.target.files)==null?void 0:l[0];if(!s)return;const a=new FileReader;a.onloadend=()=>{const u=a.result;e({base64:u,type:s.type,name:s.name}),n(null)},a.onerror=()=>{n("Failed to read file.")},a.readAsDataURL(s)};return g.jsxs("div",{className:"flex flex-col items-start gap-2",children:[g.jsx("input",{type:"file",onChange:o,disabled:t,className:`block w-full text-sm text-gray-500 file:mr-4 file:px-4 input-control !py-1 !pl-1\r
|
|
51
|
+
`))}else{let h=c.props,m=h==null?void 0:h.className,d=typeof m=="function"?(...b)=>Fi(m(...b),l.className):Fi(m,l.className),y=d?{className:d}:{},x=_l(c.props,Yt(Ai(l,["ref"])));for(let b in f)b in x&&delete f[b];return p.cloneElement(c,Object.assign({},x,f,u,{ref:o(lh(c),u.ref)},y))}return p.createElement(i,Object.assign({},Ai(l,["ref"]),i!==p.Fragment&&u,i!==p.Fragment&&f),c)}function sh(){let e=p.useRef([]),t=p.useCallback(r=>{for(let n of e.current)n!=null&&(typeof n=="function"?n(r):n.current=r)},[]);return(...r)=>{if(!r.every(n=>n==null))return e.current=r,t}}function ah(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function _l(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let n in r)Object.assign(t,{[n](o,...i){let s=r[n];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function Sl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];for(let n in r)Object.assign(t,{[n](...o){let i=r[n];for(let s of i)s==null||s(...o)}});return t}function et(e){var t;return Object.assign(p.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Yt(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Ai(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function lh(e){return p.version.split(".")[0]>="19"?e.props.ref:e.ref}function uh(e,t,r){let[n,o]=p.useState(r),i=e!==void 0,s=p.useRef(i),a=p.useRef(!1),l=p.useRef(!1);return i&&!s.current&&!a.current?(a.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&s.current&&!l.current&&(l.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:n,te(u=>(i||o(u),t==null?void 0:t(u)))]}function ch(e){let[t]=p.useState(e);return t}function Cl(e={},t=null,r=[]){for(let[n,o]of Object.entries(e))Ol(r,kl(t,n),o);return r}function kl(e,t){return e?e+"["+t+"]":t}function Ol(e,t,r){if(Array.isArray(r))for(let[n,o]of r.entries())Ol(e,kl(t,n.toString()),o);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):Cl(r,t,e)}function fh(e){var t,r;let n=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(n){for(let o of n.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(r=n.requestSubmit)==null||r.call(n)}}let dh="span";var ji=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ji||{});function ph(e,t){var r;let{features:n=1,...o}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:(r=o["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return st()({ourProps:i,theirProps:o,slot:{},defaultTag:dh,name:"Hidden"})}let Fl=et(ph),mh=p.createContext(null);function hh({children:e}){let t=p.useContext(mh);if(!t)return p.createElement(p.Fragment,null,e);let{target:r}=t;return r?_t.createPortal(p.createElement(p.Fragment,null,e),r):null}function gh({data:e,form:t,disabled:r,onReset:n,overrides:o}){let[i,s]=p.useState(null),a=cr();return p.useEffect(()=>{if(n&&i)return a.addEventListener(i,"reset",n)},[i,t,n]),p.createElement(hh,null,p.createElement(yh,{setForm:s,formId:t}),Cl(e).map(([l,u])=>p.createElement(Fl,{features:ji.Hidden,...Yt({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:r,name:l,value:u,...o})})))}function yh({setForm:e,formId:t}){return p.useEffect(()=>{if(t){let r=document.getElementById(t);r&&e(r)}},[e,t]),t?null:p.createElement(Fl,{features:ji.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:r=>{if(!r)return;let n=r.closest("form");n&&e(n)}})}let bh=p.createContext(void 0);function Al(){return p.useContext(bh)}function xh(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&vh(r)?!1:n}function vh(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let jl=Symbol();function wh(e,t=!0){return Object.assign(e,{[jl]:t})}function pt(...e){let t=p.useRef(e);p.useEffect(()=>{t.current=e},[e]);let r=te(n=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return e.every(n=>n==null||(n==null?void 0:n[jl]))?void 0:r}let $i=p.createContext(null);$i.displayName="DescriptionContext";function $l(){let e=p.useContext($i);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,$l),t}return e}function Eh(){var e,t;return(t=(e=p.useContext($i))==null?void 0:e.value)!=null?t:void 0}let Th="p";function _h(e,t){let r=p.useId(),n=Oi(),{id:o=`headlessui-description-${r}`,...i}=e,s=$l(),a=pt(t);be(()=>s.register(o),[o,s.register]);let l=n||!1,u=p.useMemo(()=>({...s.slot,disabled:l}),[s.slot,l]),c={ref:a,...s.props,id:o};return st()({ourProps:c,theirProps:i,slot:u,defaultTag:Th,name:s.name||"Description"})}let Sh=et(_h);Object.assign(Sh,{});var De=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(De||{});let eo=p.createContext(null);eo.displayName="LabelContext";function Nl(){let e=p.useContext(eo);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Nl),t}return e}function Pl(e){var t,r,n;let o=(r=(t=p.useContext(eo))==null?void 0:t.value)!=null?r:void 0;return((n=e==null?void 0:e.length)!=null?n:0)>0?[o,...e].filter(Boolean).join(" "):o}function Ch({inherit:e=!1}={}){let t=Pl(),[r,n]=p.useState([]),o=e?[t,...r].filter(Boolean):r;return[o.length>0?o.join(" "):void 0,p.useMemo(()=>function(i){let s=te(l=>(n(u=>[...u,l]),()=>n(u=>{let c=u.slice(),f=c.indexOf(l);return f!==-1&&c.splice(f,1),c}))),a=p.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return p.createElement(eo.Provider,{value:a},i.children)},[n])]}let kh="label";function Oh(e,t){var r;let n=p.useId(),o=Nl(),i=Al(),s=Oi(),{id:a=`headlessui-label-${n}`,htmlFor:l=i??((r=o.props)==null?void 0:r.htmlFor),passive:u=!1,...c}=e,f=pt(t);be(()=>o.register(a),[a,o.register]);let h=te(x=>{let b=x.currentTarget;if(b instanceof HTMLLabelElement&&x.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(x),b instanceof HTMLLabelElement){let w=document.getElementById(b.htmlFor);if(w){let v=w.getAttribute("disabled");if(v==="true"||v==="")return;let E=w.getAttribute("aria-disabled");if(E==="true"||E==="")return;(w instanceof HTMLInputElement&&(w.type==="radio"||w.type==="checkbox")||w.role==="radio"||w.role==="checkbox"||w.role==="switch")&&w.click(),w.focus({preventScroll:!0})}}}),m=s||!1,d=p.useMemo(()=>({...o.slot,disabled:m}),[o.slot,m]),y={ref:f,...o.props,id:a,htmlFor:l,onClick:h};return u&&("onClick"in y&&(delete y.htmlFor,delete y.onClick),"onClick"in c&&delete c.onClick),st()({ourProps:y,theirProps:c,slot:d,defaultTag:l?kh:"div",name:o.name||"Label"})}let Fh=et(Oh),Ah=Object.assign(Fh,{});function jh(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function $h(e=jh){return p.useCallback((t,r)=>{if(typeof e=="string"){let n=e;return(t==null?void 0:t[n])===(r==null?void 0:r[n])}return e(t,r)},[e])}function Nh(e){if(e===null)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}function Ph(e,t=!1){let[r,n]=p.useReducer(()=>({}),{}),o=p.useMemo(()=>Nh(e),[e,r]);return be(()=>{if(!e)return;let i=new ResizeObserver(n);return i.observe(e),()=>{i.disconnect()}},[e]),t?{width:`${o.width}px`,height:`${o.height}px`}:o}let Dh=class extends Map{constructor(t){super(),this.factory=t}get(t){let r=super.get(t);return r===void 0&&(r=this.factory(t),this.set(t,r)),r}};function Dl(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...i){let s=t[o].call(r,...i);s&&(r=s,n.forEach(a=>a()))}}}function Ll(e){return p.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}let Lh=new Dh(()=>Dl(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let r=this.slice();return r.splice(t,1),r}}));function Ni(e,t){let r=Lh.get(t),n=p.useId(),o=Ll(r);if(be(()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)},[r,e]),!e)return!1;let i=o.indexOf(n),s=o.length;return i===-1&&(i=s,s+=1),i===s-1}let Pi=new Map,un=new Map;function Il(e){var t;let r=(t=un.get(e))!=null?t:0;return un.set(e,r+1),r!==0?()=>Ml(e):(Pi.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Ml(e))}function Ml(e){var t;let r=(t=un.get(e))!=null?t:1;if(r===1?un.delete(e):un.set(e,r-1),r!==1)return;let n=Pi.get(e);n&&(n["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,Pi.delete(e))}function Ih(e,{allowed:t,disallowed:r}={}){let n=Ni(e,"inert-others");be(()=>{var o,i;if(!n)return;let s=Vt();for(let l of(o=r==null?void 0:r())!=null?o:[])l&&s.add(Il(l));let a=(i=t==null?void 0:t())!=null?i:[];for(let l of a){if(!l)continue;let u=ln(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let f of c.children)a.some(h=>f.contains(h))||s.add(Il(f));c=c.parentElement}}return s.dispose},[n,t,r])}function Mh(e,t,r){let n=fr(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&r()});p.useEffect(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=Vt();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,n,e])}let Di=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Rh=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Li=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Li||{}),Vh=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Vh||{}),Bh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Bh||{});function Rl(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Di)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function Uh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Rh)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ii=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ii||{});function Vl(e,t=0){var r;return e===((r=ln(e))==null?void 0:r.body)?!1:gt(t,{0(){return e.matches(Di)},1(){let n=e;for(;n!==null;){if(n.matches(Di))return!0;n=n.parentElement}return!1}})}var zh=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(zh||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let qh=["textarea","input"].join(",");function Hh(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,qh))!=null?r:!1}function Bl(e,t=r=>r){return e.slice().sort((r,n)=>{let o=t(r),i=t(n);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Wh(e,t){return Kh(Rl(),t,{relativeTo:e})}function Kh(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?r?Bl(e):e:t&64?Uh(e):Rl(e);o.length>0&&s.length>1&&(s=s.filter(m=>!o.some(d=>d!=null&&"current"in d?(d==null?void 0:d.current)===m:d===m))),n=n??i.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(n))-1;if(t&4)return Math.max(0,s.indexOf(n))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,f=s.length,h;do{if(c>=f||c+f<=0)return 0;let m=l+c;if(t&16)m=(m+f)%f;else{if(m<0)return 3;if(m>=f)return 1}h=s[m],h==null||h.focus(u),c+=a}while(h!==i.activeElement);return t&6&&Hh(h)&&h.select(),2}function Ul(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Yh(){return/Android/gi.test(window.navigator.userAgent)}function Jh(){return Ul()||Yh()}function cn(e,t,r,n){let o=fr(r);p.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,n),()=>document.removeEventListener(t,i,n)},[e,t,n])}function Gh(e,t,r,n){let o=fr(r);p.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,n),()=>window.removeEventListener(t,i,n)},[e,t,n])}const zl=30;function Xh(e,t,r){let n=Ni(e,"outside-click"),o=fr(r),i=p.useCallback(function(l,u){if(l.defaultPrevented)return;let c=u(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(m){return typeof m=="function"?h(m()):Array.isArray(m)||m instanceof Set?m:[m]}(t);for(let h of f)if(h!==null&&(h.contains(c)||l.composed&&l.composedPath().includes(h)))return;return!Vl(c,Ii.Loose)&&c.tabIndex!==-1&&l.preventDefault(),o.current(l,c)},[o,t]),s=p.useRef(null);cn(n,"pointerdown",l=>{var u,c;s.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),cn(n,"mousedown",l=>{var u,c;s.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),cn(n,"click",l=>{Jh()||s.current&&(i(l,()=>s.current),s.current=null)},!0);let a=p.useRef({x:0,y:0});cn(n,"touchstart",l=>{a.current.x=l.touches[0].clientX,a.current.y=l.touches[0].clientY},!0),cn(n,"touchend",l=>{let u={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(u.x-a.current.x)>=zl||Math.abs(u.y-a.current.y)>=zl))return i(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),Gh(n,"blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Mi(...e){return p.useMemo(()=>ln(...e),[...e])}function Zh(e,t){return p.useMemo(()=>{var r;if(e.type)return e.type;let n=(r=e.as)!=null?r:"button";if(typeof n=="string"&&n.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function Qh(){let e;return{before({doc:t}){var r;let n=t.documentElement,o=(r=t.defaultView)!=null?r:window;e=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),i=Math.max(0,e-o);r.style(n,"paddingRight",`${i}px`)}}}function eg(){return Ul()?{before({doc:e,d:t,meta:r}){function n(o){return r.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Vt();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=e.querySelector(u);c&&!n(c)&&(s=c)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(n(a.target)){let l=a.target;for(;l.parentElement&&n(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(n(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;i!==l&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function tg(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function rg(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let dr=Dl(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Vt(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:rg(r)},o=[eg(),Qh(),tg()];o.forEach(({before:i})=>i==null?void 0:i(n)),o.forEach(({after:i})=>i==null?void 0:i(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});dr.subscribe(()=>{let e=dr.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!n||!o&&n)&&dr.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&dr.dispatch("TEARDOWN",r)}});function ng(e,t,r=()=>({containers:[]})){let n=Ll(dr),o=t?n.get(t):void 0,i=o?o.count>0:!1;return be(()=>{if(!(!t||!e))return dr.dispatch("PUSH",t,r),()=>dr.dispatch("POP",t,r)},[e,t]),i}function og(e,t,r=()=>[document.body]){let n=Ni(e,"scroll-lock");ng(n,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],r]}})}function ql(e){return[e.screenX,e.screenY]}function ig(){let e=p.useRef([-1,-1]);return{wasMoved(t){let r=ql(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=ql(t)}}}function sg(e=0){let[t,r]=p.useState(e),n=p.useCallback(l=>r(l),[t]),o=p.useCallback(l=>r(u=>u|l),[t]),i=p.useCallback(l=>(t&l)===l,[t]),s=p.useCallback(l=>r(u=>u&~l),[r]),a=p.useCallback(l=>r(u=>u^l),[r]);return{flags:t,setFlag:n,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var Hl,Wl;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Hl=process==null?void 0:process.env)==null?void 0:Hl.NODE_ENV)==="test"&&typeof((Wl=Element==null?void 0:Element.prototype)==null?void 0:Wl.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
52
|
+
`)),[]});var ag=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(ag||{});function Kl(e){let t={};for(let r in e)e[r]===!0&&(t[`data-${r}`]="");return t}function Yl(e,t,r,n){let[o,i]=p.useState(r),{hasFlag:s,addFlag:a,removeFlag:l}=sg(e&&o?3:0),u=p.useRef(!1),c=p.useRef(!1),f=cr();return be(()=>{var h;if(e){if(r&&i(!0),!t){r&&a(3);return}return(h=n==null?void 0:n.start)==null||h.call(n,r),lg(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(r?(a(3),l(4)):(a(4),l(2)))},run(){c.current?r?(l(3),a(4)):(l(4),a(3)):r?l(1):a(1)},done(){var m;c.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),r||i(!1),(m=n==null?void 0:n.end)==null||m.call(n,r))}})}},[e,r,t,f]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function lg(e,{prepare:t,run:r,done:n,inFlight:o}){let i=Vt();return cg(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{r(),i.requestAnimationFrame(()=>{i.add(ug(e,n))})}),i.dispose}function ug(e,t){var r,n;let o=Vt();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let s=(n=(r=e.getAnimations)==null?void 0:r.call(e).filter(a=>a instanceof CSSTransition))!=null?n:[];return s.length===0?(t(),o.dispose):(Promise.allSettled(s.map(a=>a.finished)).then(()=>{i||t()}),o.dispose)}function cg(e,{inFlight:t,prepare:r}){if(t!=null&&t.current){r();return}let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}function to(){return typeof window<"u"}function Ar(e){return Jl(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(Jl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Jl(e){return to()?e instanceof Node||e instanceof at(e).Node:!1}function ze(e){return to()?e instanceof Element||e instanceof at(e).Element:!1}function Ct(e){return to()?e instanceof HTMLElement||e instanceof at(e).HTMLElement:!1}function Gl(e){return!to()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}function fn(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function fg(e){return["table","td","th"].includes(Ar(e))}function ro(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ri(e){const t=Vi(),r=ze(e)?yt(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function dg(e){let t=Jt(e);for(;Ct(t)&&!jr(t);){if(Ri(t))return t;if(ro(t))return null;t=Jt(t)}return null}function Vi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jr(e){return["html","body","#document"].includes(Ar(e))}function yt(e){return at(e).getComputedStyle(e)}function no(e){return ze(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jt(e){if(Ar(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gl(e)&&e.host||St(e);return Gl(t)?t.host:t}function Xl(e){const t=Jt(e);return jr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ct(t)&&fn(t)?t:Xl(t)}function dn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Xl(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=at(o);if(i){const a=Bi(s);return t.concat(s,s.visualViewport||[],fn(o)?o:[],a&&r?dn(a):[])}return t.concat(o,dn(o,[],r))}function Bi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pg(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}const pr=Math.min,qe=Math.max,pn=Math.round,oo=Math.floor,kt=e=>({x:e,y:e}),mg={left:"right",right:"left",bottom:"top",top:"bottom"},hg={start:"end",end:"start"};function Zl(e,t,r){return qe(e,pr(t,r))}function $r(e,t){return typeof e=="function"?e(t):e}function Gt(e){return e.split("-")[0]}function mn(e){return e.split("-")[1]}function Ql(e){return e==="x"?"y":"x"}function eu(e){return e==="y"?"height":"width"}function mr(e){return["top","bottom"].includes(Gt(e))?"y":"x"}function tu(e){return Ql(mr(e))}function gg(e,t,r){r===void 0&&(r=!1);const n=mn(e),o=tu(e),i=eu(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=io(s)),[s,io(s)]}function yg(e){const t=io(e);return[Ui(e),t,Ui(t)]}function Ui(e){return e.replace(/start|end/g,t=>hg[t])}function bg(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:s;default:return[]}}function xg(e,t,r,n){const o=mn(e);let i=bg(Gt(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ui)))),i}function io(e){return e.replace(/left|right|bottom|top/g,t=>mg[t])}function vg(e){return{top:0,right:0,bottom:0,left:0,...e}}function wg(e){return typeof e!="number"?vg(e):{top:e,right:e,bottom:e,left:e}}function so(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ru(e,t,r){let{reference:n,floating:o}=e;const i=mr(t),s=tu(t),a=eu(s),l=Gt(t),u=i==="y",c=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let m;switch(l){case"top":m={x:c,y:n.y-o.height};break;case"bottom":m={x:c,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-o.width,y:f};break;default:m={x:n.x,y:n.y}}switch(mn(t)){case"start":m[s]-=h*(r&&u?-1:1);break;case"end":m[s]+=h*(r&&u?-1:1);break}return m}const Eg=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=ru(u,n,l),h=n,m={},d=0;for(let y=0;y<a.length;y++){const{name:x,fn:b}=a[y],{x:w,y:v,data:E,reset:k}=await b({x:c,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});c=w??c,f=v??f,m={...m,[x]:{...m[x],...E}},k&&d<=50&&(d++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(u=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:c,y:f}=ru(u,h,l)),y=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:m}};async function ao(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=$r(t,e),d=wg(m),x=a[h?f==="floating"?"reference":"floating":f],b=so(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),w=f==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),E=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},k=so(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(b.top-k.top+d.top)/E.y,bottom:(k.bottom-b.bottom+d.bottom)/E.y,left:(b.left-k.left+d.left)/E.x,right:(k.right-b.right+d.right)/E.x}}const Tg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:y=!0,...x}=$r(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const b=Gt(o),w=mr(a),v=Gt(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=h||(v||!y?[io(a)]:yg(a)),T=d!=="none";!h&&T&&k.push(...xg(a,y,d,E));const C=[a,...k],O=await ao(t,x),j=[];let D=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&j.push(O[b]),f){const H=gg(o,s,E);j.push(O[H[0]],O[H[1]])}if(D=[...D,{placement:o,overflows:j}],!j.every(H=>H<=0)){var N,L;const H=(((N=i.flip)==null?void 0:N.index)||0)+1,J=C[H];if(J)return{data:{index:H,overflows:D},reset:{placement:J}};let z=(L=D.filter(X=>X.overflows[0]<=0).sort((X,K)=>X.overflows[1]-K.overflows[1])[0])==null?void 0:L.placement;if(!z)switch(m){case"bestFit":{var R;const X=(R=D.filter(K=>{if(T){const Q=mr(K.placement);return Q===w||Q==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(Q=>Q>0).reduce((Q,re)=>Q+re,0)]).sort((K,Q)=>K[1]-Q[1])[0])==null?void 0:R[0];X&&(z=X);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};async function _g(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Gt(r),a=mn(r),l=mr(r)==="y",u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,f=$r(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof d=="number"&&(m=a==="end"?d*-1:d),l?{x:m*c,y:h*u}:{x:h*u,y:m*c}}const Sg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await _g(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Cg=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:x=>{let{x:b,y:w}=x;return{x:b,y:w}}},...l}=$r(e,t),u={x:r,y:n},c=await ao(t,l),f=mr(Gt(o)),h=Ql(f);let m=u[h],d=u[f];if(i){const x=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=m+c[x],v=m-c[b];m=Zl(w,m,v)}if(s){const x=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=d+c[x],v=d-c[b];d=Zl(w,d,v)}const y=a.fn({...t,[h]:m,[f]:d});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[h]:i,[f]:s}}}}}},kg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=$r(e,t),c=await ao(t,u),f=Gt(o),h=mn(o),m=mr(o)==="y",{width:d,height:y}=i.floating;let x,b;f==="top"||f==="bottom"?(x=f,b=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,x=h==="end"?"top":"bottom");const w=y-c.top-c.bottom,v=d-c.left-c.right,E=pr(y-c[x],w),k=pr(d-c[b],v),T=!t.middlewareData.shift;let C=E,O=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(O=v),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=w),T&&!h){const D=qe(c.left,0),N=qe(c.right,0),L=qe(c.top,0),R=qe(c.bottom,0);m?O=d-2*(D!==0||N!==0?D+N:qe(c.left,c.right)):C=y-2*(L!==0||R!==0?L+R:qe(c.top,c.bottom))}await l({...t,availableWidth:O,availableHeight:C});const j=await s.getDimensions(a.floating);return d!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}};function nu(e){const t=yt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ct(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=pn(r)!==i||pn(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function zi(e){return ze(e)?e:e.contextElement}function Nr(e){const t=zi(e);if(!Ct(t))return kt(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=nu(t);let s=(i?pn(r.width):r.width)/n,a=(i?pn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Og=kt(0);function ou(e){const t=at(e);return!Vi()||!t.visualViewport?Og:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fg(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==at(e)?!1:t}function hr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=zi(e);let s=kt(1);t&&(n?ze(n)&&(s=Nr(n)):s=Nr(e));const a=Fg(i,r,n)?ou(i):kt(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,f=o.height/s.y;if(i){const h=at(i),m=n&&ze(n)?at(n):n;let d=h,y=Bi(d);for(;y&&n&&m!==d;){const x=Nr(y),b=y.getBoundingClientRect(),w=yt(y),v=b.left+(y.clientLeft+parseFloat(w.paddingLeft))*x.x,E=b.top+(y.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=v,u+=E,d=at(y),y=Bi(d)}}return so({width:c,height:f,x:l,y:u})}function qi(e,t){const r=no(e).scrollLeft;return t?t.left+r:hr(St(e)).left+r}function iu(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:qi(e,n)),i=n.top+t.scrollTop;return{x:o,y:i}}function Ag(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=St(n),a=t?ro(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=kt(1);const c=kt(0),f=Ct(n);if((f||!f&&!i)&&((Ar(n)!=="body"||fn(s))&&(l=no(n)),Ct(n))){const m=hr(n);u=Nr(n),c.x=m.x+n.clientLeft,c.y=m.y+n.clientTop}const h=s&&!f&&!i?iu(s,l,!0):kt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:r.y*u.y-l.scrollTop*u.y+c.y+h.y}}function jg(e){return Array.from(e.getClientRects())}function $g(e){const t=St(e),r=no(e),n=e.ownerDocument.body,o=qe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=qe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+qi(e);const a=-r.scrollTop;return yt(n).direction==="rtl"&&(s+=qe(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Ng(e,t){const r=at(e),n=St(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Vi();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function Pg(e,t){const r=hr(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Ct(e)?Nr(e):kt(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=n*i.y;return{width:s,height:a,x:l,y:u}}function su(e,t,r){let n;if(t==="viewport")n=Ng(e,r);else if(t==="document")n=$g(St(e));else if(ze(t))n=Pg(t,r);else{const o=ou(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return so(n)}function au(e,t){const r=Jt(e);return r===t||!ze(r)||jr(r)?!1:yt(r).position==="fixed"||au(r,t)}function Dg(e,t){const r=t.get(e);if(r)return r;let n=dn(e,[],!1).filter(a=>ze(a)&&Ar(a)!=="body"),o=null;const i=yt(e).position==="fixed";let s=i?Jt(e):e;for(;ze(s)&&!jr(s);){const a=yt(s),l=Ri(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||fn(s)&&!l&&au(e,s))?n=n.filter(c=>c!==s):o=a,s=Jt(s)}return t.set(e,n),n}function Lg(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?ro(t)?[]:Dg(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((u,c)=>{const f=su(t,c,o);return u.top=qe(f.top,u.top),u.right=pr(f.right,u.right),u.bottom=pr(f.bottom,u.bottom),u.left=qe(f.left,u.left),u},su(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ig(e){const{width:t,height:r}=nu(e);return{width:t,height:r}}function Mg(e,t,r){const n=Ct(t),o=St(t),i=r==="fixed",s=hr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=kt(0);if(n||!n&&!i)if((Ar(t)!=="body"||fn(o))&&(a=no(t)),n){const h=hr(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=qi(o));const u=o&&!n&&!i?iu(o,a):kt(0),c=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:c,y:f,width:s.width,height:s.height}}function Hi(e){return yt(e).position==="static"}function lu(e,t){if(!Ct(e)||yt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return St(e)===r&&(r=r.ownerDocument.body),r}function uu(e,t){const r=at(e);if(ro(e))return r;if(!Ct(e)){let o=Jt(e);for(;o&&!jr(o);){if(ze(o)&&!Hi(o))return o;o=Jt(o)}return r}let n=lu(e,t);for(;n&&fg(n)&&Hi(n);)n=lu(n,t);return n&&jr(n)&&Hi(n)&&!Ri(n)?r:n||dg(e)||r}const Rg=async function(e){const t=this.getOffsetParent||uu,r=this.getDimensions,n=await r(e.floating);return{reference:Mg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Vg(e){return yt(e).direction==="rtl"}const Bg={convertOffsetParentRelativeRectToViewportRelativeRect:Ag,getDocumentElement:St,getClippingRect:Lg,getOffsetParent:uu,getElementRects:Rg,getClientRects:jg,getDimensions:Ig,getScale:Nr,isElement:ze,isRTL:Vg};function Ug(e,t){let r=null,n;const o=St(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const m=oo(c),d=oo(o.clientWidth-(u+f)),y=oo(o.clientHeight-(c+h)),x=oo(u),w={rootMargin:-m+"px "+-d+"px "+-y+"px "+-x+"px",threshold:qe(0,pr(1,l))||1};let v=!0;function E(k){const T=k[0].intersectionRatio;if(T!==l){if(!v)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}v=!1}try{r=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(E,w)}r.observe(e)}return s(!0),i}function zg(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=zi(e),c=o||i?[...u?dn(u):[],...dn(t)]:[];c.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const f=u&&a?Ug(u,r):null;let h=-1,m=null;s&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(t)})),r()}),u&&!l&&m.observe(u),m.observe(t));let d,y=l?hr(e):null;l&&x();function x(){const b=hr(e);y&&(b.x!==y.x||b.y!==y.y||b.width!==y.width||b.height!==y.height)&&r(),y=b,d=requestAnimationFrame(x)}return r(),()=>{var b;c.forEach(w=>{o&&w.removeEventListener("scroll",r),i&&w.removeEventListener("resize",r)}),f==null||f(),(b=m)==null||b.disconnect(),m=null,l&&cancelAnimationFrame(d)}}const Wi=ao,qg=Sg,Hg=Cg,Wg=Tg,Kg=kg,Yg=(e,t,r)=>{const n=new Map,o={platform:Bg,...r},i={...o.platform,_c:n};return Eg(e,t,{...o,platform:i})};var lo=typeof document<"u"?p.useLayoutEffect:p.useEffect;function uo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!uo(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!uo(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function cu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fu(e,t){const r=cu(e);return Math.round(t*r)/r}function Ki(e){const t=A.useRef(e);return lo(()=>{t.current=e}),t}function Jg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=A.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=A.useState(n);uo(h,n)||m(n);const[d,y]=A.useState(null),[x,b]=A.useState(null),w=A.useCallback(K=>{K!==T.current&&(T.current=K,y(K))},[]),v=A.useCallback(K=>{K!==C.current&&(C.current=K,b(K))},[]),E=i||d,k=s||x,T=A.useRef(null),C=A.useRef(null),O=A.useRef(c),j=l!=null,D=Ki(l),N=Ki(o),L=Ki(u),R=A.useCallback(()=>{if(!T.current||!C.current)return;const K={placement:t,strategy:r,middleware:h};N.current&&(K.platform=N.current),Yg(T.current,C.current,K).then(Q=>{const re={...Q,isPositioned:L.current!==!1};H.current&&!uo(O.current,re)&&(O.current=re,$n.flushSync(()=>{f(re)}))})},[h,t,r,N,L]);lo(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(K=>({...K,isPositioned:!1})))},[u]);const H=A.useRef(!1);lo(()=>(H.current=!0,()=>{H.current=!1}),[]),lo(()=>{if(E&&(T.current=E),k&&(C.current=k),E&&k){if(D.current)return D.current(E,k,R);R()}},[E,k,R,D,j]);const J=A.useMemo(()=>({reference:T,floating:C,setReference:w,setFloating:v}),[w,v]),z=A.useMemo(()=>({reference:E,floating:k}),[E,k]),X=A.useMemo(()=>{const K={position:r,left:0,top:0};if(!z.floating)return K;const Q=fu(z.floating,c.x),re=fu(z.floating,c.y);return a?{...K,transform:"translate("+Q+"px, "+re+"px)",...cu(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:re}},[r,a,z.floating,c.x,c.y]);return A.useMemo(()=>({...c,update:R,refs:J,elements:z,floatingStyles:X}),[c,R,J,z,X])}const du=(e,t)=>({...qg(e),options:[e,t]}),Gg=(e,t)=>({...Hg(e),options:[e,t]}),Xg=(e,t)=>({...Wg(e),options:[e,t]}),Zg=(e,t)=>({...Kg(e),options:[e,t]}),pu={...A},Qg=pu.useInsertionEffect||(e=>e());function mu(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Qg(()=>{t.current=e}),A.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var Yi=typeof document<"u"?p.useLayoutEffect:p.useEffect;let hu=!1,ey=0;const gu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ey++;function ty(){const[e,t]=A.useState(()=>hu?gu():void 0);return Yi(()=>{e==null&&t(gu())},[]),A.useEffect(()=>{hu=!0},[]),e}const ry=pu.useId||ty;let hn;process.env.NODE_ENV!=="production"&&(hn=new Set);function ny(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=hn)!=null&&e.has(o))){var i;(i=hn)==null||i.add(o),console.warn(o)}}function oy(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=hn)!=null&&e.has(o))){var i;(i=hn)==null||i.add(o),console.error(o)}}function iy(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const sy=A.createContext(null),ay=A.createContext(null),ly=()=>{var e;return((e=A.useContext(sy))==null?void 0:e.id)||null},uy=()=>A.useContext(ay),cy="data-floating-ui-focusable";function fy(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=ry(),i=A.useRef({}),[s]=A.useState(()=>iy()),a=ly()!=null;if(process.env.NODE_ENV!=="production"){const m=n.reference;m&&!ze(m)&&oy("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=A.useState(n.reference),c=mu((m,d,y)=>{i.current.openEvent=m?d:void 0,s.emit("openchange",{open:m,event:d,reason:y,nested:a}),r==null||r(m,d,y)}),f=A.useMemo(()=>({setPositionReference:u}),[]),h=A.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:c,elements:h,events:s,floatingId:o,refs:f}),[t,c,h,s,o,f])}function dy(e){e===void 0&&(e={});const{nodeId:t}=e,r=fy({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,s]=A.useState(null),[a,l]=A.useState(null),c=(o==null?void 0:o.domReference)||i,f=A.useRef(null),h=uy();Yi(()=>{c&&(f.current=c)},[c]);const m=Jg({...e,elements:{...o,...a&&{reference:a}}}),d=A.useCallback(v=>{const E=ze(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;l(E),m.refs.setReference(E)},[m.refs]),y=A.useCallback(v=>{(ze(v)||v===null)&&(f.current=v,s(v)),(ze(m.refs.reference.current)||m.refs.reference.current===null||v!==null&&!ze(v))&&m.refs.setReference(v)},[m.refs]),x=A.useMemo(()=>({...m.refs,setReference:y,setPositionReference:d,domReference:f}),[m.refs,y,d]),b=A.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),w=A.useMemo(()=>({...m,...n,refs:x,elements:b,nodeId:t}),[m,x,b,t,n]);return Yi(()=>{n.dataRef.current.floatingContext=w;const v=h==null?void 0:h.nodesRef.current.find(E=>E.id===t);v&&(v.context=w)}),A.useMemo(()=>({...m,context:w,refs:x,elements:b}),[m,x,b,w])}const yu="active",bu="selected";function Ji(e,t,r){const n=new Map,o=r==="item";let i=e;if(o&&e){const{[yu]:s,[bu]:a,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[cy]:""},...i,...t.map(s=>{const a=s?s[r]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[u,c]=l;if(!(o&&[yu,bu].includes(u)))if(u.indexOf("on")===0){if(n.has(u)||n.set(u,[]),typeof c=="function"){var f;(f=n.get(u))==null||f.push(c),s[u]=function(){for(var h,m=arguments.length,d=new Array(m),y=0;y<m;y++)d[y]=arguments[y];return(h=n.get(u))==null?void 0:h.map(x=>x(...d)).find(x=>x!==void 0)}}}else s[u]=c}),s),{})}}function py(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),r=e.map(a=>a==null?void 0:a.floating),n=e.map(a=>a==null?void 0:a.item),o=A.useCallback(a=>Ji(a,e,"reference"),t),i=A.useCallback(a=>Ji(a,e,"floating"),r),s=A.useCallback(a=>Ji(a,e,"item"),n);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function xu(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const my=e=>({name:"inner",options:e,async fn(t){const{listRef:r,overflowRef:n,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=$r(e,t),{rects:f,elements:{floating:h}}=t,m=r.current[s],d=(u==null?void 0:u.current)||h,y=h.clientTop||d.clientTop,x=h.clientTop!==0,b=d.clientTop!==0,w=h===d;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||ny('`placement` side must be "bottom" when using the `inner`',"middleware.")),!m)return{};const v={...t,...await du(-m.offsetTop-h.clientTop-f.reference.height/2-m.offsetHeight/2-i).fn(t)},E=await Wi(xu(v,d.scrollHeight+y+h.clientTop),c),k=await Wi(v,{...c,elementContext:"reference"}),T=qe(0,E.top),C=v.y+T,D=(d.scrollHeight>d.clientHeight?N=>N:pn)(qe(0,d.scrollHeight+(x&&w||b?y*2:0)-T-qe(0,E.bottom)));if(d.style.maxHeight=D+"px",d.scrollTop=T,o){const N=d.offsetHeight<m.offsetHeight*pr(a,r.current.length)-1||k.top>=-l||k.bottom>=-l;$n.flushSync(()=>o(N))}return n&&(n.current=await Wi(xu({...v,y:C},d.offsetHeight+y+h.clientTop),c)),{y:C}}});function hy(e,t){const{open:r,elements:n}=e,{enabled:o=!0,overflowRef:i,scrollRef:s,onChange:a}=t,l=mu(a),u=A.useRef(!1),c=A.useRef(null),f=A.useRef(null);A.useEffect(()=>{if(!o)return;function m(y){if(y.ctrlKey||!d||i.current==null)return;const x=y.deltaY,b=i.current.top>=-.5,w=i.current.bottom>=-.5,v=d.scrollHeight-d.clientHeight,E=x<0?-1:1,k=x<0?"max":"min";d.scrollHeight<=d.clientHeight||(!b&&x>0||!w&&x<0?(y.preventDefault(),$n.flushSync(()=>{l(T=>T+Math[k](x,v*E))})):/firefox/i.test(pg())&&(d.scrollTop+=x))}const d=(s==null?void 0:s.current)||n.floating;if(r&&d)return d.addEventListener("wheel",m),requestAnimationFrame(()=>{c.current=d.scrollTop,i.current!=null&&(f.current={...i.current})}),()=>{c.current=null,f.current=null,d.removeEventListener("wheel",m)}},[o,r,n.floating,i,s,l]);const h=A.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const m=(s==null?void 0:s.current)||n.floating;if(!(!i.current||!m||!u.current)){if(c.current!==null){const d=m.scrollTop-c.current;(i.current.bottom<-.5&&d<-1||i.current.top<-.5&&d>1)&&$n.flushSync(()=>l(y=>y+d))}requestAnimationFrame(()=>{c.current=m.scrollTop})}}}),[n.floating,l,i,s]);return A.useMemo(()=>o?{floating:h}:{},[o,h])}let Pr=p.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Pr.displayName="FloatingContext";let Gi=p.createContext(null);Gi.displayName="PlacementContext";function gy(e){return p.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function yy(){return p.useContext(Pr).setReference}function by(){return p.useContext(Pr).getReferenceProps}function xy(){let{getFloatingProps:e,slot:t}=p.useContext(Pr);return p.useCallback((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor}),[e,t])}function vy(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=p.useContext(Gi),r=p.useMemo(()=>e,[JSON.stringify(e,(o,i)=>{var s;return(s=i==null?void 0:i.outerHTML)!=null?s:i})]);be(()=>{t==null||t(r??null)},[t,r]);let n=p.useContext(Pr);return p.useMemo(()=>[n.setFloating,e?n.styles:{}],[n.setFloating,e,n.styles])}let vu=4;function wy({children:e,enabled:t=!0}){let[r,n]=p.useState(null),[o,i]=p.useState(0),s=p.useRef(null),[a,l]=p.useState(null);Ey(a);let u=t&&r!==null&&a!==null,{to:c="bottom",gap:f=0,offset:h=0,padding:m=0,inner:d}=Ty(r,a),[y,x="center"]=c.split(" ");be(()=>{u&&i(0)},[u]);let{refs:b,floatingStyles:w,context:v}=dy({open:u,placement:y==="selection"?x==="center"?"bottom":`bottom-${x}`:x==="center"?`${y}`:`${y}-${x}`,strategy:"absolute",transform:!1,middleware:[du({mainAxis:y==="selection"?0:f,crossAxis:h}),Gg({padding:m}),y!=="selection"&&Xg({padding:m}),y==="selection"&&d?my({...d,padding:m,overflowRef:s,offset:o,minItemsVisible:vu,referenceOverflowThreshold:m,onFallbackChange(N){var L,R;if(!N)return;let H=v.elements.floating;if(!H)return;let J=parseFloat(getComputedStyle(H).scrollPaddingBottom)||0,z=Math.min(vu,H.childElementCount),X=0,K=0;for(let Q of(R=(L=v.elements.floating)==null?void 0:L.childNodes)!=null?R:[])if(Q instanceof HTMLElement){let re=Q.offsetTop,je=re+Q.clientHeight+J,Le=H.scrollTop,W=Le+H.clientHeight;if(re>=Le&&je<=W)z--;else{K=Math.max(0,Math.min(je,W)-Math.max(re,Le)),X=Q.clientHeight;break}}z>=1&&i(Q=>{let re=X*z-K+J;return Q>=re?Q:re})}}):null,Zg({padding:m,apply({availableWidth:N,availableHeight:L,elements:R}){Object.assign(R.floating.style,{overflow:"auto",maxWidth:`${N}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${L}px)`})}})].filter(Boolean),whileElementsMounted:zg}),[E=y,k=x]=v.placement.split("-");y==="selection"&&(E="selection");let T=p.useMemo(()=>({anchor:[E,k].filter(Boolean).join(" ")}),[E,k]),C=hy(v,{overflowRef:s,onChange:i}),{getReferenceProps:O,getFloatingProps:j}=py([C]),D=te(N=>{l(N),b.setFloating(N)});return A.createElement(Gi.Provider,{value:n},A.createElement(Pr.Provider,{value:{setFloating:D,setReference:b.setReference,styles:w,getReferenceProps:O,getFloatingProps:j,slot:T}},e))}function Ey(e){be(()=>{if(!e)return;let t=new MutationObserver(()=>{let r=window.getComputedStyle(e).maxHeight,n=parseFloat(r);if(isNaN(n))return;let o=parseInt(r);isNaN(o)||n!==o&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Ty(e,t){var r,n,o;let i=Xi((r=e==null?void 0:e.gap)!=null?r:"var(--anchor-gap, 0)",t),s=Xi((n=e==null?void 0:e.offset)!=null?n:"var(--anchor-offset, 0)",t),a=Xi((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}function Xi(e,t,r=void 0){let n=cr(),o=te((l,u)=>{if(l==null)return[r,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[r,null];let c=Eu(l,u);return[c,f=>{let h=wu(l);{let m=h.map(d=>window.getComputedStyle(u).getPropertyValue(d));n.requestAnimationFrame(function d(){n.nextFrame(d);let y=!1;for(let[b,w]of h.entries()){let v=window.getComputedStyle(u).getPropertyValue(w);if(m[b]!==v){m[b]=v,y=!0;break}}if(!y)return;let x=Eu(l,u);c!==x&&(f(x),c=x)})}return n.dispose}]}return[r,null]}),i=p.useMemo(()=>o(e,t)[0],[e,t]),[s=i,a]=p.useState();return be(()=>{let[l,u]=o(e,t);if(a(l),!!u)return u(a)},[e,t]),s}function wu(e){let t=/var\((.*)\)/.exec(e);if(t){let r=t[1].indexOf(",");if(r===-1)return[t[1]];let n=t[1].slice(0,r).trim(),o=t[1].slice(r+1).trim();return o?[n,...wu(o)]:[n]}return[]}function Eu(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}function _y(e,t){let[r,n]=p.useState(t);return!e&&r!==t&&n(t),e?r:t}let Zi=p.createContext(null);Zi.displayName="OpenClosedContext";var bt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(bt||{});function Qi(){return p.useContext(Zi)}function Tu({value:e,children:t}){return p.createElement(Zi.Provider,{value:e},t)}function Sy(e){throw new Error("Unexpected object: "+e)}var Ae=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Ae||{});function es(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),o=n??-1;switch(e.focus){case 0:{for(let i=0;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 1:{o===-1&&(o=r.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 2:{for(let i=o+1;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 3:{for(let i=r.length-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 4:{for(let i=0;i<r.length;++i)if(t.resolveId(r[i],i,r)===e.id)return i;return n}case 5:return null;default:Sy(e)}}function Cy(e){let t=te(e),r=p.useRef(!1);p.useEffect(()=>(r.current=!1,()=>{r.current=!0,Tl(()=>{r.current&&t()})}),[t])}function ky(){let e=typeof document>"u";return"useSyncExternalStore"in A?(t=>t.useSyncExternalStore)(A)(()=>()=>{},()=>!1,()=>!e):!1}function ts(){let e=ky(),[t,r]=A.useState(ur.isHandoffComplete);return t&&ur.isHandoffComplete===!1&&r(!1),A.useEffect(()=>{t!==!0&&r(!0)},[t]),A.useEffect(()=>ur.handoff(),[]),e?!1:t}let Oy=p.createContext(!1);function Fy(){return p.useContext(Oy)}function Ay(e){let t=Fy(),r=p.useContext(Su),n=Mi(e),[o,i]=p.useState(()=>{var s;if(!t&&r!==null)return(s=r.current)!=null?s:null;if(ur.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let l=n.createElement("div");return l.setAttribute("id","headlessui-portal-root"),n.body.appendChild(l)});return p.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),p.useEffect(()=>{t||r!==null&&i(r.current)},[r,i,t]),o}let _u=p.Fragment,jy=et(function(e,t){let r=e,n=p.useRef(null),o=pt(wh(f=>{n.current=f}),t),i=Mi(n),s=Ay(n),[a]=p.useState(()=>{var f;return ur.isServer?null:(f=i==null?void 0:i.createElement("div"))!=null?f:null}),l=p.useContext(Dy),u=ts();be(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),be(()=>{if(a&&l)return l.register(a)},[l,a]),Cy(()=>{var f;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((f=s.parentElement)==null||f.removeChild(s)))});let c=st();return u?!s||!a?null:_t.createPortal(c({ourProps:{ref:o},theirProps:r,slot:{},defaultTag:_u,name:"Portal"}),a):null});function $y(e,t){let r=pt(t),{enabled:n=!0,...o}=e,i=st();return n?p.createElement(jy,{...o,ref:r}):i({ourProps:{ref:r},theirProps:o,slot:{},defaultTag:_u,name:"Portal"})}let Ny=p.Fragment,Su=p.createContext(null);function Py(e,t){let{target:r,...n}=e,o={ref:pt(t)},i=st();return p.createElement(Su.Provider,{value:r},i({ourProps:o,theirProps:n,defaultTag:Ny,name:"Popover.Group"}))}let Dy=p.createContext(null),Ly=et($y),Iy=et(Py),My=Object.assign(Ly,{Group:Iy});function Ry(){let e=p.useRef(!1);return be(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Cu(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:Ou)!==p.Fragment||p.Children.count(e.children)===1}let co=p.createContext(null);co.displayName="TransitionContext";var Vy=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Vy||{});function By(){let e=p.useContext(co);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Uy(){let e=p.useContext(fo);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let fo=p.createContext(null);fo.displayName="NestingContext";function po(e){return"children"in e?po(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function ku(e,t){let r=fr(e),n=p.useRef([]),o=Ry(),i=cr(),s=te((m,d=Kt.Hidden)=>{let y=n.current.findIndex(({el:x})=>x===m);y!==-1&&(gt(d,{[Kt.Unmount](){n.current.splice(y,1)},[Kt.Hidden](){n.current[y].state="hidden"}}),i.microTask(()=>{var x;!po(n)&&o.current&&((x=r.current)==null||x.call(r))}))}),a=te(m=>{let d=n.current.find(({el:y})=>y===m);return d?d.state!=="visible"&&(d.state="visible"):n.current.push({el:m,state:"visible"}),()=>s(m,Kt.Unmount)}),l=p.useRef([]),u=p.useRef(Promise.resolve()),c=p.useRef({enter:[],leave:[]}),f=te((m,d,y)=>{l.current.splice(0),t&&(t.chains.current[d]=t.chains.current[d].filter(([x])=>x!==m)),t==null||t.chains.current[d].push([m,new Promise(x=>{l.current.push(x)})]),t==null||t.chains.current[d].push([m,new Promise(x=>{Promise.all(c.current[d].map(([b,w])=>w)).then(()=>x())})]),d==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>y(d)):y(d)}),h=te((m,d,y)=>{Promise.all(c.current[d].splice(0).map(([x,b])=>b)).then(()=>{var x;(x=l.current.shift())==null||x()}).then(()=>y(d))});return p.useMemo(()=>({children:n,register:a,unregister:s,onStart:f,onStop:h,wait:u,chains:c}),[a,s,n,f,h,c,u])}let Ou=p.Fragment,Fu=Zn.RenderStrategy;function zy(e,t){var r,n;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:c,enterTo:f,entered:h,leave:m,leaveFrom:d,leaveTo:y,...x}=e,[b,w]=p.useState(null),v=p.useRef(null),E=Cu(e),k=pt(...E?[v,t,w]:t===null?[]:[t]),T=(r=x.unmount)==null||r?Kt.Unmount:Kt.Hidden,{show:C,appear:O,initial:j}=By(),[D,N]=p.useState(C?"visible":"hidden"),L=Uy(),{register:R,unregister:H}=L;be(()=>R(v),[R,v]),be(()=>{if(T===Kt.Hidden&&v.current){if(C&&D!=="visible"){N("visible");return}return gt(D,{hidden:()=>H(v),visible:()=>R(v)})}},[D,v,R,H,C,T]);let J=ts();be(()=>{if(E&&J&&D==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,D,J,E]);let z=j&&!O,X=O&&C&&j,K=p.useRef(!1),Q=ku(()=>{K.current||(N("hidden"),H(v))},L),re=te($e=>{K.current=!0;let Se=$e?"enter":"leave";Q.onStart(v,Se,Ie=>{Ie==="enter"?i==null||i():Ie==="leave"&&(a==null||a())})}),je=te($e=>{let Se=$e?"enter":"leave";K.current=!1,Q.onStop(v,Se,Ie=>{Ie==="enter"?s==null||s():Ie==="leave"&&(l==null||l())}),Se==="leave"&&!po(Q)&&(N("hidden"),H(v))});p.useEffect(()=>{E&&o||(re(C),je(C))},[C,E,o]);let Le=!(!o||!E||!J||z),[,W]=Yl(Le,b,C,{start:re,end:je}),we=Yt({ref:k,className:((n=Fi(x.className,X&&u,X&&c,W.enter&&u,W.enter&&W.closed&&c,W.enter&&!W.closed&&f,W.leave&&m,W.leave&&!W.closed&&d,W.leave&&W.closed&&y,!W.transition&&C&&h))==null?void 0:n.trim())||void 0,...Kl(W)}),_e=0;D==="visible"&&(_e|=bt.Open),D==="hidden"&&(_e|=bt.Closed),W.enter&&(_e|=bt.Opening),W.leave&&(_e|=bt.Closing);let le=st();return p.createElement(fo.Provider,{value:Q},p.createElement(Tu,{value:_e},le({ourProps:we,theirProps:x,defaultTag:Ou,features:Fu,visible:D==="visible",name:"Transition.Child"})))}function qy(e,t){let{show:r,appear:n=!1,unmount:o=!0,...i}=e,s=p.useRef(null),a=Cu(e),l=pt(...a?[s,t]:t===null?[]:[t]);ts();let u=Qi();if(r===void 0&&u!==null&&(r=(u&bt.Open)===bt.Open),r===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=p.useState(r?"visible":"hidden"),h=ku(()=>{r||f("hidden")}),[m,d]=p.useState(!0),y=p.useRef([r]);be(()=>{m!==!1&&y.current[y.current.length-1]!==r&&(y.current.push(r),d(!1))},[y,r]);let x=p.useMemo(()=>({show:r,appear:n,initial:m}),[r,n,m]);be(()=>{r?f("visible"):!po(h)&&s.current!==null&&f("hidden")},[r,h]);let b={unmount:o},w=te(()=>{var k;m&&d(!1),(k=e.beforeEnter)==null||k.call(e)}),v=te(()=>{var k;m&&d(!1),(k=e.beforeLeave)==null||k.call(e)}),E=st();return p.createElement(fo.Provider,{value:h},p.createElement(co.Provider,{value:x},E({ourProps:{...b,as:p.Fragment,children:p.createElement(Au,{ref:l,...b,...i,beforeEnter:w,beforeLeave:v})},theirProps:{},defaultTag:p.Fragment,features:Fu,visible:c==="visible",name:"Transition"})))}function Hy(e,t){let r=p.useContext(co)!==null,n=Qi()!==null;return p.createElement(p.Fragment,null,!r&&n?p.createElement(rs,{ref:t,...e}):p.createElement(Au,{ref:t,...e}))}let rs=et(qy),Au=et(zy),Wy=et(Hy),ju=Object.assign(rs,{Child:Wy,Root:rs});function Ky(e,t){let r=p.useRef({left:0,top:0});if(be(()=>{if(!t)return;let o=t.getBoundingClientRect();o&&(r.current=o)},[e,t]),t==null||!e||t===document.activeElement)return!1;let n=t.getBoundingClientRect();return n.top!==r.current.top||n.left!==r.current.left}let $u=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Nu(e){var t,r;let n=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return n;let i=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),i=!0;let s=i?(r=o.innerText)!=null?r:"":n;return $u.test(s)&&(s=s.replace($u,"")),s}function Yy(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(o=>{let i=document.getElementById(o);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():Nu(i).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return Nu(e).trim()}function Jy(e){let t=p.useRef(""),r=p.useRef("");return te(()=>{let n=e.current;if(!n)return"";let o=n.innerText;if(t.current===o)return r.current;let i=Yy(n).trim().toLowerCase();return t.current=o,r.current=i,i})}var Gy=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Gy||{}),Xy=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Xy||{}),Zy=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Zy||{}),Qy=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(Qy||{});function ns(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=Bl(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=r?n.indexOf(r):null;return o===-1&&(o=null),{options:n,activeOptionIndex:o}}let e0={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,n=e.options.findIndex(o=>r(o.dataRef.current.value));return n!==-1&&(t=n),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var r,n,o,i,s;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===Ae.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Ae.Specific)return{...a,activeOptionIndex:e.options.findIndex(c=>c.id===t.id)};if(t.focus===Ae.Previous){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=es(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled});if(h!==null){let m=e.options[h].dataRef.current.domRef;if(((n=f.current)==null?void 0:n.previousElementSibling)===m.current||((o=m.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeOptionIndex:h}}}}else if(t.focus===Ae.Next){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=es(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled});if(h!==null){let m=e.options[h].dataRef.current.domRef;if(((i=f.current)==null?void 0:i.nextElementSibling)===m.current||((s=m.current)==null?void 0:s.nextElementSibling)===null)return{...a,activeOptionIndex:h}}}}let l=ns(e),u=es(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(s=>{var a;return!s.dataRef.current.disabled&&((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(n))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},n=ns(e,o=>[...o,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(r)),{...e,...n}},6:(e,t)=>{let r=ns(e,n=>{let o=n.findIndex(i=>i.id===t.id);return o!==-1&&n.splice(o,1),n});return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},os=p.createContext(null);os.displayName="ListboxActionsContext";function mo(e){let t=p.useContext(os);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,mo),r}return t}let ho=p.createContext(null);ho.displayName="ListboxDataContext";function gn(e){let t=p.useContext(ho);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,gn),r}return t}function t0(e,t){return gt(t.type,e0,e,t)}let r0=p.Fragment;function n0(e,t){var r;let n=Oi(),{value:o,defaultValue:i,form:s,name:a,onChange:l,by:u,invalid:c=!1,disabled:f=n||!1,horizontal:h=!1,multiple:m=!1,__demoMode:d=!1,...y}=e;const x=h?"horizontal":"vertical";let b=pt(t),w=ch(i),[v=m?[]:void 0,E]=uh(o,l,w),[k,T]=p.useReducer(t0,{dataRef:p.createRef(),listboxState:d?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:d}),C=p.useRef({static:!1,hold:!1}),O=p.useRef(new Map),j=$h(u),D=p.useCallback(oe=>gt(N.mode,{1:()=>v.some(ye=>j(ye,oe)),0:()=>j(v,oe)}),[v]),N=p.useMemo(()=>({...k,value:v,disabled:f,invalid:c,mode:m?1:0,orientation:x,compare:j,isSelected:D,optionsPropsRef:C,listRef:O}),[v,f,c,m,k,O]);be(()=>{k.dataRef.current=N},[N]);let L=N.listboxState===0;Xh(L,[N.buttonElement,N.optionsElement],(oe,ye)=>{var Ne;T({type:1}),Vl(ye,Ii.Loose)||(oe.preventDefault(),(Ne=N.buttonElement)==null||Ne.focus())});let R=p.useMemo(()=>({open:N.listboxState===0,disabled:f,invalid:c,value:v}),[N,f,v,c]),H=te(oe=>{let ye=N.options.find(Ne=>Ne.id===oe);ye&&je(ye.dataRef.current.value)}),J=te(()=>{if(N.activeOptionIndex!==null){let{dataRef:oe,id:ye}=N.options[N.activeOptionIndex];je(oe.current.value),T({type:2,focus:Ae.Specific,id:ye})}}),z=te(()=>T({type:0})),X=te(()=>T({type:1})),K=cr(),Q=te((oe,ye,Ne)=>{K.dispose(),K.microTask(()=>oe===Ae.Specific?T({type:2,focus:Ae.Specific,id:ye,trigger:Ne}):T({type:2,focus:oe,trigger:Ne}))}),re=te((oe,ye)=>(T({type:5,id:oe,dataRef:ye}),()=>T({type:6,id:oe}))),je=te(oe=>gt(N.mode,{0(){return E==null?void 0:E(oe)},1(){let ye=N.value.slice(),Ne=ye.findIndex(qt=>j(qt,oe));return Ne===-1?ye.push(oe):ye.splice(Ne,1),E==null?void 0:E(ye)}})),Le=te(oe=>T({type:3,value:oe})),W=te(()=>T({type:4})),we=te(oe=>{T({type:7,element:oe})}),_e=te(oe=>{T({type:8,element:oe})}),le=p.useMemo(()=>({onChange:je,registerOption:re,goToOption:Q,closeListbox:X,openListbox:z,selectActiveOption:J,selectOption:H,search:Le,clearSearch:W,setButtonElement:we,setOptionsElement:_e}),[]),[$e,Se]=Ch({inherit:!0}),Ie={ref:b},wt=p.useCallback(()=>{if(w!==void 0)return E==null?void 0:E(w)},[E,w]),Ce=st();return p.createElement(Se,{value:$e,props:{htmlFor:(r=N.buttonElement)==null?void 0:r.id},slot:{open:N.listboxState===0,disabled:f}},p.createElement(wy,null,p.createElement(os.Provider,{value:le},p.createElement(ho.Provider,{value:N},p.createElement(Tu,{value:gt(N.listboxState,{0:bt.Open,1:bt.Closed})},a!=null&&v!=null&&p.createElement(gh,{disabled:f,data:{[a]:v},form:s,onReset:wt}),Ce({ourProps:Ie,theirProps:y,slot:R,defaultTag:r0,name:"Listbox"}))))))}let o0="button";function i0(e,t){var r;let n=gn("Listbox.Button"),o=mo("Listbox.Button"),i=p.useId(),s=Al(),{id:a=s||`headlessui-listbox-button-${i}`,disabled:l=n.disabled||!1,autoFocus:u=!1,...c}=e,f=pt(t,yy(),o.setButtonElement),h=by(),m=te(N=>{switch(N.key){case De.Enter:fh(N.currentTarget);break;case De.Space:case De.ArrowDown:N.preventDefault(),_t.flushSync(()=>o.openListbox()),n.value||o.goToOption(Ae.First);break;case De.ArrowUp:N.preventDefault(),_t.flushSync(()=>o.openListbox()),n.value||o.goToOption(Ae.Last);break}}),d=te(N=>{switch(N.key){case De.Space:N.preventDefault();break}}),y=te(N=>{var L;if(xh(N.currentTarget))return N.preventDefault();n.listboxState===0?(_t.flushSync(()=>o.closeListbox()),(L=n.buttonElement)==null||L.focus({preventScroll:!0})):(N.preventDefault(),o.openListbox())}),x=te(N=>N.preventDefault()),b=Pl([a]),w=Eh(),{isFocusVisible:v,focusProps:E}=Xm({autoFocus:u}),{isHovered:k,hoverProps:T}=Gm({isDisabled:l}),{pressed:C,pressProps:O}=nh({disabled:l}),j=p.useMemo(()=>({open:n.listboxState===0,active:C||n.listboxState===0,disabled:l,invalid:n.invalid,value:n.value,hover:k,focus:v,autofocus:u}),[n.listboxState,n.value,l,k,v,C,n.invalid,u]),D=Sl(h(),{ref:f,id:a,type:Zh(e,n.buttonElement),"aria-haspopup":"listbox","aria-controls":(r=n.optionsElement)==null?void 0:r.id,"aria-expanded":n.listboxState===0,"aria-labelledby":b,"aria-describedby":w,disabled:l||void 0,autoFocus:u,onKeyDown:m,onKeyUp:d,onKeyPress:x,onClick:y},E,T,O);return st()({ourProps:D,theirProps:c,slot:j,defaultTag:o0,name:"Listbox.Button"})}let Pu=p.createContext(!1),s0="div",a0=Zn.RenderStrategy|Zn.Static;function l0(e,t){var r,n;let o=p.useId(),{id:i=`headlessui-listbox-options-${o}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=e,f=gy(s),[h,m]=p.useState(null);f&&(a=!0);let d=gn("Listbox.Options"),y=mo("Listbox.Options"),x=Mi(d.optionsElement),b=Qi(),[w,v]=Yl(u,h,b!==null?(b&bt.Open)===bt.Open:d.listboxState===0);Mh(w,d.buttonElement,y.closeListbox);let E=d.__demoMode?!1:l&&d.listboxState===0;og(E,x);let k=d.__demoMode?!1:l&&d.listboxState===0;Ih(k,{allowed:p.useCallback(()=>[d.buttonElement,d.optionsElement],[d.buttonElement,d.optionsElement])});let T=d.listboxState!==0,C=Ky(T,d.buttonElement)?!1:w,O=w&&d.listboxState===1,j=_y(O,d.value),D=te(W=>d.compare(j,W)),N=p.useMemo(()=>{var W;if(f==null||!((W=f==null?void 0:f.to)!=null&&W.includes("selection")))return null;let we=d.options.findIndex(_e=>D(_e.dataRef.current.value));return we===-1&&(we=0),we},[f,d.options]),L=(()=>{if(f==null)return;if(N===null)return{...f,inner:void 0};let W=Array.from(d.listRef.current.values());return{...f,inner:{listRef:{current:W},index:N}}})(),[R,H]=vy(L),J=xy(),z=pt(t,f?R:null,y.setOptionsElement,m),X=cr();p.useEffect(()=>{var W;let we=d.optionsElement;we&&d.listboxState===0&&we!==((W=ln(we))==null?void 0:W.activeElement)&&(we==null||we.focus({preventScroll:!0}))},[d.listboxState,d.optionsElement]);let K=te(W=>{var we,_e;switch(X.dispose(),W.key){case De.Space:if(d.searchQuery!=="")return W.preventDefault(),W.stopPropagation(),y.search(W.key);case De.Enter:if(W.preventDefault(),W.stopPropagation(),d.activeOptionIndex!==null){let{dataRef:le}=d.options[d.activeOptionIndex];y.onChange(le.current.value)}d.mode===0&&(_t.flushSync(()=>y.closeListbox()),(we=d.buttonElement)==null||we.focus({preventScroll:!0}));break;case gt(d.orientation,{vertical:De.ArrowDown,horizontal:De.ArrowRight}):return W.preventDefault(),W.stopPropagation(),y.goToOption(Ae.Next);case gt(d.orientation,{vertical:De.ArrowUp,horizontal:De.ArrowLeft}):return W.preventDefault(),W.stopPropagation(),y.goToOption(Ae.Previous);case De.Home:case De.PageUp:return W.preventDefault(),W.stopPropagation(),y.goToOption(Ae.First);case De.End:case De.PageDown:return W.preventDefault(),W.stopPropagation(),y.goToOption(Ae.Last);case De.Escape:W.preventDefault(),W.stopPropagation(),_t.flushSync(()=>y.closeListbox()),(_e=d.buttonElement)==null||_e.focus({preventScroll:!0});return;case De.Tab:W.preventDefault(),W.stopPropagation(),_t.flushSync(()=>y.closeListbox()),Wh(d.buttonElement,W.shiftKey?Li.Previous:Li.Next);break;default:W.key.length===1&&(y.search(W.key),X.setTimeout(()=>y.clearSearch(),350));break}}),Q=(r=d.buttonElement)==null?void 0:r.id,re=p.useMemo(()=>({open:d.listboxState===0}),[d.listboxState]),je=Sl(f?J():{},{id:i,ref:z,"aria-activedescendant":d.activeOptionIndex===null||(n=d.options[d.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":d.mode===1?!0:void 0,"aria-labelledby":Q,"aria-orientation":d.orientation,onKeyDown:K,role:"listbox",tabIndex:d.listboxState===0?0:void 0,style:{...c.style,...H,"--button-width":Ph(d.buttonElement,!0).width},...Kl(v)}),Le=st();return p.createElement(My,{enabled:a?e.static||w:!1},p.createElement(ho.Provider,{value:d.mode===1?d:{...d,isSelected:D}},Le({ourProps:je,theirProps:c,slot:re,defaultTag:s0,features:a0,visible:C,name:"Listbox.Options"})))}let u0="div";function c0(e,t){let r=p.useId(),{id:n=`headlessui-listbox-option-${r}`,disabled:o=!1,value:i,...s}=e,a=p.useContext(Pu)===!0,l=gn("Listbox.Option"),u=mo("Listbox.Option"),c=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===n:!1,f=l.isSelected(i),h=p.useRef(null),m=Jy(h),d=fr({disabled:o,value:i,domRef:h,get textValue(){return m()}}),y=pt(t,h,j=>{j?l.listRef.current.set(n,j):l.listRef.current.delete(n)});be(()=>{if(!l.__demoMode&&l.listboxState===0&&c&&l.activationTrigger!==0)return Vt().requestAnimationFrame(()=>{var j,D;(D=(j=h.current)==null?void 0:j.scrollIntoView)==null||D.call(j,{block:"nearest"})})},[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),be(()=>{if(!a)return u.registerOption(n,d)},[d,n,a]);let x=te(j=>{var D;if(o)return j.preventDefault();u.onChange(i),l.mode===0&&(_t.flushSync(()=>u.closeListbox()),(D=l.buttonElement)==null||D.focus({preventScroll:!0}))}),b=te(()=>{if(o)return u.goToOption(Ae.Nothing);u.goToOption(Ae.Specific,n)}),w=ig(),v=te(j=>{w.update(j),!o&&(c||u.goToOption(Ae.Specific,n,0))}),E=te(j=>{w.wasMoved(j)&&(o||c||u.goToOption(Ae.Specific,n,0))}),k=te(j=>{w.wasMoved(j)&&(o||c&&u.goToOption(Ae.Nothing))}),T=p.useMemo(()=>({active:c,focus:c,selected:f,disabled:o,selectedOption:f&&a}),[c,f,o,a]),C=a?{}:{id:n,ref:y,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:x,onFocus:b,onPointerEnter:v,onMouseEnter:v,onPointerMove:E,onMouseMove:E,onPointerLeave:k,onMouseLeave:k},O=st();return!f&&a?null:O({ourProps:C,theirProps:s,slot:T,defaultTag:u0,name:"Listbox.Option"})}let f0=p.Fragment;function d0(e,t){let{options:r,placeholder:n,...o}=e,i={ref:pt(t)},s=gn("ListboxSelectedOption"),a=p.useMemo(()=>({}),[]),l=s.value===void 0||s.value===null||s.mode===1&&Array.isArray(s.value)&&s.value.length===0,u=st();return p.createElement(Pu.Provider,{value:!0},u({ourProps:i,theirProps:{...o,children:p.createElement(p.Fragment,null,n&&l?n:r)},slot:a,defaultTag:f0,name:"ListboxSelectedOption"}))}let p0=et(n0),m0=et(i0),h0=Ah,g0=et(l0),y0=et(c0),b0=et(d0),Xt=Object.assign(p0,{Button:m0,Label:h0,Options:g0,Option:y0,SelectedOption:b0});function x0({element:e,validationData:t}){var l;const[r,n]=p.useState(e.value||[]),{register:o=()=>({}),setValue:i,getValues:s}=t||{},a=s&&s(e==null?void 0:e.id);return p.useEffect(()=>{o(e.id)},[e.id,o]),p.useEffect(()=>{i&&i(e.id,r)},[e.id,r,i]),p.useEffect(()=>{a!=null&&a.length&&!(r!=null&&r.length)&&n(a)},[a,r==null?void 0:r.length]),g.jsx("div",{className:"w-full z-10",children:g.jsx(Xt,{value:r,onChange:n,multiple:!0,children:g.jsxs("div",{className:"relative",children:[g.jsx(Xt.Button,{className:"w-full py-2 pl-3 pr-10 text-left bg-white input-control cursor-default ",children:(r==null?void 0:r.length)>0?r==null?void 0:r.map(u=>u.label).join(", "):"Select options"}),g.jsx(ju,{as:p.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx(Xt.Options,{className:"absolute w-full py-1 mt-1 grid gap-y-[1px] bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:(l=e==null?void 0:e.options)==null?void 0:l.map((u,c)=>g.jsx(Xt.Option,{className:({active:f})=>`cursor-default select-none relative w-full flex justify-between ${f?"text-gray-700 bg-gray-100":"text-gray-700"}`,value:u,children:({selected:f})=>g.jsxs("div",{className:`flex items-center justify-between py-2 pl-4 pr-4 w-full ${f?"bg-gray-100":""}`,children:[g.jsx("span",{className:`block truncate ${f?"font-medium":"font-normal"}`,children:u==null?void 0:u.label}),f?g.jsx("span",{className:"absolute inset-y-0 right-3 flex items-center pl-3 text-gray-600",children:"✓"}):null]})},c))})})]})})})}function v0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:se("input-control",e==null?void 0:e.customClass),...r(e.id)})}function w0({onFileLoaded:e,disabled:t}){const[r,n]=p.useState(null),o=i=>{var l;const s=(l=i.target.files)==null?void 0:l[0];if(!s)return;const a=new FileReader;a.onloadend=()=>{const u=a.result;e({base64:u,type:s.type,name:s.name}),n(null)},a.onerror=()=>{n("Failed to read file.")},a.readAsDataURL(s)};return g.jsxs("div",{className:"flex flex-col items-start gap-2",children:[g.jsx("input",{type:"file",onChange:o,disabled:t,className:`block w-full text-sm text-gray-500 file:mr-4 file:px-4 input-control !py-1 !pl-1\r
|
|
53
53
|
file:rounded-[6px] file:py-[6px] file:border-0\r
|
|
54
54
|
file:text-sm file:font-semibold\r
|
|
55
55
|
file:bg-blue-50 file:text-blue-700\r
|
|
56
|
-
hover:file:bg-blue-100`}),r&&g.jsx("p",{className:"text-red-500 text-sm",children:r})]})}const v0=["jpg","jpeg","png","gif","bmp","webp","svg","image"],Pu={pdf:"/pdf-icon.png",word:"/word-icon.png",excel:"/excel-icon.png",powerpoint:"/ppt-icon.png",other:"/file-icon.png"},w0=(e="")=>{var r;const t=((r=e.split(".").pop())==null?void 0:r.toLowerCase())||"";return v0.includes(t)||e.startsWith("data:image/")?"image":["pdf"].includes(t)||e.startsWith("data:application/pdf")?"pdf":["doc","docx"].includes(t)||e.startsWith("data:application/msword")||e.startsWith("data:application/vnd.openxmlformats-officedocument.wordprocessingml.document")?"word":["xls","xlsx","csv"].includes(t)||e.startsWith("data:application/vnd.ms-excel")||e.startsWith("data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")?"excel":["ppt","pptx"].includes(t)||e.startsWith("data:application/vnd.ms-powerpoint")||e.startsWith("data:application/vnd.openxmlformats-officedocument.presentationml.presentation")?"powerpoint":["txt"].includes(t)||e.startsWith("data:text/")?"text":["zip","rar","7z","tar","gz"].includes(t)?"archive":["mp4","mkv","webm","avi","mov"].includes(t)||e.startsWith("data:video/")?"video":["mp3","wav","flac","aac","ogg"].includes(t)||e.startsWith("data:audio/")?"audio":"other"},E0=({fileUrl:e,fileName:t})=>{const[r,n]=p.useState(!1),[o,i]=p.useState("unknown");p.useEffect(()=>{e&&i(w0(e))},[e]);const s=()=>{o==="image"?n(!0):window.open(e,"_blank")},a=()=>n(!1),l=()=>{if(o==="image")return g.jsx("button",{className:"btn btn-view text-sm font-semibold",type:"button","aria-label":"Preview file",children:g.jsx("span",{children:"Preview File"})});const u=Pu[o]||Pu.other;return g.jsxs("div",{onClick:s,className:"cursor-pointer border border-gray-200 bg-gray-200 rounded p-2 flex flex-col items-center justify-center hover:shadow",title:`Click to ${o==="pdf"?"open":"download"} ${t||"file"}`,children:[o==="image"&&g.jsx("div",{className:"w-14 h-14 flex items-center justify-center mb-2",children:g.jsx("img",{src:u,alt:`${o} icon`,className:"max-w-full max-h-full"})}),g.jsx("div",{className:"text-xs text-gray-700 truncate w-full text-center",children:t||(e==null?void 0:e.split("/").pop())||"Unknown file"})]})};return g.jsxs("div",{className:"mt-2",children:[g.jsx("div",{onClick:s,children:l()}),r&&o==="image"&&g.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-50",onClick:a,children:g.jsxs("div",{className:"relative bg-white p-5 rounded-lg max-w-[90vw] max-h-[90vh] overflow-auto",onClick:u=>u.stopPropagation(),children:[g.jsx("button",{onClick:a,className:"absolute top-2 right-2 text-2xl font-bold text-gray-700","aria-label":"Close preview",children:"×"}),g.jsx("img",{src:e||"/place.png",alt:t||"Full Image",className:"max-w-full max-h-[80vh] mx-auto object-contain"})]})})]})};function T0({element:e,validationData:t}){const[r,n]=p.useState((e==null?void 0:e.value)??null),{register:o=()=>({}),setValue:i,isReadOnly:s}=t||{};return p.useEffect(()=>{o(e.id)},[e.id,o]),g.jsxs("div",{children:[g.jsx(x0,{onFileLoaded:a=>{i(e.id,a),n(a)},disabled:s}),r&&g.jsx(E0,{fileUrl:r.base64,fileName:r.name})]})}function _0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:ue("input-control",e==null?void 0:e.customClass),...r(e.id)})}var fe=function(){return fe=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},fe.apply(this,arguments)};function S0(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function lt(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ot=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},k0={k:1e3,m:1e6,b:1e9},C0=function(e,t){t===void 0&&(t=".");var r=new RegExp("(\\d+(".concat(Ot(t),"\\d*)?)([kmb])$"),"i"),n=e.match(r);if(n){var o=n[1],i=n[3],s=k0[i.toLowerCase()];return Number(o.replace(t,"."))*s}},O0=function(e,t){t===void 0&&(t=",");var r=new RegExp(Ot(t),"g");return e.replace(r,"")},F0=function(e,t){var r=Ot(t.join("")),n=new RegExp("[^\\d".concat(r,"]"),"gi");return e.replace(n,"")},is=function(e){var t=e.value,r=e.groupSeparator,n=r===void 0?",":r,o=e.decimalSeparator,i=o===void 0?".":o,s=e.allowDecimals,a=s===void 0?!0:s,l=e.decimalsLimit,u=l===void 0?2:l,c=e.allowNegativeValue,f=c===void 0?!0:c,h=e.disableAbbreviations,m=h===void 0?!1:h,d=e.prefix,y=d===void 0?"":d,x=e.transformRawValue,b=x===void 0?function(re){return re}:x,w=b(t);if(w==="-")return w;var v=m?[]:["k","m","b"],E=new RegExp("((^|\\D)-\\d)|(-".concat(Ot(y),")")),C=E.test(w),T=RegExp("(\\d+)-?".concat(Ot(y))).exec(t)||[],k=T[0],O=T[1],j=y?k?w.replace(k,"").concat(O):w.replace(y,""):w,D=O0(j,n),N=F0(D,lt([n,i],v,!0)),L=N;if(!m){if(v.some(function(re){return re===N.toLowerCase().replace(i,"")}))return"";var R=C0(N,i);R&&(L=String(R))}var H=C&&f?"-":"";if(i&&L.includes(i)){var J=N.split(i),z=J[0],X=J[1],K=u&&X?X.slice(0,u):X,Q=a?"".concat(i).concat(K):"";return"".concat(H).concat(z).concat(Q)}return"".concat(H).concat(L)},A0=function(e,t,r){if(r!==void 0&&e.length>1){if(r===0)return e.replace(t,"");if(e.includes(t)){var n=e.split(t),o=n[0],i=n[1];if(i.length===r)return e;if(i.length>r)return"".concat(o).concat(t).concat(i.slice(0,r))}var s=e.length>r?new RegExp("(\\d+)(\\d{".concat(r,"})")):new RegExp("(\\d)(\\d+)"),a=e.match(s);if(a){var o=a[1],i=a[2];return"".concat(o).concat(t).concat(i)}}return e},Du=function(e,t){var r=t.groupSeparator,n=r===void 0?",":r,o=t.decimalSeparator,i=o===void 0?".":o,s=new RegExp("\\d([^".concat(Ot(n)).concat(Ot(i),"0-9]+)")),a=e.match(s);return a?a[1]:void 0},gn=function(e){var t=e.value,r=e.decimalSeparator,n=e.intlConfig,o=e.decimalScale,i=e.prefix,s=i===void 0?"":i,a=e.suffix,l=a===void 0?"":a;if(t===""||t===void 0)return"";if(t==="-")return"-";var u=new RegExp("^\\d?-".concat(s?"".concat(Ot(s),"?"):"","\\d")).test(t),c=r!=="."?j0(t,r,u):t;r&&r!=="-"&&c.startsWith(r)&&(c="0"+c);var f={minimumFractionDigits:o||0,maximumFractionDigits:20},h=n?new Intl.NumberFormat(n.locale,n.currency?fe(fe({},f),{style:"currency",currency:n.currency}):f):new Intl.NumberFormat(void 0,f),m=h.formatToParts(Number(c)),d=$0(m,e),y=Du(d,fe({},e)),x=t.slice(-1)===r?r:"",b=c.match(RegExp("\\d+\\.(\\d+)"))||[],w=b[1];return o===void 0&&w&&r&&(d.includes(r)?d=d.replace(RegExp("(\\d+)(".concat(Ot(r),")(\\d+)"),"g"),"$1$2".concat(w)):y&&!l?d=d.replace(y,"".concat(r).concat(w).concat(y)):d="".concat(d).concat(r).concat(w)),l&&x?"".concat(d).concat(x).concat(l):y&&x?d.replace(y,"".concat(x).concat(y)):y&&l?d.replace(y,"".concat(x).concat(l)):[d,x,l].join("")},j0=function(e,t,r){var n=e;return t&&t!=="."&&(n=n.replace(RegExp(Ot(t),"g"),"."),r&&t==="-"&&(n="-".concat(n.slice(1)))),n},$0=function(e,t){var r=t.prefix,n=t.groupSeparator,o=t.decimalSeparator,i=t.decimalScale,s=t.disableGroupSeparators,a=s===void 0?!1:s;return e.reduce(function(l,u,c){var f=u.type,h=u.value;return c===0&&r?f==="minusSign"?[h,r]:f==="currency"?lt(lt([],l,!0),[r],!1):[r,h]:f==="currency"?r?l:lt(lt([],l,!0),[h],!1):f==="group"?a?l:lt(lt([],l,!0),[n!==void 0?n:h],!1):f==="decimal"?i!==void 0&&i===0?l:lt(lt([],l,!0),[o!==void 0?o:h],!1):f==="fraction"?lt(lt([],l,!0),[i!==void 0?h.slice(0,i):h],!1):lt(lt([],l,!0),[h],!1)},[""]).join("")},N0={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},P0=function(e){var t=e||{},r=t.locale,n=t.currency,o=r?new Intl.NumberFormat(r,n?{currency:n,style:"currency"}:void 0):new Intl.NumberFormat;return o.formatToParts(1000.1).reduce(function(i,s,a){return s.type==="currency"?a===0?fe(fe({},i),{currencySymbol:s.value,prefix:s.value}):fe(fe({},i),{currencySymbol:s.value,suffix:s.value}):s.type==="group"?fe(fe({},i),{groupSeparator:s.value}):s.type==="decimal"?fe(fe({},i),{decimalSeparator:s.value}):i},N0)},Lu=function(e){return RegExp(/\d/,"gi").test(e)},D0=function(e,t,r){if(t===void 0&&(t="."),r===void 0||e===""||e===void 0)return e;if(!e.match(/\d/g))return"";var n=e.split(t),o=n[0],i=n[1];if(r===0)return o;var s=i||"";if(s.length<r)for(;s.length<r;)s+="0";else s=s.slice(0,r);return"".concat(o).concat(t).concat(s)},L0=function(e){var t=e.selectionStart,r=e.value,n=e.lastKeyStroke,o=e.stateValue,i=e.groupSeparator,s=t,a=r;if(o&&s){var l=r.split("");return n==="Backspace"&&o[s]===i&&(l.splice(s-1,1),s-=1),n==="Delete"&&o[s]===i&&(l.splice(s,1),s+=1),a=l.join(""),{modifiedValue:a,cursorPosition:s}}return{modifiedValue:a,cursorPosition:t}},go=p.forwardRef(function(e,t){var r=e.allowDecimals,n=r===void 0?!0:r,o=e.allowNegativeValue,i=o===void 0?!0:o,s=e.id,a=e.name,l=e.className,u=e.customInput,c=e.decimalsLimit,f=e.defaultValue,h=e.disabled,m=h===void 0?!1:h,d=e.maxLength,y=e.value,x=e.onValueChange,b=e.fixedDecimalLength,w=e.placeholder,v=e.decimalScale,E=e.prefix,C=e.suffix,T=e.intlConfig,k=e.step,O=e.min,j=e.max,D=e.disableGroupSeparators,N=D===void 0?!1:D,L=e.disableAbbreviations,R=L===void 0?!1:L,H=e.decimalSeparator,J=e.groupSeparator,z=e.onChange,X=e.onFocus,K=e.onBlur,Q=e.onKeyDown,re=e.onKeyUp,je=e.transformRawValue,De=e.formatValueOnBlur,W=De===void 0?!0:De,we=S0(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue","formatValueOnBlur"]);if(H&&Lu(H))throw new Error("decimalSeparator cannot be a number");if(J&&Lu(J))throw new Error("groupSeparator cannot be a number");var _e=p.useMemo(function(){return P0(T)},[T]),ae=H||_e.decimalSeparator||"",$e=J||_e.groupSeparator||"";if(ae&&$e&&ae===$e&&N===!1)throw new Error("decimalSeparator cannot be the same as groupSeparator");var Se={decimalSeparator:ae,groupSeparator:$e,disableGroupSeparators:N,intlConfig:T,prefix:E||_e.prefix,suffix:C},Le={decimalSeparator:ae,groupSeparator:$e,allowDecimals:n,decimalsLimit:c||b||2,allowNegativeValue:i,disableAbbreviations:R,prefix:E||_e.prefix,transformRawValue:je},wt=p.useState(function(){return f!=null?gn(fe(fe({},Se),{decimalScale:v,value:String(f)})):y!=null?gn(fe(fe({},Se),{decimalScale:v,value:String(y)})):""}),ke=wt[0],oe=wt[1],ye=p.useState(!1),Ne=ye[0],qt=ye[1],Ht=p.useState(0),Er=Ht[0],S=Ht[1],F=p.useState(0),P=F[0],B=F[1],V=p.useState(null),M=V[0],Y=V[1],G=p.useRef(null);p.useImperativeHandle(t,function(){return G.current});var xe=function(ve,We){qt(!0);var Be=L0({selectionStart:We,value:ve,lastKeyStroke:M,stateValue:ke,groupSeparator:$e}),Ke=Be.modifiedValue,Ue=Be.cursorPosition,Xe=is(fe({value:Ke},Le));if(!(d&&Xe.replace(/-/g,"").length>d)){if(Xe===""||Xe==="-"||Xe===ae){x&&x(void 0,a,{float:null,formatted:"",value:""}),oe(Xe),S(1);return}var Tt=ae?Xe.replace(ae,"."):Xe,An=parseFloat(Tt),_r=gn(fe({value:Xe},Se));if(Ue!=null){var Sr=Ue+(_r.length-ve.length);Sr=Sr<=0?E?E.length:0:Sr,S(Sr),B(P+1)}if(oe(_r),x){var Xs={float:An,formatted:_r,value:Xe};x(Xe,a,Xs)}}},he=function(ve){var We=ve.target,Be=We.value,Ke=We.selectionStart;xe(Be,Ke),z&&z(ve)},Et=function(ve){return X&&X(ve),ke?ke.length:0},Ur=function(ve){var We=ve.target.value,Be=is(fe({value:We},Le));if(Be==="-"||Be===ae||!Be){oe(""),K&&K(ve);return}var Ke=A0(Be,ae,b),Ue=D0(Ke,ae,v!==void 0?v:b),Xe=parseFloat(Ue.replace(ae,".")),Tt=gn(fe(fe({},Se),{value:Ue}));x&&W&&x(Ue,a,{float:Xe,formatted:Tt,value:Ue}),oe(Tt),K&&K(ve)},tr=function(ve){var We=ve.key;if(Y(We),k&&(We==="ArrowUp"||We==="ArrowDown")){ve.preventDefault(),S(ke.length);var Be=parseFloat(y!=null?String(y).replace(ae,"."):is(fe({value:ke},Le)))||0,Ke=We==="ArrowUp"?Be+k:Be-k;if(O!==void 0&&Ke<Number(O)||j!==void 0&&Ke>Number(j))return;var Ue=String(k).includes(".")?Number(String(k).split(".")[1].length):void 0;xe(String(Ue?Ke.toFixed(Ue):Ke).replace(".",ae))}Q&&Q(ve)},Wt=function(ve){var We=ve.key,Be=ve.currentTarget.selectionStart;if(We!=="ArrowUp"&&We!=="ArrowDown"&&ke!=="-"){var Ke=Du(ke,{groupSeparator:$e,decimalSeparator:ae});if(Ke&&Be&&Be>ke.length-Ke.length&&G.current){var Ue=ke.length-Ke.length;G.current.setSelectionRange(Ue,Ue)}}re&&re(ve)};p.useEffect(function(){y==null&&f==null&&oe("")},[f,y]),p.useEffect(function(){Ne&&ke!=="-"&&G.current&&document.activeElement===G.current&&G.current.setSelectionRange(Er,Er)},[ke,Er,G,Ne,P]);var On=function(){return y!=null&&ke!=="-"&&(!ae||ke!==ae)?gn(fe(fe({},Se),{decimalScale:Ne?void 0:v,value:String(y)})):ke},Tr=fe({type:"text",inputMode:"decimal",id:s,name:a,className:l,onChange:he,onBlur:Ur,onFocus:Et,onKeyDown:tr,onKeyUp:Wt,placeholder:w,disabled:m,value:On(),ref:G},we);if(u){var Fn=u;return p.createElement(Fn,fe({},Tr))}return p.createElement("input",fe({},Tr))});go.displayName="CurrencyInput";const ge=({label:e,name:t,register:r,errors:n,className:o,type:i="text",placeholder:s="",isFloating:a,setValue:l,value:u,trigger:c,prefix:f,disabled:h})=>{var d,y,x,b;const m=r?{...r(t)}:{};return i==="amount"?g.jsxs("div",{className:"space-y-1.5 relative",children:[g.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),g.jsx(go,{onValueChange:w=>{l(t,w),r&&r(t),c&&c(t)},placeholder:s,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"}`,decimalsLimit:2,value:u,prefix:f,disabled:h}),(n==null?void 0:n[t])&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:(d=n[t])==null?void 0:d.message})]}):["checkbox","radio"].includes(i)?g.jsxs("div",{children:[g.jsxs("label",{className:"flex items-center space-x-2",children:[g.jsx("input",{...m,type:i,className:"h-4 w-4 rounded border-gray-300",value:u,disabled:h}),g.jsx("span",{className:"text-sm font-medium text-[#344054] font-onest",children:e})]}),(n==null?void 0:n[t])&&g.jsx("p",{className:"ml-2 text-sm text-red-600",children:(y=n[t])==null?void 0:y.message})]}):i==="textarea"?g.jsxs("div",{className:"space-y-1.5 relative",children:[g.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),g.jsx("textarea",{...m,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"} ${o}`,placeholder:s,disabled:h}),(n==null?void 0:n[t])&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:(x=n[t])==null?void 0:x.message})]}):g.jsxs("div",{className:"space-y-1.5 relative",children:[g.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3":"relative"}`,children:e}),g.jsx("input",{...m,type:i,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"} ${o}`,placeholder:a?"":s,disabled:h}),(n==null?void 0:n[t])&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:(b=n[t])==null?void 0:b.message})]})};function I0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("div",{className:ue("grid gap-y-[6px]",e.customClass),children:e==null?void 0:e.options.map(n=>g.jsx("div",{children:g.jsx(ge,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,register:r,name:e.id,value:n.value})},n.id))})}function M0({element:e,state:t}){return g.jsx("div",{children:"SectionInput"})}function R0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("div",{className:ue("grid gap-y-[6px]",e.customClass),children:e==null?void 0:e.options.map(n=>g.jsx("div",{children:g.jsx(ge,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,register:r,name:e.id,value:n.value})},n.id))})}const ss=({className:e="",options:t,placeholder:r="Select",errors:n,register:o,setValue:i,name:s,label:a,value:l,trigger:u,isMultiple:c,isFloatingLabel:f,subText:h,labelClass:m="text-[10px]",loading:d})=>{const[y,x]=p.useState(c?[]:null),b=ue("input-control",e);return p.useEffect(()=>{y&&i&&o&&(i(s,y==null?void 0:y.value),o&&o(s),u&&u(s))},[s,o,y,i,u]),p.useEffect(()=>{const w=t==null?void 0:t.find(v=>typeof v.value=="string"&&typeof l=="string"?v.value.toLowerCase()===l.toLowerCase():typeof v.value=="object"&&typeof l=="object"?v.value.id===(l==null?void 0:l.id):v.value===l);x(w||null)},[l,t]),g.jsxs("div",{className:"relative",children:[!f&&a&&g.jsx("label",{className:"block text-sm text-[#686878] darks:!text-white/70 mb-2",children:a}),f&&g.jsx("label",{className:`z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ${m}`,children:a}),g.jsx(Xt,{value:y,onChange:x,multiple:c,children:g.jsxs("div",{className:"relative",children:[g.jsxs(Xt.Button,{className:b,children:[d?g.jsx("span",{className:" block opacity-60 text-sm text-left",children:"Fetching data ..."}):g.jsx("span",{className:"block truncate text-sm text-left",children:(y==null?void 0:y.label)||g.jsx("span",{className:"opacity-60",children:r})}),g.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:g.jsx(Me,{icon:"lucide:chevron-down"})})]}),g.jsx(Au,{as:p.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx(Xt.Options,{className:"z-[77] absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white darks:bg-gray-800 text-gray-900 darks:text-white/80 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:t==null?void 0:t.map((w,v)=>g.jsx(Xt.Option,{className:({active:E})=>`relative cursor-default select-none py-2 pl-4 pr-4 text-sm ${E?"bg-gray-100 darks:bg-gray-700 text-gray-900 darks:text-white/80":"text-gray-900 darks:text-white/70 "}`,value:w,children:({selected:E})=>g.jsx("div",{className:`block truncate text-sm ${E?"font-medium":"font-normal"}`,children:w.label})},v))})})]})}),!n&&h&&g.jsx("p",{className:"text-[10px] text-[#98A2B3] leading-normal mt-[6px]",children:h}),n&&g.jsx("span",{className:"text-sm text-red-500",children:n.message})]})};function V0({element:e,validationData:t}){const{register:r=()=>({}),trigger:n,setValue:o,watch:i}=t||{};let s;return i&&(s=i()[e.id]),p.useEffect(()=>{r(e.id)},[e.id,r]),g.jsx("div",{children:g.jsx(ss,{options:(e==null?void 0:e.options)??[],register:r,name:e.id,setValue:o,trigger:n,value:s,className:ue("input-control",e==null?void 0:e.customClass)})})}function B0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("textarea",{placeholder:e.placeholder,rows:4,className:ue("input-control resize-none",e==null?void 0:e.customClass),...r(e.id)})}var yn=e=>e.type==="checkbox",hr=e=>e instanceof Date,Je=e=>e==null;const Iu=e=>typeof e=="object";var Ee=e=>!Je(e)&&!Array.isArray(e)&&Iu(e)&&!hr(e),U0=e=>Ee(e)&&e.target?yn(e.target)?e.target.checked:e.target.value:e,z0=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,q0=(e,t)=>e.has(z0(t)),H0=e=>{const t=e.constructor&&e.constructor.prototype;return Ee(t)&&t.hasOwnProperty("isPrototypeOf")},as=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ve(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(as&&(e instanceof Blob||n))&&(r||Ee(e)))if(t=r?[]:{},!r&&!H0(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Ve(e[o]));else return e;return t}var bn=e=>Array.isArray(e)?e.filter(Boolean):[],me=e=>e===void 0,U=(e,t,r)=>{if(!t||!Ee(e))return r;const n=bn(t.split(/[,[\].]+?/)).reduce((o,i)=>Je(o)?o:o[i],e);return me(n)||n===e?me(e[t])?r:e[t]:n},Ft=e=>typeof e=="boolean",ls=e=>/^\w*$/.test(e),Mu=e=>bn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),se=(e,t,r)=>{let n=-1;const o=ls(t)?[t]:Mu(t),i=o.length,s=i-1;for(;++n<i;){const a=o[n];let l=r;if(n!==s){const u=e[a];l=Ee(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const Ru={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},mt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Vu=p.createContext(null),W0=()=>p.useContext(Vu),K0=e=>{const{children:t,...r}=e;return p.createElement(Vu.Provider,{value:r},t)};var Y0=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==mt.all&&(t._proxyFormState[s]=!n||mt.all),e[s]}});return o},Ge=e=>Ee(e)&&!Object.keys(e).length,J0=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return Ge(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===mt.all)},ut=e=>Array.isArray(e)?e:[e];function Bu(e){const t=p.useRef(e);t.current=e,p.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var At=e=>typeof e=="string",G0=(e,t,r,n,o)=>At(e)?(n&&t.watch.add(e),U(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),U(r,i))):(n&&(t.watchAll=!0),r),Uu=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Zt=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},us=(e,t,r={})=>r.shouldFocus||me(r.shouldFocus)?r.focusName||`${e}.${me(r.focusIndex)?t:r.focusIndex}.`:"",xn=e=>({isOnSubmit:!e||e===mt.onSubmit,isOnBlur:e===mt.onBlur,isOnChange:e===mt.onChange,isOnAll:e===mt.all,isOnTouch:e===mt.onTouched}),cs=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Pr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=U(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Pr(a,t))break}else if(Ee(a)&&Pr(a,t))break}}};var zu=(e,t,r)=>{const n=ut(U(e,r));return se(n,"root",t[r]),se(e,r,n),e},fs=e=>e.type==="file",jt=e=>typeof e=="function",yo=e=>{if(!as)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},bo=e=>At(e),ds=e=>e.type==="radio",xo=e=>e instanceof RegExp;const qu={value:!1,isValid:!1},Hu={value:!0,isValid:!0};var Wu=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!me(e[0].attributes.value)?me(e[0].value)||e[0].value===""?Hu:{value:e[0].value,isValid:!0}:Hu:qu}return qu};const Ku={isValid:!1,value:null};var Yu=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Ku):Ku;function Ju(e,t,r="validate"){if(bo(e)||Array.isArray(e)&&e.every(bo)||Ft(e)&&!e)return{type:r,message:bo(e)?e:"",ref:t}}var Dr=e=>Ee(e)&&!xo(e)?e:{value:e,message:""},ps=async(e,t,r,n,o)=>{const{ref:i,refs:s,required:a,maxLength:l,minLength:u,min:c,max:f,pattern:h,validate:m,name:d,valueAsNumber:y,mount:x,disabled:b}=e._f,w=U(t,d);if(!x||b)return{};const v=s?s[0]:i,E=L=>{n&&v.reportValidity&&(v.setCustomValidity(Ft(L)?"":L||""),v.reportValidity())},C={},T=ds(i),k=yn(i),O=T||k,j=(y||fs(i))&&me(i.value)&&me(w)||yo(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,D=Uu.bind(null,d,r,C),N=(L,R,H,J=Bt.maxLength,z=Bt.minLength)=>{const X=L?R:H;C[d]={type:L?J:z,message:X,ref:i,...D(L?J:z,X)}};if(o?!Array.isArray(w)||!w.length:a&&(!O&&(j||Je(w))||Ft(w)&&!w||k&&!Wu(s).isValid||T&&!Yu(s).isValid)){const{value:L,message:R}=bo(a)?{value:!!a,message:a}:Dr(a);if(L&&(C[d]={type:Bt.required,message:R,ref:v,...D(Bt.required,R)},!r))return E(R),C}if(!j&&(!Je(c)||!Je(f))){let L,R;const H=Dr(f),J=Dr(c);if(!Je(w)&&!isNaN(w)){const z=i.valueAsNumber||w&&+w;Je(H.value)||(L=z>H.value),Je(J.value)||(R=z<J.value)}else{const z=i.valueAsDate||new Date(w),X=re=>new Date(new Date().toDateString()+" "+re),K=i.type=="time",Q=i.type=="week";At(H.value)&&w&&(L=K?X(w)>X(H.value):Q?w>H.value:z>new Date(H.value)),At(J.value)&&w&&(R=K?X(w)<X(J.value):Q?w<J.value:z<new Date(J.value))}if((L||R)&&(N(!!L,H.message,J.message,Bt.max,Bt.min),!r))return E(C[d].message),C}if((l||u)&&!j&&(At(w)||o&&Array.isArray(w))){const L=Dr(l),R=Dr(u),H=!Je(L.value)&&w.length>+L.value,J=!Je(R.value)&&w.length<+R.value;if((H||J)&&(N(H,L.message,R.message),!r))return E(C[d].message),C}if(h&&!j&&At(w)){const{value:L,message:R}=Dr(h);if(xo(L)&&!w.match(L)&&(C[d]={type:Bt.pattern,message:R,ref:i,...D(Bt.pattern,R)},!r))return E(R),C}if(m){if(jt(m)){const L=await m(w,t),R=Ju(L,v);if(R&&(C[d]={...R,...D(Bt.validate,R.message)},!r))return E(R.message),C}else if(Ee(m)){let L={};for(const R in m){if(!Ge(L)&&!r)break;const H=Ju(await m[R](w,t),v,R);H&&(L={...H,...D(R,H.message)},E(H.message),r&&(C[d]=L))}if(!Ge(L)&&(C[d]={ref:v,...L},!r))return C}}return E(!0),C},ms=(e,t)=>[...e,...ut(t)],hs=e=>Array.isArray(e)?e.map(()=>{}):void 0;function gs(e,t,r){return[...e.slice(0,t),...ut(r),...e.slice(t)]}var ys=(e,t,r)=>Array.isArray(e)?(me(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],bs=(e,t)=>[...ut(t),...ut(e)];function X0(e,t){let r=0;const n=[...e];for(const o of t)n.splice(o-r,1),r++;return bn(n).length?n:[]}var xs=(e,t)=>me(t)?[]:X0(e,ut(t).sort((r,n)=>r-n)),vs=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};function Z0(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=me(e)?n++:e[t[n++]];return e}function Q0(e){for(const t in e)if(e.hasOwnProperty(t)&&!me(e[t]))return!1;return!0}function Oe(e,t){const r=Array.isArray(t)?t:ls(t)?[t]:Mu(t),n=r.length===1?e:Z0(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(Ee(n)&&Ge(n)||Array.isArray(n)&&Q0(n))&&Oe(e,r.slice(0,-1)),e}var Gu=(e,t,r)=>(e[t]=r,e);function eb(e){const t=W0(),{control:r=t.control,name:n,keyName:o="id",shouldUnregister:i,rules:s}=e,[a,l]=p.useState(r._getFieldArray(n)),u=p.useRef(r._getFieldArray(n).map(Zt)),c=p.useRef(a),f=p.useRef(n),h=p.useRef(!1);f.current=n,c.current=a,r._names.array.add(n),s&&r.register(n,s),Bu({next:({values:T,name:k})=>{if(k===f.current||!k){const O=U(T,f.current);Array.isArray(O)&&(l(O),u.current=O.map(Zt))}},subject:r._subjects.array});const m=p.useCallback(T=>{h.current=!0,r._updateFieldArray(n,T)},[r,n]),d=(T,k)=>{const O=ut(Ve(T)),j=ms(r._getFieldArray(n),O);r._names.focus=us(n,j.length-1,k),u.current=ms(u.current,O.map(Zt)),m(j),l(j),r._updateFieldArray(n,j,ms,{argA:hs(T)})},y=(T,k)=>{const O=ut(Ve(T)),j=bs(r._getFieldArray(n),O);r._names.focus=us(n,0,k),u.current=bs(u.current,O.map(Zt)),m(j),l(j),r._updateFieldArray(n,j,bs,{argA:hs(T)})},x=T=>{const k=xs(r._getFieldArray(n),T);u.current=xs(u.current,T),m(k),l(k),!Array.isArray(U(r._fields,n))&&se(r._fields,n,void 0),r._updateFieldArray(n,k,xs,{argA:T})},b=(T,k,O)=>{const j=ut(Ve(k)),D=gs(r._getFieldArray(n),T,j);r._names.focus=us(n,T,O),u.current=gs(u.current,T,j.map(Zt)),m(D),l(D),r._updateFieldArray(n,D,gs,{argA:T,argB:hs(k)})},w=(T,k)=>{const O=r._getFieldArray(n);vs(O,T,k),vs(u.current,T,k),m(O),l(O),r._updateFieldArray(n,O,vs,{argA:T,argB:k},!1)},v=(T,k)=>{const O=r._getFieldArray(n);ys(O,T,k),ys(u.current,T,k),m(O),l(O),r._updateFieldArray(n,O,ys,{argA:T,argB:k},!1)},E=(T,k)=>{const O=Ve(k),j=Gu(r._getFieldArray(n),T,O);u.current=[...j].map((D,N)=>!D||N===T?Zt():u.current[N]),m(j),l([...j]),r._updateFieldArray(n,j,Gu,{argA:T,argB:O},!0,!1)},C=T=>{const k=ut(Ve(T));u.current=k.map(Zt),m([...k]),l([...k]),r._updateFieldArray(n,[...k],O=>O,{},!0,!1)};return p.useEffect(()=>{if(r._state.action=!1,cs(n,r._names)&&r._subjects.state.next({...r._formState}),h.current&&(!xn(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([n]).then(T=>{const k=U(T.errors,n),O=U(r._formState.errors,n);(O?!k&&O.type||k&&(O.type!==k.type||O.message!==k.message):k&&k.type)&&(k?se(r._formState.errors,n,k):Oe(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const T=U(r._fields,n);T&&T._f&&!(xn(r._options.reValidateMode).isOnSubmit&&xn(r._options.mode).isOnSubmit)&&ps(T,r._formValues,r._options.criteriaMode===mt.all,r._options.shouldUseNativeValidation,!0).then(k=>!Ge(k)&&r._subjects.state.next({errors:zu(r._formState.errors,k,n)}))}r._subjects.values.next({name:n,values:{...r._formValues}}),r._names.focus&&Pr(r._fields,(T,k)=>{if(r._names.focus&&k.startsWith(r._names.focus)&&T.focus)return T.focus(),1}),r._names.focus="",r._updateValid(),h.current=!1},[a,n,r]),p.useEffect(()=>(!U(r._formValues,n)&&r._updateFieldArray(n),()=>{(r._options.shouldUnregister||i)&&r.unregister(n)}),[n,r,o,i]),{swap:p.useCallback(w,[m,n,r]),move:p.useCallback(v,[m,n,r]),prepend:p.useCallback(y,[m,n,r]),append:p.useCallback(d,[m,n,r]),remove:p.useCallback(x,[m,n,r]),insert:p.useCallback(b,[m,n,r]),update:p.useCallback(E,[m,n,r]),replace:p.useCallback(C,[m,n,r]),fields:p.useMemo(()=>a.map((T,k)=>({...T,[o]:u.current[k]||Zt()})),[a,o])}}var ws=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},Es=e=>Je(e)||!Iu(e);function Qt(e,t){if(Es(e)||Es(t))return e===t;if(hr(e)&&hr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const s=t[o];if(hr(i)&&hr(s)||Ee(i)&&Ee(s)||Array.isArray(i)&&Array.isArray(s)?!Qt(i,s):i!==s)return!1}}return!0}var Xu=e=>e.type==="select-multiple",tb=e=>ds(e)||yn(e),Ts=e=>yo(e)&&e.isConnected,Zu=e=>{for(const t in e)if(jt(e[t]))return!0;return!1};function vo(e,t={}){const r=Array.isArray(e);if(Ee(e)||r)for(const n in e)Array.isArray(e[n])||Ee(e[n])&&!Zu(e[n])?(t[n]=Array.isArray(e[n])?[]:{},vo(e[n],t[n])):Je(e[n])||(t[n]=!0);return t}function Qu(e,t,r){const n=Array.isArray(e);if(Ee(e)||n)for(const o in e)Array.isArray(e[o])||Ee(e[o])&&!Zu(e[o])?me(t)||Es(r[o])?r[o]=Array.isArray(e[o])?vo(e[o],[]):{...vo(e[o])}:Qu(e[o],Je(t)?{}:t[o],r[o]):r[o]=!Qt(e[o],t[o]);return r}var vn=(e,t)=>Qu(e,t,vo(t)),ec=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>me(e)?e:t?e===""?NaN:e&&+e:r&&At(e)?new Date(e):n?n(e):e;function _s(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return fs(t)?t.files:ds(t)?Yu(e.refs).value:Xu(t)?[...t.selectedOptions].map(({value:r})=>r):yn(t)?Wu(e.refs).value:ec(me(t.value)?e.ref.value:t.value,e)}var rb=(e,t,r,n)=>{const o={};for(const i of e){const s=U(t,i);s&&se(o,i,s._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},wn=e=>me(e)?e:xo(e)?e.source:Ee(e)?xo(e.value)?e.value.source:e.value:e;const tc="AsyncFunction";var nb=e=>!!e&&!!e.validate&&!!(jt(e.validate)&&e.validate.constructor.name===tc||Ee(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===tc)),ob=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function rc(e,t,r){const n=U(e,r);if(n||ls(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),s=U(t,i),a=U(e,i);if(s&&!Array.isArray(s)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:r}}var ib=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,sb=(e,t)=>!bn(U(e,t)).length&&Oe(e,t);const ab={mode:mt.onSubmit,reValidateMode:mt.onChange,shouldFocusError:!0};function lb(e={}){let t={...ab,...e},r={submitCount:0,isDirty:!1,isLoading:jt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=Ee(t.defaultValues)||Ee(t.values)?Ve(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Ve(o),s={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:ws(),array:ws(),state:ws()},h=xn(t.mode),m=xn(t.reValidateMode),d=t.criteriaMode===mt.all,y=S=>F=>{clearTimeout(u),u=setTimeout(S,F)},x=async S=>{if(!t.disabled&&(c.isValid||S)){const F=t.resolver?Ge((await O()).errors):await D(n,!0);F!==r.isValid&&f.state.next({isValid:F})}},b=(S,F)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((S||Array.from(a.mount)).forEach(P=>{P&&(F?se(r.validatingFields,P,F):Oe(r.validatingFields,P))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Ge(r.validatingFields)}))},w=(S,F=[],P,B,V=!0,M=!0)=>{if(B&&P&&!t.disabled){if(s.action=!0,M&&Array.isArray(U(n,S))){const Y=P(U(n,S),B.argA,B.argB);V&&se(n,S,Y)}if(M&&Array.isArray(U(r.errors,S))){const Y=P(U(r.errors,S),B.argA,B.argB);V&&se(r.errors,S,Y),sb(r.errors,S)}if(c.touchedFields&&M&&Array.isArray(U(r.touchedFields,S))){const Y=P(U(r.touchedFields,S),B.argA,B.argB);V&&se(r.touchedFields,S,Y)}c.dirtyFields&&(r.dirtyFields=vn(o,i)),f.state.next({name:S,isDirty:L(S,F),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else se(i,S,F)},v=(S,F)=>{se(r.errors,S,F),f.state.next({errors:r.errors})},E=S=>{r.errors=S,f.state.next({errors:r.errors,isValid:!1})},C=(S,F,P,B)=>{const V=U(n,S);if(V){const M=U(i,S,me(P)?U(o,S):P);me(M)||B&&B.defaultChecked||F?se(i,S,F?M:_s(V._f)):J(S,M),s.mount&&x()}},T=(S,F,P,B,V)=>{let M=!1,Y=!1;const G={name:S};if(!t.disabled){const xe=!!(U(n,S)&&U(n,S)._f&&U(n,S)._f.disabled);if(!P||B){c.isDirty&&(Y=r.isDirty,r.isDirty=G.isDirty=L(),M=Y!==G.isDirty);const he=xe||Qt(U(o,S),F);Y=!!(!xe&&U(r.dirtyFields,S)),he||xe?Oe(r.dirtyFields,S):se(r.dirtyFields,S,!0),G.dirtyFields=r.dirtyFields,M=M||c.dirtyFields&&Y!==!he}if(P){const he=U(r.touchedFields,S);he||(se(r.touchedFields,S,P),G.touchedFields=r.touchedFields,M=M||c.touchedFields&&he!==P)}M&&V&&f.state.next(G)}return M?G:{}},k=(S,F,P,B)=>{const V=U(r.errors,S),M=c.isValid&&Ft(F)&&r.isValid!==F;if(t.delayError&&P?(l=y(()=>v(S,P)),l(t.delayError)):(clearTimeout(u),l=null,P?se(r.errors,S,P):Oe(r.errors,S)),(P?!Qt(V,P):V)||!Ge(B)||M){const Y={...B,...M&&Ft(F)?{isValid:F}:{},errors:r.errors,name:S};r={...r,...Y},f.state.next(Y)}},O=async S=>{b(S,!0);const F=await t.resolver(i,t.context,rb(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(S),F},j=async S=>{const{errors:F}=await O(S);if(S)for(const P of S){const B=U(F,P);B?se(r.errors,P,B):Oe(r.errors,P)}else r.errors=F;return F},D=async(S,F,P={valid:!0})=>{for(const B in S){const V=S[B];if(V){const{_f:M,...Y}=V;if(M){const G=a.array.has(M.name),xe=V._f&&nb(V._f);xe&&c.validatingFields&&b([B],!0);const he=await ps(V,i,d,t.shouldUseNativeValidation&&!F,G);if(xe&&c.validatingFields&&b([B]),he[M.name]&&(P.valid=!1,F))break;!F&&(U(he,M.name)?G?zu(r.errors,he,M.name):se(r.errors,M.name,he[M.name]):Oe(r.errors,M.name))}!Ge(Y)&&await D(Y,F,P)}}return P.valid},N=()=>{for(const S of a.unMount){const F=U(n,S);F&&(F._f.refs?F._f.refs.every(P=>!Ts(P)):!Ts(F._f.ref))&&ae(S)}a.unMount=new Set},L=(S,F)=>!t.disabled&&(S&&F&&se(i,S,F),!Qt(je(),o)),R=(S,F,P)=>G0(S,a,{...s.mount?i:me(F)?o:At(S)?{[S]:F}:F},P,F),H=S=>bn(U(s.mount?i:o,S,t.shouldUnregister?U(o,S,[]):[])),J=(S,F,P={})=>{const B=U(n,S);let V=F;if(B){const M=B._f;M&&(!M.disabled&&se(i,S,ec(F,M)),V=yo(M.ref)&&Je(F)?"":F,Xu(M.ref)?[...M.ref.options].forEach(Y=>Y.selected=V.includes(Y.value)):M.refs?yn(M.ref)?M.refs.length>1?M.refs.forEach(Y=>(!Y.defaultChecked||!Y.disabled)&&(Y.checked=Array.isArray(V)?!!V.find(G=>G===Y.value):V===Y.value)):M.refs[0]&&(M.refs[0].checked=!!V):M.refs.forEach(Y=>Y.checked=Y.value===V):fs(M.ref)?M.ref.value="":(M.ref.value=V,M.ref.type||f.values.next({name:S,values:{...i}})))}(P.shouldDirty||P.shouldTouch)&&T(S,V,P.shouldTouch,P.shouldDirty,!0),P.shouldValidate&&re(S)},z=(S,F,P)=>{for(const B in F){const V=F[B],M=`${S}.${B}`,Y=U(n,M);(a.array.has(S)||Ee(V)||Y&&!Y._f)&&!hr(V)?z(M,V,P):J(M,V,P)}},X=(S,F,P={})=>{const B=U(n,S),V=a.array.has(S),M=Ve(F);se(i,S,M),V?(f.array.next({name:S,values:{...i}}),(c.isDirty||c.dirtyFields)&&P.shouldDirty&&f.state.next({name:S,dirtyFields:vn(o,i),isDirty:L(S,M)})):B&&!B._f&&!Je(M)?z(S,M,P):J(S,M,P),cs(S,a)&&f.state.next({...r}),f.values.next({name:s.mount?S:void 0,values:{...i}})},K=async S=>{s.mount=!0;const F=S.target;let P=F.name,B=!0;const V=U(n,P),M=()=>F.type?_s(V._f):U0(S),Y=G=>{B=Number.isNaN(G)||hr(G)&&isNaN(G.getTime())||Qt(G,U(i,P,G))};if(V){let G,xe;const he=M(),Et=S.type===Ru.BLUR||S.type===Ru.FOCUS_OUT,Ur=!ob(V._f)&&!t.resolver&&!U(r.errors,P)&&!V._f.deps||ib(Et,U(r.touchedFields,P),r.isSubmitted,m,h),tr=cs(P,a,Et);se(i,P,he),Et?(V._f.onBlur&&V._f.onBlur(S),l&&l(0)):V._f.onChange&&V._f.onChange(S);const Wt=T(P,he,Et,!1),On=!Ge(Wt)||tr;if(!Et&&f.values.next({name:P,type:S.type,values:{...i}}),Ur)return c.isValid&&(t.mode==="onBlur"?Et&&x():x()),On&&f.state.next({name:P,...tr?{}:Wt});if(!Et&&tr&&f.state.next({...r}),t.resolver){const{errors:Tr}=await O([P]);if(Y(he),B){const Fn=rc(r.errors,n,P),ve=rc(Tr,n,Fn.name||P);G=ve.error,P=ve.name,xe=Ge(Tr)}}else b([P],!0),G=(await ps(V,i,d,t.shouldUseNativeValidation))[P],b([P]),Y(he),B&&(G?xe=!1:c.isValid&&(xe=await D(n,!0)));B&&(V._f.deps&&re(V._f.deps),k(P,xe,G,Wt))}},Q=(S,F)=>{if(U(r.errors,F)&&S.focus)return S.focus(),1},re=async(S,F={})=>{let P,B;const V=ut(S);if(t.resolver){const M=await j(me(S)?S:V);P=Ge(M),B=S?!V.some(Y=>U(M,Y)):P}else S?(B=(await Promise.all(V.map(async M=>{const Y=U(n,M);return await D(Y&&Y._f?{[M]:Y}:Y)}))).every(Boolean),!(!B&&!r.isValid)&&x()):B=P=await D(n);return f.state.next({...!At(S)||c.isValid&&P!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:P}:{},errors:r.errors}),F.shouldFocus&&!B&&Pr(n,Q,S?V:a.mount),B},je=S=>{const F={...s.mount?i:o};return me(S)?F:At(S)?U(F,S):S.map(P=>U(F,P))},De=(S,F)=>({invalid:!!U((F||r).errors,S),isDirty:!!U((F||r).dirtyFields,S),error:U((F||r).errors,S),isValidating:!!U(r.validatingFields,S),isTouched:!!U((F||r).touchedFields,S)}),W=S=>{S&&ut(S).forEach(F=>Oe(r.errors,F)),f.state.next({errors:S?r.errors:{}})},we=(S,F,P)=>{const B=(U(n,S,{_f:{}})._f||{}).ref,V=U(r.errors,S)||{},{ref:M,message:Y,type:G,...xe}=V;se(r.errors,S,{...xe,...F,ref:B}),f.state.next({name:S,errors:r.errors,isValid:!1}),P&&P.shouldFocus&&B&&B.focus&&B.focus()},_e=(S,F)=>jt(S)?f.values.subscribe({next:P=>S(R(void 0,F),P)}):R(S,F,!0),ae=(S,F={})=>{for(const P of S?ut(S):a.mount)a.mount.delete(P),a.array.delete(P),F.keepValue||(Oe(n,P),Oe(i,P)),!F.keepError&&Oe(r.errors,P),!F.keepDirty&&Oe(r.dirtyFields,P),!F.keepTouched&&Oe(r.touchedFields,P),!F.keepIsValidating&&Oe(r.validatingFields,P),!t.shouldUnregister&&!F.keepDefaultValue&&Oe(o,P);f.values.next({values:{...i}}),f.state.next({...r,...F.keepDirty?{isDirty:L()}:{}}),!F.keepIsValid&&x()},$e=({disabled:S,name:F,field:P,fields:B,value:V})=>{if(Ft(S)&&s.mount||S){const M=S?void 0:me(V)?_s(P?P._f:U(B,F)._f):V;(S||!S&&!me(M))&&se(i,F,M),T(F,M,!1,!1,!0)}},Se=(S,F={})=>{let P=U(n,S);const B=Ft(F.disabled)||Ft(t.disabled);return se(n,S,{...P||{},_f:{...P&&P._f?P._f:{ref:{name:S}},name:S,mount:!0,...F}}),a.mount.add(S),P?$e({field:P,disabled:Ft(F.disabled)?F.disabled:t.disabled,name:S,value:F.value}):C(S,!0,F.value),{...B?{disabled:F.disabled||t.disabled}:{},...t.progressive?{required:!!F.required,min:wn(F.min),max:wn(F.max),minLength:wn(F.minLength),maxLength:wn(F.maxLength),pattern:wn(F.pattern)}:{},name:S,onChange:K,onBlur:K,ref:V=>{if(V){Se(S,F),P=U(n,S);const M=me(V.value)&&V.querySelectorAll&&V.querySelectorAll("input,select,textarea")[0]||V,Y=tb(M),G=P._f.refs||[];if(Y?G.find(xe=>xe===M):M===P._f.ref)return;se(n,S,{_f:{...P._f,...Y?{refs:[...G.filter(Ts),M,...Array.isArray(U(o,S))?[{}]:[]],ref:{type:M.type,name:S}}:{ref:M}}}),C(S,!1,void 0,M)}else P=U(n,S,{}),P._f&&(P._f.mount=!1),(t.shouldUnregister||F.shouldUnregister)&&!(q0(a.array,S)&&s.action)&&a.unMount.add(S)}}},Le=()=>t.shouldFocusError&&Pr(n,Q,a.mount),wt=S=>{Ft(S)&&(f.state.next({disabled:S}),Pr(n,(F,P)=>{const B=U(n,P);B&&(F.disabled=B._f.disabled||S,Array.isArray(B._f.refs)&&B._f.refs.forEach(V=>{V.disabled=B._f.disabled||S}))},0,!1))},ke=(S,F)=>async P=>{let B;if(P&&(P.preventDefault&&P.preventDefault(),P.persist&&P.persist()),t.disabled){F&&await F({...r.errors},P);return}let V=Ve(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:M,values:Y}=await O();r.errors=M,V=Y}else await D(n);if(Oe(r.errors,"root"),Ge(r.errors)){f.state.next({errors:{}});try{await S(V,P)}catch(M){B=M}}else F&&await F({...r.errors},P),Le(),setTimeout(Le);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ge(r.errors)&&!B,submitCount:r.submitCount+1,errors:r.errors}),B)throw B},oe=(S,F={})=>{U(n,S)&&(me(F.defaultValue)?X(S,Ve(U(o,S))):(X(S,F.defaultValue),se(o,S,Ve(F.defaultValue))),F.keepTouched||Oe(r.touchedFields,S),F.keepDirty||(Oe(r.dirtyFields,S),r.isDirty=F.defaultValue?L(S,Ve(U(o,S))):L()),F.keepError||(Oe(r.errors,S),c.isValid&&x()),f.state.next({...r}))},ye=(S,F={})=>{const P=S?Ve(S):o,B=Ve(P),V=Ge(S),M=V?o:B;if(F.keepDefaultValues||(o=P),!F.keepValues){if(F.keepDirtyValues){const Y=new Set([...a.mount,...Object.keys(vn(o,i))]);for(const G of Array.from(Y))U(r.dirtyFields,G)?se(M,G,U(i,G)):X(G,U(M,G))}else{if(as&&me(S))for(const Y of a.mount){const G=U(n,Y);if(G&&G._f){const xe=Array.isArray(G._f.refs)?G._f.refs[0]:G._f.ref;if(yo(xe)){const he=xe.closest("form");if(he){he.reset();break}}}}n={}}i=t.shouldUnregister?F.keepDefaultValues?Ve(o):{}:Ve(M),f.array.next({values:{...M}}),f.values.next({values:{...M}})}a={mount:F.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!F.keepIsValid||!!F.keepDirtyValues,s.watch=!!t.shouldUnregister,f.state.next({submitCount:F.keepSubmitCount?r.submitCount:0,isDirty:V?!1:F.keepDirty?r.isDirty:!!(F.keepDefaultValues&&!Qt(S,o)),isSubmitted:F.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:V?{}:F.keepDirtyValues?F.keepDefaultValues&&i?vn(o,i):r.dirtyFields:F.keepDefaultValues&&S?vn(o,S):F.keepDirty?r.dirtyFields:{},touchedFields:F.keepTouched?r.touchedFields:{},errors:F.keepErrors?r.errors:{},isSubmitSuccessful:F.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ne=(S,F)=>ye(jt(S)?S(i):S,F);return{control:{register:Se,unregister:ae,getFieldState:De,handleSubmit:ke,setError:we,_executeSchema:O,_getWatch:R,_getDirty:L,_updateValid:x,_removeUnmounted:N,_updateFieldArray:w,_updateDisabledField:$e,_getFieldArray:H,_reset:ye,_resetDefaultValues:()=>jt(t.defaultValues)&&t.defaultValues().then(S=>{Ne(S,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:wt,_subjects:f,_proxyFormState:c,_setErrors:E,get _fields(){return n},get _formValues(){return i},get _state(){return s},set _state(S){s=S},get _defaultValues(){return o},get _names(){return a},set _names(S){a=S},get _formState(){return r},set _formState(S){r=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:re,register:Se,handleSubmit:ke,watch:_e,setValue:X,getValues:je,reset:Ne,resetField:oe,clearErrors:W,unregister:ae,setError:we,setFocus:(S,F={})=>{const P=U(n,S),B=P&&P._f;if(B){const V=B.refs?B.refs[0]:B.ref;V.focus&&(V.focus(),F.shouldSelect&&jt(V.select)&&V.select())}},getFieldState:De}}function Ss(e={}){const t=p.useRef(),r=p.useRef(),[n,o]=p.useState({isDirty:!1,isValidating:!1,isLoading:jt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:jt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...lb(e),formState:n});const i=t.current.control;return i._options=e,Bu({subject:i._subjects.state,next:s=>{J0(s,i._proxyFormState,i._updateFormState)&&o({...i._formState})}}),p.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),p.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==n.isDirty&&i._subjects.state.next({isDirty:s})}},[i,n.isDirty]),p.useEffect(()=>{e.values&&!Qt(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values,o(s=>({...s}))):i._resetDefaultValues()},[e.values,i]),p.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),p.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),p.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),p.useMemo(()=>({...t.current,formState:Y0(n,i)}),[n,i])}const nc=(e,t,r)=>{if(e&&"reportValidity"in e){const n=U(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},oc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?nc(n.ref,r,e):n.refs&&n.refs.forEach(o=>nc(o,r,e))}},ub=(e,t)=>{t.shouldUseNativeValidation&&oc(e,t);const r={};for(const n in e){const o=U(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(cb(t.names||Object.keys(e),n)){const s=Object.assign({},U(r,n));se(s,"root",i),se(r,n,s)}else se(r,n,i)}return r},cb=(e,t)=>e.some(r=>r.startsWith(t+"."));function ks(e,t,r){return t===void 0&&(t={}),r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(s,a){try{var l=(t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:o}))).then(function(u){return i.shouldUseNativeValidation&&oc({},i),{values:r.raw?n:u,errors:{}}}))}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:ub((a=s,l=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(a.inner||[]).reduce(function(u,c){if(u[c.path]||(u[c.path]={message:c.message,type:c.type}),l){var f=u[c.path].types,h=f&&f[c.type];u[c.path]=Uu(c.path,l,u,c.type,h?[].concat(h,c.message):c.message)}return u},{})),i)};var a,l}))}catch(s){return Promise.reject(s)}}}var Cs,ic;function fb(){if(ic)return Cs;ic=1;function e(b){this._maxSize=b,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(b){return this._values[b]},e.prototype.set=function(b,w){return this._size>=this._maxSize&&this.clear(),b in this._values||this._size++,this._values[b]=w};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,a=new e(s),l=new e(s),u=new e(s);Cs={Cache:e,split:f,normalizePath:c,setter:function(b){var w=c(b);return l.get(b)||l.set(b,function(E,C){for(var T=0,k=w.length,O=E;T<k-1;){var j=w[T];if(j==="__proto__"||j==="constructor"||j==="prototype")return E;O=O[w[T++]]}O[w[T]]=C})},getter:function(b,w){var v=c(b);return u.get(b)||u.set(b,function(C){for(var T=0,k=v.length;T<k;)if(C!=null||!w)C=C[v[T++]];else return;return C})},join:function(b){return b.reduce(function(w,v){return w+(m(v)||r.test(v)?"["+v+"]":(w?".":"")+v)},"")},forEach:function(b,w,v){h(Array.isArray(b)?b:f(b),w,v)}};function c(b){return a.get(b)||a.set(b,f(b).map(function(w){return w.replace(i,"$2")}))}function f(b){return b.match(t)||[""]}function h(b,w,v){var E=b.length,C,T,k,O;for(T=0;T<E;T++)C=b[T],C&&(x(C)&&(C='"'+C+'"'),O=m(C),k=!O&&/^\d+$/.test(C),w.call(v,C,O,k,T,b))}function m(b){return typeof b=="string"&&b&&["'",'"'].indexOf(b.charAt(0))!==-1}function d(b){return b.match(n)&&!b.match(r)}function y(b){return o.test(b)}function x(b){return!m(b)&&(d(b)||y(b))}return Cs}var gr=fb(),Os,sc;function db(){if(sc)return Os;sc=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=c=>c.match(e)||[],r=c=>c[0].toUpperCase()+c.slice(1),n=(c,f)=>t(c).join(f).toLowerCase(),o=c=>t(c).reduce((f,h)=>`${f}${f?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return Os={words:t,upperFirst:r,camelCase:o,pascalCase:c=>r(o(c)),snakeCase:c=>n(c,"_"),kebabCase:c=>n(c,"-"),sentenceCase:c=>r(n(c," ")),titleCase:c=>t(c).map(r).join(" ")},Os}var Fs=db(),wo={exports:{}},ac;function pb(){if(ac)return wo.exports;ac=1,wo.exports=function(o){return e(t(o),o)},wo.exports.array=e;function e(o,i){var s=o.length,a=new Array(s),l={},u=s,c=r(i),f=n(o);for(i.forEach(function(m){if(!f.has(m[0])||!f.has(m[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)l[u]||h(o[u],u,new Set);return a;function h(m,d,y){if(y.has(m)){var x;try{x=", node was:"+JSON.stringify(m)}catch{x=""}throw new Error("Cyclic dependency"+x)}if(!f.has(m))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(m));if(!l[d]){l[d]=!0;var b=c.get(m)||new Set;if(b=Array.from(b),d=b.length){y.add(m);do{var w=b[--d];h(w,f.get(w),y)}while(d);y.delete(m)}a[--s]=m}}}function t(o){for(var i=new Set,s=0,a=o.length;s<a;s++){var l=o[s];i.add(l[0]),i.add(l[1])}return Array.from(i)}function r(o){for(var i=new Map,s=0,a=o.length;s<a;s++){var l=o[s];i.has(l[0])||i.set(l[0],new Set),i.has(l[1])||i.set(l[1],new Set),i.get(l[0]).add(l[1])}return i}function n(o){for(var i=new Map,s=0,a=o.length;s<a;s++)i.set(o[s],s);return i}return wo.exports}var mb=pb();const hb=xf(mb),gb=Object.prototype.toString,yb=Error.prototype.toString,bb=RegExp.prototype.toString,xb=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",vb=/^Symbol\((.*)\)(.*)$/;function wb(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function lc(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return wb(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return xb.call(e).replace(vb,"Symbol($1)");const n=gb.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+yb.call(e)+"]":n==="RegExp"?bb.call(e):null}function Ut(e,t){let r=lc(e,t);return r!==null?r:JSON.stringify(e,function(n,o){let i=lc(this[n],t);return i!==null?i:o},2)}function uc(e){return e==null?[]:[].concat(e)}let cc,fc,dc,Eb=/\$\{\s*(\w+)\s*\}/g;cc=Symbol.toStringTag;class pc{constructor(t,r,n,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[cc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],uc(t).forEach(i=>{if(tt.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}fc=Symbol.hasInstance,dc=Symbol.toStringTag;class tt extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(Eb,(o,i)=>Ut(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,o,i){const s=new pc(t,r,n,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[dc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,tt)}static[fc](t){return pc[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let $t={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const o=n!=null&&n!==r?` (cast from the value \`${Ut(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ut(r,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Ut(r,!0)}\``+o}},rt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},er={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},As={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},js={isValue:"${path} field must be ${value}"},Eo={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},To={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:$t,string:rt,number:er,date:As,object:Eo,array:To,boolean:js,tuple:{notType:e=>{const{path:t,value:r,spec:n}=e,o=n.types.length;if(Array.isArray(r)){if(r.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${Ut(r,!0)}\``;if(r.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${Ut(r,!0)}\``}return tt.formatError($t.notType,e)}}});const _o=e=>e&&e.__isYupSchema__;class So{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:o,otherwise:i}=r,s=typeof n=="function"?n:(...a)=>a.every(l=>l===n);return new So(t,(a,l)=>{var u;let c=s(...a)?o:i;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(n,t,r);if(o===void 0||o===t)return t;if(!_o(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const ko={context:"$",value:"."};class yr{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===ko.context,this.isValue=this.key[0]===ko.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?ko.context:this.isValue?ko.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&gr.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let o=this.isContext?n:this.isValue?t:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}yr.prototype.__isYupRef=!0;const xt=e=>e==null;function Lr(e){function t({value:r,path:n="",options:o,originalValue:i,schema:s},a,l){const{name:u,test:c,params:f,message:h,skipAbsent:m}=e;let{parent:d,context:y,abortEarly:x=s.spec.abortEarly,disableStackTrace:b=s.spec.disableStackTrace}=o;function w(N){return yr.isRef(N)?N.getValue(r,d,y):N}function v(N={}){const L=Object.assign({value:r,originalValue:i,label:s.spec.label,path:N.path||n,spec:s.spec,disableStackTrace:N.disableStackTrace||b},f,N.params);for(const H of Object.keys(L))L[H]=w(L[H]);const R=new tt(tt.formatError(N.message||h,L),r,L.path,N.type||u,L.disableStackTrace);return R.params=L,R}const E=x?a:l;let C={path:n,parent:d,type:u,from:o.from,createError:v,resolve:w,options:o,originalValue:i,schema:s};const T=N=>{tt.isError(N)?E(N):N?l(null):E(v())},k=N=>{tt.isError(N)?E(N):a(N)};if(m&&xt(r))return T(!0);let j;try{var D;if(j=c.call(C,r,C),typeof((D=j)==null?void 0:D.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(T,k)}}catch(N){k(N);return}T(j)}return t.OPTIONS=e,t}function Tb(e,t,r,n=r){let o,i,s;return t?(gr.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a;e=e.resolve({context:n,parent:o,value:r});let f=e.type==="tuple",h=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&h>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);o=r,r=r&&r[h],e=f?e.spec.types[h]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);o=r,r=r&&r[c],e=e.fields[c]}i=c,s=l?"["+a+"]":"."+a}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class Co extends Set{describe(){const t=[];for(const r of this.values())t.push(yr.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Co(this.values())}merge(t,r){const n=this.clone();return t.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}}function Ir(e,t=new Map){if(_o(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Ir(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,o]of e.entries())r.set(n,Ir(o,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Ir(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,o]of Object.entries(e))r[n]=Ir(o,t)}else throw Error(`Unable to clone ${e}`);return r}class nt{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Co,this._blacklist=new Co,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($t.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Ir(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const o=Object.assign({},r.spec,n.spec);return n.spec=o,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(s=>{i.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((o,i)=>i.resolve(o,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,o,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),o=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(o&&xt(i))return i;let s=Ut(t),a=Ut(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
56
|
+
hover:file:bg-blue-100`}),r&&g.jsx("p",{className:"text-red-500 text-sm",children:r})]})}const E0=["jpg","jpeg","png","gif","bmp","webp","svg","image"],Du={pdf:"/pdf-icon.png",word:"/word-icon.png",excel:"/excel-icon.png",powerpoint:"/ppt-icon.png",other:"/file-icon.png"},T0=(e="")=>{var r;const t=((r=e.split(".").pop())==null?void 0:r.toLowerCase())||"";return E0.includes(t)||e.startsWith("data:image/")?"image":["pdf"].includes(t)||e.startsWith("data:application/pdf")?"pdf":["doc","docx"].includes(t)||e.startsWith("data:application/msword")||e.startsWith("data:application/vnd.openxmlformats-officedocument.wordprocessingml.document")?"word":["xls","xlsx","csv"].includes(t)||e.startsWith("data:application/vnd.ms-excel")||e.startsWith("data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")?"excel":["ppt","pptx"].includes(t)||e.startsWith("data:application/vnd.ms-powerpoint")||e.startsWith("data:application/vnd.openxmlformats-officedocument.presentationml.presentation")?"powerpoint":["txt"].includes(t)||e.startsWith("data:text/")?"text":["zip","rar","7z","tar","gz"].includes(t)?"archive":["mp4","mkv","webm","avi","mov"].includes(t)||e.startsWith("data:video/")?"video":["mp3","wav","flac","aac","ogg"].includes(t)||e.startsWith("data:audio/")?"audio":"other"},_0=({fileUrl:e,fileName:t})=>{const[r,n]=p.useState(!1),[o,i]=p.useState("unknown");p.useEffect(()=>{e&&i(T0(e))},[e]);const s=()=>{o==="image"?n(!0):window.open(e,"_blank")},a=()=>n(!1),l=()=>{if(o==="image")return g.jsx("button",{className:"btn btn-view text-sm font-semibold",type:"button","aria-label":"Preview file",children:g.jsx("span",{children:"Preview File"})});const u=Du[o]||Du.other;return g.jsxs("div",{onClick:s,className:"cursor-pointer border border-gray-200 bg-gray-200 rounded p-2 flex flex-col items-center justify-center hover:shadow",title:`Click to ${o==="pdf"?"open":"download"} ${t||"file"}`,children:[o==="image"&&g.jsx("div",{className:"w-14 h-14 flex items-center justify-center mb-2",children:g.jsx("img",{src:u,alt:`${o} icon`,className:"max-w-full max-h-full"})}),g.jsx("div",{className:"text-xs text-gray-700 truncate w-full text-center",children:t||(e==null?void 0:e.split("/").pop())||"Unknown file"})]})};return g.jsxs("div",{className:"mt-2",children:[g.jsx("div",{onClick:s,children:l()}),r&&o==="image"&&g.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-50",onClick:a,children:g.jsxs("div",{className:"relative bg-white p-5 rounded-lg max-w-[90vw] max-h-[90vh] overflow-auto",onClick:u=>u.stopPropagation(),children:[g.jsx("button",{onClick:a,className:"absolute top-2 right-2 text-2xl font-bold text-gray-700","aria-label":"Close preview",children:"×"}),g.jsx("img",{src:e||"/place.png",alt:t||"Full Image",className:"max-w-full max-h-[80vh] mx-auto object-contain"})]})})]})};function S0({element:e,validationData:t}){const[r,n]=p.useState((e==null?void 0:e.value)??null),{register:o=()=>({}),setValue:i,isReadOnly:s}=t||{};return p.useEffect(()=>{o(e.id)},[e.id,o]),g.jsxs("div",{children:[g.jsx(w0,{onFileLoaded:a=>{i(e.id,a),n(a)},disabled:s}),r&&g.jsx(_0,{fileUrl:r.base64,fileName:r.name})]})}function C0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:se("input-control",e==null?void 0:e.customClass),...r(e.id)})}var fe=function(){return fe=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},fe.apply(this,arguments)};function k0(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function lt(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ot=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},O0={k:1e3,m:1e6,b:1e9},F0=function(e,t){t===void 0&&(t=".");var r=new RegExp("(\\d+(".concat(Ot(t),"\\d*)?)([kmb])$"),"i"),n=e.match(r);if(n){var o=n[1],i=n[3],s=O0[i.toLowerCase()];return Number(o.replace(t,"."))*s}},A0=function(e,t){t===void 0&&(t=",");var r=new RegExp(Ot(t),"g");return e.replace(r,"")},j0=function(e,t){var r=Ot(t.join("")),n=new RegExp("[^\\d".concat(r,"]"),"gi");return e.replace(n,"")},is=function(e){var t=e.value,r=e.groupSeparator,n=r===void 0?",":r,o=e.decimalSeparator,i=o===void 0?".":o,s=e.allowDecimals,a=s===void 0?!0:s,l=e.decimalsLimit,u=l===void 0?2:l,c=e.allowNegativeValue,f=c===void 0?!0:c,h=e.disableAbbreviations,m=h===void 0?!1:h,d=e.prefix,y=d===void 0?"":d,x=e.transformRawValue,b=x===void 0?function(re){return re}:x,w=b(t);if(w==="-")return w;var v=m?[]:["k","m","b"],E=new RegExp("((^|\\D)-\\d)|(-".concat(Ot(y),")")),k=E.test(w),T=RegExp("(\\d+)-?".concat(Ot(y))).exec(t)||[],C=T[0],O=T[1],j=y?C?w.replace(C,"").concat(O):w.replace(y,""):w,D=A0(j,n),N=j0(D,lt([n,i],v,!0)),L=N;if(!m){if(v.some(function(re){return re===N.toLowerCase().replace(i,"")}))return"";var R=F0(N,i);R&&(L=String(R))}var H=k&&f?"-":"";if(i&&L.includes(i)){var J=N.split(i),z=J[0],X=J[1],K=u&&X?X.slice(0,u):X,Q=a?"".concat(i).concat(K):"";return"".concat(H).concat(z).concat(Q)}return"".concat(H).concat(L)},$0=function(e,t,r){if(r!==void 0&&e.length>1){if(r===0)return e.replace(t,"");if(e.includes(t)){var n=e.split(t),o=n[0],i=n[1];if(i.length===r)return e;if(i.length>r)return"".concat(o).concat(t).concat(i.slice(0,r))}var s=e.length>r?new RegExp("(\\d+)(\\d{".concat(r,"})")):new RegExp("(\\d)(\\d+)"),a=e.match(s);if(a){var o=a[1],i=a[2];return"".concat(o).concat(t).concat(i)}}return e},Lu=function(e,t){var r=t.groupSeparator,n=r===void 0?",":r,o=t.decimalSeparator,i=o===void 0?".":o,s=new RegExp("\\d([^".concat(Ot(n)).concat(Ot(i),"0-9]+)")),a=e.match(s);return a?a[1]:void 0},yn=function(e){var t=e.value,r=e.decimalSeparator,n=e.intlConfig,o=e.decimalScale,i=e.prefix,s=i===void 0?"":i,a=e.suffix,l=a===void 0?"":a;if(t===""||t===void 0)return"";if(t==="-")return"-";var u=new RegExp("^\\d?-".concat(s?"".concat(Ot(s),"?"):"","\\d")).test(t),c=r!=="."?N0(t,r,u):t;r&&r!=="-"&&c.startsWith(r)&&(c="0"+c);var f={minimumFractionDigits:o||0,maximumFractionDigits:20},h=n?new Intl.NumberFormat(n.locale,n.currency?fe(fe({},f),{style:"currency",currency:n.currency}):f):new Intl.NumberFormat(void 0,f),m=h.formatToParts(Number(c)),d=P0(m,e),y=Lu(d,fe({},e)),x=t.slice(-1)===r?r:"",b=c.match(RegExp("\\d+\\.(\\d+)"))||[],w=b[1];return o===void 0&&w&&r&&(d.includes(r)?d=d.replace(RegExp("(\\d+)(".concat(Ot(r),")(\\d+)"),"g"),"$1$2".concat(w)):y&&!l?d=d.replace(y,"".concat(r).concat(w).concat(y)):d="".concat(d).concat(r).concat(w)),l&&x?"".concat(d).concat(x).concat(l):y&&x?d.replace(y,"".concat(x).concat(y)):y&&l?d.replace(y,"".concat(x).concat(l)):[d,x,l].join("")},N0=function(e,t,r){var n=e;return t&&t!=="."&&(n=n.replace(RegExp(Ot(t),"g"),"."),r&&t==="-"&&(n="-".concat(n.slice(1)))),n},P0=function(e,t){var r=t.prefix,n=t.groupSeparator,o=t.decimalSeparator,i=t.decimalScale,s=t.disableGroupSeparators,a=s===void 0?!1:s;return e.reduce(function(l,u,c){var f=u.type,h=u.value;return c===0&&r?f==="minusSign"?[h,r]:f==="currency"?lt(lt([],l,!0),[r],!1):[r,h]:f==="currency"?r?l:lt(lt([],l,!0),[h],!1):f==="group"?a?l:lt(lt([],l,!0),[n!==void 0?n:h],!1):f==="decimal"?i!==void 0&&i===0?l:lt(lt([],l,!0),[o!==void 0?o:h],!1):f==="fraction"?lt(lt([],l,!0),[i!==void 0?h.slice(0,i):h],!1):lt(lt([],l,!0),[h],!1)},[""]).join("")},D0={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},L0=function(e){var t=e||{},r=t.locale,n=t.currency,o=r?new Intl.NumberFormat(r,n?{currency:n,style:"currency"}:void 0):new Intl.NumberFormat;return o.formatToParts(1000.1).reduce(function(i,s,a){return s.type==="currency"?a===0?fe(fe({},i),{currencySymbol:s.value,prefix:s.value}):fe(fe({},i),{currencySymbol:s.value,suffix:s.value}):s.type==="group"?fe(fe({},i),{groupSeparator:s.value}):s.type==="decimal"?fe(fe({},i),{decimalSeparator:s.value}):i},D0)},Iu=function(e){return RegExp(/\d/,"gi").test(e)},I0=function(e,t,r){if(t===void 0&&(t="."),r===void 0||e===""||e===void 0)return e;if(!e.match(/\d/g))return"";var n=e.split(t),o=n[0],i=n[1];if(r===0)return o;var s=i||"";if(s.length<r)for(;s.length<r;)s+="0";else s=s.slice(0,r);return"".concat(o).concat(t).concat(s)},M0=function(e){var t=e.selectionStart,r=e.value,n=e.lastKeyStroke,o=e.stateValue,i=e.groupSeparator,s=t,a=r;if(o&&s){var l=r.split("");return n==="Backspace"&&o[s]===i&&(l.splice(s-1,1),s-=1),n==="Delete"&&o[s]===i&&(l.splice(s,1),s+=1),a=l.join(""),{modifiedValue:a,cursorPosition:s}}return{modifiedValue:a,cursorPosition:t}},go=p.forwardRef(function(e,t){var r=e.allowDecimals,n=r===void 0?!0:r,o=e.allowNegativeValue,i=o===void 0?!0:o,s=e.id,a=e.name,l=e.className,u=e.customInput,c=e.decimalsLimit,f=e.defaultValue,h=e.disabled,m=h===void 0?!1:h,d=e.maxLength,y=e.value,x=e.onValueChange,b=e.fixedDecimalLength,w=e.placeholder,v=e.decimalScale,E=e.prefix,k=e.suffix,T=e.intlConfig,C=e.step,O=e.min,j=e.max,D=e.disableGroupSeparators,N=D===void 0?!1:D,L=e.disableAbbreviations,R=L===void 0?!1:L,H=e.decimalSeparator,J=e.groupSeparator,z=e.onChange,X=e.onFocus,K=e.onBlur,Q=e.onKeyDown,re=e.onKeyUp,je=e.transformRawValue,Le=e.formatValueOnBlur,W=Le===void 0?!0:Le,we=k0(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue","formatValueOnBlur"]);if(H&&Iu(H))throw new Error("decimalSeparator cannot be a number");if(J&&Iu(J))throw new Error("groupSeparator cannot be a number");var _e=p.useMemo(function(){return L0(T)},[T]),le=H||_e.decimalSeparator||"",$e=J||_e.groupSeparator||"";if(le&&$e&&le===$e&&N===!1)throw new Error("decimalSeparator cannot be the same as groupSeparator");var Se={decimalSeparator:le,groupSeparator:$e,disableGroupSeparators:N,intlConfig:T,prefix:E||_e.prefix,suffix:k},Ie={decimalSeparator:le,groupSeparator:$e,allowDecimals:n,decimalsLimit:c||b||2,allowNegativeValue:i,disableAbbreviations:R,prefix:E||_e.prefix,transformRawValue:je},wt=p.useState(function(){return f!=null?yn(fe(fe({},Se),{decimalScale:v,value:String(f)})):y!=null?yn(fe(fe({},Se),{decimalScale:v,value:String(y)})):""}),Ce=wt[0],oe=wt[1],ye=p.useState(!1),Ne=ye[0],qt=ye[1],Ht=p.useState(0),Tr=Ht[0],S=Ht[1],F=p.useState(0),P=F[0],B=F[1],V=p.useState(null),M=V[0],Y=V[1],G=p.useRef(null);p.useImperativeHandle(t,function(){return G.current});var xe=function(ve,We){qt(!0);var Be=M0({selectionStart:We,value:ve,lastKeyStroke:M,stateValue:Ce,groupSeparator:$e}),Ke=Be.modifiedValue,Ue=Be.cursorPosition,Xe=is(fe({value:Ke},Ie));if(!(d&&Xe.replace(/-/g,"").length>d)){if(Xe===""||Xe==="-"||Xe===le){x&&x(void 0,a,{float:null,formatted:"",value:""}),oe(Xe),S(1);return}var Tt=le?Xe.replace(le,"."):Xe,jn=parseFloat(Tt),Sr=yn(fe({value:Xe},Se));if(Ue!=null){var Cr=Ue+(Sr.length-ve.length);Cr=Cr<=0?E?E.length:0:Cr,S(Cr),B(P+1)}if(oe(Sr),x){var Zs={float:jn,formatted:Sr,value:Xe};x(Xe,a,Zs)}}},he=function(ve){var We=ve.target,Be=We.value,Ke=We.selectionStart;xe(Be,Ke),z&&z(ve)},Et=function(ve){return X&&X(ve),Ce?Ce.length:0},zr=function(ve){var We=ve.target.value,Be=is(fe({value:We},Ie));if(Be==="-"||Be===le||!Be){oe(""),K&&K(ve);return}var Ke=$0(Be,le,b),Ue=I0(Ke,le,v!==void 0?v:b),Xe=parseFloat(Ue.replace(le,".")),Tt=yn(fe(fe({},Se),{value:Ue}));x&&W&&x(Ue,a,{float:Xe,formatted:Tt,value:Ue}),oe(Tt),K&&K(ve)},tr=function(ve){var We=ve.key;if(Y(We),C&&(We==="ArrowUp"||We==="ArrowDown")){ve.preventDefault(),S(Ce.length);var Be=parseFloat(y!=null?String(y).replace(le,"."):is(fe({value:Ce},Ie)))||0,Ke=We==="ArrowUp"?Be+C:Be-C;if(O!==void 0&&Ke<Number(O)||j!==void 0&&Ke>Number(j))return;var Ue=String(C).includes(".")?Number(String(C).split(".")[1].length):void 0;xe(String(Ue?Ke.toFixed(Ue):Ke).replace(".",le))}Q&&Q(ve)},Wt=function(ve){var We=ve.key,Be=ve.currentTarget.selectionStart;if(We!=="ArrowUp"&&We!=="ArrowDown"&&Ce!=="-"){var Ke=Lu(Ce,{groupSeparator:$e,decimalSeparator:le});if(Ke&&Be&&Be>Ce.length-Ke.length&&G.current){var Ue=Ce.length-Ke.length;G.current.setSelectionRange(Ue,Ue)}}re&&re(ve)};p.useEffect(function(){y==null&&f==null&&oe("")},[f,y]),p.useEffect(function(){Ne&&Ce!=="-"&&G.current&&document.activeElement===G.current&&G.current.setSelectionRange(Tr,Tr)},[Ce,Tr,G,Ne,P]);var Fn=function(){return y!=null&&Ce!=="-"&&(!le||Ce!==le)?yn(fe(fe({},Se),{decimalScale:Ne?void 0:v,value:String(y)})):Ce},_r=fe({type:"text",inputMode:"decimal",id:s,name:a,className:l,onChange:he,onBlur:zr,onFocus:Et,onKeyDown:tr,onKeyUp:Wt,placeholder:w,disabled:m,value:Fn(),ref:G},we);if(u){var An=u;return p.createElement(An,fe({},_r))}return p.createElement("input",fe({},_r))});go.displayName="CurrencyInput";const ge=({label:e,name:t,register:r,errors:n,className:o,type:i="text",placeholder:s="",isFloating:a,setValue:l,value:u,trigger:c,prefix:f,disabled:h})=>{var d,y,x,b;const m=r?{...r(t)}:{};return i==="amount"?g.jsxs("div",{className:"space-y-1.5 relative",children:[g.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),g.jsx(go,{onValueChange:w=>{l(t,w),r&&r(t),c&&c(t)},placeholder:s,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"}`,decimalsLimit:2,value:u,prefix:f,disabled:h}),(n==null?void 0:n[t])&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:(d=n[t])==null?void 0:d.message})]}):["checkbox","radio"].includes(i)?g.jsxs("div",{children:[g.jsxs("label",{className:"flex items-center space-x-2",children:[g.jsx("input",{...m,type:i,className:"h-4 w-4 rounded border-gray-300",value:u,disabled:h}),g.jsx("span",{className:"text-sm font-medium text-[#344054] font-onest",children:e})]}),(n==null?void 0:n[t])&&g.jsx("p",{className:"ml-2 text-sm text-red-600",children:(y=n[t])==null?void 0:y.message})]}):i==="textarea"?g.jsxs("div",{className:"space-y-1.5 relative",children:[g.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),g.jsx("textarea",{...m,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"} ${o}`,placeholder:s,disabled:h}),(n==null?void 0:n[t])&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:(x=n[t])==null?void 0:x.message})]}):g.jsxs("div",{className:"space-y-1.5 relative",children:[g.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3":"relative"}`,children:e}),g.jsx("input",{...m,type:i,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"} ${o}`,placeholder:a?"":s,disabled:h}),(n==null?void 0:n[t])&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:(b=n[t])==null?void 0:b.message})]})};function R0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("div",{className:se("grid gap-y-[6px]",e.customClass),children:e==null?void 0:e.options.map(n=>g.jsx("div",{children:g.jsx(ge,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,register:r,name:e.id,value:n.value})},n.id))})}function V0({element:e,state:t}){return g.jsx("div",{children:"SectionInput"})}function B0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("div",{className:se("grid gap-y-[6px]",e.customClass),children:e==null?void 0:e.options.map(n=>g.jsx("div",{children:g.jsx(ge,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,register:r,name:e.id,value:n.value})},n.id))})}const ss=({className:e="",options:t,placeholder:r="Select",errors:n,register:o,setValue:i,name:s,label:a,value:l,trigger:u,isMultiple:c,isFloatingLabel:f,subText:h,labelClass:m="text-[10px]",loading:d})=>{const[y,x]=p.useState(c?[]:null),b=se("input-control",e);return p.useEffect(()=>{y&&i&&o&&(i(s,y==null?void 0:y.value),o&&o(s),u&&u(s))},[s,o,y,i,u]),p.useEffect(()=>{const w=t==null?void 0:t.find(v=>typeof v.value=="string"&&typeof l=="string"?v.value.toLowerCase()===l.toLowerCase():typeof v.value=="object"&&typeof l=="object"?v.value.id===(l==null?void 0:l.id):v.value===l);x(w||null)},[l,t]),g.jsxs("div",{className:"relative",children:[!f&&a&&g.jsx("label",{className:"block text-sm text-[#686878] darks:!text-white/70 mb-2",children:a}),f&&g.jsx("label",{className:`z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ${m}`,children:a}),g.jsx(Xt,{value:y,onChange:x,multiple:c,children:g.jsxs("div",{className:"relative",children:[g.jsxs(Xt.Button,{className:b,children:[d?g.jsx("span",{className:" block opacity-60 text-sm text-left",children:"Fetching data ..."}):g.jsx("span",{className:"block truncate text-sm text-left",children:(y==null?void 0:y.label)||g.jsx("span",{className:"opacity-60",children:r})}),g.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:g.jsx(Pe,{icon:"lucide:chevron-down"})})]}),g.jsx(ju,{as:p.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx(Xt.Options,{className:"z-[77] absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white darks:bg-gray-800 text-gray-900 darks:text-white/80 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:t==null?void 0:t.map((w,v)=>g.jsx(Xt.Option,{className:({active:E})=>`relative cursor-default select-none py-2 pl-4 pr-4 text-sm ${E?"bg-gray-100 darks:bg-gray-700 text-gray-900 darks:text-white/80":"text-gray-900 darks:text-white/70 "}`,value:w,children:({selected:E})=>g.jsx("div",{className:`block truncate text-sm ${E?"font-medium":"font-normal"}`,children:w.label})},v))})})]})}),!n&&h&&g.jsx("p",{className:"text-[10px] text-[#98A2B3] leading-normal mt-[6px]",children:h}),n&&g.jsx("span",{className:"text-sm text-red-500",children:n.message})]})};function U0({element:e,validationData:t}){const{register:r=()=>({}),trigger:n,setValue:o,watch:i}=t||{};let s;return i&&(s=i()[e.id]),p.useEffect(()=>{r(e.id)},[e.id,r]),g.jsx("div",{children:g.jsx(ss,{options:(e==null?void 0:e.options)??[],register:r,name:e.id,setValue:o,trigger:n,value:s,className:se("input-control",e==null?void 0:e.customClass)})})}function z0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("textarea",{placeholder:e.placeholder,rows:4,className:se("input-control resize-none",e==null?void 0:e.customClass),...r(e.id)})}var bn=e=>e.type==="checkbox",gr=e=>e instanceof Date,Je=e=>e==null;const Mu=e=>typeof e=="object";var Ee=e=>!Je(e)&&!Array.isArray(e)&&Mu(e)&&!gr(e),q0=e=>Ee(e)&&e.target?bn(e.target)?e.target.checked:e.target.value:e,H0=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,W0=(e,t)=>e.has(H0(t)),K0=e=>{const t=e.constructor&&e.constructor.prototype;return Ee(t)&&t.hasOwnProperty("isPrototypeOf")},as=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ve(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(as&&(e instanceof Blob||n))&&(r||Ee(e)))if(t=r?[]:{},!r&&!K0(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Ve(e[o]));else return e;return t}var xn=e=>Array.isArray(e)?e.filter(Boolean):[],me=e=>e===void 0,U=(e,t,r)=>{if(!t||!Ee(e))return r;const n=xn(t.split(/[,[\].]+?/)).reduce((o,i)=>Je(o)?o:o[i],e);return me(n)||n===e?me(e[t])?r:e[t]:n},Ft=e=>typeof e=="boolean",ls=e=>/^\w*$/.test(e),Ru=e=>xn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ae=(e,t,r)=>{let n=-1;const o=ls(t)?[t]:Ru(t),i=o.length,s=i-1;for(;++n<i;){const a=o[n];let l=r;if(n!==s){const u=e[a];l=Ee(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const Vu={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},mt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Bu=p.createContext(null),Y0=()=>p.useContext(Bu),J0=e=>{const{children:t,...r}=e;return p.createElement(Bu.Provider,{value:r},t)};var G0=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==mt.all&&(t._proxyFormState[s]=!n||mt.all),e[s]}});return o},Ge=e=>Ee(e)&&!Object.keys(e).length,X0=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return Ge(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===mt.all)},ut=e=>Array.isArray(e)?e:[e];function Uu(e){const t=p.useRef(e);t.current=e,p.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var At=e=>typeof e=="string",Z0=(e,t,r,n,o)=>At(e)?(n&&t.watch.add(e),U(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),U(r,i))):(n&&(t.watchAll=!0),r),zu=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Zt=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},us=(e,t,r={})=>r.shouldFocus||me(r.shouldFocus)?r.focusName||`${e}.${me(r.focusIndex)?t:r.focusIndex}.`:"",vn=e=>({isOnSubmit:!e||e===mt.onSubmit,isOnBlur:e===mt.onBlur,isOnChange:e===mt.onChange,isOnAll:e===mt.all,isOnTouch:e===mt.onTouched}),cs=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Dr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=U(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Dr(a,t))break}else if(Ee(a)&&Dr(a,t))break}}};var qu=(e,t,r)=>{const n=ut(U(e,r));return ae(n,"root",t[r]),ae(e,r,n),e},fs=e=>e.type==="file",jt=e=>typeof e=="function",yo=e=>{if(!as)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},bo=e=>At(e),ds=e=>e.type==="radio",xo=e=>e instanceof RegExp;const Hu={value:!1,isValid:!1},Wu={value:!0,isValid:!0};var Ku=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!me(e[0].attributes.value)?me(e[0].value)||e[0].value===""?Wu:{value:e[0].value,isValid:!0}:Wu:Hu}return Hu};const Yu={isValid:!1,value:null};var Ju=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Yu):Yu;function Gu(e,t,r="validate"){if(bo(e)||Array.isArray(e)&&e.every(bo)||Ft(e)&&!e)return{type:r,message:bo(e)?e:"",ref:t}}var Lr=e=>Ee(e)&&!xo(e)?e:{value:e,message:""},ps=async(e,t,r,n,o)=>{const{ref:i,refs:s,required:a,maxLength:l,minLength:u,min:c,max:f,pattern:h,validate:m,name:d,valueAsNumber:y,mount:x,disabled:b}=e._f,w=U(t,d);if(!x||b)return{};const v=s?s[0]:i,E=L=>{n&&v.reportValidity&&(v.setCustomValidity(Ft(L)?"":L||""),v.reportValidity())},k={},T=ds(i),C=bn(i),O=T||C,j=(y||fs(i))&&me(i.value)&&me(w)||yo(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,D=zu.bind(null,d,r,k),N=(L,R,H,J=Bt.maxLength,z=Bt.minLength)=>{const X=L?R:H;k[d]={type:L?J:z,message:X,ref:i,...D(L?J:z,X)}};if(o?!Array.isArray(w)||!w.length:a&&(!O&&(j||Je(w))||Ft(w)&&!w||C&&!Ku(s).isValid||T&&!Ju(s).isValid)){const{value:L,message:R}=bo(a)?{value:!!a,message:a}:Lr(a);if(L&&(k[d]={type:Bt.required,message:R,ref:v,...D(Bt.required,R)},!r))return E(R),k}if(!j&&(!Je(c)||!Je(f))){let L,R;const H=Lr(f),J=Lr(c);if(!Je(w)&&!isNaN(w)){const z=i.valueAsNumber||w&&+w;Je(H.value)||(L=z>H.value),Je(J.value)||(R=z<J.value)}else{const z=i.valueAsDate||new Date(w),X=re=>new Date(new Date().toDateString()+" "+re),K=i.type=="time",Q=i.type=="week";At(H.value)&&w&&(L=K?X(w)>X(H.value):Q?w>H.value:z>new Date(H.value)),At(J.value)&&w&&(R=K?X(w)<X(J.value):Q?w<J.value:z<new Date(J.value))}if((L||R)&&(N(!!L,H.message,J.message,Bt.max,Bt.min),!r))return E(k[d].message),k}if((l||u)&&!j&&(At(w)||o&&Array.isArray(w))){const L=Lr(l),R=Lr(u),H=!Je(L.value)&&w.length>+L.value,J=!Je(R.value)&&w.length<+R.value;if((H||J)&&(N(H,L.message,R.message),!r))return E(k[d].message),k}if(h&&!j&&At(w)){const{value:L,message:R}=Lr(h);if(xo(L)&&!w.match(L)&&(k[d]={type:Bt.pattern,message:R,ref:i,...D(Bt.pattern,R)},!r))return E(R),k}if(m){if(jt(m)){const L=await m(w,t),R=Gu(L,v);if(R&&(k[d]={...R,...D(Bt.validate,R.message)},!r))return E(R.message),k}else if(Ee(m)){let L={};for(const R in m){if(!Ge(L)&&!r)break;const H=Gu(await m[R](w,t),v,R);H&&(L={...H,...D(R,H.message)},E(H.message),r&&(k[d]=L))}if(!Ge(L)&&(k[d]={ref:v,...L},!r))return k}}return E(!0),k},ms=(e,t)=>[...e,...ut(t)],hs=e=>Array.isArray(e)?e.map(()=>{}):void 0;function gs(e,t,r){return[...e.slice(0,t),...ut(r),...e.slice(t)]}var ys=(e,t,r)=>Array.isArray(e)?(me(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],bs=(e,t)=>[...ut(t),...ut(e)];function Q0(e,t){let r=0;const n=[...e];for(const o of t)n.splice(o-r,1),r++;return xn(n).length?n:[]}var xs=(e,t)=>me(t)?[]:Q0(e,ut(t).sort((r,n)=>r-n)),vs=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};function eb(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=me(e)?n++:e[t[n++]];return e}function tb(e){for(const t in e)if(e.hasOwnProperty(t)&&!me(e[t]))return!1;return!0}function Oe(e,t){const r=Array.isArray(t)?t:ls(t)?[t]:Ru(t),n=r.length===1?e:eb(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(Ee(n)&&Ge(n)||Array.isArray(n)&&tb(n))&&Oe(e,r.slice(0,-1)),e}var Xu=(e,t,r)=>(e[t]=r,e);function rb(e){const t=Y0(),{control:r=t.control,name:n,keyName:o="id",shouldUnregister:i,rules:s}=e,[a,l]=p.useState(r._getFieldArray(n)),u=p.useRef(r._getFieldArray(n).map(Zt)),c=p.useRef(a),f=p.useRef(n),h=p.useRef(!1);f.current=n,c.current=a,r._names.array.add(n),s&&r.register(n,s),Uu({next:({values:T,name:C})=>{if(C===f.current||!C){const O=U(T,f.current);Array.isArray(O)&&(l(O),u.current=O.map(Zt))}},subject:r._subjects.array});const m=p.useCallback(T=>{h.current=!0,r._updateFieldArray(n,T)},[r,n]),d=(T,C)=>{const O=ut(Ve(T)),j=ms(r._getFieldArray(n),O);r._names.focus=us(n,j.length-1,C),u.current=ms(u.current,O.map(Zt)),m(j),l(j),r._updateFieldArray(n,j,ms,{argA:hs(T)})},y=(T,C)=>{const O=ut(Ve(T)),j=bs(r._getFieldArray(n),O);r._names.focus=us(n,0,C),u.current=bs(u.current,O.map(Zt)),m(j),l(j),r._updateFieldArray(n,j,bs,{argA:hs(T)})},x=T=>{const C=xs(r._getFieldArray(n),T);u.current=xs(u.current,T),m(C),l(C),!Array.isArray(U(r._fields,n))&&ae(r._fields,n,void 0),r._updateFieldArray(n,C,xs,{argA:T})},b=(T,C,O)=>{const j=ut(Ve(C)),D=gs(r._getFieldArray(n),T,j);r._names.focus=us(n,T,O),u.current=gs(u.current,T,j.map(Zt)),m(D),l(D),r._updateFieldArray(n,D,gs,{argA:T,argB:hs(C)})},w=(T,C)=>{const O=r._getFieldArray(n);vs(O,T,C),vs(u.current,T,C),m(O),l(O),r._updateFieldArray(n,O,vs,{argA:T,argB:C},!1)},v=(T,C)=>{const O=r._getFieldArray(n);ys(O,T,C),ys(u.current,T,C),m(O),l(O),r._updateFieldArray(n,O,ys,{argA:T,argB:C},!1)},E=(T,C)=>{const O=Ve(C),j=Xu(r._getFieldArray(n),T,O);u.current=[...j].map((D,N)=>!D||N===T?Zt():u.current[N]),m(j),l([...j]),r._updateFieldArray(n,j,Xu,{argA:T,argB:O},!0,!1)},k=T=>{const C=ut(Ve(T));u.current=C.map(Zt),m([...C]),l([...C]),r._updateFieldArray(n,[...C],O=>O,{},!0,!1)};return p.useEffect(()=>{if(r._state.action=!1,cs(n,r._names)&&r._subjects.state.next({...r._formState}),h.current&&(!vn(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([n]).then(T=>{const C=U(T.errors,n),O=U(r._formState.errors,n);(O?!C&&O.type||C&&(O.type!==C.type||O.message!==C.message):C&&C.type)&&(C?ae(r._formState.errors,n,C):Oe(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const T=U(r._fields,n);T&&T._f&&!(vn(r._options.reValidateMode).isOnSubmit&&vn(r._options.mode).isOnSubmit)&&ps(T,r._formValues,r._options.criteriaMode===mt.all,r._options.shouldUseNativeValidation,!0).then(C=>!Ge(C)&&r._subjects.state.next({errors:qu(r._formState.errors,C,n)}))}r._subjects.values.next({name:n,values:{...r._formValues}}),r._names.focus&&Dr(r._fields,(T,C)=>{if(r._names.focus&&C.startsWith(r._names.focus)&&T.focus)return T.focus(),1}),r._names.focus="",r._updateValid(),h.current=!1},[a,n,r]),p.useEffect(()=>(!U(r._formValues,n)&&r._updateFieldArray(n),()=>{(r._options.shouldUnregister||i)&&r.unregister(n)}),[n,r,o,i]),{swap:p.useCallback(w,[m,n,r]),move:p.useCallback(v,[m,n,r]),prepend:p.useCallback(y,[m,n,r]),append:p.useCallback(d,[m,n,r]),remove:p.useCallback(x,[m,n,r]),insert:p.useCallback(b,[m,n,r]),update:p.useCallback(E,[m,n,r]),replace:p.useCallback(k,[m,n,r]),fields:p.useMemo(()=>a.map((T,C)=>({...T,[o]:u.current[C]||Zt()})),[a,o])}}var ws=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},Es=e=>Je(e)||!Mu(e);function Qt(e,t){if(Es(e)||Es(t))return e===t;if(gr(e)&&gr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const s=t[o];if(gr(i)&&gr(s)||Ee(i)&&Ee(s)||Array.isArray(i)&&Array.isArray(s)?!Qt(i,s):i!==s)return!1}}return!0}var Zu=e=>e.type==="select-multiple",nb=e=>ds(e)||bn(e),Ts=e=>yo(e)&&e.isConnected,Qu=e=>{for(const t in e)if(jt(e[t]))return!0;return!1};function vo(e,t={}){const r=Array.isArray(e);if(Ee(e)||r)for(const n in e)Array.isArray(e[n])||Ee(e[n])&&!Qu(e[n])?(t[n]=Array.isArray(e[n])?[]:{},vo(e[n],t[n])):Je(e[n])||(t[n]=!0);return t}function ec(e,t,r){const n=Array.isArray(e);if(Ee(e)||n)for(const o in e)Array.isArray(e[o])||Ee(e[o])&&!Qu(e[o])?me(t)||Es(r[o])?r[o]=Array.isArray(e[o])?vo(e[o],[]):{...vo(e[o])}:ec(e[o],Je(t)?{}:t[o],r[o]):r[o]=!Qt(e[o],t[o]);return r}var wn=(e,t)=>ec(e,t,vo(t)),tc=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>me(e)?e:t?e===""?NaN:e&&+e:r&&At(e)?new Date(e):n?n(e):e;function _s(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return fs(t)?t.files:ds(t)?Ju(e.refs).value:Zu(t)?[...t.selectedOptions].map(({value:r})=>r):bn(t)?Ku(e.refs).value:tc(me(t.value)?e.ref.value:t.value,e)}var ob=(e,t,r,n)=>{const o={};for(const i of e){const s=U(t,i);s&&ae(o,i,s._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},En=e=>me(e)?e:xo(e)?e.source:Ee(e)?xo(e.value)?e.value.source:e.value:e;const rc="AsyncFunction";var ib=e=>!!e&&!!e.validate&&!!(jt(e.validate)&&e.validate.constructor.name===rc||Ee(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===rc)),sb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function nc(e,t,r){const n=U(e,r);if(n||ls(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),s=U(t,i),a=U(e,i);if(s&&!Array.isArray(s)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:r}}var ab=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,lb=(e,t)=>!xn(U(e,t)).length&&Oe(e,t);const ub={mode:mt.onSubmit,reValidateMode:mt.onChange,shouldFocusError:!0};function cb(e={}){let t={...ub,...e},r={submitCount:0,isDirty:!1,isLoading:jt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=Ee(t.defaultValues)||Ee(t.values)?Ve(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Ve(o),s={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:ws(),array:ws(),state:ws()},h=vn(t.mode),m=vn(t.reValidateMode),d=t.criteriaMode===mt.all,y=S=>F=>{clearTimeout(u),u=setTimeout(S,F)},x=async S=>{if(!t.disabled&&(c.isValid||S)){const F=t.resolver?Ge((await O()).errors):await D(n,!0);F!==r.isValid&&f.state.next({isValid:F})}},b=(S,F)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((S||Array.from(a.mount)).forEach(P=>{P&&(F?ae(r.validatingFields,P,F):Oe(r.validatingFields,P))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Ge(r.validatingFields)}))},w=(S,F=[],P,B,V=!0,M=!0)=>{if(B&&P&&!t.disabled){if(s.action=!0,M&&Array.isArray(U(n,S))){const Y=P(U(n,S),B.argA,B.argB);V&&ae(n,S,Y)}if(M&&Array.isArray(U(r.errors,S))){const Y=P(U(r.errors,S),B.argA,B.argB);V&&ae(r.errors,S,Y),lb(r.errors,S)}if(c.touchedFields&&M&&Array.isArray(U(r.touchedFields,S))){const Y=P(U(r.touchedFields,S),B.argA,B.argB);V&&ae(r.touchedFields,S,Y)}c.dirtyFields&&(r.dirtyFields=wn(o,i)),f.state.next({name:S,isDirty:L(S,F),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ae(i,S,F)},v=(S,F)=>{ae(r.errors,S,F),f.state.next({errors:r.errors})},E=S=>{r.errors=S,f.state.next({errors:r.errors,isValid:!1})},k=(S,F,P,B)=>{const V=U(n,S);if(V){const M=U(i,S,me(P)?U(o,S):P);me(M)||B&&B.defaultChecked||F?ae(i,S,F?M:_s(V._f)):J(S,M),s.mount&&x()}},T=(S,F,P,B,V)=>{let M=!1,Y=!1;const G={name:S};if(!t.disabled){const xe=!!(U(n,S)&&U(n,S)._f&&U(n,S)._f.disabled);if(!P||B){c.isDirty&&(Y=r.isDirty,r.isDirty=G.isDirty=L(),M=Y!==G.isDirty);const he=xe||Qt(U(o,S),F);Y=!!(!xe&&U(r.dirtyFields,S)),he||xe?Oe(r.dirtyFields,S):ae(r.dirtyFields,S,!0),G.dirtyFields=r.dirtyFields,M=M||c.dirtyFields&&Y!==!he}if(P){const he=U(r.touchedFields,S);he||(ae(r.touchedFields,S,P),G.touchedFields=r.touchedFields,M=M||c.touchedFields&&he!==P)}M&&V&&f.state.next(G)}return M?G:{}},C=(S,F,P,B)=>{const V=U(r.errors,S),M=c.isValid&&Ft(F)&&r.isValid!==F;if(t.delayError&&P?(l=y(()=>v(S,P)),l(t.delayError)):(clearTimeout(u),l=null,P?ae(r.errors,S,P):Oe(r.errors,S)),(P?!Qt(V,P):V)||!Ge(B)||M){const Y={...B,...M&&Ft(F)?{isValid:F}:{},errors:r.errors,name:S};r={...r,...Y},f.state.next(Y)}},O=async S=>{b(S,!0);const F=await t.resolver(i,t.context,ob(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(S),F},j=async S=>{const{errors:F}=await O(S);if(S)for(const P of S){const B=U(F,P);B?ae(r.errors,P,B):Oe(r.errors,P)}else r.errors=F;return F},D=async(S,F,P={valid:!0})=>{for(const B in S){const V=S[B];if(V){const{_f:M,...Y}=V;if(M){const G=a.array.has(M.name),xe=V._f&&ib(V._f);xe&&c.validatingFields&&b([B],!0);const he=await ps(V,i,d,t.shouldUseNativeValidation&&!F,G);if(xe&&c.validatingFields&&b([B]),he[M.name]&&(P.valid=!1,F))break;!F&&(U(he,M.name)?G?qu(r.errors,he,M.name):ae(r.errors,M.name,he[M.name]):Oe(r.errors,M.name))}!Ge(Y)&&await D(Y,F,P)}}return P.valid},N=()=>{for(const S of a.unMount){const F=U(n,S);F&&(F._f.refs?F._f.refs.every(P=>!Ts(P)):!Ts(F._f.ref))&&le(S)}a.unMount=new Set},L=(S,F)=>!t.disabled&&(S&&F&&ae(i,S,F),!Qt(je(),o)),R=(S,F,P)=>Z0(S,a,{...s.mount?i:me(F)?o:At(S)?{[S]:F}:F},P,F),H=S=>xn(U(s.mount?i:o,S,t.shouldUnregister?U(o,S,[]):[])),J=(S,F,P={})=>{const B=U(n,S);let V=F;if(B){const M=B._f;M&&(!M.disabled&&ae(i,S,tc(F,M)),V=yo(M.ref)&&Je(F)?"":F,Zu(M.ref)?[...M.ref.options].forEach(Y=>Y.selected=V.includes(Y.value)):M.refs?bn(M.ref)?M.refs.length>1?M.refs.forEach(Y=>(!Y.defaultChecked||!Y.disabled)&&(Y.checked=Array.isArray(V)?!!V.find(G=>G===Y.value):V===Y.value)):M.refs[0]&&(M.refs[0].checked=!!V):M.refs.forEach(Y=>Y.checked=Y.value===V):fs(M.ref)?M.ref.value="":(M.ref.value=V,M.ref.type||f.values.next({name:S,values:{...i}})))}(P.shouldDirty||P.shouldTouch)&&T(S,V,P.shouldTouch,P.shouldDirty,!0),P.shouldValidate&&re(S)},z=(S,F,P)=>{for(const B in F){const V=F[B],M=`${S}.${B}`,Y=U(n,M);(a.array.has(S)||Ee(V)||Y&&!Y._f)&&!gr(V)?z(M,V,P):J(M,V,P)}},X=(S,F,P={})=>{const B=U(n,S),V=a.array.has(S),M=Ve(F);ae(i,S,M),V?(f.array.next({name:S,values:{...i}}),(c.isDirty||c.dirtyFields)&&P.shouldDirty&&f.state.next({name:S,dirtyFields:wn(o,i),isDirty:L(S,M)})):B&&!B._f&&!Je(M)?z(S,M,P):J(S,M,P),cs(S,a)&&f.state.next({...r}),f.values.next({name:s.mount?S:void 0,values:{...i}})},K=async S=>{s.mount=!0;const F=S.target;let P=F.name,B=!0;const V=U(n,P),M=()=>F.type?_s(V._f):q0(S),Y=G=>{B=Number.isNaN(G)||gr(G)&&isNaN(G.getTime())||Qt(G,U(i,P,G))};if(V){let G,xe;const he=M(),Et=S.type===Vu.BLUR||S.type===Vu.FOCUS_OUT,zr=!sb(V._f)&&!t.resolver&&!U(r.errors,P)&&!V._f.deps||ab(Et,U(r.touchedFields,P),r.isSubmitted,m,h),tr=cs(P,a,Et);ae(i,P,he),Et?(V._f.onBlur&&V._f.onBlur(S),l&&l(0)):V._f.onChange&&V._f.onChange(S);const Wt=T(P,he,Et,!1),Fn=!Ge(Wt)||tr;if(!Et&&f.values.next({name:P,type:S.type,values:{...i}}),zr)return c.isValid&&(t.mode==="onBlur"?Et&&x():x()),Fn&&f.state.next({name:P,...tr?{}:Wt});if(!Et&&tr&&f.state.next({...r}),t.resolver){const{errors:_r}=await O([P]);if(Y(he),B){const An=nc(r.errors,n,P),ve=nc(_r,n,An.name||P);G=ve.error,P=ve.name,xe=Ge(_r)}}else b([P],!0),G=(await ps(V,i,d,t.shouldUseNativeValidation))[P],b([P]),Y(he),B&&(G?xe=!1:c.isValid&&(xe=await D(n,!0)));B&&(V._f.deps&&re(V._f.deps),C(P,xe,G,Wt))}},Q=(S,F)=>{if(U(r.errors,F)&&S.focus)return S.focus(),1},re=async(S,F={})=>{let P,B;const V=ut(S);if(t.resolver){const M=await j(me(S)?S:V);P=Ge(M),B=S?!V.some(Y=>U(M,Y)):P}else S?(B=(await Promise.all(V.map(async M=>{const Y=U(n,M);return await D(Y&&Y._f?{[M]:Y}:Y)}))).every(Boolean),!(!B&&!r.isValid)&&x()):B=P=await D(n);return f.state.next({...!At(S)||c.isValid&&P!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:P}:{},errors:r.errors}),F.shouldFocus&&!B&&Dr(n,Q,S?V:a.mount),B},je=S=>{const F={...s.mount?i:o};return me(S)?F:At(S)?U(F,S):S.map(P=>U(F,P))},Le=(S,F)=>({invalid:!!U((F||r).errors,S),isDirty:!!U((F||r).dirtyFields,S),error:U((F||r).errors,S),isValidating:!!U(r.validatingFields,S),isTouched:!!U((F||r).touchedFields,S)}),W=S=>{S&&ut(S).forEach(F=>Oe(r.errors,F)),f.state.next({errors:S?r.errors:{}})},we=(S,F,P)=>{const B=(U(n,S,{_f:{}})._f||{}).ref,V=U(r.errors,S)||{},{ref:M,message:Y,type:G,...xe}=V;ae(r.errors,S,{...xe,...F,ref:B}),f.state.next({name:S,errors:r.errors,isValid:!1}),P&&P.shouldFocus&&B&&B.focus&&B.focus()},_e=(S,F)=>jt(S)?f.values.subscribe({next:P=>S(R(void 0,F),P)}):R(S,F,!0),le=(S,F={})=>{for(const P of S?ut(S):a.mount)a.mount.delete(P),a.array.delete(P),F.keepValue||(Oe(n,P),Oe(i,P)),!F.keepError&&Oe(r.errors,P),!F.keepDirty&&Oe(r.dirtyFields,P),!F.keepTouched&&Oe(r.touchedFields,P),!F.keepIsValidating&&Oe(r.validatingFields,P),!t.shouldUnregister&&!F.keepDefaultValue&&Oe(o,P);f.values.next({values:{...i}}),f.state.next({...r,...F.keepDirty?{isDirty:L()}:{}}),!F.keepIsValid&&x()},$e=({disabled:S,name:F,field:P,fields:B,value:V})=>{if(Ft(S)&&s.mount||S){const M=S?void 0:me(V)?_s(P?P._f:U(B,F)._f):V;(S||!S&&!me(M))&&ae(i,F,M),T(F,M,!1,!1,!0)}},Se=(S,F={})=>{let P=U(n,S);const B=Ft(F.disabled)||Ft(t.disabled);return ae(n,S,{...P||{},_f:{...P&&P._f?P._f:{ref:{name:S}},name:S,mount:!0,...F}}),a.mount.add(S),P?$e({field:P,disabled:Ft(F.disabled)?F.disabled:t.disabled,name:S,value:F.value}):k(S,!0,F.value),{...B?{disabled:F.disabled||t.disabled}:{},...t.progressive?{required:!!F.required,min:En(F.min),max:En(F.max),minLength:En(F.minLength),maxLength:En(F.maxLength),pattern:En(F.pattern)}:{},name:S,onChange:K,onBlur:K,ref:V=>{if(V){Se(S,F),P=U(n,S);const M=me(V.value)&&V.querySelectorAll&&V.querySelectorAll("input,select,textarea")[0]||V,Y=nb(M),G=P._f.refs||[];if(Y?G.find(xe=>xe===M):M===P._f.ref)return;ae(n,S,{_f:{...P._f,...Y?{refs:[...G.filter(Ts),M,...Array.isArray(U(o,S))?[{}]:[]],ref:{type:M.type,name:S}}:{ref:M}}}),k(S,!1,void 0,M)}else P=U(n,S,{}),P._f&&(P._f.mount=!1),(t.shouldUnregister||F.shouldUnregister)&&!(W0(a.array,S)&&s.action)&&a.unMount.add(S)}}},Ie=()=>t.shouldFocusError&&Dr(n,Q,a.mount),wt=S=>{Ft(S)&&(f.state.next({disabled:S}),Dr(n,(F,P)=>{const B=U(n,P);B&&(F.disabled=B._f.disabled||S,Array.isArray(B._f.refs)&&B._f.refs.forEach(V=>{V.disabled=B._f.disabled||S}))},0,!1))},Ce=(S,F)=>async P=>{let B;if(P&&(P.preventDefault&&P.preventDefault(),P.persist&&P.persist()),t.disabled){F&&await F({...r.errors},P);return}let V=Ve(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:M,values:Y}=await O();r.errors=M,V=Y}else await D(n);if(Oe(r.errors,"root"),Ge(r.errors)){f.state.next({errors:{}});try{await S(V,P)}catch(M){B=M}}else F&&await F({...r.errors},P),Ie(),setTimeout(Ie);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ge(r.errors)&&!B,submitCount:r.submitCount+1,errors:r.errors}),B)throw B},oe=(S,F={})=>{U(n,S)&&(me(F.defaultValue)?X(S,Ve(U(o,S))):(X(S,F.defaultValue),ae(o,S,Ve(F.defaultValue))),F.keepTouched||Oe(r.touchedFields,S),F.keepDirty||(Oe(r.dirtyFields,S),r.isDirty=F.defaultValue?L(S,Ve(U(o,S))):L()),F.keepError||(Oe(r.errors,S),c.isValid&&x()),f.state.next({...r}))},ye=(S,F={})=>{const P=S?Ve(S):o,B=Ve(P),V=Ge(S),M=V?o:B;if(F.keepDefaultValues||(o=P),!F.keepValues){if(F.keepDirtyValues){const Y=new Set([...a.mount,...Object.keys(wn(o,i))]);for(const G of Array.from(Y))U(r.dirtyFields,G)?ae(M,G,U(i,G)):X(G,U(M,G))}else{if(as&&me(S))for(const Y of a.mount){const G=U(n,Y);if(G&&G._f){const xe=Array.isArray(G._f.refs)?G._f.refs[0]:G._f.ref;if(yo(xe)){const he=xe.closest("form");if(he){he.reset();break}}}}n={}}i=t.shouldUnregister?F.keepDefaultValues?Ve(o):{}:Ve(M),f.array.next({values:{...M}}),f.values.next({values:{...M}})}a={mount:F.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!F.keepIsValid||!!F.keepDirtyValues,s.watch=!!t.shouldUnregister,f.state.next({submitCount:F.keepSubmitCount?r.submitCount:0,isDirty:V?!1:F.keepDirty?r.isDirty:!!(F.keepDefaultValues&&!Qt(S,o)),isSubmitted:F.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:V?{}:F.keepDirtyValues?F.keepDefaultValues&&i?wn(o,i):r.dirtyFields:F.keepDefaultValues&&S?wn(o,S):F.keepDirty?r.dirtyFields:{},touchedFields:F.keepTouched?r.touchedFields:{},errors:F.keepErrors?r.errors:{},isSubmitSuccessful:F.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ne=(S,F)=>ye(jt(S)?S(i):S,F);return{control:{register:Se,unregister:le,getFieldState:Le,handleSubmit:Ce,setError:we,_executeSchema:O,_getWatch:R,_getDirty:L,_updateValid:x,_removeUnmounted:N,_updateFieldArray:w,_updateDisabledField:$e,_getFieldArray:H,_reset:ye,_resetDefaultValues:()=>jt(t.defaultValues)&&t.defaultValues().then(S=>{Ne(S,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:wt,_subjects:f,_proxyFormState:c,_setErrors:E,get _fields(){return n},get _formValues(){return i},get _state(){return s},set _state(S){s=S},get _defaultValues(){return o},get _names(){return a},set _names(S){a=S},get _formState(){return r},set _formState(S){r=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:re,register:Se,handleSubmit:Ce,watch:_e,setValue:X,getValues:je,reset:Ne,resetField:oe,clearErrors:W,unregister:le,setError:we,setFocus:(S,F={})=>{const P=U(n,S),B=P&&P._f;if(B){const V=B.refs?B.refs[0]:B.ref;V.focus&&(V.focus(),F.shouldSelect&&jt(V.select)&&V.select())}},getFieldState:Le}}function Ss(e={}){const t=p.useRef(),r=p.useRef(),[n,o]=p.useState({isDirty:!1,isValidating:!1,isLoading:jt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:jt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...cb(e),formState:n});const i=t.current.control;return i._options=e,Uu({subject:i._subjects.state,next:s=>{X0(s,i._proxyFormState,i._updateFormState)&&o({...i._formState})}}),p.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),p.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==n.isDirty&&i._subjects.state.next({isDirty:s})}},[i,n.isDirty]),p.useEffect(()=>{e.values&&!Qt(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values,o(s=>({...s}))):i._resetDefaultValues()},[e.values,i]),p.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),p.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),p.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),p.useMemo(()=>({...t.current,formState:G0(n,i)}),[n,i])}const oc=(e,t,r)=>{if(e&&"reportValidity"in e){const n=U(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},ic=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?oc(n.ref,r,e):n.refs&&n.refs.forEach(o=>oc(o,r,e))}},fb=(e,t)=>{t.shouldUseNativeValidation&&ic(e,t);const r={};for(const n in e){const o=U(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(db(t.names||Object.keys(e),n)){const s=Object.assign({},U(r,n));ae(s,"root",i),ae(r,n,s)}else ae(r,n,i)}return r},db=(e,t)=>e.some(r=>r.startsWith(t+"."));function Cs(e,t,r){return t===void 0&&(t={}),r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(s,a){try{var l=(t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:o}))).then(function(u){return i.shouldUseNativeValidation&&ic({},i),{values:r.raw?n:u,errors:{}}}))}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:fb((a=s,l=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(a.inner||[]).reduce(function(u,c){if(u[c.path]||(u[c.path]={message:c.message,type:c.type}),l){var f=u[c.path].types,h=f&&f[c.type];u[c.path]=zu(c.path,l,u,c.type,h?[].concat(h,c.message):c.message)}return u},{})),i)};var a,l}))}catch(s){return Promise.reject(s)}}}var ks,sc;function pb(){if(sc)return ks;sc=1;function e(b){this._maxSize=b,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(b){return this._values[b]},e.prototype.set=function(b,w){return this._size>=this._maxSize&&this.clear(),b in this._values||this._size++,this._values[b]=w};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,a=new e(s),l=new e(s),u=new e(s);ks={Cache:e,split:f,normalizePath:c,setter:function(b){var w=c(b);return l.get(b)||l.set(b,function(E,k){for(var T=0,C=w.length,O=E;T<C-1;){var j=w[T];if(j==="__proto__"||j==="constructor"||j==="prototype")return E;O=O[w[T++]]}O[w[T]]=k})},getter:function(b,w){var v=c(b);return u.get(b)||u.set(b,function(k){for(var T=0,C=v.length;T<C;)if(k!=null||!w)k=k[v[T++]];else return;return k})},join:function(b){return b.reduce(function(w,v){return w+(m(v)||r.test(v)?"["+v+"]":(w?".":"")+v)},"")},forEach:function(b,w,v){h(Array.isArray(b)?b:f(b),w,v)}};function c(b){return a.get(b)||a.set(b,f(b).map(function(w){return w.replace(i,"$2")}))}function f(b){return b.match(t)||[""]}function h(b,w,v){var E=b.length,k,T,C,O;for(T=0;T<E;T++)k=b[T],k&&(x(k)&&(k='"'+k+'"'),O=m(k),C=!O&&/^\d+$/.test(k),w.call(v,k,O,C,T,b))}function m(b){return typeof b=="string"&&b&&["'",'"'].indexOf(b.charAt(0))!==-1}function d(b){return b.match(n)&&!b.match(r)}function y(b){return o.test(b)}function x(b){return!m(b)&&(d(b)||y(b))}return ks}var yr=pb(),Os,ac;function mb(){if(ac)return Os;ac=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=c=>c.match(e)||[],r=c=>c[0].toUpperCase()+c.slice(1),n=(c,f)=>t(c).join(f).toLowerCase(),o=c=>t(c).reduce((f,h)=>`${f}${f?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return Os={words:t,upperFirst:r,camelCase:o,pascalCase:c=>r(o(c)),snakeCase:c=>n(c,"_"),kebabCase:c=>n(c,"-"),sentenceCase:c=>r(n(c," ")),titleCase:c=>t(c).map(r).join(" ")},Os}var Fs=mb(),wo={exports:{}},lc;function hb(){if(lc)return wo.exports;lc=1,wo.exports=function(o){return e(t(o),o)},wo.exports.array=e;function e(o,i){var s=o.length,a=new Array(s),l={},u=s,c=r(i),f=n(o);for(i.forEach(function(m){if(!f.has(m[0])||!f.has(m[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)l[u]||h(o[u],u,new Set);return a;function h(m,d,y){if(y.has(m)){var x;try{x=", node was:"+JSON.stringify(m)}catch{x=""}throw new Error("Cyclic dependency"+x)}if(!f.has(m))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(m));if(!l[d]){l[d]=!0;var b=c.get(m)||new Set;if(b=Array.from(b),d=b.length){y.add(m);do{var w=b[--d];h(w,f.get(w),y)}while(d);y.delete(m)}a[--s]=m}}}function t(o){for(var i=new Set,s=0,a=o.length;s<a;s++){var l=o[s];i.add(l[0]),i.add(l[1])}return Array.from(i)}function r(o){for(var i=new Map,s=0,a=o.length;s<a;s++){var l=o[s];i.has(l[0])||i.set(l[0],new Set),i.has(l[1])||i.set(l[1],new Set),i.get(l[0]).add(l[1])}return i}function n(o){for(var i=new Map,s=0,a=o.length;s<a;s++)i.set(o[s],s);return i}return wo.exports}var gb=hb();const yb=wf(gb),bb=Object.prototype.toString,xb=Error.prototype.toString,vb=RegExp.prototype.toString,wb=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Eb=/^Symbol\((.*)\)(.*)$/;function Tb(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function uc(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return Tb(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return wb.call(e).replace(Eb,"Symbol($1)");const n=bb.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+xb.call(e)+"]":n==="RegExp"?vb.call(e):null}function Ut(e,t){let r=uc(e,t);return r!==null?r:JSON.stringify(e,function(n,o){let i=uc(this[n],t);return i!==null?i:o},2)}function cc(e){return e==null?[]:[].concat(e)}let fc,dc,pc,_b=/\$\{\s*(\w+)\s*\}/g;fc=Symbol.toStringTag;class mc{constructor(t,r,n,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[fc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],cc(t).forEach(i=>{if(tt.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}dc=Symbol.hasInstance,pc=Symbol.toStringTag;class tt extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(_b,(o,i)=>Ut(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,o,i){const s=new mc(t,r,n,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[pc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,tt)}static[dc](t){return mc[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let $t={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const o=n!=null&&n!==r?` (cast from the value \`${Ut(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ut(r,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Ut(r,!0)}\``+o}},rt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},er={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},As={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},js={isValue:"${path} field must be ${value}"},Eo={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},To={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:$t,string:rt,number:er,date:As,object:Eo,array:To,boolean:js,tuple:{notType:e=>{const{path:t,value:r,spec:n}=e,o=n.types.length;if(Array.isArray(r)){if(r.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${Ut(r,!0)}\``;if(r.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${Ut(r,!0)}\``}return tt.formatError($t.notType,e)}}});const _o=e=>e&&e.__isYupSchema__;class So{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:o,otherwise:i}=r,s=typeof n=="function"?n:(...a)=>a.every(l=>l===n);return new So(t,(a,l)=>{var u;let c=s(...a)?o:i;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(n,t,r);if(o===void 0||o===t)return t;if(!_o(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const Co={context:"$",value:"."};class br{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Co.context,this.isValue=this.key[0]===Co.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Co.context:this.isValue?Co.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&yr.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let o=this.isContext?n:this.isValue?t:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}br.prototype.__isYupRef=!0;const xt=e=>e==null;function Ir(e){function t({value:r,path:n="",options:o,originalValue:i,schema:s},a,l){const{name:u,test:c,params:f,message:h,skipAbsent:m}=e;let{parent:d,context:y,abortEarly:x=s.spec.abortEarly,disableStackTrace:b=s.spec.disableStackTrace}=o;function w(N){return br.isRef(N)?N.getValue(r,d,y):N}function v(N={}){const L=Object.assign({value:r,originalValue:i,label:s.spec.label,path:N.path||n,spec:s.spec,disableStackTrace:N.disableStackTrace||b},f,N.params);for(const H of Object.keys(L))L[H]=w(L[H]);const R=new tt(tt.formatError(N.message||h,L),r,L.path,N.type||u,L.disableStackTrace);return R.params=L,R}const E=x?a:l;let k={path:n,parent:d,type:u,from:o.from,createError:v,resolve:w,options:o,originalValue:i,schema:s};const T=N=>{tt.isError(N)?E(N):N?l(null):E(v())},C=N=>{tt.isError(N)?E(N):a(N)};if(m&&xt(r))return T(!0);let j;try{var D;if(j=c.call(k,r,k),typeof((D=j)==null?void 0:D.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${k.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(T,C)}}catch(N){C(N);return}T(j)}return t.OPTIONS=e,t}function Sb(e,t,r,n=r){let o,i,s;return t?(yr.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a;e=e.resolve({context:n,parent:o,value:r});let f=e.type==="tuple",h=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&h>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);o=r,r=r&&r[h],e=f?e.spec.types[h]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);o=r,r=r&&r[c],e=e.fields[c]}i=c,s=l?"["+a+"]":"."+a}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class ko extends Set{describe(){const t=[];for(const r of this.values())t.push(br.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new ko(this.values())}merge(t,r){const n=this.clone();return t.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}}function Mr(e,t=new Map){if(_o(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Mr(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,o]of e.entries())r.set(n,Mr(o,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Mr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,o]of Object.entries(e))r[n]=Mr(o,t)}else throw Error(`Unable to clone ${e}`);return r}class nt{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new ko,this._blacklist=new ko,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($t.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Mr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const o=Object.assign({},r.spec,n.spec);return n.spec=o,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(s=>{i.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((o,i)=>i.resolve(o,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,o,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),o=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(o&&xt(i))return i;let s=Ut(t),a=Ut(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
57
57
|
|
|
58
58
|
attempted value: ${s}
|
|
59
|
-
`+(a!==s?`result of cast: ${a}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,o){let{path:i,originalValue:s=t,strict:a=this.spec.strict}=r,l=t;a||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:l,originalValue:s,options:r,tests:u},n,c=>{if(c.length)return o(c,l);this.runTests({path:i,value:l,originalValue:s,options:r,tests:this.tests},n,o)})}runTests(t,r,n){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=t,c=y=>{o||(o=!0,r(y,s))},f=y=>{o||(o=!0,n(y,s))},h=i.length,m=[];if(!h)return f([]);let d={value:s,originalValue:a,path:l,options:u,schema:this};for(let y=0;y<i.length;y++){const x=i[y];x(d,c,function(w){w&&(Array.isArray(w)?m.push(...w):m.push(w)),--h<=0&&f(m)})}}asNestedTest({key:t,index:r,parent:n,parentPath:o,originalParent:i,options:s}){const a=t??r;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=n[a];const c=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${l?a:`"${a}"`}]`:(o?`${o}.`:"")+t});return(f,h,m)=>this.resolve(c)._validate(u,c,h,m)}validate(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return new Promise((s,a)=>o._validate(t,r,(l,u)=>{tt.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new tt(l,u,void 0,void 0,i)):s(u)}))}validateSync(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),i,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return o._validate(t,Object.assign({},r,{sync:!0}),(a,l)=>{throw tt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new tt(a,t,void 0,void 0,s);i=l}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(tt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(tt.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Ir(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Lr({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Lr({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=$t.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=$t.notNull){return this.nullability(!1,t)}required(t=$t.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=$t.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=Lr(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),n.tests.push(o),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),o=uc(t).map(i=>new yr(i));return o.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new So(o,r):So.fromOptions(o,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Lr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=$t.oneOf){let n=this.clone();return t.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=Lr({message:r,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),n}notOneOf(t,r=$t.notOneOf){let n=this.clone();return t.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=Lr({message:r,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:o,optional:i,nullable:s}=r.spec;return{meta:o,label:n,optional:i,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(f=>f.name===l.name)===u)}}}nt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])nt.prototype[`${e}At`]=function(t,r,n={}){const{parent:o,parentPath:i,schema:s}=Tb(this,t,r,n.context);return s[e](o&&o[i],Object.assign({},n,{parent:o,path:t}))};for(const e of["equals","is"])nt.prototype[e]=nt.prototype.oneOf;for(const e of["not","nope"])nt.prototype[e]=nt.prototype.notOneOf;const _b=()=>!0;function Mr(e){return new mc(e)}class mc extends nt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:_b},t))}}Mr.prototype=mc.prototype;function Oo(){return new hc}class hc extends nt{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=js.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return xt(r)||r===!0}})}isFalse(t=js.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return xt(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Oo.prototype=hc.prototype;const Sb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function kb(e){const t=$s(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function $s(e){var t,r;const n=Sb.exec(e);return n?{year:zt(n[1]),month:zt(n[2],1)-1,day:zt(n[3],1),hour:zt(n[4]),minute:zt(n[5]),second:zt(n[6]),millisecond:n[7]?zt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:zt(n[10]),minuteOffset:zt(n[11])}:null}function zt(e,t=0){return Number(e)||t}let Cb=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ob=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Fb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Ab="^\\d{4}-\\d{2}-\\d{2}",jb="\\d{2}:\\d{2}:\\d{2}",$b="(([+-]\\d{2}(:?\\d{2})?)|Z)",Nb=new RegExp(`${Ab}T${jb}(\\.\\d+)?${$b}$`),Pb=e=>xt(e)||e===e.trim(),Db={}.toString();function de(){return new gc}class gc extends nt{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Db?t:o})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||$t.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=rt.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=rt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=rt.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,o,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:o,name:i}=r:o=r),this.test({name:i||"matches",message:o||rt.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=rt.email){return this.matches(Cb,{name:"email",message:t,excludeEmptyString:!0})}url(t=rt.url){return this.matches(Ob,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=rt.uuid){return this.matches(Fb,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,o;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:o=void 0}=t:r=t),this.matches(Nb,{name:"datetime",message:r||rt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||rt.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:i=>{if(!i||n)return!0;const s=$s(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||rt.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=$s(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=rt.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Pb})}lowercase(t=rt.lowercase){return this.transform(r=>xt(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>xt(r)||r===r.toLowerCase()})}uppercase(t=rt.uppercase){return this.transform(r=>xt(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>xt(r)||r===r.toUpperCase()})}}de.prototype=gc.prototype;let Lb=e=>e!=+e;function Rr(){return new yc}class yc extends nt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Lb(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return n.isType(o)||o===null?o:parseFloat(o)})})}min(t,r=er.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=er.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=er.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=er.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=er.positive){return this.moreThan(0,t)}negative(t=er.negative){return this.lessThan(0,t)}integer(t=er.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>xt(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(o=>xt(o)?o:Math[t](o))}}Rr.prototype=yc.prototype;let bc=new Date(""),Ib=e=>Object.prototype.toString.call(e)==="[object Date]";function Ns(){return new En}class En extends nt{constructor(){super({type:"date",check(t){return Ib(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=kb(t),isNaN(t)?En.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(yr.isRef(t))n=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=o}return n}min(t,r=As.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(n)}})}max(t,r=As.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(n)}})}}En.INVALID_DATE=bc,Ns.prototype=En.prototype,Ns.INVALID_DATE=bc;function Mb(e,t=[]){let r=[],n=new Set,o=new Set(t.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=gr.split(s)[0];n.add(l),o.has(`${a}-${l}`)||r.push([a,l])}for(const s of Object.keys(e)){let a=e[s];n.add(s),yr.isRef(a)&&a.isSibling?i(a.path,s):_o(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return hb.array(Array.from(n),r).reverse()}function xc(e,t){let r=1/0;return e.some((n,o)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=o,!0}),r}function vc(e){return(t,r)=>xc(e,t)-xc(e,r)}const wc=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Fo(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Fo(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Fo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Fo)}):"optional"in e?e.optional():e}const Rb=(e,t)=>{const r=[...gr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),o=gr.getter(gr.join(r),!0)(e);return!!(o&&n in o)};let Ec=e=>Object.prototype.toString.call(e)==="[object Object]";function Tc(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Vb=vc([]);function Tn(e){return new _c(e)}class _c extends nt{constructor(t){super({type:"object",check(r){return Ec(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Vb,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let o=super._cast(t,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let i=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(f=>!this._nodes.includes(f))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),c=!1;for(const f of a){let h=i[f],m=f in o;if(h){let d,y=o[f];u.path=(r.path?`${r.path}.`:"")+f,h=h.resolve({value:y,context:r.context,parent:l});let x=h instanceof nt?h.spec:void 0,b=x==null?void 0:x.strict;if(x!=null&&x.strip){c=c||f in o;continue}d=!r.__validating||!b?h.cast(o[f],u):o[f],d!==void 0&&(l[f]=d)}else m&&!s&&(l[f]=o[f]);(m!==f in l||l[f]!==o[f])&&(c=!0)}return c?l:o}_validate(t,r={},n,o){let{from:i=[],originalValue:s=t,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(l,u)=>{if(!a||!Ec(u)){o(l,u);return}s=s||u;let c=[];for(let f of this._nodes){let h=this.fields[f];!h||yr.isRef(h)||c.push(h.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:s}))}this.runTests({tests:c,value:u,originalValue:s,options:r},n,f=>{o(f.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[o,i]of Object.entries(this.fields)){const s=n[o];n[o]=s===void 0?i:s}return r.withMutation(o=>o.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var o;const i=this.fields[n];let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Mb(t,r),n._sortErrors=vc(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let o=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),o)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Fo(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,o])=>t.includes(n)&&t.includes(o)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let o=gr.getter(t,!0);return this.transform(i=>{if(!i)return i;let s=i;return Rb(i,t)&&(s=Object.assign({},i),n||delete s[t],s[r]=o(i)),s})}json(){return this.transform(wc)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Eo.exact,test(r){if(r==null)return!0;const n=Tc(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Eo.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;const i=Tc(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Eo.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const o of Object.keys(r))n[t(o)]=r[o];return n})}camelCase(){return this.transformKeys(Fs.camelCase)}snakeCase(){return this.transformKeys(Fs.snakeCase)}constantCase(){return this.transformKeys(t=>Fs.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[i,s]of Object.entries(r.fields)){var o;let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),n.fields[i]=s.describe(a)}return n}}Tn.prototype=_c.prototype;function Sc(e){return new kc(e)}class kc extends nt{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){const n=super._cast(t,r);if(!this._typeCheck(n)||!this.innerType)return n;let o=!1;const i=n.map((s,a)=>{const l=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${a}]`}));return l!==s&&(o=!0),l});return o?i:n}_validate(t,r={},n,o){var i;let s=this.innerType,a=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(l,u)=>{var c;if(!a||!s||!this._typeCheck(u)){o(l,u);return}let f=new Array(u.length);for(let m=0;m<u.length;m++){var h;f[m]=s.asNestedTest({options:r,index:m,parent:u,parentPath:r.path,originalParent:(h=r.originalValue)!=null?h:t})}this.runTests({value:u,tests:f,originalValue:(c=r.originalValue)!=null?c:t,options:r},n,m=>o(m.concat(l),u))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(wc)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!_o(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Ut(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=To.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r){return r=r||To.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r){return r=r||To.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(n,o,i)=>!t(n,o,i):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);if(r.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=r.innerType.describe(i)}return n}}Sc.prototype=kc.prototype;const Bb=({tabs:e,className:t="",count:r={},setActiveTab:n,activeTab:o,btnClass:i=""})=>{const s=ue("flex gap-x-3 mb-8 w-full no-scrollbar overflow-x-auto border-b border-[#EAECF0] darks:border-gray-500",t);return g.jsx("div",{className:s,children:e.map(a=>{const l=o===a.key,u=r[a.key]||0,c=ue("capitalize text-xs whitespace-nowrap no-scrollbar md:text-sm font-semibold pb-[14px] border-b-2 px-6 flex items-center justify-center gap-x-1 flex-1 text-center",i),f=ue({"border-gray-400 darks:border-white !text-primary darks:!text-white":l,"border-transparent text-[#667085] darks:!text-white/60":!l}),h=u>0&&g.jsx("span",{className:"text-xs h-6 min-w-[24px] rounded-full flex justify-center items-center border border-[#EAECF0] darks:border-gray-500 bg-[#F9FAFB] darks:bg-gray-800 text-[#454745] darks:text-white/80",children:u});return g.jsxs("button",{onClick:()=>n(a.key),className:ue(c,f),"aria-selected":l,role:"tab",type:"button",children:[a.title,h]},a.key)})})},Ub=[{type:"basicText",label:"Basic Text",icon:"fluent:text-16-filled",inputLabel:"",required:!1,inputType:"basicText",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"textField",label:"Text Field",icon:"fluent:text-16-filled",inputLabel:"Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"longText",label:"Long Text Field",icon:"dashicons:text",inputLabel:"Long Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"selectField",label:"Select List",icon:"tabler:select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[{label:"Placeholder 1",value:"",id:Qe()},{label:"Placeholder 2",value:"",id:Qe()}],customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"multiSelect",label:"MultiSelect",icon:"fluent-mdl2:multi-select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[{label:"Placeholder 1",value:"",id:Qe()},{label:"Placeholder 2",value:"",id:Qe()}],customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"validateInput",label:"Validate Input",icon:"iconoir:www",inputLabel:"Validate Input Label",required:!1,inputType:"validateInput",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Value is required",minLengthMessage:"",maxLengthMessage:"",value:null,url:"https://api.example.com/validate?value={value}",method:"GET",responseType:"string",customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"numberField",label:"Number",icon:"octicon:number-16",inputLabel:"Number Label",required:!1,inputType:"number",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"amountField",label:"Amount",icon:"carbon:currency",inputLabel:"Enter amount",required:!1,inputType:"amount",maxAmount:null,minAmount:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minAmountMessage:"",maxAmountMessage:"",value:null,prefix:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"date",label:"Date",icon:"bx:calendar",inputLabel:"Date Text Label",required:!1,inputType:"date",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"password",label:"Password",icon:"ic:round-password",inputLabel:"Password Text Label",required:!1,inputType:"password",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"checkbox",label:"Checkbox",icon:"mingcute:checkbox-line",inputLabel:"Checkbox Text Label",required:!1,inputType:"checkbox",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[{label:"Placeholder 1",value:"",id:Qe()},{label:"Placeholder 2",value:"",id:Qe()}],customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"radio",label:"Radio select",icon:"ri:checkbox-circle-line",inputLabel:"Radio Text Label",required:!1,inputType:"radio",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[{label:"Placeholder 1",value:"",id:Qe()},{label:"Placeholder 2",value:"",id:Qe()}],customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"email",label:"Email",icon:"mdi:email-outline",inputLabel:"Email Text Label",required:!1,inputType:"email",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"file",label:"File Attachment",icon:"ion:attach-sharp",inputLabel:"File Text Label",required:!1,inputType:"file",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"tableInput",label:"Table Input",icon:"iconoir:table",inputLabel:"Table Input Label",required:!1,inputType:"tableInput",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Value is required",minLengthMessage:"",maxLengthMessage:"",value:[],denominators:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"divider",label:"Divider",icon:"pixel:divider",inputLabel:"",inputType:"divider",customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"spacer",label:"Spacer",icon:"fluent-mdl2:spacer",inputLabel:"",inputType:"spacer",customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"grid",label:"Grid",icon:"cuida:grid-outline",inputLabel:"",inputType:"grid",placeholder:"Type here",description:"",columns:2}],zb=["amount"],qb=["text","number"],Hb=["text","number","amount","date","password"],Wb=["amount"],Ao=["grid","section","divider","spacer","basicText"],Kb=["radio","select","checkbox","multiselect"],Yb=["validateInput"],Jb=["tableInput"],Ps=["basicText"];function Gb({value:e=[],onChange:t,onGetValue:r}){const[n,o]=p.useState((e==null?void 0:e.length)>0?e:[{value:""}]);p.useEffect(()=>{(e==null?void 0:e.length)>0&&JSON.stringify(e)!==JSON.stringify(n)&&o(e)},[e]);function i(l,u){const c=[...n];c[u]={...c[u],value:l},o(c),t&&t(c)}function s(){const l=[...n,{value:""}];o(l),t&&t(l)}function a(l){const u=n.filter((c,f)=>f!==l);o(u),t&&t(u)}return p.useEffect(()=>{r&&r(JSON.stringify({values:n}))},[r,n]),g.jsxs("div",{className:"]",children:[g.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[g.jsx("div",{className:"grid text-sm font-bold border-b border-gray-100 bg-gray-50",children:g.jsx("div",{className:"px-2 py-2",children:g.jsx("span",{className:"",children:"Add Denominations"})})}),n.map((l,u)=>g.jsx("div",{className:"grid text-sm border-b border-gray-100",children:g.jsxs("div",{className:"flex items-center gap-x-4 px-2 py-1",children:[g.jsx("span",{className:"flex-1",children:g.jsx(go,{id:"input-example",className:"border border-gray-100 rounded w-full px-3 py-1 outline-none",decimalsLimit:6,defaultValue:l.value,onValueChange:c=>i(c,u),allowNegativeValue:!1})}),g.jsx("button",{onClick:()=>a(u),className:"text-red-500 hover:text-red-700 px-2",type:"button","aria-label":"Remove row",children:"×"})]})},l.key+u+Math.random()))]}),g.jsx("div",{className:"mt-1 flex justify-end",children:g.jsx("button",{type:"button",onClick:s,className:"font-semibold !text-blue-700 text-sm rounded outline-0 focus:outline-0",children:"+ Add"})})]})}const Xb=()=>g.jsx("blockquote",{className:"bg-gray-100 p-4 rounded-md text-gray-700",children:g.jsxs("ul",{children:[g.jsxs("li",{className:"text-xs",children:["API URL example format: ",g.jsx("code",{children:"https://example.com/validation?value={value}"})]}),g.jsxs("li",{className:"text-xs",children:[g.jsx("span",{className:"block mb-1",children:" Response example format:"}),g.jsx("pre",{className:"bg-white p-2 rounded-md",children:g.jsxs("code",{children:["{ ",g.jsx("br",{}),' "data": { ',g.jsx("br",{}),' "status": true, ',g.jsx("br",{}),' "description": "John Doe" ',g.jsx("br",{})," } ",g.jsx("br",{}),"}"]})})]})]})}),Zb=Tn().shape({inputLabel:de().nullable(),placeholder:de().nullable(),description:de().nullable(),isReadOnly:Oo(),isDisabled:Oo(),isRequired:Oo(),requiredMessage:de().nullable(),minLengthMessage:de().nullable(),maxLengthMessage:de().nullable(),maxLength:Rr().typeError("Expecting a number").nullable(),minLength:Rr().typeError("Expecting a number").nullable(),inputType:de().nullable(),maxAmountMessage:de().nullable(),maxAmount:de().nullable(),options:Sc().of(Tn().shape({label:de().nullable(),value:de().when("label",{is:e=>e&&e.length>0,then:e=>e.required("Value is required when label is present"),otherwise:e=>e.nullable()})})).when("inputType",{is:e=>["radio","checkbox"].includes(e),then:e=>e.required("Options are required for radio or checkbox inputs"),otherwise:e=>e.nullable()}),prefix:de().nullable(),url:de().nullable(),method:de().nullable(),denominators:Mr().nullable(),responseType:de().nullable(),minAmount:de().nullable(),heading:de().nullable(),minAmountMessage:de().nullable(),columns:Rr().nullable(),value:Mr().nullable(),customClass:de().nullable(),elementClass:de().nullable()}),Qb=[{title:"Basics",key:"basic"},{title:"Validations",key:"validation"}],ex=({isOpen:e,onClose:t,element:r})=>{const n=Qb.filter(k=>!Ao.includes(r.inputType)||k.key!=="validation"),{updateElement:o}=p.useContext(ft),[i,s]=p.useState("basic"),a=Jn("config"),{register:l,handleSubmit:u,control:c,setValue:f,watch:h,trigger:m,formState:{errors:d,isSubmitting:y,isValid:x},reset:b}=Ss({resolver:ks(Zb),defaultValues:{...r,options:r.options||[]}}),{fields:w,append:v,remove:E}=eb({control:c,name:"options"});p.useEffect(()=>{e||b()},[e,b]);const C=k=>{o(k,r.sectionId),t()},T=()=>g.jsxs("div",{className:"flex flex-col gap-y-1 justify-start",children:[w.map((k,O)=>g.jsxs("div",{className:"flex gap-x-4 items-center ",children:[g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Label",name:`options.${O}.label`,register:l,errors:d,element:r,placeholder:"Label",isFloating:!0})}),g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Value",name:`options.${O}.value`,register:l,errors:d,element:r,placeholder:"Value",isFloating:!0})})," ",g.jsx("button",{disabled:w.length===1,type:"button",className:"outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",onClick:()=>E(O),children:g.jsx(Me,{icon:"iconamoon:sign-times-fill"})})]},k.id)),g.jsxs("div",{children:[" ",g.jsxs("button",{type:"button",className:"mt-2 text-gray-700 font-medium text-sm flex gap-x-1 items-center",onClick:()=>v({label:"",value:"",id:Qe()}),children:[g.jsx(Me,{icon:"qlementine-icons:plus-16"})," Add Option"]})]})]});return g.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:g.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[g.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[g.jsxs("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:[r.label," Options"]}),g.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:g.jsx(Me,{icon:"tabler:x"})})]}),g.jsx("div",{className:"w-full",children:g.jsx(Bb,{tabs:n,setActiveTab:s,activeTab:i,className:"justify-start !text-left",btnClass:"!uppercase !text-left"})}),g.jsxs("form",{onSubmit:u(C),className:"w-full",children:[i==="basic"&&g.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[Ps.includes(r.inputType)&&g.jsx(g.Fragment,{children:g.jsx(ge,{label:"Value",name:"value",register:l,errors:d,element:r})}),g.jsx(ge,{label:"Custom Class",name:"customClass",register:l,errors:d,element:r}),!Ps.includes(r.inputType)&&!Ao.includes(r.inputType)&&g.jsx(ge,{label:"Label",name:"inputLabel",register:l,errors:d,element:r}),Hb.includes(r.inputType)&&g.jsx(ge,{label:"Placeholder",name:"placeholder",register:l,errors:d,element:r}),zb.includes(r.inputType)&&g.jsx(ge,{label:"Prefix",name:"prefix",register:l,errors:d,element:r}),Yb.includes(r.inputType)&&g.jsxs(g.Fragment,{children:[g.jsx(Xb,{}),g.jsx(ge,{label:"Api Url",name:"url",register:l,errors:d,element:r}),g.jsx(ss,{label:"Api Method",options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"}],register:l,name:"method",setValue:f,trigger:m,value:h("method")}),g.jsx(ss,{label:"Api Response type",options:[{label:"String",value:"string"},{label:"Object",value:"object"}],register:l,name:"responseType",setValue:f,trigger:m,value:h("responseType")})]}),Jb.includes(r.inputType)&&g.jsx(Gb,{onChange:k=>{f("denominators",k)},value:h("denominators")}),!Ps.includes(r.inputType)&&!Ao.includes(r.inputType)&&g.jsx(ge,{label:"Short Description",name:"description",register:l,errors:d,element:r}),r.type.toLowerCase()==="grid"&&g.jsx(ge,{label:"Number of columns",name:"columns",register:l,errors:d,element:r}),Kb.includes(r.inputType)&&T()]}),!Ao.includes(r.type.toLowerCase())&&i==="validation"&&g.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Required",name:"isRequired",register:l,errors:d,element:r,type:"checkbox"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"requiredMessage",register:l,errors:d,element:r})})]}),qb.includes(r.inputType)&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Min Length",name:"minLength",register:l,errors:d,element:r,type:"number"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"minLengthMessage",register:l,errors:d,element:r})})]}),g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Max Length",name:"maxLength",register:l,errors:d,element:r,type:"number"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"maxLengthMessage",register:l,errors:d,element:r})})]})]}),Wb.includes(r.inputType)&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Min Amount",name:"minAmount",register:l,errors:d,element:r,type:"amount"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"minAmountMessage",register:l,errors:d,element:r})})]}),g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Max Amount",name:"maxAmount",register:l,errors:d,element:r,type:"amount"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"maxAmountMessage",register:l,errors:d,element:r})})]})]})]}),g.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[g.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),g.jsx("button",{type:"submit",disabled:!x||y,style:{background:(a==null?void 0:a.buttonColor)||"#333"},className:`flex-1 px-4 py-2.5 ${!x||y?"bg-[#F2F4F7]":"bg-[#2563EB]"} ${!x||y?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:y?"Saving...":"Save"})]})]})]})})},Ds=p.memo(({state:e,element:t,children:r})=>{const[n,o]=p.useState(!1),{removeElement:i}=p.useContext(ft),s=p.useCallback(()=>{i(t.id,t.sectionId)},[t.id,t.sectionId,i]);return g.jsxs("div",{className:"w-full",children:[n&&g.jsx(ex,{isOpen:n,onClose:()=>o(!1),element:t}),g.jsxs("div",{className:"flex justify-between items-center mb-2",children:[g.jsxs("span",{children:[" ",t.inputLabel&&g.jsx("label",{className:"text-sm font-medium",children:t.inputLabel})]}),e==="edit"&&g.jsxs("span",{className:"flex gap-x-3 items-center",children:[g.jsx("button",{type:"button",className:"outline-none hover:opacity-80 text-sm",onClick:()=>o(!0),children:g.jsx(Me,{icon:"circum:edit"})}),g.jsx("button",{type:"button",className:"outline-none hover:opacity-80 text-sm",onClick:s,children:g.jsx(Me,{icon:"iconamoon:sign-times-fill"})})]})]}),r]})});Ds.displayName="ElementContainer";function tx({element:e,validationData:t}){const{register:r=()=>({}),trigger:n,setValue:o,watch:i,isReadOnly:s}=t||{};let a;return i&&(a=i()[e.id]),g.jsx(ge,{placeholder:e.placeholder,type:e.inputType,label:"",name:e.id,register:r,trigger:n,setValue:o,value:a,prefix:e.prefix,disabled:s})}function Cc(e,t){return function(){return e.apply(t,arguments)}}const{toString:rx}=Object.prototype,{getPrototypeOf:Ls}=Object,jo=(e=>t=>{const r=rx.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),vt=e=>(e=e.toLowerCase(),t=>jo(t)===e),$o=e=>t=>typeof t===e,{isArray:Vr}=Array,_n=$o("undefined");function nx(e){return e!==null&&!_n(e)&&e.constructor!==null&&!_n(e.constructor)&&ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Oc=vt("ArrayBuffer");function ox(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Oc(e.buffer),t}const ix=$o("string"),ct=$o("function"),Fc=$o("number"),No=e=>e!==null&&typeof e=="object",sx=e=>e===!0||e===!1,Po=e=>{if(jo(e)!=="object")return!1;const t=Ls(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ax=vt("Date"),lx=vt("File"),ux=vt("Blob"),cx=vt("FileList"),fx=e=>No(e)&&ct(e.pipe),dx=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ct(e.append)&&((t=jo(e))==="formdata"||t==="object"&&ct(e.toString)&&e.toString()==="[object FormData]"))},px=vt("URLSearchParams"),[mx,hx,gx,yx]=["ReadableStream","Request","Response","Headers"].map(vt),bx=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sn(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Vr(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(n=0;n<s;n++)a=i[n],t.call(null,e[a],a,e)}}function Ac(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const br=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,jc=e=>!_n(e)&&e!==br;function Is(){const{caseless:e}=jc(this)&&this||{},t={},r=(n,o)=>{const i=e&&Ac(t,o)||o;Po(t[i])&&Po(n)?t[i]=Is(t[i],n):Po(n)?t[i]=Is({},n):Vr(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Sn(arguments[n],r);return t}const xx=(e,t,r,{allOwnKeys:n}={})=>(Sn(t,(o,i)=>{r&&ct(o)?e[i]=Cc(o,r):e[i]=o},{allOwnKeys:n}),e),vx=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),wx=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Ex=(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&Ls(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Tx=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},_x=e=>{if(!e)return null;if(Vr(e))return e;let t=e.length;if(!Fc(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Sx=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ls(Uint8Array)),kx=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Cx=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Ox=vt("HTMLFormElement"),Fx=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),$c=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ax=vt("RegExp"),Nc=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Sn(r,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(n[i]=s||o)}),Object.defineProperties(e,n)},jx=e=>{Nc(e,(t,r)=>{if(ct(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ct(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},$x=(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return Vr(e)?n(e):n(String(e).split(t)),r},Nx=()=>{},Px=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Dx(e){return!!(e&&ct(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Lx=e=>{const t=new Array(10),r=(n,o)=>{if(No(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=Vr(n)?[]:{};return Sn(n,(s,a)=>{const l=r(s,o+1);!_n(l)&&(i[a]=l)}),t[o]=void 0,i}}return n};return r(e,0)},Ix=vt("AsyncFunction"),Mx=e=>e&&(No(e)||ct(e))&&ct(e.then)&&ct(e.catch),Pc=((e,t)=>e?setImmediate:t?((r,n)=>(br.addEventListener("message",({source:o,data:i})=>{o===br&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),br.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ct(br.postMessage)),Rx=typeof queueMicrotask<"u"?queueMicrotask.bind(br):typeof process<"u"&&process.nextTick||Pc,$={isArray:Vr,isArrayBuffer:Oc,isBuffer:nx,isFormData:dx,isArrayBufferView:ox,isString:ix,isNumber:Fc,isBoolean:sx,isObject:No,isPlainObject:Po,isReadableStream:mx,isRequest:hx,isResponse:gx,isHeaders:yx,isUndefined:_n,isDate:ax,isFile:lx,isBlob:ux,isRegExp:Ax,isFunction:ct,isStream:fx,isURLSearchParams:px,isTypedArray:Sx,isFileList:cx,forEach:Sn,merge:Is,extend:xx,trim:bx,stripBOM:vx,inherits:wx,toFlatObject:Ex,kindOf:jo,kindOfTest:vt,endsWith:Tx,toArray:_x,forEachEntry:kx,matchAll:Cx,isHTMLForm:Ox,hasOwnProperty:$c,hasOwnProp:$c,reduceDescriptors:Nc,freezeMethods:jx,toObjectSet:$x,toCamelCase:Fx,noop:Nx,toFiniteNumber:Px,findKey:Ac,global:br,isContextDefined:jc,isSpecCompliantForm:Dx,toJSONObject:Lx,isAsyncFn:Ix,isThenable:Mx,setImmediate:Pc,asap:Rx};function ee(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}$.inherits(ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$.toJSONObject(this.config),code:this.code,status:this.status}}});const Dc=ee.prototype,Lc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Lc[e]={value:e}}),Object.defineProperties(ee,Lc),Object.defineProperty(Dc,"isAxiosError",{value:!0}),ee.from=(e,t,r,n,o,i)=>{const s=Object.create(Dc);return $.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ee.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Vx=null;function Ms(e){return $.isPlainObject(e)||$.isArray(e)}function Ic(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function Mc(e,t,r){return e?e.concat(t).map(function(o,i){return o=Ic(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function Bx(e){return $.isArray(e)&&!e.some(Ms)}const Ux=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function Do(e,t,r){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=$.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,x){return!$.isUndefined(x[y])});const n=r.metaTokens,o=r.visitor||c,i=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&$.isSpecCompliantForm(t);if(!$.isFunction(o))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if($.isDate(d))return d.toISOString();if(!l&&$.isBlob(d))throw new ee("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(d)||$.isTypedArray(d)?l&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function c(d,y,x){let b=d;if(d&&!x&&typeof d=="object"){if($.endsWith(y,"{}"))y=n?y:y.slice(0,-2),d=JSON.stringify(d);else if($.isArray(d)&&Bx(d)||($.isFileList(d)||$.endsWith(y,"[]"))&&(b=$.toArray(d)))return y=Ic(y),b.forEach(function(v,E){!($.isUndefined(v)||v===null)&&t.append(s===!0?Mc([y],E,i):s===null?y:y+"[]",u(v))}),!1}return Ms(d)?!0:(t.append(Mc(x,y,i),u(d)),!1)}const f=[],h=Object.assign(Ux,{defaultVisitor:c,convertValue:u,isVisitable:Ms});function m(d,y){if(!$.isUndefined(d)){if(f.indexOf(d)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(d),$.forEach(d,function(b,w){(!($.isUndefined(b)||b===null)&&o.call(t,b,$.isString(w)?w.trim():w,y,h))===!0&&m(b,y?y.concat(w):[w])}),f.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return m(e),t}function Rc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Rs(e,t){this._pairs=[],e&&Do(e,this,t)}const Vc=Rs.prototype;Vc.append=function(t,r){this._pairs.push([t,r])},Vc.toString=function(t){const r=t?function(n){return t.call(this,n,Rc)}:Rc;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function zx(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Bc(e,t,r){if(!t)return e;const n=r&&r.encode||zx;$.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(t,r):i=$.isURLSearchParams(t)?t.toString():new Rs(t,r).toString(n),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Uc{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(n){n!==null&&t(n)})}}const zc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},qx={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Rs,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vs=typeof window<"u"&&typeof document<"u",Bs=typeof navigator=="object"&&navigator||void 0,Hx=Vs&&(!Bs||["ReactNative","NativeScript","NS"].indexOf(Bs.product)<0),Wx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Kx=Vs&&window.location.href||"http://localhost",He={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vs,hasStandardBrowserEnv:Hx,hasStandardBrowserWebWorkerEnv:Wx,navigator:Bs,origin:Kx},Symbol.toStringTag,{value:"Module"})),...qx};function Yx(e,t){return Do(e,new He.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return He.isNode&&$.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Jx(e){return $.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gx(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function qc(e){function t(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=i>=r.length;return s=!s&&$.isArray(o)?o.length:s,l?($.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!$.isObject(o[s]))&&(o[s]=[]),t(r,n,o[s],i)&&$.isArray(o[s])&&(o[s]=Gx(o[s])),!a)}if($.isFormData(e)&&$.isFunction(e.entries)){const r={};return $.forEachEntry(e,(n,o)=>{t(Jx(n),o,r,0)}),r}return null}function Xx(e,t,r){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(e)}const kn={transitional:zc,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=$.isObject(t);if(i&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return o?JSON.stringify(qc(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Yx(t,this.formSerializer).toString();if((a=$.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Do(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),Xx(t)):t}],transformResponse:[function(t){const r=this.transitional||kn.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?ee.from(a,ee.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch"],e=>{kn.headers[e]={}});const Zx=$.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Qx=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
60
|
-
`).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||t[r]&&
|
|
61
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Hc]=this[Hc]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Cn(s);n[a]||(nv(o,s),n[a]=!0)}return $.isArray(t)?t.forEach(i):i(t),this}}ot.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(ot.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),$.freezeMethods(ot);function zs(e,t){const r=this||kn,n=t||r,o=ot.from(n.headers);let i=n.data;return $.forEach(e,function(a){i=a.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Wc(e){return!!(e&&e.__CANCEL__)}function Br(e,t,r){ee.call(this,e??"canceled",ee.ERR_CANCELED,t,r),this.name="CanceledError"}$.inherits(Br,ee,{__CANCEL__:!0});function Kc(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ee("Request failed with status code "+r.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ov(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function iv(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[i];s||(s=u),r[o]=l,n[o]=u;let f=i,h=0;for(;f!==o;)h+=r[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const m=c&&u-c;return m?Math.round(h*1e3/m):void 0}}function sv(e,t){let r=0,n=1e3/t,o,i;const s=(u,c=Date.now())=>{r=c,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),f=c-r;f>=n?s(u,c):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-f)))},()=>o&&s(o)]}const Io=(e,t,r=3)=>{let n=0;const o=iv(50,250);return sv(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,l=s-n,u=o(l),c=s<=a;n=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},Yc=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Jc=e=>(...t)=>$.asap(()=>e(...t)),av=He.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,He.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,lv=He.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];$.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),$.isString(n)&&s.push("path="+n),$.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function uv(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Gc(e,t,r){let n=!uv(t);return e&&(n||r==!1)?cv(e,t):t}const Xc=e=>e instanceof ot?{...e}:e;function xr(e,t){t=t||{};const r={};function n(u,c,f,h){return $.isPlainObject(u)&&$.isPlainObject(c)?$.merge.call({caseless:h},u,c):$.isPlainObject(c)?$.merge({},c):$.isArray(c)?c.slice():c}function o(u,c,f,h){if($.isUndefined(c)){if(!$.isUndefined(u))return n(void 0,u,f,h)}else return n(u,c,f,h)}function i(u,c){if(!$.isUndefined(c))return n(void 0,c)}function s(u,c){if($.isUndefined(c)){if(!$.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function a(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c,f)=>o(Xc(u),Xc(c),f,!0)};return $.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||o,h=f(e[c],t[c],c);$.isUndefined(h)&&f!==a||(r[c]=h)}),r}const Zc=e=>{const t=xr({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=ot.from(s),t.url=Bc(Gc(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if($.isFormData(r)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...c]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...c].join("; "))}}if(He.hasStandardBrowserEnv&&(n&&$.isFunction(n)&&(n=n(t)),n||n!==!1&&av(t.url))){const u=o&&i&&lv.read(i);u&&s.set(o,u)}return t},fv=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=Zc(e);let i=o.data;const s=ot.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=o,c,f,h,m,d;function y(){m&&m(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function b(){if(!x)return;const v=ot.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:v,config:e,request:x};Kc(function(k){r(k),y()},function(k){n(k),y()},C),x=null}"onloadend"in x?x.onloadend=b:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(b)},x.onabort=function(){x&&(n(new ee("Request aborted",ee.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new ee("Network Error",ee.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const C=o.transitional||zc;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),n(new ee(E,C.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,x)),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&$.forEach(s.toJSON(),function(E,C){x.setRequestHeader(C,E)}),$.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),a&&a!=="json"&&(x.responseType=o.responseType),u&&([h,d]=Io(u,!0),x.addEventListener("progress",h)),l&&x.upload&&([f,m]=Io(l),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(c=v=>{x&&(n(!v||v.type?new Br(null,e,x):v),x.abort(),x=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const w=ov(o.url);if(w&&He.protocols.indexOf(w)===-1){n(new ee("Unsupported protocol "+w+":",ee.ERR_BAD_REQUEST,e));return}x.send(i||null)})},dv=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const i=function(u){if(!o){o=!0,a();const c=u instanceof Error?u:this.reason;n.abort(c instanceof ee?c:new Br(c instanceof Error?c.message:c))}};let s=t&&setTimeout(()=>{s=null,i(new ee(`timeout ${t} of ms exceeded`,ee.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>$.asap(a),l}},pv=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},mv=async function*(e,t){for await(const r of hv(e))yield*pv(r,t)},hv=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Qc=(e,t,r,n)=>{const o=mv(e,t);let i=0,s,a=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await o.next();if(u){a(),l.close();return}let f=c.byteLength;if(r){let h=i+=f;r(h)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},Mo=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ef=Mo&&typeof ReadableStream=="function",gv=Mo&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),tf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},yv=ef&&tf(()=>{let e=!1;const t=new Request(He.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),rf=64*1024,qs=ef&&tf(()=>$.isReadableStream(new Response("").body)),Ro={stream:qs&&(e=>e.body)};Mo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ro[t]&&(Ro[t]=$.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new ee(`Response type '${t}' is not supported`,ee.ERR_NOT_SUPPORT,n)})})})(new Response);const bv=async e=>{if(e==null)return 0;if($.isBlob(e))return e.size;if($.isSpecCompliantForm(e))return(await new Request(He.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if($.isArrayBufferView(e)||$.isArrayBuffer(e))return e.byteLength;if($.isURLSearchParams(e)&&(e=e+""),$.isString(e))return(await gv(e)).byteLength},xv=async(e,t)=>{const r=$.toFiniteNumber(e.getContentLength());return r??bv(t)},Hs={http:Vx,xhr:fv,fetch:Mo&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:f="same-origin",fetchOptions:h}=Zc(e);u=u?(u+"").toLowerCase():"text";let m=dv([o,i&&i.toAbortSignal()],s),d;const y=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let x;try{if(l&&yv&&r!=="get"&&r!=="head"&&(x=await xv(c,n))!==0){let C=new Request(t,{method:"POST",body:n,duplex:"half"}),T;if($.isFormData(n)&&(T=C.headers.get("content-type"))&&c.setContentType(T),C.body){const[k,O]=Yc(x,Io(Jc(l)));n=Qc(C.body,rf,k,O)}}$.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;d=new Request(t,{...h,signal:m,method:r.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:b?f:void 0});let w=await fetch(d);const v=qs&&(u==="stream"||u==="response");if(qs&&(a||v&&y)){const C={};["status","statusText","headers"].forEach(j=>{C[j]=w[j]});const T=$.toFiniteNumber(w.headers.get("content-length")),[k,O]=a&&Yc(T,Io(Jc(a),!0))||[];w=new Response(Qc(w.body,rf,k,()=>{O&&O(),y&&y()}),C)}u=u||"text";let E=await Ro[$.findKey(Ro,u)||"text"](w,e);return!v&&y&&y(),await new Promise((C,T)=>{Kc(C,T,{data:E,headers:ot.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:d})})}catch(b){throw y&&y(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ee("Network Error",ee.ERR_NETWORK,e,d),{cause:b.cause||b}):ee.from(b,b&&b.code,e,d)}})};$.forEach(Hs,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const nf=e=>`- ${e}`,vv=e=>$.isFunction(e)||e===null||e===!1,of={getAdapter:e=>{e=$.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){r=e[i];let s;if(n=r,!vv(r)&&(n=Hs[(s=String(r)).toLowerCase()],n===void 0))throw new ee(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){const i=Object.entries(o).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
|
62
|
-
`+i.map(
|
|
63
|
-
`):" "+
|
|
64
|
-
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=xr(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Bo.assertOptions(n,{silentJSONParsing:Nt.transitional(Nt.boolean),forcedJSONParsing:Nt.transitional(Nt.boolean),clarifyTimeoutError:Nt.transitional(Nt.boolean)},!1),o!=null&&($.isFunction(o)?r.paramsSerializer={serialize:o}:Bo.assertOptions(o,{encode:Nt.function,serialize:Nt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Bo.assertOptions(r,{baseUrl:Nt.spelling("baseURL"),withXsrfToken:Nt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&$.merge(i.common,i[r.method]);i&&$.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),r.headers=ot.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(l=l&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let c,f=0,h;if(!l){const d=[sf.bind(this),void 0];for(d.unshift.apply(d,a),d.push.apply(d,u),h=d.length,c=Promise.resolve(r);f<h;)c=c.then(d[f++],d[f++]);return c}h=a.length;let m=r;for(f=0;f<h;){const d=a[f++],y=a[f++];try{m=d(m)}catch(x){y.call(this,x);break}}try{c=sf.call(this,m)}catch(d){return Promise.reject(d)}for(f=0,h=u.length;f<h;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=xr(this.defaults,t);const r=Gc(t.baseURL,t.url,t.allowAbsoluteUrls);return Bc(r,t.params,t.paramsSerializer)}}$.forEach(["delete","get","head","options"],function(t){vr.prototype[t]=function(r,n){return this.request(xr(n||{},{method:t,url:r,data:(n||{}).data}))}}),$.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,a){return this.request(xr(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}vr.prototype[t]=r(),vr.prototype[t+"Form"]=r(!0)});class Ks{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,a){n.reason||(n.reason=new Br(i,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Ks(function(o){t=o}),cancel:t}}}function Ev(e){return function(r){return e.apply(null,r)}}function Tv(e){return $.isObject(e)&&e.isAxiosError===!0}const Ys={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ys).forEach(([e,t])=>{Ys[t]=e});function uf(e){const t=new vr(e),r=Cc(vr.prototype.request,t);return $.extend(r,vr.prototype,t,{allOwnKeys:!0}),$.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return uf(xr(e,o))},r}const Te=uf(kn);Te.Axios=vr,Te.CanceledError=Br,Te.CancelToken=Ks,Te.isCancel=Wc,Te.VERSION=af,Te.toFormData=Do,Te.AxiosError=ee,Te.Cancel=Te.CanceledError,Te.all=function(t){return Promise.all(t)},Te.spread=Ev,Te.isAxiosError=Tv,Te.mergeConfig=xr,Te.AxiosHeaders=ot,Te.formToJSON=e=>qc($.isHTMLForm(e)?new FormData(e):e),Te.getAdapter=of.getAdapter,Te.HttpStatusCode=Ys,Te.default=Te;function _v(e){if(!e)return!1;const t=/^data:image\/(jpeg|png|gif|bmp|webp);base64,/i,r=/\.(jpeg|jpg|png|gif|bmp|webp)$/i;return t.test(e)||r.test(e)}const Sv=({imageUrl:e})=>{const[t,r]=p.useState(!1),n=()=>{r(!0)},o=()=>{r(!1)};return g.jsxs("div",{children:[g.jsx("img",{alt:"Thumbnail",style:{cursor:"pointer",width:"120px",height:"130px",objectFit:"cover"},onClick:n,src:e||"/place.png","data-toggle":"tooltip","data-placement":"top",title:"Click to view"}),t&&g.jsx("div",{className:"modal",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center"},onClick:o,children:g.jsxs("div",{className:"modal-content",style:{position:"relative",backgroundColor:"white",padding:"20px",borderRadius:"8px",width:"90vw"},onClick:i=>i.stopPropagation(),children:[g.jsx("span",{className:"close",onClick:o,style:{position:"absolute",top:"10px",right:"10px",fontSize:"24px",cursor:"pointer"},children:"×"}),g.jsx("img",{src:e||"/place.png",alt:"Full Image",style:{maxWidth:"90%",maxHeight:"90vh",objectFit:"contain"}})]})})]})};function kv({element:e,validationData:t}){const{register:r=()=>({}),setValue:n,getValues:o}=t||{},[i,s]=p.useState(),[a,l]=p.useState(!1),[u,c]=p.useState(!1),[f,h]=p.useState(""),m=o&&o(e==null?void 0:e.id);p.useEffect(()=>{s(m)},[m]);const[d,y]=p.useState("");p.useEffect(()=>{r(e.id)},[e.id,r]);const{url:x,method:b,responseType:w}=e||{},v=p.useCallback(async E=>{var C,T,k,O,j,D,N,L,R,H,J;if(!(!x||!b)){l(!0);try{let z;if(b.toLowerCase()==="get"){const X=`${x}?value=${E}`;z=await Te.get(X)}else if(b.toLowerCase()==="post")z=await Te.post(x,{value:E});else throw new Error("Unsupported HTTP method");z.status===200&&((((T=(C=z==null?void 0:z.data)==null?void 0:C.data)==null?void 0:T.status)||((k=z==null?void 0:z.data)==null?void 0:k.status))===!0?(c(!0),w==="string"?h(((j=(O=z==null?void 0:z.data)==null?void 0:O.data)==null?void 0:j.description)||((D=z==null?void 0:z.data)==null?void 0:D.description)||"Validation successful"):y(((L=(N=z==null?void 0:z.data)==null?void 0:N.data)==null?void 0:L.description)||((R=z==null?void 0:z.data)==null?void 0:R.description)||{})):(console.error("Invalid input:",E),h("Unable to validate input"),c(!1)))}catch(z){console.error("Error validating input:",z),h(((J=(H=z==null?void 0:z.response)==null?void 0:H.data)==null?void 0:J.message)||"Unable to validate input"),c(!1)}finally{l(!1)}}},[b,w,x]);return p.useEffect(()=>{if(i){const E=setTimeout(()=>{v(i)},700);return()=>clearTimeout(E)}},[v,i]),g.jsxs("div",{children:[g.jsxs("div",{className:"relative flex items-center",children:[g.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:ue("input-control",e==null?void 0:e.customClass),...r(e==null?void 0:e.id),onChange:E=>{s(E.target.value),n(e==null?void 0:e.id,E.target.value)}}),g.jsxs("span",{className:"absolute right-0",children:[a&&g.jsxs("span",{children:[" ",g.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[g.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})]}),u&&!a&&g.jsx("span",{className:"text-green-600 text-lg pr-3 block",children:g.jsx(Me,{icon:"gg:check-o"})})]})]}),f&&w==="string"&&g.jsx("span",{className:`${u?"text-green-600":"text-red-600"} text-sm`,children:f}),w==="object"&&g.jsx("div",{className:"grid grid-cols-2 gap-6 text-sm text-gray-600 mt-2",children:Object.entries(d).map(([E,C])=>g.jsxs("div",{className:"flex items-center gap-x-2",children:[g.jsxs("span",{className:"font-semibold",children:[E,":"]}),_v(C)?g.jsx(Sv,{imageUrl:C}):g.jsx("span",{children:String(C)})]},E))})]})}function Cv({onGetTotal:e,readOnly:t,defaultValue:r,denominators:n}){const[o,i]=p.useState([...r]);function s(u,c){i(f=>{const h=[...f];return h[c]={...h[c],value:u},h})}function a(u,c){return parseFloat(u)*parseFloat(c)||0}const l=p.useMemo(()=>o.reduce((u,c)=>{const f=a(c.key,c.value);return u+f},0),[o]);return p.useEffect(()=>{e&&e(o)},[o]),p.useEffect(()=>{if(n!=null&&n.length){const u=n.map((c,f)=>({key:c.value,value:Array.isArray(r)&&r[f]?r[f].value:""}));i(u)}},[r,n]),g.jsx("div",{className:"mt-2",children:g.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden text-gray-700",children:[g.jsxs("div",{className:"grid grid-cols-3 text-sm font-bold border-b border-gray-100 bg-gray-50",children:[g.jsx("div",{className:"border-r px-4 py-2",children:g.jsx("span",{className:"",children:"Denomination"})}),g.jsx("div",{className:"border-r px-4 py-2",children:g.jsx("span",{children:"Quantity"})}),g.jsx("div",{className:"px-4 py-2",children:g.jsx("span",{children:"Sub total"})})]}),o.map((u,c)=>{var f,h;return g.jsxs("div",{className:"grid grid-cols-3 text-sm border-b border-gray-100",children:[g.jsx("div",{className:"border-r px-4 py-2 flex items-center",children:g.jsx("span",{className:"",children:(f=parseFloat(u.key))==null?void 0:f.toLocaleString()})}),g.jsx("div",{className:"border-r px-4 py-1",children:g.jsx("span",{children:g.jsx(go,{id:"input-example",className:"border border-gray-100 rounded w-full px-3 py-1 outline-none",decimalsLimit:6,defaultValue:u.value,onValueChange:m=>s(m,c),disabled:t,allowNegativeValue:!1})})}),g.jsx("div",{className:"px-4 py-2 flex justify-between items-center",children:g.jsx("span",{children:(h=a(u.key,u.value))==null?void 0:h.toLocaleString()})})]},u.key+c+Math.random())}),g.jsxs("div",{className:"grid grid-cols-3 text-sm font-bold bg-gray-50",children:[g.jsx("div",{className:"border-r px-4 py-3 col-span-2 text-right",children:"Total"}),g.jsx("div",{className:"px-4 py-3",children:l==null?void 0:l.toLocaleString()})]})]})})}function Ov({element:e,validationData:t}){const{register:r=()=>({}),setValue:n,getValues:o}=t||{},i=o&&o(e==null?void 0:e.id)||[];return p.useEffect(()=>{r(e.id)},[e.id,r]),g.jsx("div",{children:g.jsx(Cv,{onGetTotal:s=>{n&&n(e.id,s)},denominators:(e==null?void 0:e.denominators)||[],defaultValue:i,readOnly:e==null?void 0:e.isReadOnly})})}function Fv({element:e}){return g.jsx("div",{className:ue("py-6",e==null?void 0:e.customClass)})}function Av({element:e}){return g.jsx("div",{children:g.jsx("hr",{className:ue("border-gray-200 my-4",e==null?void 0:e.customClass)})})}function jv({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("div",{children:g.jsx("input",{placeholder:"Enter text",type:"text",className:"input-control",...r(e==null?void 0:e.id)})})}function $v({element:e,state:t}){return g.jsx(g.Fragment,{children:g.jsx("div",{className:e==null?void 0:e.customClass,children:(e==null?void 0:e.value)||t==="edit"&&g.jsx("span",{className:"text-gray-400",children:"Provide text"})})})}const cf={textField:dl,longText:B0,selectField:V0,multiSelect:y0,numberField:dl,amountField:tx,date:jm,password:_0,checkbox:R0,radio:I0,email:b0,file:T0,section:M0,validateInput:kv,tableInput:Ov,spacer:Fv,divider:Av,header:jv,basicText:$v},ff="edit",df=(e,t)=>{const r=cf[e.type];return r?g.jsx(Ds,{element:e,state:ff,children:g.jsxs("div",{className:"relative w-full",children:[e.type.toLowerCase()!=="grid"&&g.jsx("div",{className:"absolute top-0 left-0 h-full w-full z-20"}),g.jsx(r,{element:e,state:ff,sectionId:t})]})}):null},Js=({col:e,children:t,customClass:r})=>g.jsx("div",{className:ue("w-full p-2 bg-white",r),style:{gridColumn:e},children:t}),Nv=({element:e,sectionId:t,children:r,customClass:n,state:o})=>{const{formData:i,addElement:s,setIsDragging:a}=p.useContext(ft),l=p.useMemo(()=>Array.from({length:e.columns}),[e.columns]),u=p.useCallback(h=>{h.preventDefault(),h.stopPropagation(),h.dataTransfer.dropEffect="move"},[]),c=p.useCallback((h,m)=>{var d,y;h.preventDefault(),a(!1);try{const x=h.dataTransfer.getData("properties");if(!x)return;const b=JSON.parse(x);if((b==null?void 0:b.type)==="grid")return;const w=m+1;if((y=(d=i.find(C=>C.id===t))==null?void 0:d.questionData)==null?void 0:y.some(C=>{var T;return C.gridId===e.id&&((T=C.gridPosition)==null?void 0:T.col)===w}))return;const E={...b,id:Qe(),sectionId:t,gridId:e.id,gridPosition:{col:w}};s(E,t)}catch(x){console.error("Drop failed in grid:",x),a(!1)}},[s,e.id,i,t,a]),f=(h,m,d)=>{const y=Array.isArray(r)&&r.find(x=>{var b;return((b=x==null?void 0:x.props)==null?void 0:b.col)===h+1});return g.jsx("div",{children:g.jsx("div",{id:h.toString(),onDrop:x=>c(x,h),onDragOver:u,className:ue("border rounded-lg min-h-[110px] bg-white p-2","flex items-center justify-center text-gray-400 transition-colors",m),children:y||g.jsx("span",{children:d==="edit"&&g.jsx(Me,{icon:"ph:plus-bold"})})})},h)};return g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"grid gap-6 w-full",style:{gridTemplateColumns:`repeat(${e.columns}, 1fr)`},children:l.map((h,m)=>f(m,n,o))})})},Gs=p.memo(Nv),Pv="edit";function Dv({elementData:e,sectionId:t}){const{formData:r,updateElementPosition:n,isDragging:o,setIsDragging:i,addElementInPosition:s}=p.useContext(ft),[a,l]=p.useState(null),[u,c]=p.useState(null),f=p.useMemo(()=>{var v;return((v=r.find(E=>E.id===t))==null?void 0:v.questionData)||[]},[r,t]),h=p.useCallback((v,E)=>{v.dataTransfer.setData("properties",E),l(E)},[]),m=p.useCallback((v,E)=>{v.preventDefault(),v.stopPropagation(),c(E)},[]),d=p.useCallback(v=>{v.preventDefault(),v.stopPropagation();const E=v.dataTransfer.getData("properties"),C=v.currentTarget.id;if(!C||E===C)return;const T=f.findIndex(D=>D.id===E),k=f.findIndex(D=>D.id===C);if(T===-1||k===-1)return;const O=[...f],[j]=O.splice(T,1);O.splice(k,0,j),n(O,t),l(null)},[f,t,n]),y=p.useCallback((v,E)=>{v.preventDefault(),i(!1);try{const T={...JSON.parse(v.dataTransfer.getData("properties")),id:Qe(),sectionId:t};s(T,t,E)}catch(C){console.error("Drop error:",C)}},[s,t,i]),x=p.useCallback(v=>g.jsx("div",{className:"hover:bg-blue-300 transition rounded",onDragOver:E=>E.preventDefault(),onDrop:E=>y(E,v),onDragEnd:()=>i(!1),children:g.jsx("div",{className:"bg-blue-50 rounded p-6 h-[60px] border-2 border-blue-300 border-dashed flex items-center justify-center text-gray-400 opacity-70",children:g.jsx(Me,{icon:"octicon:plus-16"})})},`drop-${v}`),[y,i]),b=p.useCallback(v=>g.jsx("div",{id:v.id,className:ue("cursor-move border p-4 w-full rounded-lg transition-colors bg-white",{"bg-gray-100":a===v.id,"border-dashed border-blue-300":a&&a!==v.id}),draggable:!0,onDragStart:E=>h(E,v.id),onDragOver:E=>m(E,v.id),onDrop:d,onDragEnd:()=>l(null),children:df(v,t)},v.id),[a,d,m,t,h]),w=p.useMemo(()=>(e==null?void 0:e.reduce((v,E)=>(E.gridId&&(v[E.gridId]=v[E.gridId]||[],v[E.gridId].push(E)),v),{}))||{},[e]);return e!=null&&e.length?g.jsx("div",{className:"w-full h-full grid grid-cols-1 gap-4 relative",children:e.map((v,E)=>{if(v.type==="grid"){const C=w[v.id]||[];return g.jsx("div",{draggable:!0,onDragStart:T=>h(T,v.id),onDragOver:T=>m(T,v.id),onDrop:d,onDragEnd:()=>l(null),className:"cursor-move border p-4 w-full rounded-lg transition-colors bg-white",children:g.jsx(Ds,{element:v,state:"edit",children:g.jsx(Gs,{element:v,sectionId:t,state:Pv,children:C.map(T=>{var k;return g.jsx(Js,{col:(k=T.gridPosition)==null?void 0:k.col,children:df(T,t)},T.id)})})})},v.id)}return v.gridId?null:g.jsxs("div",{className:ue("group relative grid gap-y-[6px]",v.elementClass),children:[o&&u===v.id&&x(E),g.jsx("div",{className:"group",children:b(v)}),o&&u===v.id&&x(E+1)]},v.id)})}):g.jsx("div",{className:"w-full h-full flex items-center justify-center text-gray-400 min-h-[250px] p-10 col-span-2",children:"Drag or click an element to display"})}const Lv=p.memo(Dv),Iv=Tn({title:de(),description:de()}).required(),Mv=({isOpen:e,onClose:t,section:r})=>{const{updateSection:n}=p.useContext(ft),{register:o,handleSubmit:i,formState:{errors:s,isSubmitting:a,isValid:l},reset:u}=Ss({resolver:ks(Iv),defaultValues:r});if(p.useEffect(()=>{e||u()},[e,u]),!e)return null;const c=f=>{n(f,r.id),t()};return g.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:g.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[g.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[g.jsx("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:"Update Section Information"}),g.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:g.jsx(Me,{icon:"tabler:x"})})]}),g.jsxs("form",{onSubmit:i(c),className:"w-full",children:[g.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[g.jsx(ge,{label:"Title",name:"title",register:o,errors:s}),g.jsx(ge,{label:"Description",name:"description",register:o,errors:s})]}),g.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[g.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),g.jsx("button",{type:"submit",disabled:!l||a,className:`flex-1 px-4 py-2.5 ${!l||a?"bg-[#F2F4F7]":"bg-[#2563EB]"} ${!l||a?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:a?"Saving...":"Save"})]})]})]})})},Rv=()=>{const[e,t]=p.useState(!1),r=p.useRef(null),n=p.useRef(null),{removeSection:o,formData:i,setIsDragging:s,setSelectedSection:a,selectedSection:l,activeSections:u,setActiveSections:c}=p.useContext(ft);p.useEffect(()=>{var d;a(((d=i[0])==null?void 0:d.id)||null)},[]);const f=p.useCallback(d=>{d.preventDefault(),d.dataTransfer.dropEffect="move",n.current&&(n.current.scrollTop=n.current.scrollHeight)},[]);function h(d){u.includes(d)?c(y=>y.filter(x=>x!==d)):c(y=>[...y,d])}function m(d){r.current=d,t(!0)}return g.jsxs("div",{ref:n,className:"flex gap-x-4 mx-auto h-full relative px-6 pb-5 flex-col no-scrollbar overflow-y-auto max-h-[86vh]",children:[e&&g.jsx(Mv,{isOpen:e,onClose:()=>t(!1),section:r.current}),g.jsx("div",{className:"relative w-full flex flex-col gap-y-6 flex-1 py-4",children:i.map((d,y)=>g.jsxs("div",{className:"group cursor-pointer rounded",children:[g.jsxs("div",{className:`border border-gray-100 rounded pb-6 px-4 shadow-[rgba(149,157,165,0.2)_0px_2px_4px] transition-colors duration-200
|
|
65
|
-
${l===d.id?"border-dashed border-blue-400 bg-[#f7f8fa]":"border-transparent"} ${u.includes(y)?"min-h-[300px]":""}`,children:[g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("div",{onClick:()=>a(d.id),className:"h-full flex-1 cursor-pointer py-4",children:g.jsx("h2",{className:"font-medium",children:d.title||"Section title"})}),g.jsxs("div",{className:"flex gap-x-2 items-center",children:[g.jsx("button",{type:"button",className:"p-1 border rounded-lg text-xs",onClick:()=>m(d),children:g.jsx(
|
|
59
|
+
`+(a!==s?`result of cast: ${a}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,o){let{path:i,originalValue:s=t,strict:a=this.spec.strict}=r,l=t;a||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:l,originalValue:s,options:r,tests:u},n,c=>{if(c.length)return o(c,l);this.runTests({path:i,value:l,originalValue:s,options:r,tests:this.tests},n,o)})}runTests(t,r,n){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=t,c=y=>{o||(o=!0,r(y,s))},f=y=>{o||(o=!0,n(y,s))},h=i.length,m=[];if(!h)return f([]);let d={value:s,originalValue:a,path:l,options:u,schema:this};for(let y=0;y<i.length;y++){const x=i[y];x(d,c,function(w){w&&(Array.isArray(w)?m.push(...w):m.push(w)),--h<=0&&f(m)})}}asNestedTest({key:t,index:r,parent:n,parentPath:o,originalParent:i,options:s}){const a=t??r;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=n[a];const c=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${l?a:`"${a}"`}]`:(o?`${o}.`:"")+t});return(f,h,m)=>this.resolve(c)._validate(u,c,h,m)}validate(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return new Promise((s,a)=>o._validate(t,r,(l,u)=>{tt.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new tt(l,u,void 0,void 0,i)):s(u)}))}validateSync(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),i,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return o._validate(t,Object.assign({},r,{sync:!0}),(a,l)=>{throw tt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new tt(a,t,void 0,void 0,s);i=l}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(tt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(tt.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Mr(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Ir({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Ir({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=$t.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=$t.notNull){return this.nullability(!1,t)}required(t=$t.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=$t.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=Ir(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),n.tests.push(o),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),o=cc(t).map(i=>new br(i));return o.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new So(o,r):So.fromOptions(o,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Ir({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=$t.oneOf){let n=this.clone();return t.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=Ir({message:r,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),n}notOneOf(t,r=$t.notOneOf){let n=this.clone();return t.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=Ir({message:r,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:o,optional:i,nullable:s}=r.spec;return{meta:o,label:n,optional:i,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(f=>f.name===l.name)===u)}}}nt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])nt.prototype[`${e}At`]=function(t,r,n={}){const{parent:o,parentPath:i,schema:s}=Sb(this,t,r,n.context);return s[e](o&&o[i],Object.assign({},n,{parent:o,path:t}))};for(const e of["equals","is"])nt.prototype[e]=nt.prototype.oneOf;for(const e of["not","nope"])nt.prototype[e]=nt.prototype.notOneOf;const Cb=()=>!0;function Rr(e){return new hc(e)}class hc extends nt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Cb},t))}}Rr.prototype=hc.prototype;function Oo(){return new gc}class gc extends nt{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=js.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return xt(r)||r===!0}})}isFalse(t=js.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return xt(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Oo.prototype=gc.prototype;const kb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ob(e){const t=$s(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function $s(e){var t,r;const n=kb.exec(e);return n?{year:zt(n[1]),month:zt(n[2],1)-1,day:zt(n[3],1),hour:zt(n[4]),minute:zt(n[5]),second:zt(n[6]),millisecond:n[7]?zt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:zt(n[10]),minuteOffset:zt(n[11])}:null}function zt(e,t=0){return Number(e)||t}let Fb=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ab=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,jb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,$b="^\\d{4}-\\d{2}-\\d{2}",Nb="\\d{2}:\\d{2}:\\d{2}",Pb="(([+-]\\d{2}(:?\\d{2})?)|Z)",Db=new RegExp(`${$b}T${Nb}(\\.\\d+)?${Pb}$`),Lb=e=>xt(e)||e===e.trim(),Ib={}.toString();function de(){return new yc}class yc extends nt{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Ib?t:o})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||$t.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=rt.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=rt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=rt.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,o,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:o,name:i}=r:o=r),this.test({name:i||"matches",message:o||rt.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=rt.email){return this.matches(Fb,{name:"email",message:t,excludeEmptyString:!0})}url(t=rt.url){return this.matches(Ab,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=rt.uuid){return this.matches(jb,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,o;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:o=void 0}=t:r=t),this.matches(Db,{name:"datetime",message:r||rt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||rt.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:i=>{if(!i||n)return!0;const s=$s(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||rt.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=$s(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=rt.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Lb})}lowercase(t=rt.lowercase){return this.transform(r=>xt(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>xt(r)||r===r.toLowerCase()})}uppercase(t=rt.uppercase){return this.transform(r=>xt(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>xt(r)||r===r.toUpperCase()})}}de.prototype=yc.prototype;let Mb=e=>e!=+e;function Vr(){return new bc}class bc extends nt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Mb(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return n.isType(o)||o===null?o:parseFloat(o)})})}min(t,r=er.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=er.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=er.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=er.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=er.positive){return this.moreThan(0,t)}negative(t=er.negative){return this.lessThan(0,t)}integer(t=er.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>xt(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(o=>xt(o)?o:Math[t](o))}}Vr.prototype=bc.prototype;let xc=new Date(""),Rb=e=>Object.prototype.toString.call(e)==="[object Date]";function Ns(){return new Tn}class Tn extends nt{constructor(){super({type:"date",check(t){return Rb(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=Ob(t),isNaN(t)?Tn.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(br.isRef(t))n=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=o}return n}min(t,r=As.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(n)}})}max(t,r=As.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(n)}})}}Tn.INVALID_DATE=xc,Ns.prototype=Tn.prototype,Ns.INVALID_DATE=xc;function Vb(e,t=[]){let r=[],n=new Set,o=new Set(t.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=yr.split(s)[0];n.add(l),o.has(`${a}-${l}`)||r.push([a,l])}for(const s of Object.keys(e)){let a=e[s];n.add(s),br.isRef(a)&&a.isSibling?i(a.path,s):_o(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return yb.array(Array.from(n),r).reverse()}function vc(e,t){let r=1/0;return e.some((n,o)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=o,!0}),r}function wc(e){return(t,r)=>vc(e,t)-vc(e,r)}const Ec=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Fo(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Fo(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Fo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Fo)}):"optional"in e?e.optional():e}const Bb=(e,t)=>{const r=[...yr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),o=yr.getter(yr.join(r),!0)(e);return!!(o&&n in o)};let Tc=e=>Object.prototype.toString.call(e)==="[object Object]";function _c(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Ub=wc([]);function _n(e){return new Sc(e)}class Sc extends nt{constructor(t){super({type:"object",check(r){return Tc(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Ub,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let o=super._cast(t,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let i=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(f=>!this._nodes.includes(f))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),c=!1;for(const f of a){let h=i[f],m=f in o;if(h){let d,y=o[f];u.path=(r.path?`${r.path}.`:"")+f,h=h.resolve({value:y,context:r.context,parent:l});let x=h instanceof nt?h.spec:void 0,b=x==null?void 0:x.strict;if(x!=null&&x.strip){c=c||f in o;continue}d=!r.__validating||!b?h.cast(o[f],u):o[f],d!==void 0&&(l[f]=d)}else m&&!s&&(l[f]=o[f]);(m!==f in l||l[f]!==o[f])&&(c=!0)}return c?l:o}_validate(t,r={},n,o){let{from:i=[],originalValue:s=t,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(l,u)=>{if(!a||!Tc(u)){o(l,u);return}s=s||u;let c=[];for(let f of this._nodes){let h=this.fields[f];!h||br.isRef(h)||c.push(h.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:s}))}this.runTests({tests:c,value:u,originalValue:s,options:r},n,f=>{o(f.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[o,i]of Object.entries(this.fields)){const s=n[o];n[o]=s===void 0?i:s}return r.withMutation(o=>o.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var o;const i=this.fields[n];let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Vb(t,r),n._sortErrors=wc(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let o=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),o)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Fo(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,o])=>t.includes(n)&&t.includes(o)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let o=yr.getter(t,!0);return this.transform(i=>{if(!i)return i;let s=i;return Bb(i,t)&&(s=Object.assign({},i),n||delete s[t],s[r]=o(i)),s})}json(){return this.transform(Ec)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Eo.exact,test(r){if(r==null)return!0;const n=_c(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Eo.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;const i=_c(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Eo.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const o of Object.keys(r))n[t(o)]=r[o];return n})}camelCase(){return this.transformKeys(Fs.camelCase)}snakeCase(){return this.transformKeys(Fs.snakeCase)}constantCase(){return this.transformKeys(t=>Fs.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[i,s]of Object.entries(r.fields)){var o;let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),n.fields[i]=s.describe(a)}return n}}_n.prototype=Sc.prototype;function Cc(e){return new kc(e)}class kc extends nt{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){const n=super._cast(t,r);if(!this._typeCheck(n)||!this.innerType)return n;let o=!1;const i=n.map((s,a)=>{const l=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${a}]`}));return l!==s&&(o=!0),l});return o?i:n}_validate(t,r={},n,o){var i;let s=this.innerType,a=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(l,u)=>{var c;if(!a||!s||!this._typeCheck(u)){o(l,u);return}let f=new Array(u.length);for(let m=0;m<u.length;m++){var h;f[m]=s.asNestedTest({options:r,index:m,parent:u,parentPath:r.path,originalParent:(h=r.originalValue)!=null?h:t})}this.runTests({value:u,tests:f,originalValue:(c=r.originalValue)!=null?c:t,options:r},n,m=>o(m.concat(l),u))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(Ec)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!_o(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Ut(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=To.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r){return r=r||To.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r){return r=r||To.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(n,o,i)=>!t(n,o,i):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);if(r.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=r.innerType.describe(i)}return n}}Cc.prototype=kc.prototype;const zb=({tabs:e,className:t="",count:r={},setActiveTab:n,activeTab:o,btnClass:i=""})=>{const s=se("flex gap-x-3 mb-8 w-full no-scrollbar overflow-x-auto border-b border-[#EAECF0] darks:border-gray-500",t);return g.jsx("div",{className:s,children:e.map(a=>{const l=o===a.key,u=r[a.key]||0,c=se("capitalize text-xs whitespace-nowrap no-scrollbar md:text-sm font-semibold pb-[14px] border-b-2 px-6 flex items-center justify-center gap-x-1 flex-1 text-center",i),f=se({"border-gray-400 darks:border-white !text-primary darks:!text-white":l,"border-transparent text-[#667085] darks:!text-white/60":!l}),h=u>0&&g.jsx("span",{className:"text-xs h-6 min-w-[24px] rounded-full flex justify-center items-center border border-[#EAECF0] darks:border-gray-500 bg-[#F9FAFB] darks:bg-gray-800 text-[#454745] darks:text-white/80",children:u});return g.jsxs("button",{onClick:()=>n(a.key),className:se(c,f),"aria-selected":l,role:"tab",type:"button",children:[a.title,h]},a.key)})})},qb=[{type:"basicText",label:"Basic Text",icon:"fluent:text-16-filled",inputLabel:"",required:!1,inputType:"basicText",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"textField",label:"Text Field",icon:"fluent:text-16-filled",inputLabel:"Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"longText",label:"Long Text Field",icon:"dashicons:text",inputLabel:"Long Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"selectField",label:"Select List",icon:"tabler:select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[{label:"Placeholder 1",value:"",id:Qe()},{label:"Placeholder 2",value:"",id:Qe()}],customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"multiSelect",label:"MultiSelect",icon:"fluent-mdl2:multi-select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[{label:"Placeholder 1",value:"",id:Qe()},{label:"Placeholder 2",value:"",id:Qe()}],customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"validateInput",label:"Validate Input",icon:"iconoir:www",inputLabel:"Validate Input Label",required:!1,inputType:"validateInput",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Value is required",minLengthMessage:"",maxLengthMessage:"",value:null,url:"https://api.example.com/validate?value={value}",method:"GET",responseType:"string",customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"numberField",label:"Number",icon:"octicon:number-16",inputLabel:"Number Label",required:!1,inputType:"number",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"amountField",label:"Amount",icon:"carbon:currency",inputLabel:"Enter amount",required:!1,inputType:"amount",maxAmount:null,minAmount:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minAmountMessage:"",maxAmountMessage:"",value:null,prefix:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"date",label:"Date",icon:"bx:calendar",inputLabel:"Date Text Label",required:!1,inputType:"date",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"password",label:"Password",icon:"ic:round-password",inputLabel:"Password Text Label",required:!1,inputType:"password",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"checkbox",label:"Checkbox",icon:"mingcute:checkbox-line",inputLabel:"Checkbox Text Label",required:!1,inputType:"checkbox",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[{label:"Placeholder 1",value:"",id:Qe()},{label:"Placeholder 2",value:"",id:Qe()}],customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"radio",label:"Radio select",icon:"ri:checkbox-circle-line",inputLabel:"Radio Text Label",required:!1,inputType:"radio",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[{label:"Placeholder 1",value:"",id:Qe()},{label:"Placeholder 2",value:"",id:Qe()}],customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"email",label:"Email",icon:"mdi:email-outline",inputLabel:"Email Text Label",required:!1,inputType:"email",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"file",label:"File Attachment",icon:"ion:attach-sharp",inputLabel:"File Text Label",required:!1,inputType:"file",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"tableInput",label:"Table Input",icon:"iconoir:table",inputLabel:"Table Input Label",required:!1,inputType:"tableInput",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Value is required",minLengthMessage:"",maxLengthMessage:"",value:[],denominators:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"divider",label:"Divider",icon:"pixel:divider",inputLabel:"",inputType:"divider",customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"spacer",label:"Spacer",icon:"fluent-mdl2:spacer",inputLabel:"",inputType:"spacer",customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"grid",label:"Grid",icon:"cuida:grid-outline",inputLabel:"",inputType:"grid",placeholder:"Type here",description:"",columns:2}],Hb=["amount"],Wb=["text","number"],Kb=["text","number","amount","date","password"],Yb=["amount"],Ao=["grid","section","divider","spacer","basicText"],Jb=["radio","select","checkbox","multiselect"],Gb=["validateInput"],Xb=["tableInput"],Ps=["basicText"];function Zb({value:e=[],onChange:t,onGetValue:r}){const[n,o]=p.useState((e==null?void 0:e.length)>0?e:[{value:""}]);p.useEffect(()=>{(e==null?void 0:e.length)>0&&JSON.stringify(e)!==JSON.stringify(n)&&o(e)},[e]);function i(l,u){const c=[...n];c[u]={...c[u],value:l},o(c),t&&t(c)}function s(){const l=[...n,{value:""}];o(l),t&&t(l)}function a(l){const u=n.filter((c,f)=>f!==l);o(u),t&&t(u)}return p.useEffect(()=>{r&&r(JSON.stringify({values:n}))},[r,n]),g.jsxs("div",{className:"]",children:[g.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[g.jsx("div",{className:"grid text-sm font-bold border-b border-gray-100 bg-gray-50",children:g.jsx("div",{className:"px-2 py-2",children:g.jsx("span",{className:"",children:"Add Denominations"})})}),n.map((l,u)=>g.jsx("div",{className:"grid text-sm border-b border-gray-100",children:g.jsxs("div",{className:"flex items-center gap-x-4 px-2 py-1",children:[g.jsx("span",{className:"flex-1",children:g.jsx(go,{id:"input-example",className:"border border-gray-100 rounded w-full px-3 py-1 outline-none",decimalsLimit:6,defaultValue:l.value,onValueChange:c=>i(c,u),allowNegativeValue:!1})}),g.jsx("button",{onClick:()=>a(u),className:"text-red-500 hover:text-red-700 px-2",type:"button","aria-label":"Remove row",children:"×"})]})},l.key+u+Math.random()))]}),g.jsx("div",{className:"mt-1 flex justify-end",children:g.jsx("button",{type:"button",onClick:s,className:"font-semibold !text-blue-700 text-sm rounded outline-0 focus:outline-0",children:"+ Add"})})]})}const Qb=()=>g.jsx("blockquote",{className:"bg-gray-100 p-4 rounded-md text-gray-700",children:g.jsxs("ul",{children:[g.jsxs("li",{className:"text-xs",children:["API URL example format: ",g.jsx("code",{children:"https://example.com/validation?value={value}"})]}),g.jsxs("li",{className:"text-xs",children:[g.jsx("span",{className:"block mb-1",children:" Response example format:"}),g.jsx("pre",{className:"bg-white p-2 rounded-md",children:g.jsxs("code",{children:["{ ",g.jsx("br",{}),' "data": { ',g.jsx("br",{}),' "status": true, ',g.jsx("br",{}),' "description": "John Doe" ',g.jsx("br",{})," } ",g.jsx("br",{}),"}"]})})]})]})}),ex=_n().shape({inputLabel:de().nullable(),placeholder:de().nullable(),description:de().nullable(),isReadOnly:Oo(),isDisabled:Oo(),isRequired:Oo(),requiredMessage:de().nullable(),minLengthMessage:de().nullable(),maxLengthMessage:de().nullable(),maxLength:Vr().typeError("Expecting a number").nullable(),minLength:Vr().typeError("Expecting a number").nullable(),inputType:de().nullable(),maxAmountMessage:de().nullable(),maxAmount:de().nullable(),options:Cc().of(_n().shape({label:de().nullable(),value:de().when("label",{is:e=>e&&e.length>0,then:e=>e.required("Value is required when label is present"),otherwise:e=>e.nullable()})})).when("inputType",{is:e=>["radio","checkbox"].includes(e),then:e=>e.required("Options are required for radio or checkbox inputs"),otherwise:e=>e.nullable()}),prefix:de().nullable(),url:de().nullable(),method:de().nullable(),denominators:Rr().nullable(),responseType:de().nullable(),minAmount:de().nullable(),heading:de().nullable(),minAmountMessage:de().nullable(),columns:Vr().nullable(),value:Rr().nullable(),customClass:de().nullable(),elementClass:de().nullable()}),tx=[{title:"Basics",key:"basic"},{title:"Validations",key:"validation"}],rx=({isOpen:e,onClose:t,element:r})=>{const n=tx.filter(C=>!Ao.includes(r.inputType)||C.key!=="validation"),{updateElement:o}=p.useContext(ft),[i,s]=p.useState("basic"),a=sr("config"),{register:l,handleSubmit:u,control:c,setValue:f,watch:h,trigger:m,formState:{errors:d,isSubmitting:y,isValid:x},reset:b}=Ss({resolver:Cs(ex),defaultValues:{...r,options:r.options||[]}}),{fields:w,append:v,remove:E}=rb({control:c,name:"options"});p.useEffect(()=>{e||b()},[e,b]);const k=C=>{o(C,r.sectionId),t()},T=()=>g.jsxs("div",{className:"flex flex-col gap-y-1 justify-start",children:[w.map((C,O)=>g.jsxs("div",{className:"flex gap-x-4 items-center ",children:[g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Label",name:`options.${O}.label`,register:l,errors:d,element:r,placeholder:"Label",isFloating:!0})}),g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Value",name:`options.${O}.value`,register:l,errors:d,element:r,placeholder:"Value",isFloating:!0})})," ",g.jsx("button",{disabled:w.length===1,type:"button",className:"outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",onClick:()=>E(O),children:g.jsx(Pe,{icon:"iconamoon:sign-times-fill"})})]},C.id)),g.jsxs("div",{children:[" ",g.jsxs("button",{type:"button",className:"mt-2 text-gray-700 font-medium text-sm flex gap-x-1 items-center",onClick:()=>v({label:"",value:"",id:Qe()}),children:[g.jsx(Pe,{icon:"qlementine-icons:plus-16"})," Add Option"]})]})]});return g.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:g.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[g.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[g.jsxs("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:[r.label," Options"]}),g.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:g.jsx(Pe,{icon:"tabler:x"})})]}),g.jsx("div",{className:"w-full",children:g.jsx(zb,{tabs:n,setActiveTab:s,activeTab:i,className:"justify-start !text-left",btnClass:"!uppercase !text-left"})}),g.jsxs("form",{onSubmit:u(k),className:"w-full",children:[i==="basic"&&g.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[Ps.includes(r.inputType)&&g.jsx(g.Fragment,{children:g.jsx(ge,{label:"Value",name:"value",register:l,errors:d,element:r})}),g.jsx(ge,{label:"Custom Class",name:"customClass",register:l,errors:d,element:r}),!Ps.includes(r.inputType)&&!Ao.includes(r.inputType)&&g.jsx(ge,{label:"Label",name:"inputLabel",register:l,errors:d,element:r}),Kb.includes(r.inputType)&&g.jsx(ge,{label:"Placeholder",name:"placeholder",register:l,errors:d,element:r}),Hb.includes(r.inputType)&&g.jsx(ge,{label:"Prefix",name:"prefix",register:l,errors:d,element:r}),Gb.includes(r.inputType)&&g.jsxs(g.Fragment,{children:[g.jsx(Qb,{}),g.jsx(ge,{label:"Api Url",name:"url",register:l,errors:d,element:r}),g.jsx(ss,{label:"Api Method",options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"}],register:l,name:"method",setValue:f,trigger:m,value:h("method")}),g.jsx(ss,{label:"Api Response type",options:[{label:"String",value:"string"},{label:"Object",value:"object"}],register:l,name:"responseType",setValue:f,trigger:m,value:h("responseType")})]}),Xb.includes(r.inputType)&&g.jsx(Zb,{onChange:C=>{f("denominators",C)},value:h("denominators")}),!Ps.includes(r.inputType)&&!Ao.includes(r.inputType)&&g.jsx(ge,{label:"Short Description",name:"description",register:l,errors:d,element:r}),r.type.toLowerCase()==="grid"&&g.jsx(ge,{label:"Number of columns",name:"columns",register:l,errors:d,element:r}),Jb.includes(r.inputType)&&T()]}),!Ao.includes(r.type.toLowerCase())&&i==="validation"&&g.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Required",name:"isRequired",register:l,errors:d,element:r,type:"checkbox"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"requiredMessage",register:l,errors:d,element:r})})]}),Wb.includes(r.inputType)&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Min Length",name:"minLength",register:l,errors:d,element:r,type:"number"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"minLengthMessage",register:l,errors:d,element:r})})]}),g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Max Length",name:"maxLength",register:l,errors:d,element:r,type:"number"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"maxLengthMessage",register:l,errors:d,element:r})})]})]}),Yb.includes(r.inputType)&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Min Amount",name:"minAmount",register:l,errors:d,element:r,type:"amount"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"minAmountMessage",register:l,errors:d,element:r})})]}),g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Max Amount",name:"maxAmount",register:l,errors:d,element:r,type:"amount"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"maxAmountMessage",register:l,errors:d,element:r})})]})]})]}),g.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[g.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),g.jsx("button",{type:"submit",disabled:!x||y,style:{background:(a==null?void 0:a.buttonColor)||"#333"},className:`flex-1 px-4 py-2.5 ${!x||y?"bg-[#F2F4F7]":"bg-[#2563EB]"} ${!x||y?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:y?"Saving...":"Save"})]})]})]})})},Ds=p.memo(({state:e,element:t,children:r})=>{const[n,o]=p.useState(!1),{removeElement:i}=p.useContext(ft),s=p.useCallback(()=>{i(t.id,t.sectionId)},[t.id,t.sectionId,i]);return g.jsxs("div",{className:"w-full",children:[n&&g.jsx(rx,{isOpen:n,onClose:()=>o(!1),element:t}),g.jsxs("div",{className:"flex justify-between items-center mb-2",children:[g.jsxs("span",{children:[" ",t.inputLabel&&g.jsx("label",{className:"text-sm font-medium",children:t.inputLabel})]}),e==="edit"&&g.jsxs("span",{className:"flex gap-x-3 items-center",children:[g.jsx("button",{type:"button",className:"outline-none hover:opacity-80 text-sm",onClick:()=>o(!0),children:g.jsx(Pe,{icon:"circum:edit"})}),g.jsx("button",{type:"button",className:"outline-none hover:opacity-80 text-sm",onClick:s,children:g.jsx(Pe,{icon:"iconamoon:sign-times-fill"})})]})]}),r]})});Ds.displayName="ElementContainer";function nx({element:e,validationData:t}){const{register:r=()=>({}),trigger:n,setValue:o,watch:i,isReadOnly:s}=t||{};let a;return i&&(a=i()[e.id]),g.jsx(ge,{placeholder:e.placeholder,type:e.inputType,label:"",name:e.id,register:r,trigger:n,setValue:o,value:a,prefix:e.prefix,disabled:s})}function Oc(e,t){return function(){return e.apply(t,arguments)}}const{toString:ox}=Object.prototype,{getPrototypeOf:Ls}=Object,jo=(e=>t=>{const r=ox.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),vt=e=>(e=e.toLowerCase(),t=>jo(t)===e),$o=e=>t=>typeof t===e,{isArray:Br}=Array,Sn=$o("undefined");function ix(e){return e!==null&&!Sn(e)&&e.constructor!==null&&!Sn(e.constructor)&&ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fc=vt("ArrayBuffer");function sx(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Fc(e.buffer),t}const ax=$o("string"),ct=$o("function"),Ac=$o("number"),No=e=>e!==null&&typeof e=="object",lx=e=>e===!0||e===!1,Po=e=>{if(jo(e)!=="object")return!1;const t=Ls(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ux=vt("Date"),cx=vt("File"),fx=vt("Blob"),dx=vt("FileList"),px=e=>No(e)&&ct(e.pipe),mx=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ct(e.append)&&((t=jo(e))==="formdata"||t==="object"&&ct(e.toString)&&e.toString()==="[object FormData]"))},hx=vt("URLSearchParams"),[gx,yx,bx,xx]=["ReadableStream","Request","Response","Headers"].map(vt),vx=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Cn(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Br(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(n=0;n<s;n++)a=i[n],t.call(null,e[a],a,e)}}function jc(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const xr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$c=e=>!Sn(e)&&e!==xr;function Is(){const{caseless:e}=$c(this)&&this||{},t={},r=(n,o)=>{const i=e&&jc(t,o)||o;Po(t[i])&&Po(n)?t[i]=Is(t[i],n):Po(n)?t[i]=Is({},n):Br(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Cn(arguments[n],r);return t}const wx=(e,t,r,{allOwnKeys:n}={})=>(Cn(t,(o,i)=>{r&&ct(o)?e[i]=Oc(o,r):e[i]=o},{allOwnKeys:n}),e),Ex=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Tx=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},_x=(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&Ls(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Sx=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Cx=e=>{if(!e)return null;if(Br(e))return e;let t=e.length;if(!Ac(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},kx=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ls(Uint8Array)),Ox=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Fx=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Ax=vt("HTMLFormElement"),jx=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Nc=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),$x=vt("RegExp"),Pc=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Cn(r,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(n[i]=s||o)}),Object.defineProperties(e,n)},Nx=e=>{Pc(e,(t,r)=>{if(ct(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ct(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Px=(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return Br(e)?n(e):n(String(e).split(t)),r},Dx=()=>{},Lx=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ix(e){return!!(e&&ct(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Mx=e=>{const t=new Array(10),r=(n,o)=>{if(No(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=Br(n)?[]:{};return Cn(n,(s,a)=>{const l=r(s,o+1);!Sn(l)&&(i[a]=l)}),t[o]=void 0,i}}return n};return r(e,0)},Rx=vt("AsyncFunction"),Vx=e=>e&&(No(e)||ct(e))&&ct(e.then)&&ct(e.catch),Dc=((e,t)=>e?setImmediate:t?((r,n)=>(xr.addEventListener("message",({source:o,data:i})=>{o===xr&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),xr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ct(xr.postMessage)),Bx=typeof queueMicrotask<"u"?queueMicrotask.bind(xr):typeof process<"u"&&process.nextTick||Dc,$={isArray:Br,isArrayBuffer:Fc,isBuffer:ix,isFormData:mx,isArrayBufferView:sx,isString:ax,isNumber:Ac,isBoolean:lx,isObject:No,isPlainObject:Po,isReadableStream:gx,isRequest:yx,isResponse:bx,isHeaders:xx,isUndefined:Sn,isDate:ux,isFile:cx,isBlob:fx,isRegExp:$x,isFunction:ct,isStream:px,isURLSearchParams:hx,isTypedArray:kx,isFileList:dx,forEach:Cn,merge:Is,extend:wx,trim:vx,stripBOM:Ex,inherits:Tx,toFlatObject:_x,kindOf:jo,kindOfTest:vt,endsWith:Sx,toArray:Cx,forEachEntry:Ox,matchAll:Fx,isHTMLForm:Ax,hasOwnProperty:Nc,hasOwnProp:Nc,reduceDescriptors:Pc,freezeMethods:Nx,toObjectSet:Px,toCamelCase:jx,noop:Dx,toFiniteNumber:Lx,findKey:jc,global:xr,isContextDefined:$c,isSpecCompliantForm:Ix,toJSONObject:Mx,isAsyncFn:Rx,isThenable:Vx,setImmediate:Dc,asap:Bx};function ee(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}$.inherits(ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$.toJSONObject(this.config),code:this.code,status:this.status}}});const Lc=ee.prototype,Ic={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ic[e]={value:e}}),Object.defineProperties(ee,Ic),Object.defineProperty(Lc,"isAxiosError",{value:!0}),ee.from=(e,t,r,n,o,i)=>{const s=Object.create(Lc);return $.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ee.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Ux=null;function Ms(e){return $.isPlainObject(e)||$.isArray(e)}function Mc(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function Rc(e,t,r){return e?e.concat(t).map(function(o,i){return o=Mc(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function zx(e){return $.isArray(e)&&!e.some(Ms)}const qx=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function Do(e,t,r){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=$.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,x){return!$.isUndefined(x[y])});const n=r.metaTokens,o=r.visitor||c,i=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&$.isSpecCompliantForm(t);if(!$.isFunction(o))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if($.isDate(d))return d.toISOString();if(!l&&$.isBlob(d))throw new ee("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(d)||$.isTypedArray(d)?l&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function c(d,y,x){let b=d;if(d&&!x&&typeof d=="object"){if($.endsWith(y,"{}"))y=n?y:y.slice(0,-2),d=JSON.stringify(d);else if($.isArray(d)&&zx(d)||($.isFileList(d)||$.endsWith(y,"[]"))&&(b=$.toArray(d)))return y=Mc(y),b.forEach(function(v,E){!($.isUndefined(v)||v===null)&&t.append(s===!0?Rc([y],E,i):s===null?y:y+"[]",u(v))}),!1}return Ms(d)?!0:(t.append(Rc(x,y,i),u(d)),!1)}const f=[],h=Object.assign(qx,{defaultVisitor:c,convertValue:u,isVisitable:Ms});function m(d,y){if(!$.isUndefined(d)){if(f.indexOf(d)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(d),$.forEach(d,function(b,w){(!($.isUndefined(b)||b===null)&&o.call(t,b,$.isString(w)?w.trim():w,y,h))===!0&&m(b,y?y.concat(w):[w])}),f.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return m(e),t}function Vc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Rs(e,t){this._pairs=[],e&&Do(e,this,t)}const Bc=Rs.prototype;Bc.append=function(t,r){this._pairs.push([t,r])},Bc.toString=function(t){const r=t?function(n){return t.call(this,n,Vc)}:Vc;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Hx(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Uc(e,t,r){if(!t)return e;const n=r&&r.encode||Hx;$.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(t,r):i=$.isURLSearchParams(t)?t.toString():new Rs(t,r).toString(n),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class zc{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(n){n!==null&&t(n)})}}const qc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Wx={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Rs,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vs=typeof window<"u"&&typeof document<"u",Bs=typeof navigator=="object"&&navigator||void 0,Kx=Vs&&(!Bs||["ReactNative","NativeScript","NS"].indexOf(Bs.product)<0),Yx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Jx=Vs&&window.location.href||"http://localhost",He={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vs,hasStandardBrowserEnv:Kx,hasStandardBrowserWebWorkerEnv:Yx,navigator:Bs,origin:Jx},Symbol.toStringTag,{value:"Module"})),...Wx};function Gx(e,t){return Do(e,new He.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return He.isNode&&$.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Xx(e){return $.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Zx(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function Hc(e){function t(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=i>=r.length;return s=!s&&$.isArray(o)?o.length:s,l?($.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!$.isObject(o[s]))&&(o[s]=[]),t(r,n,o[s],i)&&$.isArray(o[s])&&(o[s]=Zx(o[s])),!a)}if($.isFormData(e)&&$.isFunction(e.entries)){const r={};return $.forEachEntry(e,(n,o)=>{t(Xx(n),o,r,0)}),r}return null}function Qx(e,t,r){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(e)}const kn={transitional:qc,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=$.isObject(t);if(i&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return o?JSON.stringify(Hc(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Gx(t,this.formSerializer).toString();if((a=$.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Do(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),Qx(t)):t}],transformResponse:[function(t){const r=this.transitional||kn.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?ee.from(a,ee.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch"],e=>{kn.headers[e]={}});const ev=$.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),tv=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
60
|
+
`).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||t[r]&&ev[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Wc=Symbol("internals");function On(e){return e&&String(e).trim().toLowerCase()}function Lo(e){return e===!1||e==null?e:$.isArray(e)?e.map(Lo):String(e)}function rv(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const nv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Us(e,t,r,n,o){if($.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!$.isString(t)){if($.isString(n))return t.indexOf(n)!==-1;if($.isRegExp(n))return n.test(t)}}function ov(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function iv(e,t){const r=$.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,i,s){return this[n].call(this,t,o,i,s)},configurable:!0})})}class ot{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function i(a,l,u){const c=On(l);if(!c)throw new Error("header name must be a non-empty string");const f=$.findKey(o,c);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||l]=Lo(a))}const s=(a,l)=>$.forEach(a,(u,c)=>i(u,c,l));if($.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if($.isString(t)&&(t=t.trim())&&!nv(t))s(tv(t),r);else if($.isHeaders(t))for(const[a,l]of t.entries())i(l,a,n);else t!=null&&i(r,t,n);return this}get(t,r){if(t=On(t),t){const n=$.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return rv(o);if($.isFunction(r))return r.call(this,o,n);if($.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=On(t),t){const n=$.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Us(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function i(s){if(s=On(s),s){const a=$.findKey(n,s);a&&(!r||Us(n,n[a],a,r))&&(delete n[a],o=!0)}}return $.isArray(t)?t.forEach(i):i(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!t||Us(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const r=this,n={};return $.forEach(this,(o,i)=>{const s=$.findKey(n,i);if(s){r[s]=Lo(o),delete r[i];return}const a=t?ov(i):String(i).trim();a!==i&&delete r[i],r[a]=Lo(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return $.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&$.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
61
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Wc]=this[Wc]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=On(s);n[a]||(iv(o,s),n[a]=!0)}return $.isArray(t)?t.forEach(i):i(t),this}}ot.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(ot.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),$.freezeMethods(ot);function zs(e,t){const r=this||kn,n=t||r,o=ot.from(n.headers);let i=n.data;return $.forEach(e,function(a){i=a.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Kc(e){return!!(e&&e.__CANCEL__)}function Ur(e,t,r){ee.call(this,e??"canceled",ee.ERR_CANCELED,t,r),this.name="CanceledError"}$.inherits(Ur,ee,{__CANCEL__:!0});function Yc(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ee("Request failed with status code "+r.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function sv(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function av(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[i];s||(s=u),r[o]=l,n[o]=u;let f=i,h=0;for(;f!==o;)h+=r[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const m=c&&u-c;return m?Math.round(h*1e3/m):void 0}}function lv(e,t){let r=0,n=1e3/t,o,i;const s=(u,c=Date.now())=>{r=c,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),f=c-r;f>=n?s(u,c):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-f)))},()=>o&&s(o)]}const Io=(e,t,r=3)=>{let n=0;const o=av(50,250);return lv(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,l=s-n,u=o(l),c=s<=a;n=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},Jc=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Gc=e=>(...t)=>$.asap(()=>e(...t)),uv=He.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,He.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,cv=He.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];$.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),$.isString(n)&&s.push("path="+n),$.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function fv(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function dv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xc(e,t,r){let n=!fv(t);return e&&(n||r==!1)?dv(e,t):t}const Zc=e=>e instanceof ot?{...e}:e;function vr(e,t){t=t||{};const r={};function n(u,c,f,h){return $.isPlainObject(u)&&$.isPlainObject(c)?$.merge.call({caseless:h},u,c):$.isPlainObject(c)?$.merge({},c):$.isArray(c)?c.slice():c}function o(u,c,f,h){if($.isUndefined(c)){if(!$.isUndefined(u))return n(void 0,u,f,h)}else return n(u,c,f,h)}function i(u,c){if(!$.isUndefined(c))return n(void 0,c)}function s(u,c){if($.isUndefined(c)){if(!$.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function a(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c,f)=>o(Zc(u),Zc(c),f,!0)};return $.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||o,h=f(e[c],t[c],c);$.isUndefined(h)&&f!==a||(r[c]=h)}),r}const Qc=e=>{const t=vr({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=ot.from(s),t.url=Uc(Xc(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if($.isFormData(r)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...c]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...c].join("; "))}}if(He.hasStandardBrowserEnv&&(n&&$.isFunction(n)&&(n=n(t)),n||n!==!1&&uv(t.url))){const u=o&&i&&cv.read(i);u&&s.set(o,u)}return t},pv=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=Qc(e);let i=o.data;const s=ot.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=o,c,f,h,m,d;function y(){m&&m(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function b(){if(!x)return;const v=ot.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:v,config:e,request:x};Yc(function(C){r(C),y()},function(C){n(C),y()},k),x=null}"onloadend"in x?x.onloadend=b:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(b)},x.onabort=function(){x&&(n(new ee("Request aborted",ee.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new ee("Network Error",ee.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||qc;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),n(new ee(E,k.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,x)),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&$.forEach(s.toJSON(),function(E,k){x.setRequestHeader(k,E)}),$.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),a&&a!=="json"&&(x.responseType=o.responseType),u&&([h,d]=Io(u,!0),x.addEventListener("progress",h)),l&&x.upload&&([f,m]=Io(l),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(c=v=>{x&&(n(!v||v.type?new Ur(null,e,x):v),x.abort(),x=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const w=sv(o.url);if(w&&He.protocols.indexOf(w)===-1){n(new ee("Unsupported protocol "+w+":",ee.ERR_BAD_REQUEST,e));return}x.send(i||null)})},mv=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const i=function(u){if(!o){o=!0,a();const c=u instanceof Error?u:this.reason;n.abort(c instanceof ee?c:new Ur(c instanceof Error?c.message:c))}};let s=t&&setTimeout(()=>{s=null,i(new ee(`timeout ${t} of ms exceeded`,ee.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>$.asap(a),l}},hv=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},gv=async function*(e,t){for await(const r of yv(e))yield*hv(r,t)},yv=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},ef=(e,t,r,n)=>{const o=gv(e,t);let i=0,s,a=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await o.next();if(u){a(),l.close();return}let f=c.byteLength;if(r){let h=i+=f;r(h)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},Mo=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",tf=Mo&&typeof ReadableStream=="function",bv=Mo&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),rf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},xv=tf&&rf(()=>{let e=!1;const t=new Request(He.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),nf=64*1024,qs=tf&&rf(()=>$.isReadableStream(new Response("").body)),Ro={stream:qs&&(e=>e.body)};Mo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ro[t]&&(Ro[t]=$.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new ee(`Response type '${t}' is not supported`,ee.ERR_NOT_SUPPORT,n)})})})(new Response);const vv=async e=>{if(e==null)return 0;if($.isBlob(e))return e.size;if($.isSpecCompliantForm(e))return(await new Request(He.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if($.isArrayBufferView(e)||$.isArrayBuffer(e))return e.byteLength;if($.isURLSearchParams(e)&&(e=e+""),$.isString(e))return(await bv(e)).byteLength},wv=async(e,t)=>{const r=$.toFiniteNumber(e.getContentLength());return r??vv(t)},Hs={http:Ux,xhr:pv,fetch:Mo&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:f="same-origin",fetchOptions:h}=Qc(e);u=u?(u+"").toLowerCase():"text";let m=mv([o,i&&i.toAbortSignal()],s),d;const y=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let x;try{if(l&&xv&&r!=="get"&&r!=="head"&&(x=await wv(c,n))!==0){let k=new Request(t,{method:"POST",body:n,duplex:"half"}),T;if($.isFormData(n)&&(T=k.headers.get("content-type"))&&c.setContentType(T),k.body){const[C,O]=Jc(x,Io(Gc(l)));n=ef(k.body,nf,C,O)}}$.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;d=new Request(t,{...h,signal:m,method:r.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:b?f:void 0});let w=await fetch(d);const v=qs&&(u==="stream"||u==="response");if(qs&&(a||v&&y)){const k={};["status","statusText","headers"].forEach(j=>{k[j]=w[j]});const T=$.toFiniteNumber(w.headers.get("content-length")),[C,O]=a&&Jc(T,Io(Gc(a),!0))||[];w=new Response(ef(w.body,nf,C,()=>{O&&O(),y&&y()}),k)}u=u||"text";let E=await Ro[$.findKey(Ro,u)||"text"](w,e);return!v&&y&&y(),await new Promise((k,T)=>{Yc(k,T,{data:E,headers:ot.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:d})})}catch(b){throw y&&y(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ee("Network Error",ee.ERR_NETWORK,e,d),{cause:b.cause||b}):ee.from(b,b&&b.code,e,d)}})};$.forEach(Hs,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const of=e=>`- ${e}`,Ev=e=>$.isFunction(e)||e===null||e===!1,sf={getAdapter:e=>{e=$.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){r=e[i];let s;if(n=r,!Ev(r)&&(n=Hs[(s=String(r)).toLowerCase()],n===void 0))throw new ee(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){const i=Object.entries(o).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
|
62
|
+
`+i.map(of).join(`
|
|
63
|
+
`):" "+of(i[0]):"as no adapter specified";throw new ee("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:Hs};function Ws(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ur(null,e)}function af(e){return Ws(e),e.headers=ot.from(e.headers),e.data=zs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),sf.getAdapter(e.adapter||kn.adapter)(e).then(function(n){return Ws(e),n.data=zs.call(e,e.transformResponse,n),n.headers=ot.from(n.headers),n},function(n){return Kc(n)||(Ws(e),n&&n.response&&(n.response.data=zs.call(e,e.transformResponse,n.response),n.response.headers=ot.from(n.response.headers))),Promise.reject(n)})}const lf="1.8.4",Vo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vo[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const uf={};Vo.transitional=function(t,r,n){function o(i,s){return"[Axios v"+lf+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(t===!1)throw new ee(o(s," has been removed"+(r?" in "+r:"")),ee.ERR_DEPRECATED);return r&&!uf[s]&&(uf[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,a):!0}},Vo.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Tv(e,t,r){if(typeof e!="object")throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const a=e[i],l=a===void 0||s(a,i,e);if(l!==!0)throw new ee("option "+i+" must be "+l,ee.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ee("Unknown option "+i,ee.ERR_BAD_OPTION)}}const Bo={assertOptions:Tv,validators:Vo},Nt=Bo.validators;class wr{constructor(t){this.defaults=t,this.interceptors={request:new zc,response:new zc}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
64
|
+
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=vr(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Bo.assertOptions(n,{silentJSONParsing:Nt.transitional(Nt.boolean),forcedJSONParsing:Nt.transitional(Nt.boolean),clarifyTimeoutError:Nt.transitional(Nt.boolean)},!1),o!=null&&($.isFunction(o)?r.paramsSerializer={serialize:o}:Bo.assertOptions(o,{encode:Nt.function,serialize:Nt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Bo.assertOptions(r,{baseUrl:Nt.spelling("baseURL"),withXsrfToken:Nt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&$.merge(i.common,i[r.method]);i&&$.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),r.headers=ot.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(l=l&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let c,f=0,h;if(!l){const d=[af.bind(this),void 0];for(d.unshift.apply(d,a),d.push.apply(d,u),h=d.length,c=Promise.resolve(r);f<h;)c=c.then(d[f++],d[f++]);return c}h=a.length;let m=r;for(f=0;f<h;){const d=a[f++],y=a[f++];try{m=d(m)}catch(x){y.call(this,x);break}}try{c=af.call(this,m)}catch(d){return Promise.reject(d)}for(f=0,h=u.length;f<h;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=vr(this.defaults,t);const r=Xc(t.baseURL,t.url,t.allowAbsoluteUrls);return Uc(r,t.params,t.paramsSerializer)}}$.forEach(["delete","get","head","options"],function(t){wr.prototype[t]=function(r,n){return this.request(vr(n||{},{method:t,url:r,data:(n||{}).data}))}}),$.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,a){return this.request(vr(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}wr.prototype[t]=r(),wr.prototype[t+"Form"]=r(!0)});class Ks{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,a){n.reason||(n.reason=new Ur(i,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Ks(function(o){t=o}),cancel:t}}}function _v(e){return function(r){return e.apply(null,r)}}function Sv(e){return $.isObject(e)&&e.isAxiosError===!0}const Ys={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ys).forEach(([e,t])=>{Ys[t]=e});function cf(e){const t=new wr(e),r=Oc(wr.prototype.request,t);return $.extend(r,wr.prototype,t,{allOwnKeys:!0}),$.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return cf(vr(e,o))},r}const Te=cf(kn);Te.Axios=wr,Te.CanceledError=Ur,Te.CancelToken=Ks,Te.isCancel=Kc,Te.VERSION=lf,Te.toFormData=Do,Te.AxiosError=ee,Te.Cancel=Te.CanceledError,Te.all=function(t){return Promise.all(t)},Te.spread=_v,Te.isAxiosError=Sv,Te.mergeConfig=vr,Te.AxiosHeaders=ot,Te.formToJSON=e=>Hc($.isHTMLForm(e)?new FormData(e):e),Te.getAdapter=sf.getAdapter,Te.HttpStatusCode=Ys,Te.default=Te;function Cv(e){if(!e)return!1;const t=/^data:image\/(jpeg|png|gif|bmp|webp);base64,/i,r=/\.(jpeg|jpg|png|gif|bmp|webp)$/i;return t.test(e)||r.test(e)}const kv=({imageUrl:e})=>{const[t,r]=p.useState(!1),n=()=>{r(!0)},o=()=>{r(!1)};return g.jsxs("div",{children:[g.jsx("img",{alt:"Thumbnail",style:{cursor:"pointer",width:"120px",height:"130px",objectFit:"cover"},onClick:n,src:e||"/place.png","data-toggle":"tooltip","data-placement":"top",title:"Click to view"}),t&&g.jsx("div",{className:"modal",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center"},onClick:o,children:g.jsxs("div",{className:"modal-content",style:{position:"relative",backgroundColor:"white",padding:"20px",borderRadius:"8px",width:"90vw"},onClick:i=>i.stopPropagation(),children:[g.jsx("span",{className:"close",onClick:o,style:{position:"absolute",top:"10px",right:"10px",fontSize:"24px",cursor:"pointer"},children:"×"}),g.jsx("img",{src:e||"/place.png",alt:"Full Image",style:{maxWidth:"90%",maxHeight:"90vh",objectFit:"contain"}})]})})]})};function Ov({element:e,validationData:t}){const{register:r=()=>({}),setValue:n,getValues:o}=t||{},[i,s]=p.useState(),[a,l]=p.useState(!1),[u,c]=p.useState(!1),[f,h]=p.useState(""),m=o&&o(e==null?void 0:e.id);p.useEffect(()=>{s(m)},[m]);const[d,y]=p.useState("");p.useEffect(()=>{r(e.id)},[e.id,r]);const{url:x,method:b,responseType:w}=e||{},v=p.useCallback(async E=>{var k,T,C,O,j,D,N,L,R,H,J;if(!(!x||!b)){l(!0);try{let z;if(b.toLowerCase()==="get"){const X=`${x}?value=${E}`;z=await Te.get(X)}else if(b.toLowerCase()==="post")z=await Te.post(x,{value:E});else throw new Error("Unsupported HTTP method");z.status===200&&((((T=(k=z==null?void 0:z.data)==null?void 0:k.data)==null?void 0:T.status)||((C=z==null?void 0:z.data)==null?void 0:C.status))===!0?(c(!0),w==="string"?h(((j=(O=z==null?void 0:z.data)==null?void 0:O.data)==null?void 0:j.description)||((D=z==null?void 0:z.data)==null?void 0:D.description)||"Validation successful"):y(((L=(N=z==null?void 0:z.data)==null?void 0:N.data)==null?void 0:L.description)||((R=z==null?void 0:z.data)==null?void 0:R.description)||{})):(console.error("Invalid input:",E),h("Unable to validate input"),c(!1)))}catch(z){console.error("Error validating input:",z),h(((J=(H=z==null?void 0:z.response)==null?void 0:H.data)==null?void 0:J.message)||"Unable to validate input"),c(!1)}finally{l(!1)}}},[b,w,x]);return p.useEffect(()=>{if(i){const E=setTimeout(()=>{v(i)},700);return()=>clearTimeout(E)}},[v,i]),g.jsxs("div",{children:[g.jsxs("div",{className:"relative flex items-center",children:[g.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:se("input-control",e==null?void 0:e.customClass),...r(e==null?void 0:e.id),onChange:E=>{s(E.target.value),n(e==null?void 0:e.id,E.target.value)}}),g.jsxs("span",{className:"absolute right-0",children:[a&&g.jsxs("span",{children:[" ",g.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[g.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})]}),u&&!a&&g.jsx("span",{className:"text-green-600 text-lg pr-3 block",children:g.jsx(Pe,{icon:"gg:check-o"})})]})]}),f&&w==="string"&&g.jsx("span",{className:`${u?"text-green-600":"text-red-600"} text-sm`,children:f}),w==="object"&&g.jsx("div",{className:"grid grid-cols-2 gap-6 text-sm text-gray-600 mt-2",children:Object.entries(d).map(([E,k])=>g.jsxs("div",{className:"flex items-center gap-x-2",children:[g.jsxs("span",{className:"font-semibold",children:[E,":"]}),Cv(k)?g.jsx(kv,{imageUrl:k}):g.jsx("span",{children:String(k)})]},E))})]})}function Fv({onGetTotal:e,readOnly:t,defaultValue:r,denominators:n}){const[o,i]=p.useState([...r]);function s(u,c){i(f=>{const h=[...f];return h[c]={...h[c],value:u},h})}function a(u,c){return parseFloat(u)*parseFloat(c)||0}const l=p.useMemo(()=>o.reduce((u,c)=>{const f=a(c.key,c.value);return u+f},0),[o]);return p.useEffect(()=>{e&&e(o)},[o]),p.useEffect(()=>{if(n!=null&&n.length){const u=n.map((c,f)=>({key:c.value,value:Array.isArray(r)&&r[f]?r[f].value:""}));i(u)}},[r,n]),g.jsx("div",{className:"mt-2",children:g.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden text-gray-700",children:[g.jsxs("div",{className:"grid grid-cols-3 text-sm font-bold border-b border-gray-100 bg-gray-50",children:[g.jsx("div",{className:"border-r px-4 py-2",children:g.jsx("span",{className:"",children:"Denomination"})}),g.jsx("div",{className:"border-r px-4 py-2",children:g.jsx("span",{children:"Quantity"})}),g.jsx("div",{className:"px-4 py-2",children:g.jsx("span",{children:"Sub total"})})]}),o.map((u,c)=>{var f,h;return g.jsxs("div",{className:"grid grid-cols-3 text-sm border-b border-gray-100",children:[g.jsx("div",{className:"border-r px-4 py-2 flex items-center",children:g.jsx("span",{className:"",children:(f=parseFloat(u.key))==null?void 0:f.toLocaleString()})}),g.jsx("div",{className:"border-r px-4 py-1",children:g.jsx("span",{children:g.jsx(go,{id:"input-example",className:"border border-gray-100 rounded w-full px-3 py-1 outline-none",decimalsLimit:6,defaultValue:u.value,onValueChange:m=>s(m,c),disabled:t,allowNegativeValue:!1})})}),g.jsx("div",{className:"px-4 py-2 flex justify-between items-center",children:g.jsx("span",{children:(h=a(u.key,u.value))==null?void 0:h.toLocaleString()})})]},u.key+c+Math.random())}),g.jsxs("div",{className:"grid grid-cols-3 text-sm font-bold bg-gray-50",children:[g.jsx("div",{className:"border-r px-4 py-3 col-span-2 text-right",children:"Total"}),g.jsx("div",{className:"px-4 py-3",children:l==null?void 0:l.toLocaleString()})]})]})})}function Av({element:e,validationData:t}){const{register:r=()=>({}),setValue:n,getValues:o}=t||{},i=o&&o(e==null?void 0:e.id)||[];return p.useEffect(()=>{r(e.id)},[e.id,r]),g.jsx("div",{children:g.jsx(Fv,{onGetTotal:s=>{n&&n(e.id,s)},denominators:(e==null?void 0:e.denominators)||[],defaultValue:i,readOnly:e==null?void 0:e.isReadOnly})})}function jv({element:e}){return g.jsx("div",{className:se("py-6",e==null?void 0:e.customClass)})}function $v({element:e}){return g.jsx("div",{children:g.jsx("hr",{className:se("border-gray-200 my-4",e==null?void 0:e.customClass)})})}function Nv({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("div",{children:g.jsx("input",{placeholder:"Enter text",type:"text",className:"input-control",...r(e==null?void 0:e.id)})})}function Pv({element:e,state:t}){return g.jsx(g.Fragment,{children:g.jsx("div",{className:e==null?void 0:e.customClass,children:(e==null?void 0:e.value)||t==="edit"&&g.jsx("span",{className:"text-gray-400",children:"Provide text"})})})}const ff={textField:pl,longText:z0,selectField:U0,multiSelect:x0,numberField:pl,amountField:nx,date:Nm,password:C0,checkbox:B0,radio:R0,email:v0,file:S0,section:V0,validateInput:Ov,tableInput:Av,spacer:jv,divider:$v,header:Nv,basicText:Pv},df="edit",pf=(e,t)=>{const r=ff[e.type];return r?g.jsx(Ds,{element:e,state:df,children:g.jsxs("div",{className:"relative w-full",children:[e.type.toLowerCase()!=="grid"&&g.jsx("div",{className:"absolute top-0 left-0 h-full w-full z-20"}),g.jsx(r,{element:e,state:df,sectionId:t})]})}):null},Js=({col:e,children:t,customClass:r})=>g.jsx("div",{className:se("w-full p-2 bg-white",r),style:{gridColumn:e},children:t}),Dv=({element:e,sectionId:t,children:r,customClass:n,state:o})=>{const{formData:i,addElement:s,setIsDragging:a}=p.useContext(ft),l=p.useMemo(()=>Array.from({length:e.columns}),[e.columns]),u=p.useCallback(h=>{h.preventDefault(),h.stopPropagation(),h.dataTransfer.dropEffect="move"},[]),c=p.useCallback((h,m)=>{var d,y;h.preventDefault(),a(!1);try{const x=h.dataTransfer.getData("properties");if(!x)return;const b=JSON.parse(x);if((b==null?void 0:b.type)==="grid")return;const w=m+1;if((y=(d=i.find(k=>k.id===t))==null?void 0:d.questionData)==null?void 0:y.some(k=>{var T;return k.gridId===e.id&&((T=k.gridPosition)==null?void 0:T.col)===w}))return;const E={...b,id:Qe(),sectionId:t,gridId:e.id,gridPosition:{col:w}};s(E,t)}catch(x){console.error("Drop failed in grid:",x),a(!1)}},[s,e.id,i,t,a]),f=(h,m,d)=>{const y=Array.isArray(r)&&r.find(x=>{var b;return((b=x==null?void 0:x.props)==null?void 0:b.col)===h+1});return g.jsx("div",{children:g.jsx("div",{id:h.toString(),onDrop:x=>c(x,h),onDragOver:u,className:se("border rounded-lg min-h-[110px] bg-white p-2","flex items-center justify-center text-gray-400 transition-colors",m),children:y||g.jsx("span",{children:d==="edit"&&g.jsx(Pe,{icon:"ph:plus-bold"})})})},h)};return g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"grid gap-6 w-full",style:{gridTemplateColumns:`repeat(${e.columns}, 1fr)`},children:l.map((h,m)=>f(m,n,o))})})},Gs=p.memo(Dv),Lv="edit";function Iv({elementData:e,sectionId:t}){const{formData:r,updateElementPosition:n,isDragging:o,setIsDragging:i,addElementInPosition:s}=p.useContext(ft),[a,l]=p.useState(null),[u,c]=p.useState(null),f=p.useMemo(()=>{var v;return((v=r.find(E=>E.id===t))==null?void 0:v.questionData)||[]},[r,t]),h=p.useCallback((v,E)=>{v.dataTransfer.setData("properties",E),l(E)},[]),m=p.useCallback((v,E)=>{v.preventDefault(),v.stopPropagation(),c(E)},[]),d=p.useCallback(v=>{v.preventDefault(),v.stopPropagation();const E=v.dataTransfer.getData("properties"),k=v.currentTarget.id;if(!k||E===k)return;const T=f.findIndex(D=>D.id===E),C=f.findIndex(D=>D.id===k);if(T===-1||C===-1)return;const O=[...f],[j]=O.splice(T,1);O.splice(C,0,j),n(O,t),l(null)},[f,t,n]),y=p.useCallback((v,E)=>{v.preventDefault(),i(!1);try{const T={...JSON.parse(v.dataTransfer.getData("properties")),id:Qe(),sectionId:t};s(T,t,E)}catch(k){console.error("Drop error:",k)}},[s,t,i]),x=p.useCallback(v=>g.jsx("div",{className:"hover:bg-blue-300 transition rounded",onDragOver:E=>E.preventDefault(),onDrop:E=>y(E,v),onDragEnd:()=>i(!1),children:g.jsx("div",{className:"bg-blue-50 rounded p-6 h-[60px] border-2 border-blue-300 border-dashed flex items-center justify-center text-gray-400 opacity-70",children:g.jsx(Pe,{icon:"octicon:plus-16"})})},`drop-${v}`),[y,i]),b=p.useCallback(v=>g.jsx("div",{id:v.id,className:se("cursor-move border p-4 w-full rounded-lg transition-colors bg-white",{"bg-gray-100":a===v.id,"border-dashed border-blue-300":a&&a!==v.id}),draggable:!0,onDragStart:E=>h(E,v.id),onDragOver:E=>m(E,v.id),onDrop:d,onDragEnd:()=>l(null),children:pf(v,t)},v.id),[a,d,m,t,h]),w=p.useMemo(()=>(e==null?void 0:e.reduce((v,E)=>(E.gridId&&(v[E.gridId]=v[E.gridId]||[],v[E.gridId].push(E)),v),{}))||{},[e]);return e!=null&&e.length?g.jsx("div",{className:"w-full h-full grid grid-cols-1 gap-4 relative",children:e.map((v,E)=>{if(v.type==="grid"){const k=w[v.id]||[];return g.jsx("div",{draggable:!0,onDragStart:T=>h(T,v.id),onDragOver:T=>m(T,v.id),onDrop:d,onDragEnd:()=>l(null),className:"cursor-move border p-4 w-full rounded-lg transition-colors bg-white",children:g.jsx(Ds,{element:v,state:"edit",children:g.jsx(Gs,{element:v,sectionId:t,state:Lv,children:k.map(T=>{var C;return g.jsx(Js,{col:(C=T.gridPosition)==null?void 0:C.col,children:pf(T,t)},T.id)})})})},v.id)}return v.gridId?null:g.jsxs("div",{className:se("group relative grid gap-y-[6px]",v.elementClass),children:[o&&u===v.id&&x(E),g.jsx("div",{className:"group",children:b(v)}),o&&u===v.id&&x(E+1)]},v.id)})}):g.jsx("div",{className:"w-full h-full flex items-center justify-center text-gray-400 min-h-[250px] p-10 col-span-2",children:"Drag or click an element to display"})}const Mv=p.memo(Iv),Rv=_n({title:de(),description:de()}).required(),Xs=sr("config"),Vv=({isOpen:e,onClose:t,section:r})=>{const{updateSection:n}=p.useContext(ft),{register:o,handleSubmit:i,formState:{errors:s,isSubmitting:a,isValid:l},reset:u}=Ss({resolver:Cs(Rv),defaultValues:r});if(p.useEffect(()=>{e||u()},[e,u]),!e)return null;const c=f=>{n(f,r.id),t()};return g.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:g.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[g.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[g.jsx("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:"Update Section Information"}),g.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:g.jsx(Pe,{icon:"tabler:x"})})]}),g.jsxs("form",{onSubmit:i(c),className:"w-full",children:[g.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[g.jsx(ge,{label:"Title",name:"title",register:o,errors:s}),g.jsx(ge,{label:"Description",name:"description",register:o,errors:s})]}),g.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[g.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),g.jsx("button",{type:"submit",disabled:!l||a,style:{background:(Xs==null?void 0:Xs.buttonColor)||"#333"},className:`flex-1 px-4 py-2.5 ${!l||a?"bg-[#F2F4F7]":"bg-[#2563EB]"} ${!l||a?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:a?"Saving...":"Save"})]})]})]})})},Bv=()=>{const[e,t]=p.useState(!1),r=p.useRef(null),n=p.useRef(null),{removeSection:o,formData:i,setIsDragging:s,setSelectedSection:a,selectedSection:l,activeSections:u,setActiveSections:c}=p.useContext(ft);p.useEffect(()=>{var d;a(((d=i[0])==null?void 0:d.id)||null)},[]);const f=p.useCallback(d=>{d.preventDefault(),d.dataTransfer.dropEffect="move",n.current&&(n.current.scrollTop=n.current.scrollHeight)},[]);function h(d){u.includes(d)?c(y=>y.filter(x=>x!==d)):c(y=>[...y,d])}function m(d){r.current=d,t(!0)}return g.jsxs("div",{ref:n,className:"flex gap-x-4 mx-auto h-full relative px-6 pb-5 flex-col no-scrollbar overflow-y-auto max-h-[86vh]",children:[e&&g.jsx(Vv,{isOpen:e,onClose:()=>t(!1),section:r.current}),g.jsx("div",{className:"relative w-full flex flex-col gap-y-6 flex-1 py-4",children:i.map((d,y)=>g.jsxs("div",{className:"group cursor-pointer rounded",children:[g.jsxs("div",{className:`border border-gray-100 rounded pb-6 px-4 shadow-[rgba(149,157,165,0.2)_0px_2px_4px] transition-colors duration-200
|
|
65
|
+
${l===d.id?"border-dashed border-blue-400 bg-[#f7f8fa]":"border-transparent"} ${u.includes(y)?"min-h-[300px]":""}`,children:[g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("div",{onClick:()=>a(d.id),className:"h-full flex-1 cursor-pointer py-4",children:g.jsx("h2",{className:"font-medium",children:d.title||"Section title"})}),g.jsxs("div",{className:"flex gap-x-2 items-center",children:[g.jsx("button",{type:"button",className:"p-1 border rounded-lg text-xs",onClick:()=>m(d),children:g.jsx(Pe,{icon:"fluent:edit-28-regular"})}),i.length>1&&g.jsx("button",{type:"button",className:"p-1 border rounded-lg text-xs",onClick:()=>o(d.id),children:g.jsx(Pe,{icon:"lets-icons:trash-duotone-line"})}),g.jsx("button",{type:"button",className:"p-1 rounded-lg text-xs",onClick:()=>h(y),children:g.jsx(Pe,{icon:u.includes(y)?"gravity-ui:minus":"octicon:plus-16"})})]})]}),(d==null?void 0:d.description)&&u.includes(y)&&g.jsx("p",{className:"text-sm text-gray-60 mt-2 text-gray-600",children:d==null?void 0:d.description}),u.includes(y)&&g.jsxs("div",{className:"mt-4 transition-all duration-200 h-full",id:d.id,onDragOver:f,onDragEnd:()=>s(!1),onClick:()=>a(d.id),children:[g.jsx("hr",{}),g.jsx("div",{className:"gap-y-6 mt-4 h-full",children:g.jsx(Mv,{elementData:d.questionData,sectionId:d.id})})]})]}),g.jsx("hr",{className:"mt-6 group-last:hidden"})]},d.id))})]})};function Uv({questionData:e}){const{setFormData:t}=p.useContext(ft);return p.useEffect(()=>{e&&e.length>0&&t(e)},[e,t]),g.jsx("div",{className:"bg-white p-4 border border-[#E4E7EC] rounded-lg h-full overflow-y-auto",children:g.jsx(Bv,{})})}const zv=()=>{const{setIsDragging:e,addElement:t,selectedSection:r}=p.useContext(ft),n=p.useCallback((u,c)=>{u.dataTransfer.setData("properties",JSON.stringify(c)),u.dataTransfer.effectAllowed="move",e(!0)},[e]);function o(u){if(console.log(r),!r){ce.error("Please select a section to add an element to.");return}const c={...u,id:Qe(),sectionId:r};t(c,r)}const i=sr("config"),s=i==null?void 0:i.elementColor,a=i==null?void 0:i.elementBgColor,l=i==null?void 0:i.elementBorderColor;return g.jsx("div",{className:"w-full",children:g.jsx("div",{className:"py-4 px-5 max-h-[80vh] overflow-y-auto",children:g.jsx("div",{children:g.jsx("ul",{className:"grid gap-y-[8px] mt-3",children:qb.map(u=>g.jsxs("li",{onDragStart:c=>n(c,u),onDragEnd:()=>e(!1),onClick:()=>o(u),style:{borderColor:l,color:u.color,backgroundColor:a},className:`cursor-move text-[#475467] flex justify-between items-center h-11\r
|
|
66
66
|
border border-[#98A2B3] rounded-lg py-3 px-[14px] shadow-custom\r
|
|
67
67
|
hover:shadow-lg transition-all duration-200\r
|
|
68
|
-
active:opacity-50`,draggable:!0,children:[g.jsxs("span",{className:"flex gap-x-2 items-center",children:[g.jsx("span",{className:"text-gray-400",children:g.jsx(
|
|
68
|
+
active:opacity-50`,draggable:!0,children:[g.jsxs("span",{className:"flex gap-x-2 items-center",children:[g.jsx("span",{style:{color:s},className:"text-gray-400",children:g.jsx(Pe,{icon:"akar-icons:drag-vertical"})}),g.jsx("span",{style:{color:s},className:"text-sm font-medium leading-[0]",children:u.label})]}),g.jsx("span",{style:{color:s},children:g.jsx(Pe,{icon:u.icon,iconClass:"w-4 h-4"})})]},u.type))})})})})},qv=p.memo(zv),Hv=({isOpen:e,onClose:t})=>{const{formData:r}=p.useContext(ft);if(!e)return null;const n=sr("config");return g.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:g.jsxs("div",{className:"max-w-[80vw] bg-white rounded-xl shadow-xl relative flex flex-col items-center w-full py-6 ",children:[g.jsx("button",{type:"button",onClick:t,className:"absolute top-3 right-4 text-sm",children:"Close"}),g.jsx("div",{className:"max-h-[90vh] overflow-y-auto h-full min-h-[600px] w-full",children:g.jsx(hf,{form_data:r,ignoreValidation:!0,config:n})})]})})};function Wv({title:e,backUrl:t}){const{addSection:r}=p.useContext(ft),[n,o]=p.useState(!1);function i(){window.location.href=t}return g.jsxs("div",{className:"px-[30px] py-[10px] flex justify-between items-center bg-[#F9F9FB]",children:[g.jsxs("span",{className:"flex items-center gap-x-[6px]",children:[" ",t&&g.jsx("button",{type:"button",onClick:()=>i,children:g.jsx(Pe,{icon:"mingcute:arrow-left-fill"})})," ",g.jsx("h1",{className:"font-semibold text-lg",children:e||""})]}),n&&g.jsx(Hv,{isOpen:n,onClose:()=>o(!1),element:void 0}),g.jsxs("div",{className:"py-4 flex justify-end gap-x-6 text-base",children:[g.jsx(Fr,{onClick:()=>r(),text:"Add section",btnClass:"text-gray-700 border-[#98A2B3] !font-medium bg-transparent",icon:"icon-park-outline:plus"}),g.jsx(Fr,{onClick:()=>o(!0),text:"Preview",btnClass:"text-gray-700 border-[#98A2B3] !font-medium",icon:"solar:eye-bold-duotone"})]})]})}const mf=({loadingClass:e})=>{const t=se("h-screen w-screen flex justify-center items-center",e);return p.useEffect(()=>{const r=sr("config"),n=(r==null?void 0:r.loaderColor)||"#333";document.documentElement.style.setProperty("--loader-color",n)},[]),g.jsx("div",{className:t,children:g.jsx("span",{className:"loader"})})};function Kv({onSubmit:e,questionData:t,title:r,backUrl:n,loading:o}){return g.jsx(fl,{children:g.jsxs("div",{className:"w-full h-full bg-[#E4E7EC] flex flex-col",children:[g.jsx(id,{}),g.jsx("div",{className:"border-b bg-white border-[#E4E7EC]",children:g.jsx(Wv,{title:r,backUrl:n})}),g.jsxs("div",{className:"flex flex-1 ",children:[g.jsx("div",{className:"w-[270px] h-full border-l border-[#E4E7EC] bg-white",children:g.jsx(qv,{})}),g.jsx("div",{className:"flex-1 h-full max-h-full p-4 z-[1]",children:o?g.jsx(mf,{loadingClass:"!w-full !h-[800px]"}):g.jsx(Uv,{questionData:t})})]}),g.jsx("div",{className:"border-b bg-white border-t border-[#E4E7EC]",children:g.jsx($m,{onSubmit:e})})]})})}const Yv=({onSubmit:e,questionData:t,isReadOnly:r,config:n={buttonColor:"#333"},title:o,loading:i,backUrl:s})=>(p.useEffect(()=>{n&&dl("config",n)},[n]),g.jsx(Kv,{onSubmit:e,questionData:t,isReadOnly:r,title:o,backUrl:s,loading:i})),Er={required:"This field is required",email:"Invalid email format",minLength:e=>`Minimum length is ${e}`,maxLength:e=>`Maximum length is ${e}`,minAmount:e=>`Minimum amount is ${e}`,maxAmount:e=>`Maximum amount is ${e}`},Jv=e=>({textField:de().nullable(),longText:de().nullable(),numberField:Vr().nullable().transform(r=>isNaN(r)?null:r),amountField:Vr().nullable().transform(r=>isNaN(r)?null:r),selectField:de().nullable(),checkbox:Rr().nullable(),radio:Rr().nullable(),email:de().nullable().email(Er.email),date:Ns().typeError("Invalid date").nullable()})[e]||Rr().nullable(),Gv=(e,t,r)=>t?e.type==="boolean"?e.oneOf([!0],r||Er.required):e.required(r||Er.required):e,Xv=(e,{minLength:t,maxLength:r,minLengthMessage:n,maxLengthMessage:o})=>{let i=e;return t&&(i=i.min(t,n||Er.minLength(t))),r&&(i=i.max(r,o||Er.maxLength(r))),i},Zv=(e,{minAmount:t,maxAmount:r,minAmountMessage:n,maxAmountMessage:o})=>{let i=e;return t&&(i=i.min(parseFloat(String(t)),n||Er.minAmount(t))),r&&(i=i.max(parseFloat(String(r)),o||Er.maxAmount(r))),i};function Qv(e){const t={};return e.forEach(({questionData:r})=>{r.forEach(n=>{const{id:o,type:i,isRequired:s,requiredMessage:a}=n;let l=Jv(i);l=Gv(l,s,a),i==="textField"||i==="longText"||i==="email"?l=Xv(l,n):(i==="numberField"||i==="amountField")&&(l=Zv(l,n)),t[o]=l})}),_n().shape(t)}function ew(e){return e.reduce((t,r)=>(t[r.id]=r.value,t),{})}const Uo=(e,t)=>{const r=ff[e.type];return r?g.jsxs("div",{children:[e.inputLabel&&g.jsx("label",{className:"block text-sm font-medium mb-[5px]",children:e.inputLabel}),g.jsx(r,{element:e,state:"edit",validationData:t})]}):null};function tw({form_data:e,options:t}){return g.jsx("div",{className:"grid gap-y-6",children:e.flatMap(r=>{var n;return(n=r.questionData)==null?void 0:n.map(o=>{var i,s;if(o.type==="grid"){const a=r.questionData.filter(l=>l.gridId===o.id);return g.jsx(Gs,{element:o,customClass:"p-0 min-h-[60px] border-none",children:a.map(l=>{var u;return g.jsx(Js,{col:(u=l.gridPosition)==null?void 0:u.col,customClass:"p-0",children:Uo(l,t)},l.id)})},o.id)}return o.gridId?null:g.jsxs("div",{className:se("group relative grid gap-y-[6px]",o.elementClass),children:[Uo(o,t),g.jsx("div",{className:"text-xs text-red-600 mt-1",children:(s=(i=t==null?void 0:t.errors)==null?void 0:i[o.id])==null?void 0:s.message})]},o.id)})})})}function rw({form_data:e,options:t,current:r}){var n;return g.jsx("div",{className:"grid gap-y-6",children:(n=e[r].questionData)==null?void 0:n.map(o=>{var i,s;if(o.type==="grid"){const a=e[r].questionData.filter(l=>l.gridId===o.id);return g.jsx(Gs,{element:o,customClass:"p-0 min-h-[60px] border-none",children:a.map(l=>{var u;return g.jsx(Js,{col:(u=l.gridPosition)==null?void 0:u.col,customClass:"p-0",children:Uo(l,t)},l.id)})},o.id)}return o.gridId?null:g.jsxs("div",{className:se("group relative grid gap-y-[6px]",o.elementClass),children:[Uo(o,t),g.jsx("div",{className:"text-xs text-red-600 mt-1",children:(s=(i=t==null?void 0:t.errors)==null?void 0:i[o.id])==null?void 0:s.message})]},o.id)})})}const nw=({form_data:e,answerData:t,ignoreValidation:r,onSubmitData:n,isReadOnly:o,renderType:i="multi"})=>{const[s,a]=p.useState(0),l=p.useMemo(()=>e.length,[e]),u=Qv(e),c=Ss({resolver:Cs(u),mode:"onSubmit",defaultValues:{}}),{register:f,setValue:h,watch:m,handleSubmit:d,reset:y,getValues:x,formState:{errors:b,isSubmitting:w},trigger:v}=c,E=sr("config"),k=O=>{const j=e.flatMap(D=>D.questionData.map(N=>({id:N.id,value:O[N.id],sectionId:D.id,type:N.type})));n==null||n(j)};p.useEffect(()=>{if(t!=null&&t.length){const O=ew(t);y(O)}},[t,y]);async function T(){var O;!r&&!await v((O=e==null?void 0:e[s].questionData)==null?void 0:O.map(D=>D.id))||a(j=>j+1)}function C(){a(O=>O-1)}return g.jsx(fl,{children:g.jsx(J0,{...c,children:g.jsxs("form",{onSubmit:d(k),className:"container mx-auto p-6 h-full",children:[g.jsx("div",{className:"relative w-full flex flex-col gap-y-12 py-4",children:g.jsxs("div",{children:[g.jsxs("div",{className:"mb-4",children:[(e==null?void 0:e[s].title)&&g.jsx("h2",{className:"text-lg font-semibold mb-[6px]",children:e[s].title}),(e==null?void 0:e[s].description)&&g.jsx("p",{className:"text-sm",children:e[s].description})]}),i==="multi"?g.jsx(rw,{form_data:e,options:{register:f,setValue:h,watch:m,errors:b,trigger:v,isSubmitting:w,isReadOnly:o,getValues:x},current:s}):g.jsx(tw,{form_data:e,options:{register:f,setValue:h,watch:m,errors:b,trigger:v,isSubmitting:w,isReadOnly:o,getValues:x}})]},e==null?void 0:e[s].id)}),g.jsxs("div",{className:"pt-8 flex justify-end items-center gap-4",children:[s!==0&&g.jsx(Fr,{type:"button",text:"Back",onClick:C,btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-gray-200 rounded-lg"}),s!==l-1?g.jsx(Fr,{type:"button",text:"Continue",onClick:T,style:{background:(E==null?void 0:E.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"}):!r&&g.jsx(Fr,{isDisabled:w,isLoading:w,type:"submit",text:"Submit",style:{background:(E==null?void 0:E.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})]})]})})})};function hf({answerData:e,form_data:t,ignoreValidation:r,onSubmit:n,isReadOnly:o=!1,loading:i=!1,config:s={buttonColor:"#333"},renderType:a}){return p.useEffect(()=>{s&&dl("config",s)},[s]),i?g.jsx(mf,{}):t?g.jsx("div",{className:"w-full h-full",children:g.jsx(nw,{form_data:t,answerData:e,ignoreValidation:r,onSubmitData:n,isReadOnly:o,renderType:a})}):g.jsx("div",{children:g.jsx("p",{children:"Error: No form data available. Please ensure the form data is saved correctly."})})}Pt.FormBuilder=Yv,Pt.FormViewer=hf,Object.defineProperty(Pt,Symbol.toStringTag,{value:"Module"})});
|