@dipusevilla/componentes-iu 1.0.28 → 1.0.29
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/dist/index.cjs.js +9 -9
- package/dist/index.es.js +1304 -1302
- package/dist/index.umd.js +9 -9
- package/dist/types/components/SearchField.d.ts +1 -1
- package/package.json +3 -2
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(te,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],v):(te=typeof globalThis<"u"?globalThis:te||self,v(te.DesignSystem={},te.React,te.ReactDOM))})(this,function(te,v,gr){"use strict";var br=document.createElement("style");br.textContent=`/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-500:oklch(63.7% .237 25.331);--color-red-800:oklch(44.4% .177 26.899);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-800:oklch(47.6% .114 61.907);--color-green-100:oklch(96.2% .044 156.743);--color-green-500:oklch(72.3% .219 149.579);--color-green-800:oklch(44.8% .119 151.328);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-700:oklch(37.3% .034 259.733);--color-white:#fff;--spacing:.25rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-sm:.25rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-primary:"IBM Plex Sans",sans-serif;--font-size-sm:100px;--font-size-md:16px;--font-size-lg:18px;--color-ds-background-page:#fff;--color-ds-background-surface:#e0e8e7;--color-ds-background-accent:#0a4642;--color-ds-background-disabled:#6c7778;--color-ds-text-primary:#1a1a1a;--color-ds-text-secondary:#5f5f5f;--color-ds-text-error:#c62828;--color-ds-text-on-accent:#fff;--color-ds-text-disabled:#fff;--color-ds-border-default:#267358;--color-ds-border-error:#c62828;--color-ds-border-muted:#70908e;--color-ds-button-primary-bg:#0a4642;--color-ds-button-primary-text:#fff;--color-ds-button-hover-bg:#244d3a;--color-ds-border-default-50:#26735880}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-ds-border-default-50:color-mix(in srgb,var(--color-ds-border-default)50%,transparent 50%)}}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--font-size-sm:12px;--font-size-md:15px;--font-size-lg:17px;--scrollbar-track:var(--color-ds-background-surface);--scrollbar-thumb:var(--color-ds-button-primary-bg);--scrollbar-thumb-hover:var(--color-ds-button-hover-bg);--scrollbar-size:8px;--scrollbar-radius:4px}html{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb)var(--scrollbar-track)}html::-webkit-scrollbar{width:var(--scrollbar-size);height:var(--scrollbar-size)}html::-webkit-scrollbar-track{background:var(--scrollbar-track)}html::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-radius);border:2px solid var(--scrollbar-track)}html::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover)}.custom-scroll{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb)var(--scrollbar-track)}.custom-scroll::-webkit-scrollbar{width:var(--scrollbar-size);height:var(--scrollbar-size)}.custom-scroll::-webkit-scrollbar-track{background:var(--scrollbar-track)}.custom-scroll::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-radius);border:2px solid var(--scrollbar-track)}.custom-scroll::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover)}:scope:where(.dark,.dark *){--color-ds-background-page:#0a4642;--color-ds-background-surface:#265c59;--color-ds-background-accent:#fff;--color-ds-background-disabled:#6c7778;--color-ds-text-primary:#fff;--color-ds-text-secondary:#ccc;--color-ds-text-error:#ff7575;--color-ds-text-on-accent:#1a1a1a;--color-ds-text-disabled:#fff;--color-ds-border-default:#fff;--color-ds-border-default-50:#26735880;--color-ds-border-error:red;--color-ds-border-muted:#70908e}@supports (color:color-mix(in lab,red,red)){:scope:where(.dark,.dark *){--color-ds-border-default-50:color-mix(in srgb,var(--color-ds-border-default)50%,transparent 50%)}}:scope:where(.dark,.dark *){--color-ds-button-primary-bg:#fff;--color-ds-button-primary-text:#1a1a1a;--color-ds-button-hover-bg:#6ee7b7;--color-ds-logo-dipusevilla:#fff}:scope:where(.dark,.dark *) ::-webkit-calendar-picker-indicator{filter:invert()}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-14{top:calc(var(--spacing)*14)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.isolate{isolation:isolate}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.float-left{float:left}.float-right{float:right}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-mx-2{margin-inline:calc(var(--spacing)*-2)}.my-1{margin-block:calc(var(--spacing)*1)}.mt-0{margin-top:calc(var(--spacing)*0)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-8{margin-top:calc(var(--spacing)*8)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-6{margin-left:calc(var(--spacing)*6)}.box-border{box-sizing:border-box}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.size-1{width:calc(var(--spacing)*1);height:calc(var(--spacing)*1)}.h-0\\.5{height:calc(var(--spacing)*.5)}.h-1{height:calc(var(--spacing)*1)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-20{height:calc(var(--spacing)*20)}.h-full{height:100%}.h-screen{height:100vh}.max-h-0{max-height:calc(var(--spacing)*0)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-screen{max-height:100vh}.min-h-\\[18px\\]{min-height:18px}.w-1{width:calc(var(--spacing)*1)}.w-1\\/2{width:50%}.w-1\\/3{width:33.3333%}.w-1\\/4{width:25%}.w-1\\/5{width:20%}.w-1\\/6{width:16.6667%}.w-1\\/12{width:8.33333%}.w-2\\/5{width:40%}.w-3\\/4{width:75%}.w-3\\/6{width:50%}.w-4{width:calc(var(--spacing)*4)}.w-4\\/6{width:66.6667%}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-6\\/12{width:50%}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-64{width:calc(var(--spacing)*64)}.w-80{width:calc(var(--spacing)*80)}.w-100{width:calc(var(--spacing)*100)}.w-\\[250px\\]{width:250px}.w-auto{width:auto}.w-full{width:100%}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.min-w-\\[160px\\]{min-width:160px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.translate-x-1{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing)*6);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-9{--tw-translate-x:calc(var(--spacing)*9);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.transform\\!{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)!important}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-6>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*6)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-gray-200>:not(:last-child)){border-color:var(--color-gray-200)}.self-center{align-self:center}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-full{border-top-left-radius:3.40282e38px;border-top-right-radius:3.40282e38px}.\\!rounded-l-none{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-tr-\\[20px\\]{border-top-right-radius:20px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-1{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[var\\(--color-ds-background-accent\\)\\]{border-color:var(--color-ds-background-accent)}.border-\\[var\\(--color-ds-border-default\\)\\]{border-color:var(--color-ds-border-default)}.border-\\[var\\(--color-ds-border-default-50\\)\\]{border-color:var(--color-ds-border-default-50)}.border-\\[var\\(--color-ds-border-error\\)\\]{border-color:var(--color-ds-border-error)}.border-\\[var\\(--color-ds-border-muted\\)\\]{border-color:var(--color-ds-border-muted)}.border-blue-500{border-color:var(--color-blue-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-500{border-color:var(--color-green-500)}.border-red-500{border-color:var(--color-red-500)}.border-yellow-500{border-color:var(--color-yellow-500)}.border-t-\\[var\\(--color-ds-button-primary-bg\\)\\]{border-top-color:var(--color-ds-button-primary-bg)}.bg-\\[var\\(--color-ds-background-accent\\)\\]{background-color:var(--color-ds-background-accent)}.bg-\\[var\\(--color-ds-background-disabled\\)\\]{background-color:var(--color-ds-background-disabled)}.bg-\\[var\\(--color-ds-background-page\\)\\]{background-color:var(--color-ds-background-page)}.bg-\\[var\\(--color-ds-background-surface\\)\\]{background-color:var(--color-ds-background-surface)}.bg-\\[var\\(--color-ds-background-surface\\)\\]\\/90{background-color:#e0e8e7e6}@supports (color:color-mix(in lab,red,red)){.bg-\\[var\\(--color-ds-background-surface\\)\\]\\/90{background-color:color-mix(in oklab,var(--color-ds-background-surface)90%,transparent)}}.bg-\\[var\\(--color-ds-border-muted\\)\\]{background-color:var(--color-ds-border-muted)}.bg-\\[var\\(--color-ds-button-primary-bg\\)\\]{background-color:var(--color-ds-button-primary-bg)}.bg-\\[var\\(--color-ds-text-primary\\)\\]\\/50{background-color:#1a1a1a80}@supports (color:color-mix(in lab,red,red)){.bg-\\[var\\(--color-ds-text-primary\\)\\]\\/50{background-color:color-mix(in oklab,var(--color-ds-text-primary)50%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-ds-button-primary-bg{background-color:var(--color-ds-button-primary-bg)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-100{background-color:var(--color-yellow-100)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.p-10{padding:calc(var(--spacing)*10)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-10{padding-inline:calc(var(--spacing)*10)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-\\[5px\\]{padding-top:5px}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-9{padding-right:calc(var(--spacing)*9)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-\\[10px\\]{padding-bottom:10px}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-2\\.5{padding-left:calc(var(--spacing)*2.5)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-left{text-align:left}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-\\[var\\(--font-primary\\)\\]{--tw-font-weight:var(--font-primary);font-weight:var(--font-primary)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-wrap{text-wrap:wrap}.whitespace-nowrap{white-space:nowrap}.text-\\[var\\(--color-ds-background-accent\\)\\]{color:var(--color-ds-background-accent)}.text-\\[var\\(--color-ds-button-primary-bg\\)\\]{color:var(--color-ds-button-primary-bg)}.text-\\[var\\(--color-ds-button-primary-text\\)\\]{color:var(--color-ds-button-primary-text)}.text-\\[var\\(--color-ds-text-disabled\\)\\]{color:var(--color-ds-text-disabled)}.text-\\[var\\(--color-ds-text-error\\)\\]{color:var(--color-ds-text-error)}.text-\\[var\\(--color-ds-text-on-accent\\)\\]{color:var(--color-ds-text-on-accent)}.text-\\[var\\(--color-ds-text-primary\\)\\]{color:var(--color-ds-text-primary)}.text-\\[var\\(--color-ds-text-secondary\\)\\]{color:var(--color-ds-text-secondary)}.text-blue-600{color:var(--color-blue-600)}.text-blue-800{color:var(--color-blue-800)}.text-ds-button-primary-text{color:var(--color-ds-button-primary-text)}.text-gray-700{color:var(--color-gray-700)}.text-green-800{color:var(--color-green-800)}.text-red-800{color:var(--color-red-800)}.text-white{color:var(--color-white)}.text-yellow-800{color:var(--color-yellow-800)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-\\[var\\(--color-ds-text-secondary\\)\\]::-moz-placeholder{color:var(--color-ds-text-secondary)}.placeholder-\\[var\\(--color-ds-text-secondary\\)\\]::placeholder{color:var(--color-ds-text-secondary)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-\\[var\\(--color-ds-border-default\\)\\]{--tw-ring-color:var(--color-ds-border-default)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.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,)!important}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[max-height\\]{transition-property:max-height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.\\[scrollbar-gutter\\:stable_both-edges\\]{scrollbar-gutter:stable both-edges}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:animate-pulse:hover{animation:var(--animate-pulse)}.hover\\:border-\\[var\\(--color-ds-border-default\\)\\]:hover{border-color:var(--color-ds-border-default)}.hover\\:bg-\\[var\\(--color-ds-background-accent\\)\\]:hover{background-color:var(--color-ds-background-accent)}.hover\\:bg-\\[var\\(--color-ds-background-accent\\)\\]\\/10:hover{background-color:#0a46421a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-\\[var\\(--color-ds-background-accent\\)\\]\\/10:hover{background-color:color-mix(in oklab,var(--color-ds-background-accent)10%,transparent)}}.hover\\:bg-\\[var\\(--color-ds-background-surface\\)\\]:hover{background-color:var(--color-ds-background-surface)}.hover\\:bg-\\[var\\(--color-ds-border-muted\\)\\]:hover{background-color:var(--color-ds-border-muted)}.hover\\:bg-\\[var\\(--color-ds-surface-hover\\)\\]:hover{background-color:var(--color-ds-surface-hover)}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-ds-button-hover-bg:hover{background-color:var(--color-ds-button-hover-bg)}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:text-\\[var\\(--color-ds-text-on-accent\\)\\]:hover{color:var(--color-ds-text-on-accent)}.hover\\:text-\\[var\\(--color-ds-text-primary\\)\\]:hover{color:var(--color-ds-text-primary)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:border-\\[var\\(--color-ds-border-muted\\)\\]:disabled{border-color:var(--color-ds-border-muted)}.disabled\\:bg-\\[var\\(--color-ds-background-disabled\\)\\]:disabled{background-color:var(--color-ds-background-disabled)}.disabled\\:text-\\[var\\(--color-ds-text-disabled\\)\\]:disabled{color:var(--color-ds-text-disabled)}.disabled\\:text-\\[var\\(--color-ds-text-on-accent\\)\\]:disabled{color:var(--color-ds-text-on-accent)}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:ring-1:disabled{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.disabled\\:ring-\\[var\\(--color-ds-border-muted\\)\\]:disabled{--tw-ring-color:var(--color-ds-border-muted)}.disabled\\:ring-inset:disabled{--tw-ring-inset:inset}@media (min-width:40rem){.sm\\:w-1\\/2{width:50%}.sm\\:w-1\\/3{width:33.3333%}.sm\\:w-full{width:100%}}@media (min-width:48rem){.md\\:w-1\\/2{width:50%}.md\\:w-1\\/3{width:33.3333%}.md\\:w-1\\/4{width:25%}.md\\:w-2\\/3{width:66.6667%}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width:64rem){.lg\\:w-1\\/2{width:50%}.lg\\:w-1\\/3{width:33.3333%}.lg\\:w-1\\/4{width:25%}.lg\\:w-2\\/3{width:66.6667%}.lg\\:w-2\\/12{width:16.6667%}.lg\\:w-3\\/12{width:25%}.lg\\:w-4\\/12{width:33.3333%}.lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.dark\\:bg-\\[var\\(--color-ds-background-surface\\)\\]:where(.dark,.dark *){background-color:var(--color-ds-background-surface)}.text-ds-sm{font-size:var(--font-size-sm)!important}.text-ds-md{font-size:var(--font-size-md)!important}.text-ds-lg{font-size:var(--font-size-lg)!important}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(br);function ba(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(br);function ba(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const G=ba(v);function xa(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var mt={exports:{}},tt={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
5
5
|
*
|
|
@@ -15,26 +15,26 @@
|
|
|
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 vr;function ya(){return vr||(vr=1,process.env.NODE_ENV!=="production"&&function(){function r(
|
|
18
|
+
*/var vr;function ya(){return vr||(vr=1,process.env.NODE_ENV!=="production"&&function(){function r(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===q?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case j:return"Fragment";case w:return"Profiler";case T:return"StrictMode";case N:return"Suspense";case U:return"SuspenseList";case W:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case S:return"Portal";case E:return(h.displayName||"Context")+".Provider";case y:return(h._context.displayName||"Context")+".Consumer";case V:var F=h.render;return h=h.displayName,h||(h=F.displayName||F.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case H:return F=h.displayName||null,F!==null?F:r(h.type)||"Memo";case _:F=h._payload,h=h._init;try{return r(h(F))}catch{}}return null}function t(h){return""+h}function e(h){try{t(h);var F=!1}catch{F=!0}if(F){F=console;var L=F.error,Z=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return L.call(F,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Z),t(h)}}function s(h){if(h===j)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===_)return"<...>";try{var F=r(h);return F?"<"+F+">":"<...>"}catch{return"<...>"}}function a(){var h=$.A;return h===null?null:h.getOwner()}function n(){return Error("react-stack-top-frame")}function o(h){if(I.call(h,"key")){var F=Object.getOwnPropertyDescriptor(h,"key").get;if(F&&F.isReactWarning)return!1}return h.key!==void 0}function l(h,F){function L(){ee||(ee=!0,console.error("%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://react.dev/link/special-props)",F))}L.isReactWarning=!0,Object.defineProperty(h,"key",{get:L,configurable:!0})}function c(){var h=r(this.type);return J[h]||(J[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function u(h,F,L,Z,se,ce,ge,ae){return L=ce.ref,h={$$typeof:x,type:h,key:F,props:ce,_owner:se},(L!==void 0?L:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:c}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ge}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ae}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function f(h,F,L,Z,se,ce,ge,ae){var Y=F.children;if(Y!==void 0)if(Z)if(K(Y)){for(Z=0;Z<Y.length;Z++)m(Y[Z]);Object.freeze&&Object.freeze(Y)}else console.error("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 m(Y);if(I.call(F,"key")){Y=r(h);var ne=Object.keys(F).filter(function(ie){return ie!=="key"});Z=0<ne.length?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}",B[Y+Z]||(ne=0<ne.length?"{"+ne.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
19
19
|
let props = %s;
|
|
20
20
|
<%s {...props} />
|
|
21
21
|
React keys must be passed directly to JSX without using spread:
|
|
22
22
|
let props = %s;
|
|
23
|
-
<%s key={someKey} {...props} />`,B,H,ne,H),K[H+B]=!0)}if(H=null,L!==void 0&&(e(L),H=""+L),o(F)&&(e(F.key),H=""+F.key),"key"in F){L={};for(var ue in F)ue!=="key"&&(L[ue]=F[ue])}else L=F;return H&&l(L,typeof m=="function"?m.displayName||m.name||"Unknown":m),u(m,H,ce,se,a(),L,ge,ae)}function p(m){typeof m=="object"&&m!==null&&m.$$typeof===x&&m._store&&(m._store.validated=1)}var g=v,x=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),S=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),G=Symbol.for("react.client.reference"),V=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,X=Array.isArray,ee=console.createTask?console.createTask:function(){return null};g={"react-stack-bottom-frame":function(m){return m()}};var I,J={},Z=g["react-stack-bottom-frame"].bind(g,n)(),h=ee(s(n)),K={};rt.Fragment=j,rt.jsx=function(m,F,L,B,se){var ce=1e4>V.recentlyCreatedOwnerStacks++;return f(m,F,L,!1,B,se,ce?Error("react-stack-top-frame"):Z,ce?ee(s(m)):h)},rt.jsxs=function(m,F,L,B,se){var ce=1e4>V.recentlyCreatedOwnerStacks++;return f(m,F,L,!0,B,se,ce?Error("react-stack-top-frame"):Z,ce?ee(s(m)):h)}}()),rt}var yr;function wa(){return yr||(yr=1,process.env.NODE_ENV==="production"?mt.exports=va():mt.exports=ya()),mt.exports}var i=wa();function wr(r){var t,e,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(t=0;t<a;t++)r[t]&&(e=wr(r[t]))&&(s&&(s+=" "),s+=e)}else for(e in r)r[e]&&(s&&(s+=" "),s+=e);return s}function D(){for(var r,t,e=0,s="",a=arguments.length;e<a;e++)(r=arguments[e])&&(t=wr(r))&&(s&&(s+=" "),s+=t);return s}const ka={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",xl:"w-10 h-10",full:"w-full h-full"};function Ce({component:r,size:t="sm",className:e,...s}){return i.jsx(r,{className:D(ka[t],e),"aria-hidden":s["aria-label"]?void 0:!0,...s})}const ja="inline-flex items-center justify-center box-border font-[var(--font-primary)] font-medium rounded-lg transition focus:outline-none",Ea={primary:"bg-[var(--color-ds-button-primary-bg)] text-[var(--color-ds-button-primary-text)] hover:animate-pulse",outline:"bg-transparent text-[var(--color-ds-text-primary)] ring-1 ring-inset ring-[var(--color-ds-border-default)] hover:bg-[var(--color-ds-background-accent)] hover:text-[var(--color-ds-text-on-accent)]",ghost:"bg-transparent text-[var(--color-ds-text-primary)] hover:animate-pulse"},Sa={sm:"text-ds-sm h-6 px-2",md:"text-ds-md h-10 px-2.5",lg:"text-ds-lg h-12 px-3"},Na={sm:"h-6 w-6 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},_a="disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-[var(--color-ds-background-disabled)] disabled:text-[var(--color-ds-text-on-accent)] disabled:ring-1 disabled:ring-inset disabled:ring-[var(--color-ds-border-muted)]";function Me({type:r="button",variant:t="primary",size:e="sm",width:s,disabled:a=!1,icon:n,iconPosition:o="left",ariaLabel:l,children:c,onClick:u,className:f}){const p=!!n,g=p&&!c,x=g?Na[e]:Sa[e];return i.jsxs("button",{type:r,onClick:u,disabled:a,"aria-label":g?l:void 0,style:s?{width:s}:void 0,className:D(ja,Ea[t],x,_a,f,p&&c&&"gap-2"),children:[n&&o==="left"&&i.jsx(Ce,{component:n,size:e}),c,n&&o==="right"&&i.jsx(Ce,{component:n,size:e})]})}function Fa({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Ta=q.forwardRef(Fa);function Ca({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const kr=q.forwardRef(Ca);function Aa({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const Oa=q.forwardRef(Aa);function Ma({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Va=q.forwardRef(Ma);function $a({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"}))}const Da=q.forwardRef($a);function za({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const jr=q.forwardRef(za);function Ia({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const La=q.forwardRef(Ia);function Pa({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const Er=q.forwardRef(Pa);function Ra({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"}))}const Ua=q.forwardRef(Ra);function Ba({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const Wa=q.forwardRef(Ba);function Za({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"}))}const qa=q.forwardRef(Za);function Ga({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"}))}const Ha=q.forwardRef(Ga);function Ya({title:r,titleId:t,...e},s){return q.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const $t=q.forwardRef(Ya);function Dt({title:r,children:t,defaultOpen:e=!0,className:s}){const[a,n]=v.useState(e),o=v.useRef(null),l=v.useRef(null),[c,u]=v.useState(0),f=()=>{if(l.current){const p=l.current.scrollHeight;u(p)}};return v.useLayoutEffect(()=>{f()},[a]),v.useEffect(()=>{const p=l.current;if(!p)return;const g=new ResizeObserver(()=>{f()});return g.observe(p),()=>{g.disconnect()}},[]),i.jsxs("div",{className:D("flex flex-col w-full gap-3",s),children:[i.jsxs("button",{type:"button",onClick:()=>n(p=>!p),className:"flex items-center justify-between w-full hover:bg-[var(--color-ds-surface-hover)] transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"block w-1 h-5 bg-[var(--color-ds-background-accent)] rounded-sm"}),i.jsx("span",{className:"font-semibold text-[var(--color-ds-text-primary)]",children:r})]}),a?i.jsx(Va,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"}):i.jsx(kr,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"})]}),i.jsx("div",{className:"box-border w-full rounded-lg bg-[var(--color-ds-background-surface)] overflow-hidden",children:i.jsx("div",{className:"px-6",children:i.jsx("div",{ref:o,className:D("overflow-hidden transition-all duration-300 ease-in-out",a?"opacity-100":"opacity-0"),style:{maxHeight:a?`${c}px`:"0px"},children:i.jsx("div",{ref:l,className:"py-4",children:t})})})})]})}const zt="-",Xa=r=>{const t=Ja(r),{conflictingClassGroups:e,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:o=>{const l=o.split(zt);return l[0]===""&&l.length!==1&&l.shift(),Sr(l,t)||Ka(o)},getConflictingClassGroupIds:(o,l)=>{const c=e[o]||[];return l&&s[o]?[...c,...s[o]]:c}}},Sr=(r,t)=>{var o;if(r.length===0)return t.classGroupId;const e=r[0],s=t.nextPart.get(e),a=s?Sr(r.slice(1),s):void 0;if(a)return a;if(t.validators.length===0)return;const n=r.join(zt);return(o=t.validators.find(({validator:l})=>l(n)))==null?void 0:o.classGroupId},Nr=/^\[(.+)\]$/,Ka=r=>{if(Nr.test(r)){const t=Nr.exec(r)[1],e=t==null?void 0:t.substring(0,t.indexOf(":"));if(e)return"arbitrary.."+e}},Ja=r=>{const{theme:t,classGroups:e}=r,s={nextPart:new Map,validators:[]};for(const a in e)It(e[a],s,a,t);return s},It=(r,t,e,s)=>{r.forEach(a=>{if(typeof a=="string"){const n=a===""?t:_r(t,a);n.classGroupId=e;return}if(typeof a=="function"){if(Qa(a)){It(a(s),t,e,s);return}t.validators.push({validator:a,classGroupId:e});return}Object.entries(a).forEach(([n,o])=>{It(o,_r(t,n),e,s)})})},_r=(r,t)=>{let e=r;return t.split(zt).forEach(s=>{e.nextPart.has(s)||e.nextPart.set(s,{nextPart:new Map,validators:[]}),e=e.nextPart.get(s)}),e},Qa=r=>r.isThemeGetter,en=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,e=new Map,s=new Map;const a=(n,o)=>{e.set(n,o),t++,t>r&&(t=0,s=e,e=new Map)};return{get(n){let o=e.get(n);if(o!==void 0)return o;if((o=s.get(n))!==void 0)return a(n,o),o},set(n,o){e.has(n)?e.set(n,o):a(n,o)}}},Lt="!",Pt=":",tn=Pt.length,rn=r=>{const{prefix:t,experimentalParseClassName:e}=r;let s=a=>{const n=[];let o=0,l=0,c=0,u;for(let E=0;E<a.length;E++){let j=a[E];if(o===0&&l===0){if(j===Pt){n.push(a.slice(c,E)),c=E+tn;continue}if(j==="/"){u=E;continue}}j==="["?o++:j==="]"?o--:j==="("?l++:j===")"&&l--}const f=n.length===0?a:a.substring(c),p=sn(f),g=p!==f,x=u&&u>c?u-c:void 0;return{modifiers:n,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:x}};if(t){const a=t+Pt,n=s;s=o=>o.startsWith(a)?n(o.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(e){const a=s;s=n=>e({className:n,parseClassName:a})}return s},sn=r=>r.endsWith(Lt)?r.substring(0,r.length-1):r.startsWith(Lt)?r.substring(1):r,an=r=>{const t=Object.fromEntries(r.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const a=[];let n=[];return s.forEach(o=>{o[0]==="["||t[o]?(a.push(...n.sort(),o),n=[]):n.push(o)}),a.push(...n.sort()),a}},nn=r=>({cache:en(r.cacheSize),parseClassName:rn(r),sortModifiers:an(r),...Xa(r)}),on=/\s+/,ln=(r,t)=>{const{parseClassName:e,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:n}=t,o=[],l=r.trim().split(on);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:p,modifiers:g,hasImportantModifier:x,baseClassName:E,maybePostfixModifierPosition:j}=e(f);if(p){c=f+(c.length>0?" "+c:c);continue}let T=!!j,w=s(T?E.substring(0,j):E);if(!w){if(!T){c=f+(c.length>0?" "+c:c);continue}if(w=s(E),!w){c=f+(c.length>0?" "+c:c);continue}T=!1}const y=n(g).join(":"),S=x?y+Lt:y,O=S+w;if(o.includes(O))continue;o.push(O);const _=a(w,T);for(let z=0;z<_.length;++z){const Q=_[z];o.push(S+Q)}c=f+(c.length>0?" "+c:c)}return c};function cn(){let r=0,t,e,s="";for(;r<arguments.length;)(t=arguments[r++])&&(e=Fr(t))&&(s&&(s+=" "),s+=e);return s}const Fr=r=>{if(typeof r=="string")return r;let t,e="";for(let s=0;s<r.length;s++)r[s]&&(t=Fr(r[s]))&&(e&&(e+=" "),e+=t);return e};function dn(r,...t){let e,s,a,n=o;function o(c){const u=t.reduce((f,p)=>p(f),r());return e=nn(u),s=e.cache.get,a=e.cache.set,n=l,l(c)}function l(c){const u=s(c);if(u)return u;const f=ln(c,e);return a(c,f),f}return function(){return n(cn.apply(null,arguments))}}const me=r=>{const t=e=>e[r]||[];return t.isThemeGetter=!0,t},Tr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Cr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,un=/^\d+\/\d+$/,fn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,mn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ye=r=>un.test(r),re=r=>!!r&&!Number.isNaN(Number(r)),Ie=r=>!!r&&Number.isInteger(Number(r)),Rt=r=>r.endsWith("%")&&re(r.slice(0,-1)),Ve=r=>fn.test(r),bn=()=>!0,xn=r=>hn.test(r)&&!mn.test(r),Ar=()=>!1,vn=r=>pn.test(r),yn=r=>gn.test(r),wn=r=>!P(r)&&!R(r),kn=r=>Xe(r,Dr,Ar),P=r=>Tr.test(r),Be=r=>Xe(r,zr,xn),Ut=r=>Xe(r,_n,re),Or=r=>Xe(r,Vr,Ar),jn=r=>Xe(r,$r,yn),pt=r=>Xe(r,Ir,vn),R=r=>Cr.test(r),st=r=>Ke(r,zr),En=r=>Ke(r,Fn),Mr=r=>Ke(r,Vr),Sn=r=>Ke(r,Dr),Nn=r=>Ke(r,$r),gt=r=>Ke(r,Ir,!0),Xe=(r,t,e)=>{const s=Tr.exec(r);return s?s[1]?t(s[1]):e(s[2]):!1},Ke=(r,t,e=!1)=>{const s=Cr.exec(r);return s?s[1]?t(s[1]):e:!1},Vr=r=>r==="position"||r==="percentage",$r=r=>r==="image"||r==="url",Dr=r=>r==="length"||r==="size"||r==="bg-size",zr=r=>r==="length",_n=r=>r==="number",Fn=r=>r==="family-name",Ir=r=>r==="shadow",Tn=dn(()=>{const r=me("color"),t=me("font"),e=me("text"),s=me("font-weight"),a=me("tracking"),n=me("leading"),o=me("breakpoint"),l=me("container"),c=me("spacing"),u=me("radius"),f=me("shadow"),p=me("inset-shadow"),g=me("text-shadow"),x=me("drop-shadow"),E=me("blur"),j=me("perspective"),T=me("aspect"),w=me("ease"),y=me("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...O(),R,P],z=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto","contain","none"],N=()=>[R,P,c],W=()=>[Ye,"full","auto",...N()],G=()=>[Ie,"none","subgrid",R,P],V=()=>["auto",{span:["full",Ie,R,P]},Ie,R,P],U=()=>[Ie,"auto",R,P],X=()=>["auto","min","max","fr",R,P],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...N()],Z=()=>[Ye,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],h=()=>[r,R,P],K=()=>[...O(),Mr,Or,{position:[R,P]}],m=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",Sn,kn,{size:[R,P]}],L=()=>[Rt,st,Be],B=()=>["","none","full",u,R,P],se=()=>["",re,st,Be],ce=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[re,Rt,Mr,Or],H=()=>["","none",E,R,P],ne=()=>["none",re,R,P],ue=()=>["none",re,R,P],ie=()=>[re,R,P],Se=()=>[Ye,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ve],breakpoint:[Ve],color:[bn],container:[Ve],"drop-shadow":[Ve],ease:["in","out","in-out"],font:[wn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ve],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ve],shadow:[Ve],spacing:["px",re],text:[Ve],"text-shadow":[Ve],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ye,P,R,T]}],container:["container"],columns:[{columns:[re,P,R,l]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{start:W()}],end:[{end:W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[Ie,"auto",R,P]}],basis:[{basis:[Ye,"full","auto",l,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,Ye,"auto","initial","none",P]}],grow:[{grow:["",re,R,P]}],shrink:[{shrink:["",re,R,P]}],order:[{order:[Ie,"first","last","none",R,P]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[l,"screen",...Z()]}],"min-w":[{"min-w":[l,"screen","none",...Z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",e,st,Be]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,R,Ut]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rt,P]}],"font-family":[{font:[En,P,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,R,P]}],"line-clamp":[{"line-clamp":[re,"none",R,Ut]}],leading:[{leading:[n,...N()]}],"list-image":[{"list-image":["none",R,P]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",R,P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:h()}],"text-color":[{text:h()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",R,Be]}],"text-decoration-color":[{decoration:h()}],"underline-offset":[{"underline-offset":[re,"auto",R,P]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R,P]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",R,P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:K()}],"bg-repeat":[{bg:m()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ie,R,P],radial:["",R,P],conic:[Ie,R,P]},Nn,jn]}],"bg-color":[{bg:h()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:h()}],"gradient-via":[{via:h()}],"gradient-to":[{to:h()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:h()}],"border-color-x":[{"border-x":h()}],"border-color-y":[{"border-y":h()}],"border-color-s":[{"border-s":h()}],"border-color-e":[{"border-e":h()}],"border-color-t":[{"border-t":h()}],"border-color-r":[{"border-r":h()}],"border-color-b":[{"border-b":h()}],"border-color-l":[{"border-l":h()}],"divide-color":[{divide:h()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,R,P]}],"outline-w":[{outline:["",re,st,Be]}],"outline-color":[{outline:h()}],shadow:[{shadow:["","none",f,gt,pt]}],"shadow-color":[{shadow:h()}],"inset-shadow":[{"inset-shadow":["none",p,gt,pt]}],"inset-shadow-color":[{"inset-shadow":h()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:h()}],"ring-offset-w":[{"ring-offset":[re,Be]}],"ring-offset-color":[{"ring-offset":h()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":h()}],"text-shadow":[{"text-shadow":["none",g,gt,pt]}],"text-shadow-color":[{"text-shadow":h()}],opacity:[{opacity:[re,R,P]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[re]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":h()}],"mask-image-linear-to-color":[{"mask-linear-to":h()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":h()}],"mask-image-t-to-color":[{"mask-t-to":h()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":h()}],"mask-image-r-to-color":[{"mask-r-to":h()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":h()}],"mask-image-b-to-color":[{"mask-b-to":h()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":h()}],"mask-image-l-to-color":[{"mask-l-to":h()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":h()}],"mask-image-x-to-color":[{"mask-x-to":h()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":h()}],"mask-image-y-to-color":[{"mask-y-to":h()}],"mask-image-radial":[{"mask-radial":[R,P]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":h()}],"mask-image-radial-to-color":[{"mask-radial-to":h()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[re]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":h()}],"mask-image-conic-to-color":[{"mask-conic-to":h()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:K()}],"mask-repeat":[{mask:m()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",R,P]}],filter:[{filter:["","none",R,P]}],blur:[{blur:H()}],brightness:[{brightness:[re,R,P]}],contrast:[{contrast:[re,R,P]}],"drop-shadow":[{"drop-shadow":["","none",x,gt,pt]}],"drop-shadow-color":[{"drop-shadow":h()}],grayscale:[{grayscale:["",re,R,P]}],"hue-rotate":[{"hue-rotate":[re,R,P]}],invert:[{invert:["",re,R,P]}],saturate:[{saturate:[re,R,P]}],sepia:[{sepia:["",re,R,P]}],"backdrop-filter":[{"backdrop-filter":["","none",R,P]}],"backdrop-blur":[{"backdrop-blur":H()}],"backdrop-brightness":[{"backdrop-brightness":[re,R,P]}],"backdrop-contrast":[{"backdrop-contrast":[re,R,P]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,R,P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,R,P]}],"backdrop-invert":[{"backdrop-invert":["",re,R,P]}],"backdrop-opacity":[{"backdrop-opacity":[re,R,P]}],"backdrop-saturate":[{"backdrop-saturate":[re,R,P]}],"backdrop-sepia":[{"backdrop-sepia":["",re,R,P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",R,P]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",R,P]}],ease:[{ease:["linear","initial",w,R,P]}],delay:[{delay:[re,R,P]}],animate:[{animate:["none",y,R,P]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,R,P]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[R,P,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":["translate-none"],accent:[{accent:h()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:h()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",R,P]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",R,P]}],fill:[{fill:["none",...h()]}],"stroke-w":[{stroke:[re,st,Be,Ut]}],stroke:[{stroke:["none",...h()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});var at=r=>r.type==="checkbox",We=r=>r instanceof Date,ve=r=>r==null;const Lr=r=>typeof r=="object";var fe=r=>!ve(r)&&!Array.isArray(r)&&Lr(r)&&!We(r),Pr=r=>fe(r)&&r.target?at(r.target)?r.target.checked:r.target.value:r,Cn=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,Rr=(r,t)=>r.has(Cn(t)),An=r=>{const t=r.constructor&&r.constructor.prototype;return fe(t)&&t.hasOwnProperty("isPrototypeOf")},Bt=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function be(r){let t;const e=Array.isArray(r),s=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)t=new Date(r);else if(r instanceof Set)t=new Set(r);else if(!(Bt&&(r instanceof Blob||s))&&(e||fe(r)))if(t=e?[]:{},!e&&!An(r))t=r;else for(const a in r)r.hasOwnProperty(a)&&(t[a]=be(r[a]));else return r;return t}var bt=r=>Array.isArray(r)?r.filter(Boolean):[],he=r=>r===void 0,A=(r,t,e)=>{if(!t||!fe(r))return e;const s=bt(t.split(/[,[\].]+?/)).reduce((a,n)=>ve(a)?a:a[n],r);return he(s)||s===r?he(r[t])?e:r[t]:s},je=r=>typeof r=="boolean",Wt=r=>/^\w*$/.test(r),Ur=r=>bt(r.replace(/["|']|\]/g,"").split(/\.|\[/)),oe=(r,t,e)=>{let s=-1;const a=Wt(t)?[t]:Ur(t),n=a.length,o=n-1;for(;++s<n;){const l=a[s];let c=e;if(s!==o){const u=r[l];c=fe(u)||Array.isArray(u)?u:isNaN(+a[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=c,r=r[l]}};const xt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},_e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},$e={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Br=v.createContext(null),nt=()=>v.useContext(Br),On=r=>{const{children:t,...e}=r;return v.createElement(Br.Provider,{value:e},t)};var Wr=(r,t,e,s=!0)=>{const a={defaultValues:t._defaultValues};for(const n in r)Object.defineProperty(a,n,{get:()=>{const o=n;return t._proxyFormState[o]!==_e.all&&(t._proxyFormState[o]=!s||_e.all),e&&(e[o]=!0),r[o]}});return a};const Zt=typeof window<"u"?q.useLayoutEffect:q.useEffect;function Mn(r){const t=nt(),{control:e=t.control,disabled:s,name:a,exact:n}=r||{},[o,l]=v.useState(e._formState),c=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Zt(()=>e._subscribe({name:a,formState:c.current,exact:n,callback:u=>{!s&&l({...e._formState,...u})}}),[a,s,n]),v.useEffect(()=>{c.current.isValid&&e._setValid(!0)},[e]),v.useMemo(()=>Wr(o,e,c.current,!1),[o,e])}var Ae=r=>typeof r=="string",Zr=(r,t,e,s,a)=>Ae(r)?(s&&t.watch.add(r),A(e,r,a)):Array.isArray(r)?r.map(n=>(s&&t.watch.add(n),A(e,n))):(s&&(t.watchAll=!0),e);function qt(r){const t=nt(),{control:e=t.control,name:s,defaultValue:a,disabled:n,exact:o}=r||{},l=v.useRef(a),[c,u]=v.useState(e._getWatch(s,l.current));return Zt(()=>e._subscribe({name:s,formState:{values:!0},exact:o,callback:f=>!n&&u(Zr(s,e._names,f.values||e._formValues,!1,l.current))}),[s,e,n,o]),v.useEffect(()=>e._removeUnmounted()),c}function qr(r){const t=nt(),{name:e,disabled:s,control:a=t.control,shouldUnregister:n}=r,o=Rr(a._names.array,e),l=qt({control:a,name:e,defaultValue:A(a._formValues,e,A(a._defaultValues,e,r.defaultValue)),exact:!0}),c=Mn({control:a,name:e,exact:!0}),u=v.useRef(r),f=v.useRef(a.register(e,{...r.rules,value:l,...je(r.disabled)?{disabled:r.disabled}:{}})),p=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!A(c.errors,e)},isDirty:{enumerable:!0,get:()=>!!A(c.dirtyFields,e)},isTouched:{enumerable:!0,get:()=>!!A(c.touchedFields,e)},isValidating:{enumerable:!0,get:()=>!!A(c.validatingFields,e)},error:{enumerable:!0,get:()=>A(c.errors,e)}}),[c,e]),g=v.useCallback(T=>f.current.onChange({target:{value:Pr(T),name:e},type:xt.CHANGE}),[e]),x=v.useCallback(()=>f.current.onBlur({target:{value:A(a._formValues,e),name:e},type:xt.BLUR}),[e,a._formValues]),E=v.useCallback(T=>{const w=A(a._fields,e);w&&T&&(w._f.ref={focus:()=>T.focus(),select:()=>T.select(),setCustomValidity:y=>T.setCustomValidity(y),reportValidity:()=>T.reportValidity()})},[a._fields,e]),j=v.useMemo(()=>({name:e,value:l,...je(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:g,onBlur:x,ref:E}),[e,s,c.disabled,g,x,E,l]);return v.useEffect(()=>{const T=a._options.shouldUnregister||n;a.register(e,{...u.current.rules,...je(u.current.disabled)?{disabled:u.current.disabled}:{}});const w=(y,S)=>{const O=A(a._fields,y);O&&O._f&&(O._f.mount=S)};if(w(e,!0),T){const y=be(A(a._options.defaultValues,e));oe(a._defaultValues,e,y),he(A(a._formValues,e))&&oe(a._formValues,e,y)}return!o&&a.register(e),()=>{(o?T&&!a._state.action:T)?a.unregister(e):w(e,!1)}},[e,a,o,n]),v.useEffect(()=>{a._setDisabledField({disabled:s,name:e})},[s,e,a]),v.useMemo(()=>({field:j,formState:c,fieldState:p}),[j,c,p])}const Fe=r=>r.render(qr(r));var Gr=(r,t,e,s,a)=>t?{...e[r],types:{...e[r]&&e[r].types?e[r].types:{},[s]:a||!0}}:{},ot=r=>Array.isArray(r)?r:[r],Hr=()=>{let r=[];return{get observers(){return r},next:a=>{for(const n of r)n.next&&n.next(a)},subscribe:a=>(r.push(a),{unsubscribe:()=>{r=r.filter(n=>n!==a)}}),unsubscribe:()=>{r=[]}}},Gt=r=>ve(r)||!Lr(r);function Le(r,t){if(Gt(r)||Gt(t))return r===t;if(We(r)&&We(t))return r.getTime()===t.getTime();const e=Object.keys(r),s=Object.keys(t);if(e.length!==s.length)return!1;for(const a of e){const n=r[a];if(!s.includes(a))return!1;if(a!=="ref"){const o=t[a];if(We(n)&&We(o)||fe(n)&&fe(o)||Array.isArray(n)&&Array.isArray(o)?!Le(n,o):n!==o)return!1}}return!0}var ye=r=>fe(r)&&!Object.keys(r).length,Ht=r=>r.type==="file",Te=r=>typeof r=="function",vt=r=>{if(!Bt)return!1;const t=r?r.ownerDocument:0;return r instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Yr=r=>r.type==="select-multiple",Yt=r=>r.type==="radio",Vn=r=>Yt(r)||at(r),Xt=r=>vt(r)&&r.isConnected;function $n(r,t){const e=t.slice(0,-1).length;let s=0;for(;s<e;)r=he(r)?s++:r[t[s++]];return r}function Dn(r){for(const t in r)if(r.hasOwnProperty(t)&&!he(r[t]))return!1;return!0}function pe(r,t){const e=Array.isArray(t)?t:Wt(t)?[t]:Ur(t),s=e.length===1?r:$n(r,e),a=e.length-1,n=e[a];return s&&delete s[n],a!==0&&(fe(s)&&ye(s)||Array.isArray(s)&&Dn(s))&&pe(r,e.slice(0,-1)),r}var Xr=r=>{for(const t in r)if(Te(r[t]))return!0;return!1};function yt(r,t={}){const e=Array.isArray(r);if(fe(r)||e)for(const s in r)Array.isArray(r[s])||fe(r[s])&&!Xr(r[s])?(t[s]=Array.isArray(r[s])?[]:{},yt(r[s],t[s])):ve(r[s])||(t[s]=!0);return t}function Kr(r,t,e){const s=Array.isArray(r);if(fe(r)||s)for(const a in r)Array.isArray(r[a])||fe(r[a])&&!Xr(r[a])?he(t)||Gt(e[a])?e[a]=Array.isArray(r[a])?yt(r[a],[]):{...yt(r[a])}:Kr(r[a],ve(t)?{}:t[a],e[a]):e[a]=!Le(r[a],t[a]);return e}var it=(r,t)=>Kr(r,t,yt(t));const Jr={value:!1,isValid:!1},Qr={value:!0,isValid:!0};var es=r=>{if(Array.isArray(r)){if(r.length>1){const t=r.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!he(r[0].attributes.value)?he(r[0].value)||r[0].value===""?Qr:{value:r[0].value,isValid:!0}:Qr:Jr}return Jr},ts=(r,{valueAsNumber:t,valueAsDate:e,setValueAs:s})=>he(r)?r:t?r===""?NaN:r&&+r:e&&Ae(r)?new Date(r):s?s(r):r;const rs={isValid:!1,value:null};var ss=r=>Array.isArray(r)?r.reduce((t,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:t,rs):rs;function as(r){const t=r.ref;return Ht(t)?t.files:Yt(t)?ss(r.refs).value:Yr(t)?[...t.selectedOptions].map(({value:e})=>e):at(t)?es(r.refs).value:ts(he(t.value)?r.ref.value:t.value,r)}var zn=(r,t,e,s)=>{const a={};for(const n of r){const o=A(t,n);o&&oe(a,n,o._f)}return{criteriaMode:e,names:[...r],fields:a,shouldUseNativeValidation:s}},wt=r=>r instanceof RegExp,lt=r=>he(r)?r:wt(r)?r.source:fe(r)?wt(r.value)?r.value.source:r.value:r,ns=r=>({isOnSubmit:!r||r===_e.onSubmit,isOnBlur:r===_e.onBlur,isOnChange:r===_e.onChange,isOnAll:r===_e.all,isOnTouch:r===_e.onTouched});const os="AsyncFunction";var In=r=>!!r&&!!r.validate&&!!(Te(r.validate)&&r.validate.constructor.name===os||fe(r.validate)&&Object.values(r.validate).find(t=>t.constructor.name===os)),Ln=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),is=(r,t,e)=>!e&&(t.watchAll||t.watch.has(r)||[...t.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const ct=(r,t,e,s)=>{for(const a of e||Object.keys(r)){const n=A(r,a);if(n){const{_f:o,...l}=n;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!s)return!0;if(o.ref&&t(o.ref,o.name)&&!s)return!0;if(ct(l,t))break}else if(fe(l)&&ct(l,t))break}}};function ls(r,t,e){const s=A(r,e);if(s||Wt(e))return{error:s,name:e};const a=e.split(".");for(;a.length;){const n=a.join("."),o=A(t,n),l=A(r,n);if(o&&!Array.isArray(o)&&e!==n)return{name:e};if(l&&l.type)return{name:n,error:l};a.pop()}return{name:e}}var Pn=(r,t,e,s)=>{e(r);const{name:a,...n}=r;return ye(n)||Object.keys(n).length>=Object.keys(t).length||Object.keys(n).find(o=>t[o]===(!s||_e.all))},Rn=(r,t,e)=>!r||!t||r===t||ot(r).some(s=>s&&(e?s===t:s.startsWith(t)||t.startsWith(s))),Un=(r,t,e,s,a)=>a.isOnAll?!1:!e&&a.isOnTouch?!(t||r):(e?s.isOnBlur:a.isOnBlur)?!r:(e?s.isOnChange:a.isOnChange)?r:!0,Bn=(r,t)=>!bt(A(r,t)).length&&pe(r,t),Wn=(r,t,e)=>{const s=ot(A(r,e));return oe(s,"root",t[e]),oe(r,e,s),r},kt=r=>Ae(r);function cs(r,t,e="validate"){if(kt(r)||Array.isArray(r)&&r.every(kt)||je(r)&&!r)return{type:e,message:kt(r)?r:"",ref:t}}var Je=r=>fe(r)&&!wt(r)?r:{value:r,message:""},ds=async(r,t,e,s,a,n)=>{const{ref:o,refs:l,required:c,maxLength:u,minLength:f,min:p,max:g,pattern:x,validate:E,name:j,valueAsNumber:T,mount:w}=r._f,y=A(e,j);if(!w||t.has(j))return{};const S=l?l[0]:o,O=U=>{a&&S.reportValidity&&(S.setCustomValidity(je(U)?"":U||""),S.reportValidity())},_={},z=Yt(o),Q=at(o),N=z||Q,W=(T||Ht(o))&&he(o.value)&&he(y)||vt(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,G=Gr.bind(null,j,s,_),V=(U,X,ee,I=$e.maxLength,J=$e.minLength)=>{const Z=U?X:ee;_[j]={type:U?I:J,message:Z,ref:o,...G(U?I:J,Z)}};if(n?!Array.isArray(y)||!y.length:c&&(!N&&(W||ve(y))||je(y)&&!y||Q&&!es(l).isValid||z&&!ss(l).isValid)){const{value:U,message:X}=kt(c)?{value:!!c,message:c}:Je(c);if(U&&(_[j]={type:$e.required,message:X,ref:S,...G($e.required,X)},!s))return O(X),_}if(!W&&(!ve(p)||!ve(g))){let U,X;const ee=Je(g),I=Je(p);if(!ve(y)&&!isNaN(y)){const J=o.valueAsNumber||y&&+y;ve(ee.value)||(U=J>ee.value),ve(I.value)||(X=J<I.value)}else{const J=o.valueAsDate||new Date(y),Z=m=>new Date(new Date().toDateString()+" "+m),h=o.type=="time",K=o.type=="week";Ae(ee.value)&&y&&(U=h?Z(y)>Z(ee.value):K?y>ee.value:J>new Date(ee.value)),Ae(I.value)&&y&&(X=h?Z(y)<Z(I.value):K?y<I.value:J<new Date(I.value))}if((U||X)&&(V(!!U,ee.message,I.message,$e.max,$e.min),!s))return O(_[j].message),_}if((u||f)&&!W&&(Ae(y)||n&&Array.isArray(y))){const U=Je(u),X=Je(f),ee=!ve(U.value)&&y.length>+U.value,I=!ve(X.value)&&y.length<+X.value;if((ee||I)&&(V(ee,U.message,X.message),!s))return O(_[j].message),_}if(x&&!W&&Ae(y)){const{value:U,message:X}=Je(x);if(wt(U)&&!y.match(U)&&(_[j]={type:$e.pattern,message:X,ref:o,...G($e.pattern,X)},!s))return O(X),_}if(E){if(Te(E)){const U=await E(y,e),X=cs(U,S);if(X&&(_[j]={...X,...G($e.validate,X.message)},!s))return O(X.message),_}else if(fe(E)){let U={};for(const X in E){if(!ye(U)&&!s)break;const ee=cs(await E[X](y,e),S,X);ee&&(U={...ee,...G(X,ee.message)},O(ee.message),s&&(_[j]=U))}if(!ye(U)&&(_[j]={ref:S,...U},!s))return _}}return O(!0),_};const Zn={mode:_e.onSubmit,reValidateMode:_e.onChange,shouldFocusError:!0};function qn(r={}){let t={...Zn,...r},e={submitCount:0,isDirty:!1,isReady:!1,isLoading:Te(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const s={};let a=fe(t.defaultValues)||fe(t.values)?be(t.defaultValues||t.values)||{}:{},n=t.shouldUnregister?{}:be(a),o={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let p={...f};const g={array:Hr(),state:Hr()},x=t.criteriaMode===_e.all,E=d=>b=>{clearTimeout(u),u=setTimeout(d,b)},j=async d=>{if(!t.disabled&&(f.isValid||p.isValid||d)){const b=t.resolver?ye((await Q()).errors):await W(s,!0);b!==e.isValid&&g.state.next({isValid:b})}},T=(d,b)=>{!t.disabled&&(f.isValidating||f.validatingFields||p.isValidating||p.validatingFields)&&((d||Array.from(l.mount)).forEach(k=>{k&&(b?oe(e.validatingFields,k,b):pe(e.validatingFields,k))}),g.state.next({validatingFields:e.validatingFields,isValidating:!ye(e.validatingFields)}))},w=(d,b=[],k,$,M=!0,C=!0)=>{if($&&k&&!t.disabled){if(o.action=!0,C&&Array.isArray(A(s,d))){const Y=k(A(s,d),$.argA,$.argB);M&&oe(s,d,Y)}if(C&&Array.isArray(A(e.errors,d))){const Y=k(A(e.errors,d),$.argA,$.argB);M&&oe(e.errors,d,Y),Bn(e.errors,d)}if((f.touchedFields||p.touchedFields)&&C&&Array.isArray(A(e.touchedFields,d))){const Y=k(A(e.touchedFields,d),$.argA,$.argB);M&&oe(e.touchedFields,d,Y)}(f.dirtyFields||p.dirtyFields)&&(e.dirtyFields=it(a,n)),g.state.next({name:d,isDirty:V(d,b),dirtyFields:e.dirtyFields,errors:e.errors,isValid:e.isValid})}else oe(n,d,b)},y=(d,b)=>{oe(e.errors,d,b),g.state.next({errors:e.errors})},S=d=>{e.errors=d,g.state.next({errors:e.errors,isValid:!1})},O=(d,b,k,$)=>{const M=A(s,d);if(M){const C=A(n,d,he(k)?A(a,d):k);he(C)||$&&$.defaultChecked||b?oe(n,d,b?C:as(M._f)):ee(d,C),o.mount&&j()}},_=(d,b,k,$,M)=>{let C=!1,Y=!1;const le={name:d};if(!t.disabled){if(!k||$){(f.isDirty||p.isDirty)&&(Y=e.isDirty,e.isDirty=le.isDirty=V(),C=Y!==le.isDirty);const de=Le(A(a,d),b);Y=!!A(e.dirtyFields,d),de?pe(e.dirtyFields,d):oe(e.dirtyFields,d,!0),le.dirtyFields=e.dirtyFields,C=C||(f.dirtyFields||p.dirtyFields)&&Y!==!de}if(k){const de=A(e.touchedFields,d);de||(oe(e.touchedFields,d,k),le.touchedFields=e.touchedFields,C=C||(f.touchedFields||p.touchedFields)&&de!==k)}C&&M&&g.state.next(le)}return C?le:{}},z=(d,b,k,$)=>{const M=A(e.errors,d),C=(f.isValid||p.isValid)&&je(b)&&e.isValid!==b;if(t.delayError&&k?(c=E(()=>y(d,k)),c(t.delayError)):(clearTimeout(u),c=null,k?oe(e.errors,d,k):pe(e.errors,d)),(k?!Le(M,k):M)||!ye($)||C){const Y={...$,...C&&je(b)?{isValid:b}:{},errors:e.errors,name:d};e={...e,...Y},g.state.next(Y)}},Q=async d=>{T(d,!0);const b=await t.resolver(n,t.context,zn(d||l.mount,s,t.criteriaMode,t.shouldUseNativeValidation));return T(d),b},N=async d=>{const{errors:b}=await Q(d);if(d)for(const k of d){const $=A(b,k);$?oe(e.errors,k,$):pe(e.errors,k)}else e.errors=b;return b},W=async(d,b,k={valid:!0})=>{for(const $ in d){const M=d[$];if(M){const{_f:C,...Y}=M;if(C){const le=l.array.has(C.name),de=M._f&&In(M._f);de&&f.validatingFields&&T([$],!0);const Ne=await ds(M,l.disabled,n,x,t.shouldUseNativeValidation&&!b,le);if(de&&f.validatingFields&&T([$]),Ne[C.name]&&(k.valid=!1,b))break;!b&&(A(Ne,C.name)?le?Wn(e.errors,Ne,C.name):oe(e.errors,C.name,Ne[C.name]):pe(e.errors,C.name))}!ye(Y)&&await W(Y,b,k)}}return k.valid},G=()=>{for(const d of l.unMount){const b=A(s,d);b&&(b._f.refs?b._f.refs.every(k=>!Xt(k)):!Xt(b._f.ref))&&ae(d)}l.unMount=new Set},V=(d,b)=>!t.disabled&&(d&&b&&oe(n,d,b),!Le(m(),a)),U=(d,b,k)=>Zr(d,l,{...o.mount?n:he(b)?a:Ae(d)?{[d]:b}:b},k,b),X=d=>bt(A(o.mount?n:a,d,t.shouldUnregister?A(a,d,[]):[])),ee=(d,b,k={})=>{const $=A(s,d);let M=b;if($){const C=$._f;C&&(!C.disabled&&oe(n,d,ts(b,C)),M=vt(C.ref)&&ve(b)?"":b,Yr(C.ref)?[...C.ref.options].forEach(Y=>Y.selected=M.includes(Y.value)):C.refs?at(C.ref)?C.refs.forEach(Y=>{(!Y.defaultChecked||!Y.disabled)&&(Array.isArray(M)?Y.checked=!!M.find(le=>le===Y.value):Y.checked=M===Y.value||!!M)}):C.refs.forEach(Y=>Y.checked=Y.value===M):Ht(C.ref)?C.ref.value="":(C.ref.value=M,C.ref.type||g.state.next({name:d,values:be(n)})))}(k.shouldDirty||k.shouldTouch)&&_(d,M,k.shouldTouch,k.shouldDirty,!0),k.shouldValidate&&K(d)},I=(d,b,k)=>{for(const $ in b){if(!b.hasOwnProperty($))return;const M=b[$],C=`${d}.${$}`,Y=A(s,C);(l.array.has(d)||fe(M)||Y&&!Y._f)&&!We(M)?I(C,M,k):ee(C,M,k)}},J=(d,b,k={})=>{const $=A(s,d),M=l.array.has(d),C=be(b);oe(n,d,C),M?(g.array.next({name:d,values:be(n)}),(f.isDirty||f.dirtyFields||p.isDirty||p.dirtyFields)&&k.shouldDirty&&g.state.next({name:d,dirtyFields:it(a,n),isDirty:V(d,C)})):$&&!$._f&&!ve(C)?I(d,C,k):ee(d,C,k),is(d,l)&&g.state.next({...e}),g.state.next({name:o.mount?d:void 0,values:be(n)})},Z=async d=>{o.mount=!0;const b=d.target;let k=b.name,$=!0;const M=A(s,k),C=de=>{$=Number.isNaN(de)||We(de)&&isNaN(de.getTime())||Le(de,A(n,k,de))},Y=ns(t.mode),le=ns(t.reValidateMode);if(M){let de,Ne;const Vt=b.type?as(M._f):Pr(d),Ue=d.type===xt.BLUR||d.type===xt.FOCUS_OUT,Si=!Ln(M._f)&&!t.resolver&&!A(e.errors,k)&&!M._f.deps||Un(Ue,A(e.touchedFields,k),e.isSubmitted,le,Y),mr=is(k,l,Ue);oe(n,k,Vt),Ue?(M._f.onBlur&&M._f.onBlur(d),c&&c(0)):M._f.onChange&&M._f.onChange(d);const pr=_(k,Vt,Ue),Ni=!ye(pr)||mr;if(!Ue&&g.state.next({name:k,type:d.type,values:be(n)}),Si)return(f.isValid||p.isValid)&&(t.mode==="onBlur"?Ue&&j():Ue||j()),Ni&&g.state.next({name:k,...mr?{}:pr});if(!Ue&&mr&&g.state.next({...e}),t.resolver){const{errors:pa}=await Q([k]);if(C(Vt),$){const _i=ls(e.errors,s,k),ga=ls(pa,s,_i.name||k);de=ga.error,k=ga.name,Ne=ye(pa)}}else T([k],!0),de=(await ds(M,l.disabled,n,x,t.shouldUseNativeValidation))[k],T([k]),C(Vt),$&&(de?Ne=!1:(f.isValid||p.isValid)&&(Ne=await W(s,!0)));$&&(M._f.deps&&K(M._f.deps),z(k,Ne,de,pr))}},h=(d,b)=>{if(A(e.errors,b)&&d.focus)return d.focus(),1},K=async(d,b={})=>{let k,$;const M=ot(d);if(t.resolver){const C=await N(he(d)?d:M);k=ye(C),$=d?!M.some(Y=>A(C,Y)):k}else d?($=(await Promise.all(M.map(async C=>{const Y=A(s,C);return await W(Y&&Y._f?{[C]:Y}:Y)}))).every(Boolean),!(!$&&!e.isValid)&&j()):$=k=await W(s);return g.state.next({...!Ae(d)||(f.isValid||p.isValid)&&k!==e.isValid?{}:{name:d},...t.resolver||!d?{isValid:k}:{},errors:e.errors}),b.shouldFocus&&!$&&ct(s,h,d?M:l.mount),$},m=d=>{const b={...o.mount?n:a};return he(d)?b:Ae(d)?A(b,d):d.map(k=>A(b,k))},F=(d,b)=>({invalid:!!A((b||e).errors,d),isDirty:!!A((b||e).dirtyFields,d),error:A((b||e).errors,d),isValidating:!!A(e.validatingFields,d),isTouched:!!A((b||e).touchedFields,d)}),L=d=>{d&&ot(d).forEach(b=>pe(e.errors,b)),g.state.next({errors:d?e.errors:{}})},B=(d,b,k)=>{const $=(A(s,d,{_f:{}})._f||{}).ref,M=A(e.errors,d)||{},{ref:C,message:Y,type:le,...de}=M;oe(e.errors,d,{...de,...b,ref:$}),g.state.next({name:d,errors:e.errors,isValid:!1}),k&&k.shouldFocus&&$&&$.focus&&$.focus()},se=(d,b)=>Te(d)?g.state.subscribe({next:k=>d(U(void 0,b),k)}):U(d,b,!0),ce=d=>g.state.subscribe({next:b=>{Rn(d.name,b.name,d.exact)&&Pn(b,d.formState||f,Ei,d.reRenderRoot)&&d.callback({values:{...n},...e,...b})}}).unsubscribe,ge=d=>(o.mount=!0,p={...p,...d.formState},ce({...d,formState:p})),ae=(d,b={})=>{for(const k of d?ot(d):l.mount)l.mount.delete(k),l.array.delete(k),b.keepValue||(pe(s,k),pe(n,k)),!b.keepError&&pe(e.errors,k),!b.keepDirty&&pe(e.dirtyFields,k),!b.keepTouched&&pe(e.touchedFields,k),!b.keepIsValidating&&pe(e.validatingFields,k),!t.shouldUnregister&&!b.keepDefaultValue&&pe(a,k);g.state.next({values:be(n)}),g.state.next({...e,...b.keepDirty?{isDirty:V()}:{}}),!b.keepIsValid&&j()},H=({disabled:d,name:b})=>{(je(d)&&o.mount||d||l.disabled.has(b))&&(d?l.disabled.add(b):l.disabled.delete(b))},ne=(d,b={})=>{let k=A(s,d);const $=je(b.disabled)||je(t.disabled);return oe(s,d,{...k||{},_f:{...k&&k._f?k._f:{ref:{name:d}},name:d,mount:!0,...b}}),l.mount.add(d),k?H({disabled:je(b.disabled)?b.disabled:t.disabled,name:d}):O(d,!0,b.value),{...$?{disabled:b.disabled||t.disabled}:{},...t.progressive?{required:!!b.required,min:lt(b.min),max:lt(b.max),minLength:lt(b.minLength),maxLength:lt(b.maxLength),pattern:lt(b.pattern)}:{},name:d,onChange:Z,onBlur:Z,ref:M=>{if(M){ne(d,b),k=A(s,d);const C=he(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,Y=Vn(C),le=k._f.refs||[];if(Y?le.find(de=>de===C):C===k._f.ref)return;oe(s,d,{_f:{...k._f,...Y?{refs:[...le.filter(Xt),C,...Array.isArray(A(a,d))?[{}]:[]],ref:{type:C.type,name:d}}:{ref:C}}}),O(d,!1,void 0,C)}else k=A(s,d,{}),k._f&&(k._f.mount=!1),(t.shouldUnregister||b.shouldUnregister)&&!(Rr(l.array,d)&&o.action)&&l.unMount.add(d)}}},ue=()=>t.shouldFocusError&&ct(s,h,l.mount),ie=d=>{je(d)&&(g.state.next({disabled:d}),ct(s,(b,k)=>{const $=A(s,k);$&&(b.disabled=$._f.disabled||d,Array.isArray($._f.refs)&&$._f.refs.forEach(M=>{M.disabled=$._f.disabled||d}))},0,!1))},Se=(d,b)=>async k=>{let $;k&&(k.preventDefault&&k.preventDefault(),k.persist&&k.persist());let M=be(n);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:C,values:Y}=await Q();e.errors=C,M=Y}else await W(s);if(l.disabled.size)for(const C of l.disabled)oe(M,C,void 0);if(pe(e.errors,"root"),ye(e.errors)){g.state.next({errors:{}});try{await d(M,k)}catch(C){$=C}}else b&&await b({...e.errors},k),ue(),setTimeout(ue);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ye(e.errors)&&!$,submitCount:e.submitCount+1,errors:e.errors}),$)throw $},Mt=(d,b={})=>{A(s,d)&&(he(b.defaultValue)?J(d,be(A(a,d))):(J(d,b.defaultValue),oe(a,d,be(b.defaultValue))),b.keepTouched||pe(e.touchedFields,d),b.keepDirty||(pe(e.dirtyFields,d),e.isDirty=b.defaultValue?V(d,be(A(a,d))):V()),b.keepError||(pe(e.errors,d),f.isValid&&j()),g.state.next({...e}))},ft=(d,b={})=>{const k=d?be(d):a,$=be(k),M=ye(d),C=M?a:$;if(b.keepDefaultValues||(a=k),!b.keepValues){if(b.keepDirtyValues){const Y=new Set([...l.mount,...Object.keys(it(a,n))]);for(const le of Array.from(Y))A(e.dirtyFields,le)?oe(C,le,A(n,le)):J(le,A(C,le))}else{if(Bt&&he(d))for(const Y of l.mount){const le=A(s,Y);if(le&&le._f){const de=Array.isArray(le._f.refs)?le._f.refs[0]:le._f.ref;if(vt(de)){const Ne=de.closest("form");if(Ne){Ne.reset();break}}}}for(const Y of l.mount)J(Y,A(C,Y))}n=be(C),g.array.next({values:{...C}}),g.state.next({values:{...C}})}l={mount:b.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!b.keepIsValid||!!b.keepDirtyValues,o.watch=!!t.shouldUnregister,g.state.next({submitCount:b.keepSubmitCount?e.submitCount:0,isDirty:M?!1:b.keepDirty?e.isDirty:!!(b.keepDefaultValues&&!Le(d,a)),isSubmitted:b.keepIsSubmitted?e.isSubmitted:!1,dirtyFields:M?{}:b.keepDirtyValues?b.keepDefaultValues&&n?it(a,n):e.dirtyFields:b.keepDefaultValues&&d?it(a,d):b.keepDirty?e.dirtyFields:{},touchedFields:b.keepTouched?e.touchedFields:{},errors:b.keepErrors?e.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?e.isSubmitSuccessful:!1,isSubmitting:!1})},ht=(d,b)=>ft(Te(d)?d(n):d,b),ji=(d,b={})=>{const k=A(s,d),$=k&&k._f;if($){const M=$.refs?$.refs[0]:$.ref;M.focus&&(M.focus(),b.shouldSelect&&Te(M.select)&&M.select())}},Ei=d=>{e={...e,...d}},ma={control:{register:ne,unregister:ae,getFieldState:F,handleSubmit:Se,setError:B,_subscribe:ce,_runSchema:Q,_getWatch:U,_getDirty:V,_setValid:j,_setFieldArray:w,_setDisabledField:H,_setErrors:S,_getFieldArray:X,_reset:ft,_resetDefaultValues:()=>Te(t.defaultValues)&&t.defaultValues().then(d=>{ht(d,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:G,_disableForm:ie,_subjects:g,_proxyFormState:f,get _fields(){return s},get _formValues(){return n},get _state(){return o},set _state(d){o=d},get _defaultValues(){return a},get _names(){return l},set _names(d){l=d},get _formState(){return e},get _options(){return t},set _options(d){t={...t,...d}}},subscribe:ge,trigger:K,register:ne,handleSubmit:Se,watch:se,setValue:J,getValues:m,reset:ht,resetField:Mt,clearErrors:L,unregister:ae,setError:B,setFocus:ji,getFieldState:F};return{...ma,formControl:ma}}function Gn(r={}){const t=v.useRef(void 0),e=v.useRef(void 0),[s,a]=v.useState({isDirty:!1,isValidating:!1,isLoading:Te(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,isReady:!1,defaultValues:Te(r.defaultValues)?void 0:r.defaultValues});t.current||(t.current={...r.formControl?r.formControl:qn(r),formState:s},r.formControl&&r.defaultValues&&!Te(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const n=t.current.control;return n._options=r,Zt(()=>{const o=n._subscribe({formState:n._proxyFormState,callback:()=>a({...n._formState}),reRenderRoot:!0});return a(l=>({...l,isReady:!0})),n._formState.isReady=!0,o},[n]),v.useEffect(()=>n._disableForm(r.disabled),[n,r.disabled]),v.useEffect(()=>{r.mode&&(n._options.mode=r.mode),r.reValidateMode&&(n._options.reValidateMode=r.reValidateMode),r.errors&&!ye(r.errors)&&n._setErrors(r.errors)},[n,r.errors,r.mode,r.reValidateMode]),v.useEffect(()=>{r.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,r.shouldUnregister]),v.useEffect(()=>{if(n._proxyFormState.isDirty){const o=n._getDirty();o!==s.isDirty&&n._subjects.state.next({isDirty:o})}},[n,s.isDirty]),v.useEffect(()=>{r.values&&!Le(r.values,e.current)?(n._reset(r.values,n._options.resetOptions),e.current=r.values,a(o=>({...o}))):n._resetDefaultValues()},[n,r.values]),v.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),t.current.formState=Wr(s,n),t.current}const us={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Hn={sm:"h-6",md:"h-10",lg:"h-12"},Yn={sm:"px-2",md:"px-2.5",lg:"px-3"};function fs(r,t,e,s,a,n,o){const l=t?"datetime-local":"date",c=D("box-border w-full rounded-lg border outline-none transition font-[var(--font-primary)]",us[e],Hn[e],Yn[e],n?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]"),p=Tn(c,a?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-disabled)] cursor-not-allowed opacity-60":"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",o);return i.jsxs(i.Fragment,{children:[i.jsx("input",{id:r,type:l,disabled:a,"aria-disabled":a,"data-disabled":a?"true":"false",...s,className:p}),i.jsx("div",{children:n!=null&&n.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:n.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function hs(r){const{control:t,name:e,rules:s,defaultValue:a,showTime:n=!1,size:o="sm",width:l="100%",label:c,labelHidden:u=!1,hasError:f=!1,errorMessage:p="",disabled:g=!1,className:x,onChange:E}=r,j=v.useId(),T=e||j;return i.jsxs("div",{className:D("flex flex-col",x),style:{width:l,maxWidth:"100%"},children:[c&&i.jsx("label",{htmlFor:T,className:D("pb-2 text-[var(--color-ds-text-primary)]",us[o],u&&"sr-only"),children:c}),t&&e?i.jsx(Fe,{name:e,control:t,rules:s,defaultValue:a,render:({field:w,fieldState:y})=>fs(T,n,o,{value:w.value,onChange:w.onChange,onBlur:w.onBlur},g,y.error,x)}):fs(T,n,o,{defaultValue:a,onChange:E},g,f?{message:p}:void 0,x)]})}const Xn=({trigger:r,items:t,align:e="left",className:s})=>{const[a,n]=v.useState(!1),o=v.useRef(null),l=v.useRef([]);v.useEffect(()=>{const u=f=>{o.current&&!o.current.contains(f.target)&&n(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]);const c=u=>{var p,g;const f=l.current.findIndex(x=>x===document.activeElement);if(u.key==="Escape")n(!1);else if(u.key==="ArrowDown"){u.preventDefault();const x=(f+1)%t.length;(p=l.current[x])==null||p.focus()}else if(u.key==="ArrowUp"){u.preventDefault();const x=(f-1+t.length)%t.length;(g=l.current[x])==null||g.focus()}};return i.jsxs("div",{className:D("relative inline-block",s),ref:o,children:[i.jsx("button",{type:"button",onClick:()=>n(u=>!u),className:"inline-flex items-center focus:outline-none","aria-haspopup":"menu","aria-expanded":a,children:r}),a&&i.jsx("div",{role:"menu","aria-orientation":"vertical",className:D("absolute mt-2 min-w-[160px] bg-[var(--color-ds-background-page)]","border border-[var(--color-ds-border-muted)] rounded shadow-lg z-10",e==="right"?"right-0":"left-0"),onKeyDown:c,children:t.map((u,f)=>{const{label:p,onSelect:g,disabled:x,icon:E}=u;return i.jsxs("button",{role:"menuitem",type:"button",disabled:x,ref:j=>{l.current[f]=j},className:D("w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",x?"opacity-50 cursor-not-allowed":"hover:bg-[var(--color-ds-background-surface)]"),onClick:()=>{x||(g(),n(!1))},children:[E&&i.jsx(E,{className:"w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]"}),p]},f)})})]})},Kn=(r,t,e,s)=>{var n,o,l,c;const a=[e,{code:t,...s||{}}];if((o=(n=r==null?void 0:r.services)==null?void 0:n.logger)!=null&&o.forward)return r.services.logger.forward(a,"warn","react-i18next::",!0);Ze(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(c=(l=r==null?void 0:r.services)==null?void 0:l.logger)!=null&&c.warn?r.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},ms={},Kt=(r,t,e,s)=>{Ze(e)&&ms[e]||(Ze(e)&&(ms[e]=new Date),Kn(r,t,e,s))},ps=(r,t)=>()=>{if(r.isInitialized)t();else{const e=()=>{setTimeout(()=>{r.off("initialized",e)},0),t()};r.on("initialized",e)}},Jt=(r,t,e)=>{r.loadNamespaces(t,ps(r,e))},gs=(r,t,e,s)=>{if(Ze(e)&&(e=[e]),r.options.preload&&r.options.preload.indexOf(t)>-1)return Jt(r,e,s);e.forEach(a=>{r.options.ns.indexOf(a)<0&&r.options.ns.push(a)}),r.loadLanguages(t,ps(r,s))},Jn=(r,t,e={})=>!t.languages||!t.languages.length?(Kt(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(r,{lng:e.lng,precheck:(s,a)=>{var n;if(((n=e.bindI18n)==null?void 0:n.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!a(s.isLanguageChangingTo,r))return!1}}),Ze=r=>typeof r=="string",Qn=r=>typeof r=="object"&&r!==null,eo=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,to={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ro=r=>to[r];let so={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:r=>r.replace(eo,ro)};const ao=()=>so;let no;const oo=()=>no,io=v.createContext();class lo{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const co=(r,t)=>{const e=v.useRef();return v.useEffect(()=>{e.current=r},[r,t]),e.current},bs=(r,t,e,s)=>r.getFixedT(t,e,s),uo=(r,t,e,s)=>v.useCallback(bs(r,t,e,s),[r,t,e,s]),Qt=(r,t={})=>{var O,_,z,Q;const{i18n:e}=t,{i18n:s,defaultNS:a}=v.useContext(io)||{},n=e||s||oo();if(n&&!n.reportNamespaces&&(n.reportNamespaces=new lo),!n){Kt(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const N=(G,V)=>Ze(V)?V:Qn(V)&&Ze(V.defaultValue)?V.defaultValue:Array.isArray(G)?G[G.length-1]:G,W=[N,{},!1];return W.t=N,W.i18n={},W.ready=!1,W}(O=n.options.react)!=null&&O.wait&&Kt(n,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...ao(),...n.options.react,...t},{useSuspense:l,keyPrefix:c}=o;let u=a||((_=n.options)==null?void 0:_.defaultNS);u=Ze(u)?[u]:u||["translation"],(Q=(z=n.reportNamespaces).addUsedNamespaces)==null||Q.call(z,u);const f=(n.isInitialized||n.initializedStoreOnce)&&u.every(N=>Jn(N,n,o)),p=uo(n,t.lng||null,o.nsMode==="fallback"?u:u[0],c),g=()=>p,x=()=>bs(n,t.lng||null,o.nsMode==="fallback"?u:u[0],c),[E,j]=v.useState(g);let T=u.join();t.lng&&(T=`${t.lng}${T}`);const w=co(T),y=v.useRef(!0);v.useEffect(()=>{const{bindI18n:N,bindI18nStore:W}=o;y.current=!0,!f&&!l&&(t.lng?gs(n,t.lng,u,()=>{y.current&&j(x)}):Jt(n,u,()=>{y.current&&j(x)})),f&&w&&w!==T&&y.current&&j(x);const G=()=>{y.current&&j(x)};return N&&(n==null||n.on(N,G)),W&&(n==null||n.store.on(W,G)),()=>{y.current=!1,n&&(N==null||N.split(" ").forEach(V=>n.off(V,G))),W&&n&&W.split(" ").forEach(V=>n.store.off(V,G))}},[n,T]),v.useEffect(()=>{y.current&&f&&j(g)},[n,c,f]);const S=[E,n,f];if(S.t=E,S.i18n=n,S.ready=f,f||!f&&!l)return S;throw new Promise(N=>{t.lng?gs(n,t.lng,u,()=>N()):Jt(n,u,()=>N())})},er={sm:"text-sm",md:"text-base",lg:"text-lg"};function xs(r,t,e,s,a,n,o,l,c){const{t:u}=Qt(),f=v.useRef(null),p=typeof s=="number"&&t.length>=s,g=()=>{var y;!o&&!p&&((y=f.current)==null||y.click())},x=y=>{const S=y.target.files;if(!S)return;const O=Array.from(S);let _=t.concat(O);s&&(_=_.slice(0,s)),e(_),y.target.value=""},E=y=>{if(y.preventDefault(),o||p)return;const S=Array.from(y.dataTransfer.files);let O=t.concat(S);s&&(O=O.slice(0,s)),e(O)},j=y=>{y.preventDefault()},T=y=>{const S=URL.createObjectURL(y);window.open(S)},w=y=>{const S=t.filter((O,_)=>_!==y);e(S)};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"self-start mb-4 w-auto",children:i.jsx(Me,{type:"button",variant:"outline",size:n,icon:jr,onClick:g,disabled:o||p,children:u("ds.fileUploader.browse","Browse files")})}),!p&&i.jsxs("div",{className:D("relative flex bg-[var(--color-ds-background-page)] flex-col items-center justify-center border-2 border-dashed border-[var(--color-ds-border-muted)] rounded-lg p-4",o?"opacity-50 cursor-not-allowed":"hover:border-[var(--color-ds-border-default)]",er[n],c),onDrop:E,onDragOver:j,children:[i.jsx("input",{id:r,type:"file",ref:f,className:"hidden",multiple:s!==1,accept:a,onChange:x,disabled:o}),i.jsx(Ce,{component:Da,size:"md",className:"w-8 h-8 text-[var(--color-ds-text-secondary)]"}),i.jsx("p",{className:"mt-3 text-[var(--color-ds-text-secondary)] text-center",children:u("ds.fileUploader.dragDrop","Drag & drop your files here or click to browse")})]}),t.length>0&&i.jsx("ul",{className:"mt-4 space-y-1",children:t.map((y,S)=>i.jsxs("li",{className:"flex items-center justify-between text-[var(--color-ds-text-secondary)] text-sm",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx(jr,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),i.jsx("span",{className:"truncate pr-2",children:y.name})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Me,{variant:"ghost",size:"sm",icon:Er,ariaLabel:u("ds.fileUploader.view","View"),onClick:()=>T(y)}),i.jsx(Me,{variant:"ghost",size:"sm",icon:$t,ariaLabel:u("ds.fileUploader.remove","Remove"),onClick:()=>w(S)})]})]},S))}),i.jsx("div",{className:"pt-[5px] min-h-[18px] w-full",children:l!=null&&l.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function vs(r){const{control:t,name:e,rules:s,defaultValue:a,maxFiles:n,accept:o,size:l="sm",width:c="100%",label:u,labelHidden:f=!1,disabled:p=!1,hasError:g=!1,errorMessage:x="",className:E}=r,j=v.useId(),T=e||j;if(t&&e)return i.jsxs("div",{className:D("flex flex-col",E),style:{width:c},children:[u&&i.jsx("label",{htmlFor:T,className:D("pb-[10px] text-[var(--color-ds-text-primary)]",er[l],f&&"sr-only"),children:u}),i.jsx(Fe,{name:e,control:t,rules:s,defaultValue:a instanceof FileList?Array.from(a):a||[],render:({field:S,fieldState:O})=>xs(T,S.value,_=>S.onChange(_),n,o,l,p,O.error,E)})]});const[w,y]=v.useState(a instanceof FileList?Array.from(a):a||[]);return i.jsxs("div",{className:D("flex flex-col",E),style:{width:c},children:[u&&i.jsx("label",{htmlFor:T,className:D("pb-[10px] text-[var(--color-ds-text-primary)]",er[l],f&&"sr-only"),children:u}),xs(T,w,y,n,o,l,p,g?{message:x}:void 0,E)]})}const qe=({count:r=1,width:t,height:e="1em",variant:s="rect",className:a})=>{const n=Array.from({length:r});return i.jsx(i.Fragment,{children:n.map((o,l)=>i.jsx("span",{role:"status","aria-label":"Cargando...",className:D("bg-[var(--color-ds-border-muted)] animate-pulse inline-block",s==="circle"?"rounded-full":"rounded",a),style:{width:t??"auto",height:e}},l))})},jt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},fo={sm:"h-6",md:"h-10",lg:"h-12"},ho={sm:"px-2",md:"px-2.5",lg:"px-3"},ys={sm:"pl-2",md:"pl-2.5",lg:"pl-3"},mo={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Et({id:r,type:t="text",size:e="sm",width:s="100%",label:a,labelHidden:n=!1,hasError:o=!1,errorMessage:l="",prefixIcon:c,suffixIcon:u,separator:f,suffixButton:p,disabled:g=!1,control:x,name:E,rules:j,defaultValue:T,loading:w=!1,className:y,...S}){const O=v.useId(),[_,z]=v.useState(!1),Q=r||O,N=t==="password",G=c??(t==="number"?Ua:void 0),V=N?_?La:Er:u,U=D("box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",jt[e],fo[e],ho[e],o?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]","bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]","disabled:bg-[var(--color-ds-background-disabled)]","disabled:border-[var(--color-ds-border-muted)]","disabled:text-[var(--color-ds-text-disabled)]","disabled:cursor-not-allowed");return w?i.jsxs("div",{className:"flex flex-col",style:{width:s,maxWidth:"100%"},children:[!n&&a&&i.jsx("label",{htmlFor:Q,className:D("pb-2",jt[e]),children:a}),i.jsx(qe,{width:"100%",height:mo[e],variant:"rect",className:"rounded-lg"}),i.jsx("div",{className:"min-h-[18px] w-full",children:i.jsx("span",{"aria-hidden":"true",children:" "})})]}):x&&E?i.jsx(Fe,{name:E,control:x,rules:j,defaultValue:T,render:({field:X,fieldState:ee})=>i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!n&&a&&i.jsx("label",{htmlFor:Q,className:D("pb-2 text-[var(--color-ds-text-primary)]",jt[e]),children:a}),i.jsxs("div",{className:"relative flex items-center w-full",children:[G&&i.jsx("div",{className:D("absolute left-0 flex items-center h-full",ys[e]),children:i.jsx(Ce,{component:G,size:e,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...X,id:Q,type:N?_?"text":"password":t,disabled:g,"aria-invalid":!!ee.error,className:D(U,G&&"pl-9",V&&"pr-9",y),onInvalid:I=>I.preventDefault(),style:N&&!_?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&i.jsx("div",{className:"flex items-center h-full",children:f}),p&&i.jsx("div",{className:"flex items-center h-full pr-2",children:p}),V&&i.jsx("button",{type:"button",onClick:()=>z(I=>!I),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Ce,{component:V,size:e,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:ee.error?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:ee.error.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}):i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!n&&a&&i.jsx("label",{htmlFor:Q,className:D("pb-2 text-[var(--color-ds-text-primary)]",jt[e]),children:a}),i.jsxs("div",{className:"relative flex items-center w-full",children:[G&&i.jsx("div",{className:D("absolute left-0 flex items-center h-full",ys[e]),children:i.jsx(Ce,{component:G,size:e,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...S,id:Q,type:N?_?"text":"password":t,disabled:g,"aria-invalid":o,className:D(U,G&&"pl-9",V&&"pr-9",y),onInvalid:X=>X.preventDefault(),style:N&&!_?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&i.jsx("div",{className:"flex items-center h-full",children:f}),p&&i.jsx("div",{className:"flex items-center h-full",children:p}),V&&i.jsx("button",{type:"button",onClick:()=>z(X=>!X),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Ce,{component:V,size:e,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:o&&l?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}const po={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},tr=400,St=8,ws=({children:r,size:t="sm",position:e="top",className:s})=>{const[a,n]=v.useState(!1),[o,l]=v.useState({x:0,y:0}),c=v.useRef(null),u=v.useId();v.useEffect(()=>{if(a&&c.current){const g=c.current.getBoundingClientRect();let x=0,E=0;switch(e){case"top":x=g.left+g.width/2-tr/2,E=g.top-St;break;case"bottom":x=g.left+g.width/2-tr/2,E=g.bottom+St;break;case"left":x=g.left-tr-St,E=g.top+g.height/2;break;case"right":x=g.right+St,E=g.top+g.height/2;break}l({x,y:E})}},[a,e]);const f=()=>typeof r=="string"?i.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):i.jsx(i.Fragment,{children:r}),p=a?i.jsx("div",{id:u,role:"tooltip",className:D("fixed z-50 w-[250px] bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)] text-ds-sm rounded p-2 shadow-lg","pointer-events-none"),style:{top:`${o.y}px`,left:`${o.x}px`,transform:e==="left"||e==="right"?"translateY(-50%)":e==="top"?"translateY(-100%)":void 0},children:f()}):null;return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button","aria-describedby":u,ref:c,className:D("inline-flex items-center justify-center focus:outline-none",po[t],"text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]",s),onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onFocus:()=>n(!0),onBlur:()=>n(!1),children:i.jsx(Wa,{className:"w-full h-full"})}),gr.createPortal(p,document.body)]})};function go({name:r,label:t,type:e="text",size:s="sm",width:a,placeholder:n,validation:o,loadingDefaults:l,disabled:c,info:u}){var T;const{control:f,formState:{errors:p}}=nt(),g=!!p[r],x=((T=p[r])==null?void 0:T.message)||"",E="relative",j=a??"w-full";return i.jsxs("div",{className:E,children:[i.jsx(Fe,{name:r,control:f,rules:o,render:({field:w})=>i.jsx(Et,{label:t,size:s,width:j,placeholder:n,hasError:g,errorMessage:x,loading:l,type:e,...w,disabled:c})}),u&&i.jsx(ws,{size:s,position:"left",className:"absolute top-1/2 right-2 -translate-y-1/2",children:u})]})}const rr=v.memo(go);rr.displayName="FormFieldInput";function bo({title:r,headerButtons:t,children:e,className:s}){return i.jsxs("div",{className:D("flex flex-col h-full",s),children:[i.jsxs("div",{className:"flex items-center justify-between py-4",children:[i.jsx("div",{className:`bg-[var(--color-ds-background-accent)] \r
|
|
23
|
+
<%s key={someKey} {...props} />`,Z,Y,ne,Y),B[Y+Z]=!0)}if(Y=null,L!==void 0&&(e(L),Y=""+L),o(F)&&(e(F.key),Y=""+F.key),"key"in F){L={};for(var ue in F)ue!=="key"&&(L[ue]=F[ue])}else L=F;return Y&&l(L,typeof h=="function"?h.displayName||h.name||"Unknown":h),u(h,Y,ce,se,a(),L,ge,ae)}function m(h){typeof h=="object"&&h!==null&&h.$$typeof===x&&h._store&&(h._store.validated=1)}var g=v,x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),E=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),q=Symbol.for("react.client.reference"),$=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,K=Array.isArray,Q=console.createTask?console.createTask:function(){return null};g={"react-stack-bottom-frame":function(h){return h()}};var ee,J={},M=g["react-stack-bottom-frame"].bind(g,n)(),p=Q(s(n)),B={};rt.Fragment=j,rt.jsx=function(h,F,L,Z,se){var ce=1e4>$.recentlyCreatedOwnerStacks++;return f(h,F,L,!1,Z,se,ce?Error("react-stack-top-frame"):M,ce?Q(s(h)):p)},rt.jsxs=function(h,F,L,Z,se){var ce=1e4>$.recentlyCreatedOwnerStacks++;return f(h,F,L,!0,Z,se,ce?Error("react-stack-top-frame"):M,ce?Q(s(h)):p)}}()),rt}var yr;function wa(){return yr||(yr=1,process.env.NODE_ENV==="production"?mt.exports=va():mt.exports=ya()),mt.exports}var i=wa();function wr(r){var t,e,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(t=0;t<a;t++)r[t]&&(e=wr(r[t]))&&(s&&(s+=" "),s+=e)}else for(e in r)r[e]&&(s&&(s+=" "),s+=e);return s}function z(){for(var r,t,e=0,s="",a=arguments.length;e<a;e++)(r=arguments[e])&&(t=wr(r))&&(s&&(s+=" "),s+=t);return s}const ka={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",xl:"w-10 h-10",full:"w-full h-full"};function Ce({component:r,size:t="sm",className:e,...s}){return i.jsx(r,{className:z(ka[t],e),"aria-hidden":s["aria-label"]?void 0:!0,...s})}const ja="inline-flex items-center justify-center box-border font-[var(--font-primary)] font-medium rounded-lg transition focus:outline-none",Ea={primary:"bg-[var(--color-ds-button-primary-bg)] text-[var(--color-ds-button-primary-text)] hover:animate-pulse",outline:"bg-transparent text-[var(--color-ds-text-primary)] ring-1 ring-inset ring-[var(--color-ds-border-default)] hover:bg-[var(--color-ds-background-accent)] hover:text-[var(--color-ds-text-on-accent)]",ghost:"bg-transparent text-[var(--color-ds-text-primary)] hover:animate-pulse"},Sa={sm:"text-ds-sm h-6 px-2",md:"text-ds-md h-10 px-2.5",lg:"text-ds-lg h-12 px-3"},Na={sm:"h-6 w-6 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},_a="disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-[var(--color-ds-background-disabled)] disabled:text-[var(--color-ds-text-on-accent)] disabled:ring-1 disabled:ring-inset disabled:ring-[var(--color-ds-border-muted)]";function Me({type:r="button",variant:t="primary",size:e="sm",width:s,disabled:a=!1,icon:n,iconPosition:o="left",ariaLabel:l,children:c,onClick:u,className:f}){const m=!!n,g=m&&!c,x=g?Na[e]:Sa[e];return i.jsxs("button",{type:r,onClick:u,disabled:a,"aria-label":g?l:void 0,style:s?{width:s}:void 0,className:z(ja,Ea[t],x,_a,f,m&&c&&"gap-2"),children:[n&&o==="left"&&i.jsx(Ce,{component:n,size:e}),c,n&&o==="right"&&i.jsx(Ce,{component:n,size:e})]})}function Fa({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Ta=G.forwardRef(Fa);function Ca({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const kr=G.forwardRef(Ca);function Aa({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const Oa=G.forwardRef(Aa);function Ma({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Va=G.forwardRef(Ma);function $a({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"}))}const Da=G.forwardRef($a);function za({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const jr=G.forwardRef(za);function Ia({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const La=G.forwardRef(Ia);function Pa({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const Er=G.forwardRef(Pa);function Ra({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"}))}const Ua=G.forwardRef(Ra);function Ba({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const Wa=G.forwardRef(Ba);function Za({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"}))}const qa=G.forwardRef(Za);function Ga({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"}))}const Ha=G.forwardRef(Ga);function Ya({title:r,titleId:t,...e},s){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?G.createElement("title",{id:t},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const $t=G.forwardRef(Ya);function Dt({title:r,children:t,defaultOpen:e=!0,className:s}){const[a,n]=v.useState(e),o=v.useRef(null),l=v.useRef(null),[c,u]=v.useState(0),f=()=>{if(l.current){const m=l.current.scrollHeight;u(m)}};return v.useLayoutEffect(()=>{f()},[a]),v.useEffect(()=>{const m=l.current;if(!m)return;const g=new ResizeObserver(()=>{f()});return g.observe(m),()=>{g.disconnect()}},[]),i.jsxs("div",{className:z("flex flex-col w-full gap-3",s),children:[i.jsxs("button",{type:"button",onClick:()=>n(m=>!m),className:"flex items-center justify-between w-full hover:bg-[var(--color-ds-surface-hover)] transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"block w-1 h-5 bg-[var(--color-ds-background-accent)] rounded-sm"}),i.jsx("span",{className:"font-semibold text-[var(--color-ds-text-primary)]",children:r})]}),a?i.jsx(Va,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"}):i.jsx(kr,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"})]}),i.jsx("div",{className:"box-border w-full rounded-lg bg-[var(--color-ds-background-surface)] overflow-hidden",children:i.jsx("div",{className:"px-6",children:i.jsx("div",{ref:o,className:z("overflow-hidden transition-all duration-300 ease-in-out",a?"opacity-100":"opacity-0"),style:{maxHeight:a?`${c}px`:"0px"},children:i.jsx("div",{ref:l,className:"py-4",children:t})})})})]})}const zt="-",Xa=r=>{const t=Ja(r),{conflictingClassGroups:e,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:o=>{const l=o.split(zt);return l[0]===""&&l.length!==1&&l.shift(),Sr(l,t)||Ka(o)},getConflictingClassGroupIds:(o,l)=>{const c=e[o]||[];return l&&s[o]?[...c,...s[o]]:c}}},Sr=(r,t)=>{var o;if(r.length===0)return t.classGroupId;const e=r[0],s=t.nextPart.get(e),a=s?Sr(r.slice(1),s):void 0;if(a)return a;if(t.validators.length===0)return;const n=r.join(zt);return(o=t.validators.find(({validator:l})=>l(n)))==null?void 0:o.classGroupId},Nr=/^\[(.+)\]$/,Ka=r=>{if(Nr.test(r)){const t=Nr.exec(r)[1],e=t==null?void 0:t.substring(0,t.indexOf(":"));if(e)return"arbitrary.."+e}},Ja=r=>{const{theme:t,classGroups:e}=r,s={nextPart:new Map,validators:[]};for(const a in e)It(e[a],s,a,t);return s},It=(r,t,e,s)=>{r.forEach(a=>{if(typeof a=="string"){const n=a===""?t:_r(t,a);n.classGroupId=e;return}if(typeof a=="function"){if(Qa(a)){It(a(s),t,e,s);return}t.validators.push({validator:a,classGroupId:e});return}Object.entries(a).forEach(([n,o])=>{It(o,_r(t,n),e,s)})})},_r=(r,t)=>{let e=r;return t.split(zt).forEach(s=>{e.nextPart.has(s)||e.nextPart.set(s,{nextPart:new Map,validators:[]}),e=e.nextPart.get(s)}),e},Qa=r=>r.isThemeGetter,en=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,e=new Map,s=new Map;const a=(n,o)=>{e.set(n,o),t++,t>r&&(t=0,s=e,e=new Map)};return{get(n){let o=e.get(n);if(o!==void 0)return o;if((o=s.get(n))!==void 0)return a(n,o),o},set(n,o){e.has(n)?e.set(n,o):a(n,o)}}},Lt="!",Pt=":",tn=Pt.length,rn=r=>{const{prefix:t,experimentalParseClassName:e}=r;let s=a=>{const n=[];let o=0,l=0,c=0,u;for(let S=0;S<a.length;S++){let j=a[S];if(o===0&&l===0){if(j===Pt){n.push(a.slice(c,S)),c=S+tn;continue}if(j==="/"){u=S;continue}}j==="["?o++:j==="]"?o--:j==="("?l++:j===")"&&l--}const f=n.length===0?a:a.substring(c),m=sn(f),g=m!==f,x=u&&u>c?u-c:void 0;return{modifiers:n,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:x}};if(t){const a=t+Pt,n=s;s=o=>o.startsWith(a)?n(o.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(e){const a=s;s=n=>e({className:n,parseClassName:a})}return s},sn=r=>r.endsWith(Lt)?r.substring(0,r.length-1):r.startsWith(Lt)?r.substring(1):r,an=r=>{const t=Object.fromEntries(r.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const a=[];let n=[];return s.forEach(o=>{o[0]==="["||t[o]?(a.push(...n.sort(),o),n=[]):n.push(o)}),a.push(...n.sort()),a}},nn=r=>({cache:en(r.cacheSize),parseClassName:rn(r),sortModifiers:an(r),...Xa(r)}),on=/\s+/,ln=(r,t)=>{const{parseClassName:e,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:n}=t,o=[],l=r.trim().split(on);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:m,modifiers:g,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:j}=e(f);if(m){c=f+(c.length>0?" "+c:c);continue}let T=!!j,w=s(T?S.substring(0,j):S);if(!w){if(!T){c=f+(c.length>0?" "+c:c);continue}if(w=s(S),!w){c=f+(c.length>0?" "+c:c);continue}T=!1}const y=n(g).join(":"),E=x?y+Lt:y,V=E+w;if(o.includes(V))continue;o.push(V);const N=a(w,T);for(let U=0;U<N.length;++U){const H=N[U];o.push(E+H)}c=f+(c.length>0?" "+c:c)}return c};function cn(){let r=0,t,e,s="";for(;r<arguments.length;)(t=arguments[r++])&&(e=Fr(t))&&(s&&(s+=" "),s+=e);return s}const Fr=r=>{if(typeof r=="string")return r;let t,e="";for(let s=0;s<r.length;s++)r[s]&&(t=Fr(r[s]))&&(e&&(e+=" "),e+=t);return e};function dn(r,...t){let e,s,a,n=o;function o(c){const u=t.reduce((f,m)=>m(f),r());return e=nn(u),s=e.cache.get,a=e.cache.set,n=l,l(c)}function l(c){const u=s(c);if(u)return u;const f=ln(c,e);return a(c,f),f}return function(){return n(cn.apply(null,arguments))}}const me=r=>{const t=e=>e[r]||[];return t.isThemeGetter=!0,t},Tr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Cr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,un=/^\d+\/\d+$/,fn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,mn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ye=r=>un.test(r),re=r=>!!r&&!Number.isNaN(Number(r)),Ie=r=>!!r&&Number.isInteger(Number(r)),Rt=r=>r.endsWith("%")&&re(r.slice(0,-1)),Ve=r=>fn.test(r),bn=()=>!0,xn=r=>hn.test(r)&&!mn.test(r),Ar=()=>!1,vn=r=>pn.test(r),yn=r=>gn.test(r),wn=r=>!P(r)&&!R(r),kn=r=>Xe(r,Dr,Ar),P=r=>Tr.test(r),Be=r=>Xe(r,zr,xn),Ut=r=>Xe(r,_n,re),Or=r=>Xe(r,Vr,Ar),jn=r=>Xe(r,$r,yn),pt=r=>Xe(r,Ir,vn),R=r=>Cr.test(r),st=r=>Ke(r,zr),En=r=>Ke(r,Fn),Mr=r=>Ke(r,Vr),Sn=r=>Ke(r,Dr),Nn=r=>Ke(r,$r),gt=r=>Ke(r,Ir,!0),Xe=(r,t,e)=>{const s=Tr.exec(r);return s?s[1]?t(s[1]):e(s[2]):!1},Ke=(r,t,e=!1)=>{const s=Cr.exec(r);return s?s[1]?t(s[1]):e:!1},Vr=r=>r==="position"||r==="percentage",$r=r=>r==="image"||r==="url",Dr=r=>r==="length"||r==="size"||r==="bg-size",zr=r=>r==="length",_n=r=>r==="number",Fn=r=>r==="family-name",Ir=r=>r==="shadow",Tn=dn(()=>{const r=me("color"),t=me("font"),e=me("text"),s=me("font-weight"),a=me("tracking"),n=me("leading"),o=me("breakpoint"),l=me("container"),c=me("spacing"),u=me("radius"),f=me("shadow"),m=me("inset-shadow"),g=me("text-shadow"),x=me("drop-shadow"),S=me("blur"),j=me("perspective"),T=me("aspect"),w=me("ease"),y=me("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...V(),R,P],U=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],_=()=>[R,P,c],W=()=>[Ye,"full","auto",..._()],q=()=>[Ie,"none","subgrid",R,P],$=()=>["auto",{span:["full",Ie,R,P]},Ie,R,P],I=()=>[Ie,"auto",R,P],K=()=>["auto","min","max","fr",R,P],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",..._()],M=()=>[Ye,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],p=()=>[r,R,P],B=()=>[...V(),Mr,Or,{position:[R,P]}],h=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",Sn,kn,{size:[R,P]}],L=()=>[Rt,st,Be],Z=()=>["","none","full",u,R,P],se=()=>["",re,st,Be],ce=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[re,Rt,Mr,Or],Y=()=>["","none",S,R,P],ne=()=>["none",re,R,P],ue=()=>["none",re,R,P],ie=()=>[re,R,P],Se=()=>[Ye,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ve],breakpoint:[Ve],color:[bn],container:[Ve],"drop-shadow":[Ve],ease:["in","out","in-out"],font:[wn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ve],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ve],shadow:[Ve],spacing:["px",re],text:[Ve],"text-shadow":[Ve],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ye,P,R,T]}],container:["container"],columns:[{columns:[re,P,R,l]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{start:W()}],end:[{end:W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[Ie,"auto",R,P]}],basis:[{basis:[Ye,"full","auto",l,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,Ye,"auto","initial","none",P]}],grow:[{grow:["",re,R,P]}],shrink:[{shrink:["",re,R,P]}],order:[{order:[Ie,"first","last","none",R,P]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[l,"screen",...M()]}],"min-w":[{"min-w":[l,"screen","none",...M()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",e,st,Be]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,R,Ut]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rt,P]}],"font-family":[{font:[En,P,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,R,P]}],"line-clamp":[{"line-clamp":[re,"none",R,Ut]}],leading:[{leading:[n,..._()]}],"list-image":[{"list-image":["none",R,P]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",R,P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:p()}],"text-color":[{text:p()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",R,Be]}],"text-decoration-color":[{decoration:p()}],"underline-offset":[{"underline-offset":[re,"auto",R,P]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R,P]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",R,P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:h()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ie,R,P],radial:["",R,P],conic:[Ie,R,P]},Nn,jn]}],"bg-color":[{bg:p()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:p()}],"gradient-via":[{via:p()}],"gradient-to":[{to:p()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:p()}],"border-color-x":[{"border-x":p()}],"border-color-y":[{"border-y":p()}],"border-color-s":[{"border-s":p()}],"border-color-e":[{"border-e":p()}],"border-color-t":[{"border-t":p()}],"border-color-r":[{"border-r":p()}],"border-color-b":[{"border-b":p()}],"border-color-l":[{"border-l":p()}],"divide-color":[{divide:p()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,R,P]}],"outline-w":[{outline:["",re,st,Be]}],"outline-color":[{outline:p()}],shadow:[{shadow:["","none",f,gt,pt]}],"shadow-color":[{shadow:p()}],"inset-shadow":[{"inset-shadow":["none",m,gt,pt]}],"inset-shadow-color":[{"inset-shadow":p()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:p()}],"ring-offset-w":[{"ring-offset":[re,Be]}],"ring-offset-color":[{"ring-offset":p()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":p()}],"text-shadow":[{"text-shadow":["none",g,gt,pt]}],"text-shadow-color":[{"text-shadow":p()}],opacity:[{opacity:[re,R,P]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[re]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":p()}],"mask-image-linear-to-color":[{"mask-linear-to":p()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":p()}],"mask-image-t-to-color":[{"mask-t-to":p()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":p()}],"mask-image-r-to-color":[{"mask-r-to":p()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":p()}],"mask-image-b-to-color":[{"mask-b-to":p()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":p()}],"mask-image-l-to-color":[{"mask-l-to":p()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":p()}],"mask-image-x-to-color":[{"mask-x-to":p()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":p()}],"mask-image-y-to-color":[{"mask-y-to":p()}],"mask-image-radial":[{"mask-radial":[R,P]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":p()}],"mask-image-radial-to-color":[{"mask-radial-to":p()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":V()}],"mask-image-conic-pos":[{"mask-conic":[re]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":p()}],"mask-image-conic-to-color":[{"mask-conic-to":p()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:h()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",R,P]}],filter:[{filter:["","none",R,P]}],blur:[{blur:Y()}],brightness:[{brightness:[re,R,P]}],contrast:[{contrast:[re,R,P]}],"drop-shadow":[{"drop-shadow":["","none",x,gt,pt]}],"drop-shadow-color":[{"drop-shadow":p()}],grayscale:[{grayscale:["",re,R,P]}],"hue-rotate":[{"hue-rotate":[re,R,P]}],invert:[{invert:["",re,R,P]}],saturate:[{saturate:[re,R,P]}],sepia:[{sepia:["",re,R,P]}],"backdrop-filter":[{"backdrop-filter":["","none",R,P]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[re,R,P]}],"backdrop-contrast":[{"backdrop-contrast":[re,R,P]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,R,P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,R,P]}],"backdrop-invert":[{"backdrop-invert":["",re,R,P]}],"backdrop-opacity":[{"backdrop-opacity":[re,R,P]}],"backdrop-saturate":[{"backdrop-saturate":[re,R,P]}],"backdrop-sepia":[{"backdrop-sepia":["",re,R,P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",R,P]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",R,P]}],ease:[{ease:["linear","initial",w,R,P]}],delay:[{delay:[re,R,P]}],animate:[{animate:["none",y,R,P]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,R,P]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[R,P,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":["translate-none"],accent:[{accent:p()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:p()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",R,P]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",R,P]}],fill:[{fill:["none",...p()]}],"stroke-w":[{stroke:[re,st,Be,Ut]}],stroke:[{stroke:["none",...p()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});var at=r=>r.type==="checkbox",We=r=>r instanceof Date,ve=r=>r==null;const Lr=r=>typeof r=="object";var fe=r=>!ve(r)&&!Array.isArray(r)&&Lr(r)&&!We(r),Pr=r=>fe(r)&&r.target?at(r.target)?r.target.checked:r.target.value:r,Cn=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,Rr=(r,t)=>r.has(Cn(t)),An=r=>{const t=r.constructor&&r.constructor.prototype;return fe(t)&&t.hasOwnProperty("isPrototypeOf")},Bt=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function be(r){let t;const e=Array.isArray(r),s=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)t=new Date(r);else if(r instanceof Set)t=new Set(r);else if(!(Bt&&(r instanceof Blob||s))&&(e||fe(r)))if(t=e?[]:{},!e&&!An(r))t=r;else for(const a in r)r.hasOwnProperty(a)&&(t[a]=be(r[a]));else return r;return t}var bt=r=>Array.isArray(r)?r.filter(Boolean):[],he=r=>r===void 0,A=(r,t,e)=>{if(!t||!fe(r))return e;const s=bt(t.split(/[,[\].]+?/)).reduce((a,n)=>ve(a)?a:a[n],r);return he(s)||s===r?he(r[t])?e:r[t]:s},je=r=>typeof r=="boolean",Wt=r=>/^\w*$/.test(r),Ur=r=>bt(r.replace(/["|']|\]/g,"").split(/\.|\[/)),oe=(r,t,e)=>{let s=-1;const a=Wt(t)?[t]:Ur(t),n=a.length,o=n-1;for(;++s<n;){const l=a[s];let c=e;if(s!==o){const u=r[l];c=fe(u)||Array.isArray(u)?u:isNaN(+a[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=c,r=r[l]}};const xt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},_e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},$e={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Br=v.createContext(null),nt=()=>v.useContext(Br),On=r=>{const{children:t,...e}=r;return v.createElement(Br.Provider,{value:e},t)};var Wr=(r,t,e,s=!0)=>{const a={defaultValues:t._defaultValues};for(const n in r)Object.defineProperty(a,n,{get:()=>{const o=n;return t._proxyFormState[o]!==_e.all&&(t._proxyFormState[o]=!s||_e.all),e&&(e[o]=!0),r[o]}});return a};const Zt=typeof window<"u"?G.useLayoutEffect:G.useEffect;function Mn(r){const t=nt(),{control:e=t.control,disabled:s,name:a,exact:n}=r||{},[o,l]=v.useState(e._formState),c=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Zt(()=>e._subscribe({name:a,formState:c.current,exact:n,callback:u=>{!s&&l({...e._formState,...u})}}),[a,s,n]),v.useEffect(()=>{c.current.isValid&&e._setValid(!0)},[e]),v.useMemo(()=>Wr(o,e,c.current,!1),[o,e])}var Ae=r=>typeof r=="string",Zr=(r,t,e,s,a)=>Ae(r)?(s&&t.watch.add(r),A(e,r,a)):Array.isArray(r)?r.map(n=>(s&&t.watch.add(n),A(e,n))):(s&&(t.watchAll=!0),e);function qt(r){const t=nt(),{control:e=t.control,name:s,defaultValue:a,disabled:n,exact:o}=r||{},l=v.useRef(a),[c,u]=v.useState(e._getWatch(s,l.current));return Zt(()=>e._subscribe({name:s,formState:{values:!0},exact:o,callback:f=>!n&&u(Zr(s,e._names,f.values||e._formValues,!1,l.current))}),[s,e,n,o]),v.useEffect(()=>e._removeUnmounted()),c}function qr(r){const t=nt(),{name:e,disabled:s,control:a=t.control,shouldUnregister:n}=r,o=Rr(a._names.array,e),l=qt({control:a,name:e,defaultValue:A(a._formValues,e,A(a._defaultValues,e,r.defaultValue)),exact:!0}),c=Mn({control:a,name:e,exact:!0}),u=v.useRef(r),f=v.useRef(a.register(e,{...r.rules,value:l,...je(r.disabled)?{disabled:r.disabled}:{}})),m=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!A(c.errors,e)},isDirty:{enumerable:!0,get:()=>!!A(c.dirtyFields,e)},isTouched:{enumerable:!0,get:()=>!!A(c.touchedFields,e)},isValidating:{enumerable:!0,get:()=>!!A(c.validatingFields,e)},error:{enumerable:!0,get:()=>A(c.errors,e)}}),[c,e]),g=v.useCallback(T=>f.current.onChange({target:{value:Pr(T),name:e},type:xt.CHANGE}),[e]),x=v.useCallback(()=>f.current.onBlur({target:{value:A(a._formValues,e),name:e},type:xt.BLUR}),[e,a._formValues]),S=v.useCallback(T=>{const w=A(a._fields,e);w&&T&&(w._f.ref={focus:()=>T.focus(),select:()=>T.select(),setCustomValidity:y=>T.setCustomValidity(y),reportValidity:()=>T.reportValidity()})},[a._fields,e]),j=v.useMemo(()=>({name:e,value:l,...je(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:g,onBlur:x,ref:S}),[e,s,c.disabled,g,x,S,l]);return v.useEffect(()=>{const T=a._options.shouldUnregister||n;a.register(e,{...u.current.rules,...je(u.current.disabled)?{disabled:u.current.disabled}:{}});const w=(y,E)=>{const V=A(a._fields,y);V&&V._f&&(V._f.mount=E)};if(w(e,!0),T){const y=be(A(a._options.defaultValues,e));oe(a._defaultValues,e,y),he(A(a._formValues,e))&&oe(a._formValues,e,y)}return!o&&a.register(e),()=>{(o?T&&!a._state.action:T)?a.unregister(e):w(e,!1)}},[e,a,o,n]),v.useEffect(()=>{a._setDisabledField({disabled:s,name:e})},[s,e,a]),v.useMemo(()=>({field:j,formState:c,fieldState:m}),[j,c,m])}const Fe=r=>r.render(qr(r));var Gr=(r,t,e,s,a)=>t?{...e[r],types:{...e[r]&&e[r].types?e[r].types:{},[s]:a||!0}}:{},ot=r=>Array.isArray(r)?r:[r],Hr=()=>{let r=[];return{get observers(){return r},next:a=>{for(const n of r)n.next&&n.next(a)},subscribe:a=>(r.push(a),{unsubscribe:()=>{r=r.filter(n=>n!==a)}}),unsubscribe:()=>{r=[]}}},Gt=r=>ve(r)||!Lr(r);function Le(r,t){if(Gt(r)||Gt(t))return r===t;if(We(r)&&We(t))return r.getTime()===t.getTime();const e=Object.keys(r),s=Object.keys(t);if(e.length!==s.length)return!1;for(const a of e){const n=r[a];if(!s.includes(a))return!1;if(a!=="ref"){const o=t[a];if(We(n)&&We(o)||fe(n)&&fe(o)||Array.isArray(n)&&Array.isArray(o)?!Le(n,o):n!==o)return!1}}return!0}var ye=r=>fe(r)&&!Object.keys(r).length,Ht=r=>r.type==="file",Te=r=>typeof r=="function",vt=r=>{if(!Bt)return!1;const t=r?r.ownerDocument:0;return r instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Yr=r=>r.type==="select-multiple",Yt=r=>r.type==="radio",Vn=r=>Yt(r)||at(r),Xt=r=>vt(r)&&r.isConnected;function $n(r,t){const e=t.slice(0,-1).length;let s=0;for(;s<e;)r=he(r)?s++:r[t[s++]];return r}function Dn(r){for(const t in r)if(r.hasOwnProperty(t)&&!he(r[t]))return!1;return!0}function pe(r,t){const e=Array.isArray(t)?t:Wt(t)?[t]:Ur(t),s=e.length===1?r:$n(r,e),a=e.length-1,n=e[a];return s&&delete s[n],a!==0&&(fe(s)&&ye(s)||Array.isArray(s)&&Dn(s))&&pe(r,e.slice(0,-1)),r}var Xr=r=>{for(const t in r)if(Te(r[t]))return!0;return!1};function yt(r,t={}){const e=Array.isArray(r);if(fe(r)||e)for(const s in r)Array.isArray(r[s])||fe(r[s])&&!Xr(r[s])?(t[s]=Array.isArray(r[s])?[]:{},yt(r[s],t[s])):ve(r[s])||(t[s]=!0);return t}function Kr(r,t,e){const s=Array.isArray(r);if(fe(r)||s)for(const a in r)Array.isArray(r[a])||fe(r[a])&&!Xr(r[a])?he(t)||Gt(e[a])?e[a]=Array.isArray(r[a])?yt(r[a],[]):{...yt(r[a])}:Kr(r[a],ve(t)?{}:t[a],e[a]):e[a]=!Le(r[a],t[a]);return e}var it=(r,t)=>Kr(r,t,yt(t));const Jr={value:!1,isValid:!1},Qr={value:!0,isValid:!0};var es=r=>{if(Array.isArray(r)){if(r.length>1){const t=r.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!he(r[0].attributes.value)?he(r[0].value)||r[0].value===""?Qr:{value:r[0].value,isValid:!0}:Qr:Jr}return Jr},ts=(r,{valueAsNumber:t,valueAsDate:e,setValueAs:s})=>he(r)?r:t?r===""?NaN:r&&+r:e&&Ae(r)?new Date(r):s?s(r):r;const rs={isValid:!1,value:null};var ss=r=>Array.isArray(r)?r.reduce((t,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:t,rs):rs;function as(r){const t=r.ref;return Ht(t)?t.files:Yt(t)?ss(r.refs).value:Yr(t)?[...t.selectedOptions].map(({value:e})=>e):at(t)?es(r.refs).value:ts(he(t.value)?r.ref.value:t.value,r)}var zn=(r,t,e,s)=>{const a={};for(const n of r){const o=A(t,n);o&&oe(a,n,o._f)}return{criteriaMode:e,names:[...r],fields:a,shouldUseNativeValidation:s}},wt=r=>r instanceof RegExp,lt=r=>he(r)?r:wt(r)?r.source:fe(r)?wt(r.value)?r.value.source:r.value:r,ns=r=>({isOnSubmit:!r||r===_e.onSubmit,isOnBlur:r===_e.onBlur,isOnChange:r===_e.onChange,isOnAll:r===_e.all,isOnTouch:r===_e.onTouched});const os="AsyncFunction";var In=r=>!!r&&!!r.validate&&!!(Te(r.validate)&&r.validate.constructor.name===os||fe(r.validate)&&Object.values(r.validate).find(t=>t.constructor.name===os)),Ln=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),is=(r,t,e)=>!e&&(t.watchAll||t.watch.has(r)||[...t.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const ct=(r,t,e,s)=>{for(const a of e||Object.keys(r)){const n=A(r,a);if(n){const{_f:o,...l}=n;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!s)return!0;if(o.ref&&t(o.ref,o.name)&&!s)return!0;if(ct(l,t))break}else if(fe(l)&&ct(l,t))break}}};function ls(r,t,e){const s=A(r,e);if(s||Wt(e))return{error:s,name:e};const a=e.split(".");for(;a.length;){const n=a.join("."),o=A(t,n),l=A(r,n);if(o&&!Array.isArray(o)&&e!==n)return{name:e};if(l&&l.type)return{name:n,error:l};a.pop()}return{name:e}}var Pn=(r,t,e,s)=>{e(r);const{name:a,...n}=r;return ye(n)||Object.keys(n).length>=Object.keys(t).length||Object.keys(n).find(o=>t[o]===(!s||_e.all))},Rn=(r,t,e)=>!r||!t||r===t||ot(r).some(s=>s&&(e?s===t:s.startsWith(t)||t.startsWith(s))),Un=(r,t,e,s,a)=>a.isOnAll?!1:!e&&a.isOnTouch?!(t||r):(e?s.isOnBlur:a.isOnBlur)?!r:(e?s.isOnChange:a.isOnChange)?r:!0,Bn=(r,t)=>!bt(A(r,t)).length&&pe(r,t),Wn=(r,t,e)=>{const s=ot(A(r,e));return oe(s,"root",t[e]),oe(r,e,s),r},kt=r=>Ae(r);function cs(r,t,e="validate"){if(kt(r)||Array.isArray(r)&&r.every(kt)||je(r)&&!r)return{type:e,message:kt(r)?r:"",ref:t}}var Je=r=>fe(r)&&!wt(r)?r:{value:r,message:""},ds=async(r,t,e,s,a,n)=>{const{ref:o,refs:l,required:c,maxLength:u,minLength:f,min:m,max:g,pattern:x,validate:S,name:j,valueAsNumber:T,mount:w}=r._f,y=A(e,j);if(!w||t.has(j))return{};const E=l?l[0]:o,V=I=>{a&&E.reportValidity&&(E.setCustomValidity(je(I)?"":I||""),E.reportValidity())},N={},U=Yt(o),H=at(o),_=U||H,W=(T||Ht(o))&&he(o.value)&&he(y)||vt(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,q=Gr.bind(null,j,s,N),$=(I,K,Q,ee=$e.maxLength,J=$e.minLength)=>{const M=I?K:Q;N[j]={type:I?ee:J,message:M,ref:o,...q(I?ee:J,M)}};if(n?!Array.isArray(y)||!y.length:c&&(!_&&(W||ve(y))||je(y)&&!y||H&&!es(l).isValid||U&&!ss(l).isValid)){const{value:I,message:K}=kt(c)?{value:!!c,message:c}:Je(c);if(I&&(N[j]={type:$e.required,message:K,ref:E,...q($e.required,K)},!s))return V(K),N}if(!W&&(!ve(m)||!ve(g))){let I,K;const Q=Je(g),ee=Je(m);if(!ve(y)&&!isNaN(y)){const J=o.valueAsNumber||y&&+y;ve(Q.value)||(I=J>Q.value),ve(ee.value)||(K=J<ee.value)}else{const J=o.valueAsDate||new Date(y),M=h=>new Date(new Date().toDateString()+" "+h),p=o.type=="time",B=o.type=="week";Ae(Q.value)&&y&&(I=p?M(y)>M(Q.value):B?y>Q.value:J>new Date(Q.value)),Ae(ee.value)&&y&&(K=p?M(y)<M(ee.value):B?y<ee.value:J<new Date(ee.value))}if((I||K)&&($(!!I,Q.message,ee.message,$e.max,$e.min),!s))return V(N[j].message),N}if((u||f)&&!W&&(Ae(y)||n&&Array.isArray(y))){const I=Je(u),K=Je(f),Q=!ve(I.value)&&y.length>+I.value,ee=!ve(K.value)&&y.length<+K.value;if((Q||ee)&&($(Q,I.message,K.message),!s))return V(N[j].message),N}if(x&&!W&&Ae(y)){const{value:I,message:K}=Je(x);if(wt(I)&&!y.match(I)&&(N[j]={type:$e.pattern,message:K,ref:o,...q($e.pattern,K)},!s))return V(K),N}if(S){if(Te(S)){const I=await S(y,e),K=cs(I,E);if(K&&(N[j]={...K,...q($e.validate,K.message)},!s))return V(K.message),N}else if(fe(S)){let I={};for(const K in S){if(!ye(I)&&!s)break;const Q=cs(await S[K](y,e),E,K);Q&&(I={...Q,...q(K,Q.message)},V(Q.message),s&&(N[j]=I))}if(!ye(I)&&(N[j]={ref:E,...I},!s))return N}}return V(!0),N};const Zn={mode:_e.onSubmit,reValidateMode:_e.onChange,shouldFocusError:!0};function qn(r={}){let t={...Zn,...r},e={submitCount:0,isDirty:!1,isReady:!1,isLoading:Te(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const s={};let a=fe(t.defaultValues)||fe(t.values)?be(t.defaultValues||t.values)||{}:{},n=t.shouldUnregister?{}:be(a),o={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...f};const g={array:Hr(),state:Hr()},x=t.criteriaMode===_e.all,S=d=>b=>{clearTimeout(u),u=setTimeout(d,b)},j=async d=>{if(!t.disabled&&(f.isValid||m.isValid||d)){const b=t.resolver?ye((await H()).errors):await W(s,!0);b!==e.isValid&&g.state.next({isValid:b})}},T=(d,b)=>{!t.disabled&&(f.isValidating||f.validatingFields||m.isValidating||m.validatingFields)&&((d||Array.from(l.mount)).forEach(k=>{k&&(b?oe(e.validatingFields,k,b):pe(e.validatingFields,k))}),g.state.next({validatingFields:e.validatingFields,isValidating:!ye(e.validatingFields)}))},w=(d,b=[],k,D,O=!0,C=!0)=>{if(D&&k&&!t.disabled){if(o.action=!0,C&&Array.isArray(A(s,d))){const X=k(A(s,d),D.argA,D.argB);O&&oe(s,d,X)}if(C&&Array.isArray(A(e.errors,d))){const X=k(A(e.errors,d),D.argA,D.argB);O&&oe(e.errors,d,X),Bn(e.errors,d)}if((f.touchedFields||m.touchedFields)&&C&&Array.isArray(A(e.touchedFields,d))){const X=k(A(e.touchedFields,d),D.argA,D.argB);O&&oe(e.touchedFields,d,X)}(f.dirtyFields||m.dirtyFields)&&(e.dirtyFields=it(a,n)),g.state.next({name:d,isDirty:$(d,b),dirtyFields:e.dirtyFields,errors:e.errors,isValid:e.isValid})}else oe(n,d,b)},y=(d,b)=>{oe(e.errors,d,b),g.state.next({errors:e.errors})},E=d=>{e.errors=d,g.state.next({errors:e.errors,isValid:!1})},V=(d,b,k,D)=>{const O=A(s,d);if(O){const C=A(n,d,he(k)?A(a,d):k);he(C)||D&&D.defaultChecked||b?oe(n,d,b?C:as(O._f)):Q(d,C),o.mount&&j()}},N=(d,b,k,D,O)=>{let C=!1,X=!1;const le={name:d};if(!t.disabled){if(!k||D){(f.isDirty||m.isDirty)&&(X=e.isDirty,e.isDirty=le.isDirty=$(),C=X!==le.isDirty);const de=Le(A(a,d),b);X=!!A(e.dirtyFields,d),de?pe(e.dirtyFields,d):oe(e.dirtyFields,d,!0),le.dirtyFields=e.dirtyFields,C=C||(f.dirtyFields||m.dirtyFields)&&X!==!de}if(k){const de=A(e.touchedFields,d);de||(oe(e.touchedFields,d,k),le.touchedFields=e.touchedFields,C=C||(f.touchedFields||m.touchedFields)&&de!==k)}C&&O&&g.state.next(le)}return C?le:{}},U=(d,b,k,D)=>{const O=A(e.errors,d),C=(f.isValid||m.isValid)&&je(b)&&e.isValid!==b;if(t.delayError&&k?(c=S(()=>y(d,k)),c(t.delayError)):(clearTimeout(u),c=null,k?oe(e.errors,d,k):pe(e.errors,d)),(k?!Le(O,k):O)||!ye(D)||C){const X={...D,...C&&je(b)?{isValid:b}:{},errors:e.errors,name:d};e={...e,...X},g.state.next(X)}},H=async d=>{T(d,!0);const b=await t.resolver(n,t.context,zn(d||l.mount,s,t.criteriaMode,t.shouldUseNativeValidation));return T(d),b},_=async d=>{const{errors:b}=await H(d);if(d)for(const k of d){const D=A(b,k);D?oe(e.errors,k,D):pe(e.errors,k)}else e.errors=b;return b},W=async(d,b,k={valid:!0})=>{for(const D in d){const O=d[D];if(O){const{_f:C,...X}=O;if(C){const le=l.array.has(C.name),de=O._f&&In(O._f);de&&f.validatingFields&&T([D],!0);const Ne=await ds(O,l.disabled,n,x,t.shouldUseNativeValidation&&!b,le);if(de&&f.validatingFields&&T([D]),Ne[C.name]&&(k.valid=!1,b))break;!b&&(A(Ne,C.name)?le?Wn(e.errors,Ne,C.name):oe(e.errors,C.name,Ne[C.name]):pe(e.errors,C.name))}!ye(X)&&await W(X,b,k)}}return k.valid},q=()=>{for(const d of l.unMount){const b=A(s,d);b&&(b._f.refs?b._f.refs.every(k=>!Xt(k)):!Xt(b._f.ref))&&ae(d)}l.unMount=new Set},$=(d,b)=>!t.disabled&&(d&&b&&oe(n,d,b),!Le(h(),a)),I=(d,b,k)=>Zr(d,l,{...o.mount?n:he(b)?a:Ae(d)?{[d]:b}:b},k,b),K=d=>bt(A(o.mount?n:a,d,t.shouldUnregister?A(a,d,[]):[])),Q=(d,b,k={})=>{const D=A(s,d);let O=b;if(D){const C=D._f;C&&(!C.disabled&&oe(n,d,ts(b,C)),O=vt(C.ref)&&ve(b)?"":b,Yr(C.ref)?[...C.ref.options].forEach(X=>X.selected=O.includes(X.value)):C.refs?at(C.ref)?C.refs.forEach(X=>{(!X.defaultChecked||!X.disabled)&&(Array.isArray(O)?X.checked=!!O.find(le=>le===X.value):X.checked=O===X.value||!!O)}):C.refs.forEach(X=>X.checked=X.value===O):Ht(C.ref)?C.ref.value="":(C.ref.value=O,C.ref.type||g.state.next({name:d,values:be(n)})))}(k.shouldDirty||k.shouldTouch)&&N(d,O,k.shouldTouch,k.shouldDirty,!0),k.shouldValidate&&B(d)},ee=(d,b,k)=>{for(const D in b){if(!b.hasOwnProperty(D))return;const O=b[D],C=`${d}.${D}`,X=A(s,C);(l.array.has(d)||fe(O)||X&&!X._f)&&!We(O)?ee(C,O,k):Q(C,O,k)}},J=(d,b,k={})=>{const D=A(s,d),O=l.array.has(d),C=be(b);oe(n,d,C),O?(g.array.next({name:d,values:be(n)}),(f.isDirty||f.dirtyFields||m.isDirty||m.dirtyFields)&&k.shouldDirty&&g.state.next({name:d,dirtyFields:it(a,n),isDirty:$(d,C)})):D&&!D._f&&!ve(C)?ee(d,C,k):Q(d,C,k),is(d,l)&&g.state.next({...e}),g.state.next({name:o.mount?d:void 0,values:be(n)})},M=async d=>{o.mount=!0;const b=d.target;let k=b.name,D=!0;const O=A(s,k),C=de=>{D=Number.isNaN(de)||We(de)&&isNaN(de.getTime())||Le(de,A(n,k,de))},X=ns(t.mode),le=ns(t.reValidateMode);if(O){let de,Ne;const Vt=b.type?as(O._f):Pr(d),Ue=d.type===xt.BLUR||d.type===xt.FOCUS_OUT,Si=!Ln(O._f)&&!t.resolver&&!A(e.errors,k)&&!O._f.deps||Un(Ue,A(e.touchedFields,k),e.isSubmitted,le,X),mr=is(k,l,Ue);oe(n,k,Vt),Ue?(O._f.onBlur&&O._f.onBlur(d),c&&c(0)):O._f.onChange&&O._f.onChange(d);const pr=N(k,Vt,Ue),Ni=!ye(pr)||mr;if(!Ue&&g.state.next({name:k,type:d.type,values:be(n)}),Si)return(f.isValid||m.isValid)&&(t.mode==="onBlur"?Ue&&j():Ue||j()),Ni&&g.state.next({name:k,...mr?{}:pr});if(!Ue&&mr&&g.state.next({...e}),t.resolver){const{errors:pa}=await H([k]);if(C(Vt),D){const _i=ls(e.errors,s,k),ga=ls(pa,s,_i.name||k);de=ga.error,k=ga.name,Ne=ye(pa)}}else T([k],!0),de=(await ds(O,l.disabled,n,x,t.shouldUseNativeValidation))[k],T([k]),C(Vt),D&&(de?Ne=!1:(f.isValid||m.isValid)&&(Ne=await W(s,!0)));D&&(O._f.deps&&B(O._f.deps),U(k,Ne,de,pr))}},p=(d,b)=>{if(A(e.errors,b)&&d.focus)return d.focus(),1},B=async(d,b={})=>{let k,D;const O=ot(d);if(t.resolver){const C=await _(he(d)?d:O);k=ye(C),D=d?!O.some(X=>A(C,X)):k}else d?(D=(await Promise.all(O.map(async C=>{const X=A(s,C);return await W(X&&X._f?{[C]:X}:X)}))).every(Boolean),!(!D&&!e.isValid)&&j()):D=k=await W(s);return g.state.next({...!Ae(d)||(f.isValid||m.isValid)&&k!==e.isValid?{}:{name:d},...t.resolver||!d?{isValid:k}:{},errors:e.errors}),b.shouldFocus&&!D&&ct(s,p,d?O:l.mount),D},h=d=>{const b={...o.mount?n:a};return he(d)?b:Ae(d)?A(b,d):d.map(k=>A(b,k))},F=(d,b)=>({invalid:!!A((b||e).errors,d),isDirty:!!A((b||e).dirtyFields,d),error:A((b||e).errors,d),isValidating:!!A(e.validatingFields,d),isTouched:!!A((b||e).touchedFields,d)}),L=d=>{d&&ot(d).forEach(b=>pe(e.errors,b)),g.state.next({errors:d?e.errors:{}})},Z=(d,b,k)=>{const D=(A(s,d,{_f:{}})._f||{}).ref,O=A(e.errors,d)||{},{ref:C,message:X,type:le,...de}=O;oe(e.errors,d,{...de,...b,ref:D}),g.state.next({name:d,errors:e.errors,isValid:!1}),k&&k.shouldFocus&&D&&D.focus&&D.focus()},se=(d,b)=>Te(d)?g.state.subscribe({next:k=>d(I(void 0,b),k)}):I(d,b,!0),ce=d=>g.state.subscribe({next:b=>{Rn(d.name,b.name,d.exact)&&Pn(b,d.formState||f,Ei,d.reRenderRoot)&&d.callback({values:{...n},...e,...b})}}).unsubscribe,ge=d=>(o.mount=!0,m={...m,...d.formState},ce({...d,formState:m})),ae=(d,b={})=>{for(const k of d?ot(d):l.mount)l.mount.delete(k),l.array.delete(k),b.keepValue||(pe(s,k),pe(n,k)),!b.keepError&&pe(e.errors,k),!b.keepDirty&&pe(e.dirtyFields,k),!b.keepTouched&&pe(e.touchedFields,k),!b.keepIsValidating&&pe(e.validatingFields,k),!t.shouldUnregister&&!b.keepDefaultValue&&pe(a,k);g.state.next({values:be(n)}),g.state.next({...e,...b.keepDirty?{isDirty:$()}:{}}),!b.keepIsValid&&j()},Y=({disabled:d,name:b})=>{(je(d)&&o.mount||d||l.disabled.has(b))&&(d?l.disabled.add(b):l.disabled.delete(b))},ne=(d,b={})=>{let k=A(s,d);const D=je(b.disabled)||je(t.disabled);return oe(s,d,{...k||{},_f:{...k&&k._f?k._f:{ref:{name:d}},name:d,mount:!0,...b}}),l.mount.add(d),k?Y({disabled:je(b.disabled)?b.disabled:t.disabled,name:d}):V(d,!0,b.value),{...D?{disabled:b.disabled||t.disabled}:{},...t.progressive?{required:!!b.required,min:lt(b.min),max:lt(b.max),minLength:lt(b.minLength),maxLength:lt(b.maxLength),pattern:lt(b.pattern)}:{},name:d,onChange:M,onBlur:M,ref:O=>{if(O){ne(d,b),k=A(s,d);const C=he(O.value)&&O.querySelectorAll&&O.querySelectorAll("input,select,textarea")[0]||O,X=Vn(C),le=k._f.refs||[];if(X?le.find(de=>de===C):C===k._f.ref)return;oe(s,d,{_f:{...k._f,...X?{refs:[...le.filter(Xt),C,...Array.isArray(A(a,d))?[{}]:[]],ref:{type:C.type,name:d}}:{ref:C}}}),V(d,!1,void 0,C)}else k=A(s,d,{}),k._f&&(k._f.mount=!1),(t.shouldUnregister||b.shouldUnregister)&&!(Rr(l.array,d)&&o.action)&&l.unMount.add(d)}}},ue=()=>t.shouldFocusError&&ct(s,p,l.mount),ie=d=>{je(d)&&(g.state.next({disabled:d}),ct(s,(b,k)=>{const D=A(s,k);D&&(b.disabled=D._f.disabled||d,Array.isArray(D._f.refs)&&D._f.refs.forEach(O=>{O.disabled=D._f.disabled||d}))},0,!1))},Se=(d,b)=>async k=>{let D;k&&(k.preventDefault&&k.preventDefault(),k.persist&&k.persist());let O=be(n);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:C,values:X}=await H();e.errors=C,O=X}else await W(s);if(l.disabled.size)for(const C of l.disabled)oe(O,C,void 0);if(pe(e.errors,"root"),ye(e.errors)){g.state.next({errors:{}});try{await d(O,k)}catch(C){D=C}}else b&&await b({...e.errors},k),ue(),setTimeout(ue);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ye(e.errors)&&!D,submitCount:e.submitCount+1,errors:e.errors}),D)throw D},Mt=(d,b={})=>{A(s,d)&&(he(b.defaultValue)?J(d,be(A(a,d))):(J(d,b.defaultValue),oe(a,d,be(b.defaultValue))),b.keepTouched||pe(e.touchedFields,d),b.keepDirty||(pe(e.dirtyFields,d),e.isDirty=b.defaultValue?$(d,be(A(a,d))):$()),b.keepError||(pe(e.errors,d),f.isValid&&j()),g.state.next({...e}))},ft=(d,b={})=>{const k=d?be(d):a,D=be(k),O=ye(d),C=O?a:D;if(b.keepDefaultValues||(a=k),!b.keepValues){if(b.keepDirtyValues){const X=new Set([...l.mount,...Object.keys(it(a,n))]);for(const le of Array.from(X))A(e.dirtyFields,le)?oe(C,le,A(n,le)):J(le,A(C,le))}else{if(Bt&&he(d))for(const X of l.mount){const le=A(s,X);if(le&&le._f){const de=Array.isArray(le._f.refs)?le._f.refs[0]:le._f.ref;if(vt(de)){const Ne=de.closest("form");if(Ne){Ne.reset();break}}}}for(const X of l.mount)J(X,A(C,X))}n=be(C),g.array.next({values:{...C}}),g.state.next({values:{...C}})}l={mount:b.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!b.keepIsValid||!!b.keepDirtyValues,o.watch=!!t.shouldUnregister,g.state.next({submitCount:b.keepSubmitCount?e.submitCount:0,isDirty:O?!1:b.keepDirty?e.isDirty:!!(b.keepDefaultValues&&!Le(d,a)),isSubmitted:b.keepIsSubmitted?e.isSubmitted:!1,dirtyFields:O?{}:b.keepDirtyValues?b.keepDefaultValues&&n?it(a,n):e.dirtyFields:b.keepDefaultValues&&d?it(a,d):b.keepDirty?e.dirtyFields:{},touchedFields:b.keepTouched?e.touchedFields:{},errors:b.keepErrors?e.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?e.isSubmitSuccessful:!1,isSubmitting:!1})},ht=(d,b)=>ft(Te(d)?d(n):d,b),ji=(d,b={})=>{const k=A(s,d),D=k&&k._f;if(D){const O=D.refs?D.refs[0]:D.ref;O.focus&&(O.focus(),b.shouldSelect&&Te(O.select)&&O.select())}},Ei=d=>{e={...e,...d}},ma={control:{register:ne,unregister:ae,getFieldState:F,handleSubmit:Se,setError:Z,_subscribe:ce,_runSchema:H,_getWatch:I,_getDirty:$,_setValid:j,_setFieldArray:w,_setDisabledField:Y,_setErrors:E,_getFieldArray:K,_reset:ft,_resetDefaultValues:()=>Te(t.defaultValues)&&t.defaultValues().then(d=>{ht(d,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:q,_disableForm:ie,_subjects:g,_proxyFormState:f,get _fields(){return s},get _formValues(){return n},get _state(){return o},set _state(d){o=d},get _defaultValues(){return a},get _names(){return l},set _names(d){l=d},get _formState(){return e},get _options(){return t},set _options(d){t={...t,...d}}},subscribe:ge,trigger:B,register:ne,handleSubmit:Se,watch:se,setValue:J,getValues:h,reset:ht,resetField:Mt,clearErrors:L,unregister:ae,setError:Z,setFocus:ji,getFieldState:F};return{...ma,formControl:ma}}function Gn(r={}){const t=v.useRef(void 0),e=v.useRef(void 0),[s,a]=v.useState({isDirty:!1,isValidating:!1,isLoading:Te(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,isReady:!1,defaultValues:Te(r.defaultValues)?void 0:r.defaultValues});t.current||(t.current={...r.formControl?r.formControl:qn(r),formState:s},r.formControl&&r.defaultValues&&!Te(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const n=t.current.control;return n._options=r,Zt(()=>{const o=n._subscribe({formState:n._proxyFormState,callback:()=>a({...n._formState}),reRenderRoot:!0});return a(l=>({...l,isReady:!0})),n._formState.isReady=!0,o},[n]),v.useEffect(()=>n._disableForm(r.disabled),[n,r.disabled]),v.useEffect(()=>{r.mode&&(n._options.mode=r.mode),r.reValidateMode&&(n._options.reValidateMode=r.reValidateMode),r.errors&&!ye(r.errors)&&n._setErrors(r.errors)},[n,r.errors,r.mode,r.reValidateMode]),v.useEffect(()=>{r.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,r.shouldUnregister]),v.useEffect(()=>{if(n._proxyFormState.isDirty){const o=n._getDirty();o!==s.isDirty&&n._subjects.state.next({isDirty:o})}},[n,s.isDirty]),v.useEffect(()=>{r.values&&!Le(r.values,e.current)?(n._reset(r.values,n._options.resetOptions),e.current=r.values,a(o=>({...o}))):n._resetDefaultValues()},[n,r.values]),v.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),t.current.formState=Wr(s,n),t.current}const us={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Hn={sm:"h-6",md:"h-10",lg:"h-12"},Yn={sm:"px-2",md:"px-2.5",lg:"px-3"};function fs(r,t,e,s,a,n,o){const l=t?"datetime-local":"date",c=z("box-border w-full rounded-lg border outline-none transition font-[var(--font-primary)]",us[e],Hn[e],Yn[e],n?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]"),m=Tn(c,a?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-disabled)] cursor-not-allowed opacity-60":"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",o);return i.jsxs(i.Fragment,{children:[i.jsx("input",{id:r,type:l,disabled:a,"aria-disabled":a,"data-disabled":a?"true":"false",...s,className:m}),i.jsx("div",{children:n!=null&&n.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:n.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function hs(r){const{control:t,name:e,rules:s,defaultValue:a,showTime:n=!1,size:o="sm",width:l="100%",label:c,labelHidden:u=!1,hasError:f=!1,errorMessage:m="",disabled:g=!1,className:x,onChange:S}=r,j=v.useId(),T=e||j;return i.jsxs("div",{className:z("flex flex-col",x),style:{width:l,maxWidth:"100%"},children:[c&&i.jsx("label",{htmlFor:T,className:z("pb-2 text-[var(--color-ds-text-primary)]",us[o],u&&"sr-only"),children:c}),t&&e?i.jsx(Fe,{name:e,control:t,rules:s,defaultValue:a,render:({field:w,fieldState:y})=>fs(T,n,o,{value:w.value,onChange:w.onChange,onBlur:w.onBlur},g,y.error,x)}):fs(T,n,o,{defaultValue:a,onChange:S},g,f?{message:m}:void 0,x)]})}const Xn=({trigger:r,items:t,align:e="left",className:s})=>{const[a,n]=v.useState(!1),o=v.useRef(null),l=v.useRef([]);v.useEffect(()=>{const u=f=>{o.current&&!o.current.contains(f.target)&&n(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]);const c=u=>{var m,g;const f=l.current.findIndex(x=>x===document.activeElement);if(u.key==="Escape")n(!1);else if(u.key==="ArrowDown"){u.preventDefault();const x=(f+1)%t.length;(m=l.current[x])==null||m.focus()}else if(u.key==="ArrowUp"){u.preventDefault();const x=(f-1+t.length)%t.length;(g=l.current[x])==null||g.focus()}};return i.jsxs("div",{className:z("relative inline-block",s),ref:o,children:[i.jsx("button",{type:"button",onClick:()=>n(u=>!u),className:"inline-flex items-center focus:outline-none","aria-haspopup":"menu","aria-expanded":a,children:r}),a&&i.jsx("div",{role:"menu","aria-orientation":"vertical",className:z("absolute mt-2 min-w-[160px] bg-[var(--color-ds-background-page)]","border border-[var(--color-ds-border-muted)] rounded shadow-lg z-10",e==="right"?"right-0":"left-0"),onKeyDown:c,children:t.map((u,f)=>{const{label:m,onSelect:g,disabled:x,icon:S}=u;return i.jsxs("button",{role:"menuitem",type:"button",disabled:x,ref:j=>{l.current[f]=j},className:z("w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",x?"opacity-50 cursor-not-allowed":"hover:bg-[var(--color-ds-background-surface)]"),onClick:()=>{x||(g(),n(!1))},children:[S&&i.jsx(S,{className:"w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]"}),m]},f)})})]})},Kn=(r,t,e,s)=>{var n,o,l,c;const a=[e,{code:t,...s||{}}];if((o=(n=r==null?void 0:r.services)==null?void 0:n.logger)!=null&&o.forward)return r.services.logger.forward(a,"warn","react-i18next::",!0);Ze(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(c=(l=r==null?void 0:r.services)==null?void 0:l.logger)!=null&&c.warn?r.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},ms={},Kt=(r,t,e,s)=>{Ze(e)&&ms[e]||(Ze(e)&&(ms[e]=new Date),Kn(r,t,e,s))},ps=(r,t)=>()=>{if(r.isInitialized)t();else{const e=()=>{setTimeout(()=>{r.off("initialized",e)},0),t()};r.on("initialized",e)}},Jt=(r,t,e)=>{r.loadNamespaces(t,ps(r,e))},gs=(r,t,e,s)=>{if(Ze(e)&&(e=[e]),r.options.preload&&r.options.preload.indexOf(t)>-1)return Jt(r,e,s);e.forEach(a=>{r.options.ns.indexOf(a)<0&&r.options.ns.push(a)}),r.loadLanguages(t,ps(r,s))},Jn=(r,t,e={})=>!t.languages||!t.languages.length?(Kt(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(r,{lng:e.lng,precheck:(s,a)=>{var n;if(((n=e.bindI18n)==null?void 0:n.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!a(s.isLanguageChangingTo,r))return!1}}),Ze=r=>typeof r=="string",Qn=r=>typeof r=="object"&&r!==null,eo=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,to={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ro=r=>to[r];let so={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:r=>r.replace(eo,ro)};const ao=()=>so;let no;const oo=()=>no,io=v.createContext();class lo{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const co=(r,t)=>{const e=v.useRef();return v.useEffect(()=>{e.current=r},[r,t]),e.current},bs=(r,t,e,s)=>r.getFixedT(t,e,s),uo=(r,t,e,s)=>v.useCallback(bs(r,t,e,s),[r,t,e,s]),Qt=(r,t={})=>{var V,N,U,H;const{i18n:e}=t,{i18n:s,defaultNS:a}=v.useContext(io)||{},n=e||s||oo();if(n&&!n.reportNamespaces&&(n.reportNamespaces=new lo),!n){Kt(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const _=(q,$)=>Ze($)?$:Qn($)&&Ze($.defaultValue)?$.defaultValue:Array.isArray(q)?q[q.length-1]:q,W=[_,{},!1];return W.t=_,W.i18n={},W.ready=!1,W}(V=n.options.react)!=null&&V.wait&&Kt(n,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...ao(),...n.options.react,...t},{useSuspense:l,keyPrefix:c}=o;let u=a||((N=n.options)==null?void 0:N.defaultNS);u=Ze(u)?[u]:u||["translation"],(H=(U=n.reportNamespaces).addUsedNamespaces)==null||H.call(U,u);const f=(n.isInitialized||n.initializedStoreOnce)&&u.every(_=>Jn(_,n,o)),m=uo(n,t.lng||null,o.nsMode==="fallback"?u:u[0],c),g=()=>m,x=()=>bs(n,t.lng||null,o.nsMode==="fallback"?u:u[0],c),[S,j]=v.useState(g);let T=u.join();t.lng&&(T=`${t.lng}${T}`);const w=co(T),y=v.useRef(!0);v.useEffect(()=>{const{bindI18n:_,bindI18nStore:W}=o;y.current=!0,!f&&!l&&(t.lng?gs(n,t.lng,u,()=>{y.current&&j(x)}):Jt(n,u,()=>{y.current&&j(x)})),f&&w&&w!==T&&y.current&&j(x);const q=()=>{y.current&&j(x)};return _&&(n==null||n.on(_,q)),W&&(n==null||n.store.on(W,q)),()=>{y.current=!1,n&&(_==null||_.split(" ").forEach($=>n.off($,q))),W&&n&&W.split(" ").forEach($=>n.store.off($,q))}},[n,T]),v.useEffect(()=>{y.current&&f&&j(g)},[n,c,f]);const E=[S,n,f];if(E.t=S,E.i18n=n,E.ready=f,f||!f&&!l)return E;throw new Promise(_=>{t.lng?gs(n,t.lng,u,()=>_()):Jt(n,u,()=>_())})},er={sm:"text-sm",md:"text-base",lg:"text-lg"};function xs(r,t,e,s,a,n,o,l,c){const{t:u}=Qt(),f=v.useRef(null),m=typeof s=="number"&&t.length>=s,g=()=>{var y;!o&&!m&&((y=f.current)==null||y.click())},x=y=>{const E=y.target.files;if(!E)return;const V=Array.from(E);let N=t.concat(V);s&&(N=N.slice(0,s)),e(N),y.target.value=""},S=y=>{if(y.preventDefault(),o||m)return;const E=Array.from(y.dataTransfer.files);let V=t.concat(E);s&&(V=V.slice(0,s)),e(V)},j=y=>{y.preventDefault()},T=y=>{const E=URL.createObjectURL(y);window.open(E)},w=y=>{const E=t.filter((V,N)=>N!==y);e(E)};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"self-start mb-4 w-auto",children:i.jsx(Me,{type:"button",variant:"outline",size:n,icon:jr,onClick:g,disabled:o||m,children:u("ds.fileUploader.browse","Browse files")})}),!m&&i.jsxs("div",{className:z("relative flex bg-[var(--color-ds-background-page)] flex-col items-center justify-center border-2 border-dashed border-[var(--color-ds-border-muted)] rounded-lg p-4",o?"opacity-50 cursor-not-allowed":"hover:border-[var(--color-ds-border-default)]",er[n],c),onDrop:S,onDragOver:j,children:[i.jsx("input",{id:r,type:"file",ref:f,className:"hidden",multiple:s!==1,accept:a,onChange:x,disabled:o}),i.jsx(Ce,{component:Da,size:"md",className:"w-8 h-8 text-[var(--color-ds-text-secondary)]"}),i.jsx("p",{className:"mt-3 text-[var(--color-ds-text-secondary)] text-center",children:u("ds.fileUploader.dragDrop","Drag & drop your files here or click to browse")})]}),t.length>0&&i.jsx("ul",{className:"mt-4 space-y-1",children:t.map((y,E)=>i.jsxs("li",{className:"flex items-center justify-between text-[var(--color-ds-text-secondary)] text-sm",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx(jr,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),i.jsx("span",{className:"truncate pr-2",children:y.name})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Me,{variant:"ghost",size:"sm",icon:Er,ariaLabel:u("ds.fileUploader.view","View"),onClick:()=>T(y)}),i.jsx(Me,{variant:"ghost",size:"sm",icon:$t,ariaLabel:u("ds.fileUploader.remove","Remove"),onClick:()=>w(E)})]})]},E))}),i.jsx("div",{className:"pt-[5px] min-h-[18px] w-full",children:l!=null&&l.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function vs(r){const{control:t,name:e,rules:s,defaultValue:a,maxFiles:n,accept:o,size:l="sm",width:c="100%",label:u,labelHidden:f=!1,disabled:m=!1,hasError:g=!1,errorMessage:x="",className:S}=r,j=v.useId(),T=e||j;if(t&&e)return i.jsxs("div",{className:z("flex flex-col",S),style:{width:c},children:[u&&i.jsx("label",{htmlFor:T,className:z("pb-[10px] text-[var(--color-ds-text-primary)]",er[l],f&&"sr-only"),children:u}),i.jsx(Fe,{name:e,control:t,rules:s,defaultValue:a instanceof FileList?Array.from(a):a||[],render:({field:E,fieldState:V})=>xs(T,E.value,N=>E.onChange(N),n,o,l,m,V.error,S)})]});const[w,y]=v.useState(a instanceof FileList?Array.from(a):a||[]);return i.jsxs("div",{className:z("flex flex-col",S),style:{width:c},children:[u&&i.jsx("label",{htmlFor:T,className:z("pb-[10px] text-[var(--color-ds-text-primary)]",er[l],f&&"sr-only"),children:u}),xs(T,w,y,n,o,l,m,g?{message:x}:void 0,S)]})}const qe=({count:r=1,width:t,height:e="1em",variant:s="rect",className:a})=>{const n=Array.from({length:r});return i.jsx(i.Fragment,{children:n.map((o,l)=>i.jsx("span",{role:"status","aria-label":"Cargando...",className:z("bg-[var(--color-ds-border-muted)] animate-pulse inline-block",s==="circle"?"rounded-full":"rounded",a),style:{width:t??"auto",height:e}},l))})},jt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},fo={sm:"h-6",md:"h-10",lg:"h-12"},ho={sm:"px-2",md:"px-2.5",lg:"px-3"},ys={sm:"pl-2",md:"pl-2.5",lg:"pl-3"},mo={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Et({id:r,type:t="text",size:e="sm",width:s="100%",label:a,labelHidden:n=!1,hasError:o=!1,errorMessage:l="",prefixIcon:c,suffixIcon:u,separator:f,suffixButton:m,disabled:g=!1,control:x,name:S,rules:j,defaultValue:T,loading:w=!1,className:y,...E}){const V=v.useId(),[N,U]=v.useState(!1),H=r||V,_=t==="password",q=c??(t==="number"?Ua:void 0),$=_?N?La:Er:u,I=z("box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",jt[e],fo[e],ho[e],o?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]","bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]","disabled:bg-[var(--color-ds-background-disabled)]","disabled:border-[var(--color-ds-border-muted)]","disabled:text-[var(--color-ds-text-disabled)]","disabled:cursor-not-allowed");return w?i.jsxs("div",{className:"flex flex-col",style:{width:s,maxWidth:"100%"},children:[!n&&a&&i.jsx("label",{htmlFor:H,className:z("pb-2",jt[e]),children:a}),i.jsx(qe,{width:"100%",height:mo[e],variant:"rect",className:"rounded-lg"}),i.jsx("div",{className:"min-h-[18px] w-full",children:i.jsx("span",{"aria-hidden":"true",children:" "})})]}):x&&S?i.jsx(Fe,{name:S,control:x,rules:j,defaultValue:T,render:({field:K,fieldState:Q})=>i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!n&&a&&i.jsx("label",{htmlFor:H,className:z("pb-2 text-[var(--color-ds-text-primary)]",jt[e]),children:a}),i.jsxs("div",{className:"relative flex items-center w-full",children:[q&&i.jsx("div",{className:z("absolute left-0 flex items-center h-full",ys[e]),children:i.jsx(Ce,{component:q,size:e,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...K,id:H,type:_?N?"text":"password":t,disabled:g,"aria-invalid":!!Q.error,className:z(I,q&&"pl-9",$&&"pr-9",y),onInvalid:ee=>ee.preventDefault(),style:_&&!N?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&i.jsx("div",{className:"flex items-center h-full",children:f}),m&&i.jsx("div",{className:"flex items-center h-full pr-2",children:m}),$&&i.jsx("button",{type:"button",onClick:()=>U(ee=>!ee),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Ce,{component:$,size:e,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:Q.error?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:Q.error.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}):i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!n&&a&&i.jsx("label",{htmlFor:H,className:z("pb-2 text-[var(--color-ds-text-primary)]",jt[e]),children:a}),i.jsxs("div",{className:"relative flex items-center w-full",children:[q&&i.jsx("div",{className:z("absolute left-0 flex items-center h-full",ys[e]),children:i.jsx(Ce,{component:q,size:e,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...E,id:H,type:_?N?"text":"password":t,disabled:g,"aria-invalid":o,className:z(I,q&&"pl-9",$&&"pr-9",y),onInvalid:K=>K.preventDefault(),style:_&&!N?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&i.jsx("div",{className:"flex items-center h-full",children:f}),m&&i.jsx("div",{className:"flex items-center h-full",children:m}),$&&i.jsx("button",{type:"button",onClick:()=>U(K=>!K),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Ce,{component:$,size:e,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:o&&l?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}const po={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},tr=400,St=8,ws=({children:r,size:t="sm",position:e="top",className:s})=>{const[a,n]=v.useState(!1),[o,l]=v.useState({x:0,y:0}),c=v.useRef(null),u=v.useId();v.useEffect(()=>{if(a&&c.current){const g=c.current.getBoundingClientRect();let x=0,S=0;switch(e){case"top":x=g.left+g.width/2-tr/2,S=g.top-St;break;case"bottom":x=g.left+g.width/2-tr/2,S=g.bottom+St;break;case"left":x=g.left-tr-St,S=g.top+g.height/2;break;case"right":x=g.right+St,S=g.top+g.height/2;break}l({x,y:S})}},[a,e]);const f=()=>typeof r=="string"?i.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):i.jsx(i.Fragment,{children:r}),m=a?i.jsx("div",{id:u,role:"tooltip",className:z("fixed z-50 w-[250px] bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)] text-ds-sm rounded p-2 shadow-lg","pointer-events-none"),style:{top:`${o.y}px`,left:`${o.x}px`,transform:e==="left"||e==="right"?"translateY(-50%)":e==="top"?"translateY(-100%)":void 0},children:f()}):null;return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button","aria-describedby":u,ref:c,className:z("inline-flex items-center justify-center focus:outline-none",po[t],"text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]",s),onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onFocus:()=>n(!0),onBlur:()=>n(!1),children:i.jsx(Wa,{className:"w-full h-full"})}),gr.createPortal(m,document.body)]})};function go({name:r,label:t,type:e="text",size:s="sm",width:a,placeholder:n,validation:o,loadingDefaults:l,disabled:c,info:u}){var T;const{control:f,formState:{errors:m}}=nt(),g=!!m[r],x=((T=m[r])==null?void 0:T.message)||"",S="relative",j=a??"w-full";return i.jsxs("div",{className:S,children:[i.jsx(Fe,{name:r,control:f,rules:o,render:({field:w})=>i.jsx(Et,{label:t,size:s,width:j,placeholder:n,hasError:g,errorMessage:x,loading:l,type:e,...w,disabled:c})}),u&&i.jsx(ws,{size:s,position:"left",className:"absolute top-1/2 right-2 -translate-y-1/2",children:u})]})}const rr=v.memo(go);rr.displayName="FormFieldInput";function bo({title:r,headerButtons:t,children:e,className:s}){return i.jsxs("div",{className:z("flex flex-col h-full",s),children:[i.jsxs("div",{className:"flex items-center justify-between py-4",children:[i.jsx("div",{className:`bg-[var(--color-ds-background-accent)] \r
|
|
24
24
|
text-[var(--color-ds-text-on-accent)] \r
|
|
25
25
|
rounded-tr-[20px] \r
|
|
26
26
|
pl-4 pr-10\r
|
|
27
|
-
text-ds-lg`,children:r}),t&&i.jsx("div",{className:"flex items-center space-x-2",children:t})]}),i.jsx("main",{className:"flex-1 overflow-auto",children:e})]})}function ks({options:r,value:t,onChange:e,children:s}){const a=v.useRef(null),[n,o]=v.useState({left:0,width:0});return v.useLayoutEffect(()=>{const l=a.current;if(!l)return;const c=()=>{const u=r.findIndex(T=>T.value===t);if(u<0)return;const f=l.children[u],p=f.querySelector("span"),g=(p==null?void 0:p.offsetWidth)??f.offsetWidth,x=f.offsetWidth,j=f.offsetLeft+(x-g)/2;o({left:j,width:g})};return c(),window.addEventListener("resize",c),l.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),l.removeEventListener("scroll",c)}},[t,r]),i.jsxs("div",{children:[i.jsxs("div",{className:"relative",children:[i.jsx("ul",{ref:a,role:"tablist",className:"flex justify-center overflow-x-auto border-b border-[var(--color-ds-border-default-50)]",children:r.map(l=>{const c=l.value===t;return i.jsx("li",{role:"tab","aria-selected":c,onClick:()=>e(l.value),className:D("cursor-pointer whitespace-nowrap px-4 py-2 transition-colors duration-150 ease-in-out",c?"text-[var(--color-ds-background-accent)]":"text-[var(--color-ds-text-primary)]"),children:i.jsx("span",{className:"inline-block",children:l.label})},l.value)})}),i.jsx("span",{className:"absolute bottom-0 h-1 bg-[var(--color-ds-background-accent)] transition-all duration-200 ease-in-out rounded-t-full",style:{left:n.left,width:n.width}})]}),i.jsx("div",{className:"mt-4 pb-4 border-b border-[var(--color-ds-border-default-50)]",children:s[t]})]})}const sr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},xo={sm:"h-6",md:"h-10",lg:"h-12"},vo={sm:"px-2",md:"px-2.5",lg:"px-3"},js={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Es(r,t,e,s,a,n,o,l,c){return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative flex items-center w-full",children:[i.jsx("select",{id:r,...s,disabled:a,className:D("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",sr[e],xo[e],vo[e],n?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",a?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-primary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]",l),children:t.map(u=>i.jsx("option",{value:u.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:u.label},u.value))}),c&&i.jsx("div",{className:"flex items-center h-full pr-2",children:c})]}),!o&&i.jsx("div",{className:"min-h-[18px] w-full",children:n!=null&&n.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:n.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function dt(r){const{control:t,name:e,rules:s,defaultValue:a,options:n=[],loadOptions:o,reloadDeps:l=[],value:c,onChange:u,size:f="sm",width:p="100%",label:g,labelHidden:x=!1,hasError:E=!1,errorMessage:j="",disableErrorPlaceholder:T=!1,disabled:w=!1,className:y,suffixButton:S}=r,O=v.useId(),_=e||O,[z,Q]=v.useState(n),[N,W]=v.useState(!!o);if(v.useEffect(()=>{o&&(W(!0),o().then(G=>Q(G)).finally(()=>W(!1)))},[o,...l]),v.useEffect(()=>{!t&&z.length>0&&(c===void 0||c===""||!z.some(G=>G.value===c))&&(u==null||u(z[0].value))},[z,c,u,t]),t&&e){const{field:G,fieldState:V}=qr({name:e,control:t,rules:s,defaultValue:a});return v.useEffect(()=>{if(!N&&z.length>0){const U=G.value;(U===void 0||!z.some(X=>X.value===U))&&G.onChange(z[0].value)}},[z,N,G]),i.jsxs("div",{className:D("flex flex-col",y),style:{width:p,maxWidth:"100%"},children:[g&&i.jsx("label",{htmlFor:_,className:D("pb-2 text-[var(--color-ds-text-primary)]",sr[f],x&&"sr-only"),children:g}),N?i.jsx(qe,{width:"100%",height:js[f],variant:"rect",className:"rounded-lg"}):Es(_,z,f,{value:G.value,onChange:U=>G.onChange(U.target.value)},w,V.error,T,y,S)]})}return i.jsxs("div",{className:D("flex flex-col",y),style:{width:p,maxWidth:"100%"},children:[g&&i.jsx("label",{htmlFor:_,className:D("pb-2 text-[var(--color-ds-text-primary)]",sr[f],x&&"sr-only"),children:g}),N?i.jsx(qe,{width:"100%",height:js[f],variant:"rect",className:"rounded-lg"}):Es(_,z,f,{value:c,onChange:G=>u==null?void 0:u(G.target.value)},w,E?{message:j}:void 0,T,y,S)]})}const Ss={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"};function Ns({groupLabel:r,inputs:t=[],separator:e=i.jsx("span",{className:"px-1 select-none",children:"/"}),useSeparator:s=!0,className:a,showVisibleLabel:n=!1,size:o="sm",width:l}){const c=t.length;return i.jsxs("div",{className:D("flex flex-col",a),style:l?{width:l}:void 0,children:[i.jsx("label",{className:D("sr-only pb-2",Ss[o]),children:r}),n&&i.jsx("label",{className:D("pb-2",Ss[o]),children:r}),i.jsx("div",{className:"flex items-center flex-nowrap",children:t.map((u,f)=>{const{width:p,className:g,options:x,loadOptions:E,...j}=u,T=Array.isArray(x)||typeof E=="function";let w="rounded-lg";!s&&c>1&&(f===0?w="rounded-l-lg rounded-r-none":f===c-1?w="rounded-r-lg rounded-l-none":w="rounded-none");const y=D("inline-flex items-center flex-shrink-0 overflow-hidden",typeof p=="string"&&p.startsWith("w-")?p:void 0),S=typeof p=="string"&&!p.startsWith("w-")?{width:p}:void 0,O=D(g,w);return i.jsxs("div",{className:y,style:S,children:[T?i.jsx(dt,{...j,size:o,className:O,options:x,loadOptions:E}):i.jsx(Et,{...j,size:o,className:O}),s&&f<c-1&&e]},f)})})]})}const _s={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},yo={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function Fs({groupLabel:r,options:t,control:e,name:s,rules:a,defaultValue:n,multiple:o=!0,size:l="sm",vertical:c=!0,className:u,showVisibleLabel:f=!0}){return i.jsx(Fe,{name:s,control:e,rules:a,defaultValue:n,render:({field:p,fieldState:g})=>{const{value:x,onChange:E}=p;g.error;const j=w=>o?Array.isArray(x)&&x.includes(w):x===w,T=w=>{if(o){const y=Array.isArray(x)?[...x]:[],S=y.indexOf(w);S>=0?y.splice(S,1):y.push(w),E(y)}else E(w)};return i.jsxs("div",{className:D("w-full",u),children:[i.jsx("label",{className:D("sr-only pb-2 text-[var(--color-ds-text-primary)]",_s[l]),children:r}),f&&i.jsx("label",{className:D("block pb-2 text-[var(--color-ds-text-primary)]",_s[l]),children:r}),i.jsx("div",{className:D(c?"flex flex-col gap-2":"flex flex-wrap gap-4"),children:t.map(w=>i.jsxs("label",{className:"inline-flex items-center space-x-2 cursor-pointer select-none",children:[i.jsx("input",{type:o?"checkbox":"radio",name:s,value:w.value,checked:j(w.value),onChange:()=>T(w.value),className:D(yo[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]")}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-md",children:w.label})]},w.value))})]})}})}function wo(r){function t(o){var l,c;for(const u of Object.keys(o)){if((l=o[u])!=null&&l.types||(c=o[u])!=null&&c.message)return u;if(typeof o[u]=="object"){const f=t(o[u]);if(f)return`${u}.${f}`}}return null}const e=t(r);if(!e)return;const s=`[name="${e}"]`,a=`[name^="${e}["], [name^="${e}."]`,n=document.querySelector(s)??document.querySelector(a);n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),n.focus({preventScroll:!0}))}const ko={success:"bg-green-100 border-green-500 text-green-800",error:"bg-red-100 border-red-500 text-red-800",info:"bg-blue-100 border-blue-500 text-blue-800",warning:"bg-yellow-100 border-yellow-500 text-yellow-800"},Ts=({id:r,message:t,variant:e="info",duration:s=5e3,onClose:a})=>(v.useEffect(()=>{const n=setTimeout(()=>a(r),s);return()=>clearTimeout(n)},[r,s,a]),i.jsxs("div",{className:D("w-80 max-w-full border-l-4 rounded shadow-md p-4 mb-2 flex justify-between items-start",ko[e]),role:"alert","aria-live":"assertive",children:[i.jsx("span",{className:"flex-1",children:t}),i.jsx("button",{onClick:()=>a(r),className:"ml-4 text-xl font-bold leading-none focus:outline-none",children:"×"})]}));let Nt;const jo=new Uint8Array(16);function Eo(){if(!Nt&&(Nt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Nt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Nt(jo)}const xe=[];for(let r=0;r<256;++r)xe.push((r+256).toString(16).slice(1));function So(r,t=0){return xe[r[t+0]]+xe[r[t+1]]+xe[r[t+2]]+xe[r[t+3]]+"-"+xe[r[t+4]]+xe[r[t+5]]+"-"+xe[r[t+6]]+xe[r[t+7]]+"-"+xe[r[t+8]]+xe[r[t+9]]+"-"+xe[r[t+10]]+xe[r[t+11]]+xe[r[t+12]]+xe[r[t+13]]+xe[r[t+14]]+xe[r[t+15]]}const Cs={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function No(r,t,e){if(Cs.randomUUID&&!r)return Cs.randomUUID();r=r||{};const s=r.random||(r.rng||Eo)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,So(s)}const As=v.createContext(null),Os=()=>{const r=v.useContext(As);if(!r)throw new Error("useToast debe usarse dentro de <ToastProvider>");return r},_o=({children:r})=>{const[t,e]=v.useState([]),s=(n,o="info",l=5e3)=>{const c=No();e(u=>[...u,{id:c,message:n,variant:o,duration:l}])},a=n=>{e(o=>o.filter(l=>l.id!==n))};return i.jsxs(As.Provider,{value:{show:s},children:[r,i.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col items-end",children:t.map(n=>i.jsx(Ts,{id:n.id,message:n.message,variant:n.variant,duration:n.duration,onClose:a},n.id))})]})},Ms=(r,t,e)=>{if(r&&"reportValidity"in r){const s=A(e,t);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},Vs=(r,t)=>{for(const e in t.fields){const s=t.fields[e];s&&s.ref&&"reportValidity"in s.ref?Ms(s.ref,e,r):s&&s.refs&&s.refs.forEach(a=>Ms(a,e,r))}},Fo=(r,t)=>{t.shouldUseNativeValidation&&Vs(r,t);const e={};for(const s in r){const a=A(t.fields,s),n=Object.assign(r[s]||{},{ref:a&&a.ref});if(To(t.names||Object.keys(r),s)){const o=Object.assign({},A(e,s));oe(o,"root",n),oe(e,s,o)}else oe(e,s,n)}return e},To=(r,t)=>{const e=$s(t);return r.some(s=>$s(s).match(`^${e}\\.\\d+`))};function $s(r){return r.replace(/\]|\[/g,"")}function Ds(r,t,e){return e===void 0&&(e={}),function(s,a,n){try{return Promise.resolve(function(o,l){try{var c=(t!=null&&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(r[e.mode==="sync"?"validateSync":"validate"](s,Object.assign({abortEarly:!1},t,{context:a}))).then(function(u){return n.shouldUseNativeValidation&&Vs({},n),{values:e.raw?Object.assign({},s):u,errors:{}}}))}catch(u){return l(u)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:Fo((l=o,c=!n.shouldUseNativeValidation&&n.criteriaMode==="all",(l.inner||[]).reduce(function(u,f){if(u[f.path]||(u[f.path]={message:f.message,type:f.type}),c){var p=u[f.path].types,g=p&&p[f.type];u[f.path]=Gr(f.path,c,u,f.type,g?[].concat(g,f.message):f.message)}return u},{})),n)};var l,c}))}catch(o){return Promise.reject(o)}}}var ar,zs;function Co(){if(zs)return ar;zs=1;function r(w){this._maxSize=w,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(w){return this._values[w]},r.prototype.set=function(w,y){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=y};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,e=/^\d+$/,s=/^\d/,a=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,n=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,l=new r(o),c=new r(o),u=new r(o);ar={Cache:r,split:p,normalizePath:f,setter:function(w){var y=f(w);return c.get(w)||c.set(w,function(O,_){for(var z=0,Q=y.length,N=O;z<Q-1;){var W=y[z];if(W==="__proto__"||W==="constructor"||W==="prototype")return O;N=N[y[z++]]}N[y[z]]=_})},getter:function(w,y){var S=f(w);return u.get(w)||u.set(w,function(_){for(var z=0,Q=S.length;z<Q;)if(_!=null||!y)_=_[S[z++]];else return;return _})},join:function(w){return w.reduce(function(y,S){return y+(x(S)||e.test(S)?"["+S+"]":(y?".":"")+S)},"")},forEach:function(w,y,S){g(Array.isArray(w)?w:p(w),y,S)}};function f(w){return l.get(w)||l.set(w,p(w).map(function(y){return y.replace(n,"$2")}))}function p(w){return w.match(t)||[""]}function g(w,y,S){var O=w.length,_,z,Q,N;for(z=0;z<O;z++)_=w[z],_&&(T(_)&&(_='"'+_+'"'),N=x(_),Q=!N&&/^\d+$/.test(_),y.call(S,_,N,Q,z,w))}function x(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function E(w){return w.match(s)&&!w.match(e)}function j(w){return a.test(w)}function T(w){return!x(w)&&(E(w)||j(w))}return ar}var Ge=Co(),nr,Is;function Ao(){if(Is)return nr;Is=1;const r=/[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=f=>f.match(r)||[],e=f=>f[0].toUpperCase()+f.slice(1),s=(f,p)=>t(f).join(p).toLowerCase(),a=f=>t(f).reduce((p,g)=>`${p}${p?g[0].toUpperCase()+g.slice(1).toLowerCase():g.toLowerCase()}`,"");return nr={words:t,upperFirst:e,camelCase:a,pascalCase:f=>e(a(f)),snakeCase:f=>s(f,"_"),kebabCase:f=>s(f,"-"),sentenceCase:f=>e(s(f," ")),titleCase:f=>t(f).map(e).join(" ")},nr}var or=Ao(),_t={exports:{}},Ls;function Oo(){if(Ls)return _t.exports;Ls=1,_t.exports=function(a){return r(t(a),a)},_t.exports.array=r;function r(a,n){var o=a.length,l=new Array(o),c={},u=o,f=e(n),p=s(a);for(n.forEach(function(x){if(!p.has(x[0])||!p.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)c[u]||g(a[u],u,new Set);return l;function g(x,E,j){if(j.has(x)){var T;try{T=", node was:"+JSON.stringify(x)}catch{T=""}throw new Error("Cyclic dependency"+T)}if(!p.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!c[E]){c[E]=!0;var w=f.get(x)||new Set;if(w=Array.from(w),E=w.length){j.add(x);do{var y=w[--E];g(y,p.get(y),j)}while(E);j.delete(x)}l[--o]=x}}}function t(a){for(var n=new Set,o=0,l=a.length;o<l;o++){var c=a[o];n.add(c[0]),n.add(c[1])}return Array.from(n)}function e(a){for(var n=new Map,o=0,l=a.length;o<l;o++){var c=a[o];n.has(c[0])||n.set(c[0],new Set),n.has(c[1])||n.set(c[1],new Set),n.get(c[0]).add(c[1])}return n}function s(a){for(var n=new Map,o=0,l=a.length;o<l;o++)n.set(a[o],o);return n}return _t.exports}var Mo=Oo();const Vo=xa(Mo),$o=Object.prototype.toString,Do=Error.prototype.toString,zo=RegExp.prototype.toString,Io=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Lo=/^Symbol\((.*)\)(.*)$/;function Po(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function Ps(r,t=!1){if(r==null||r===!0||r===!1)return""+r;const e=typeof r;if(e==="number")return Po(r);if(e==="string")return t?`"${r}"`:r;if(e==="function")return"[Function "+(r.name||"anonymous")+"]";if(e==="symbol")return Io.call(r).replace(Lo,"Symbol($1)");const s=$o.call(r).slice(8,-1);return s==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):s==="Error"||r instanceof Error?"["+Do.call(r)+"]":s==="RegExp"?zo.call(r):null}function Pe(r,t){let e=Ps(r,t);return e!==null?e:JSON.stringify(r,function(s,a){let n=Ps(this[s],t);return n!==null?n:a},2)}function Rs(r){return r==null?[]:[].concat(r)}let Us,Bs,Ws,Ro=/\$\{\s*(\w+)\s*\}/g;Us=Symbol.toStringTag;class Zs{constructor(t,e,s,a){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[Us]="Error",this.name="ValidationError",this.value=e,this.path=s,this.type=a,this.errors=[],this.inner=[],Rs(t).forEach(n=>{if(we.isError(n)){this.errors.push(...n.errors);const o=n.inner.length?n.inner:[n];this.inner.push(...o)}else this.errors.push(n)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Bs=Symbol.hasInstance,Ws=Symbol.toStringTag;class we extends Error{static formatError(t,e){const s=e.label||e.path||"this";return e=Object.assign({},e,{path:s,originalPath:e.path}),typeof t=="string"?t.replace(Ro,(a,n)=>Pe(e[n])):typeof t=="function"?t(e):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,e,s,a,n){const o=new Zs(t,e,s,a);if(n)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Ws]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,we)}static[Bs](t){return Zs[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Oe={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:r,type:t,value:e,originalValue:s})=>{const a=s!=null&&s!==e?` (cast from the value \`${Pe(s,!0)}\`).`:".";return t!=="mixed"?`${r} must be a \`${t}\` type, but the final value was: \`${Pe(e,!0)}\``+a:`${r} must match the configured type. The validated value was: \`${Pe(e,!0)}\``+a}},ke={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"},Re={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"},ir={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Uo={isValue:"${path} field must be ${value}"},Ft={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:Oe,string:ke,number:Re,date:ir,object:Ft,array:{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"},boolean:Uo,tuple:{notType:r=>{const{path:t,value:e,spec:s}=r,a=s.types.length;if(Array.isArray(e)){if(e.length<a)return`${t} tuple value has too few items, expected a length of ${a} but got ${e.length} for value: \`${Pe(e,!0)}\``;if(e.length>a)return`${t} tuple value has too many items, expected a length of ${a} but got ${e.length} for value: \`${Pe(e,!0)}\``}return we.formatError(Oe.notType,r)}}});const lr=r=>r&&r.__isYupSchema__;class Tt{static fromOptions(t,e){if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:a,otherwise:n}=e,o=typeof s=="function"?s:(...l)=>l.every(c=>c===s);return new Tt(t,(l,c)=>{var u;let f=o(...l)?a:n;return(u=f==null?void 0:f(c))!=null?u:c})}constructor(t,e){this.fn=void 0,this.refs=t,this.refs=t,this.fn=e}resolve(t,e){let s=this.refs.map(n=>n.getValue(e==null?void 0:e.value,e==null?void 0:e.parent,e==null?void 0:e.context)),a=this.fn(s,t,e);if(a===void 0||a===t)return t;if(!lr(a))throw new TypeError("conditions must return a schema object");return a.resolve(e)}}const Ct={context:"$",value:"."};class He{constructor(t,e={}){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]===Ct.context,this.isValue=this.key[0]===Ct.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?Ct.context:this.isValue?Ct.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&Ge.getter(this.path,!0),this.map=e.map}getValue(t,e,s){let a=this.isContext?s:this.isValue?t:e;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(t,e){return this.getValue(t,e==null?void 0:e.parent,e==null?void 0:e.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}He.prototype.__isYupRef=!0;const De=r=>r==null;function Qe(r){function t({value:e,path:s="",options:a,originalValue:n,schema:o},l,c){const{name:u,test:f,params:p,message:g,skipAbsent:x}=r;let{parent:E,context:j,abortEarly:T=o.spec.abortEarly,disableStackTrace:w=o.spec.disableStackTrace}=a;function y(V){return He.isRef(V)?V.getValue(e,E,j):V}function S(V={}){const U=Object.assign({value:e,originalValue:n,label:o.spec.label,path:V.path||s,spec:o.spec,disableStackTrace:V.disableStackTrace||w},p,V.params);for(const ee of Object.keys(U))U[ee]=y(U[ee]);const X=new we(we.formatError(V.message||g,U),e,U.path,V.type||u,U.disableStackTrace);return X.params=U,X}const O=T?l:c;let _={path:s,parent:E,type:u,from:a.from,createError:S,resolve:y,options:a,originalValue:n,schema:o};const z=V=>{we.isError(V)?O(V):V?c(null):O(S())},Q=V=>{we.isError(V)?O(V):l(V)};if(x&&De(e))return z(!0);let W;try{var G;if(W=f.call(_,e,_),typeof((G=W)==null?void 0:G.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(W).then(z,Q)}}catch(V){Q(V);return}z(W)}return t.OPTIONS=r,t}function Bo(r,t,e,s=e){let a,n,o;return t?(Ge.forEach(t,(l,c,u)=>{let f=c?l.slice(1,l.length-1):l;r=r.resolve({context:s,parent:a,value:e});let p=r.type==="tuple",g=u?parseInt(f,10):0;if(r.innerType||p){if(p&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(e&&g>=e.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);a=e,e=e&&e[g],r=p?r.spec.types[g]:r.innerType}if(!u){if(!r.fields||!r.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${r.type}")`);a=e,e=e&&e[f],r=r.fields[f]}n=f,o=c?"["+l+"]":"."+l}),{schema:r,parent:a,parentPath:n}):{parent:a,parentPath:t,schema:r}}class At extends Set{describe(){const t=[];for(const e of this.values())t.push(He.isRef(e)?e.describe():e);return t}resolveAll(t){let e=[];for(const s of this.values())e.push(t(s));return e}clone(){return new At(this.values())}merge(t,e){const s=this.clone();return t.forEach(a=>s.add(a)),e.forEach(a=>s.delete(a)),s}}function et(r,t=new Map){if(lr(r)||!r||typeof r!="object")return r;if(t.has(r))return t.get(r);let e;if(r instanceof Date)e=new Date(r.getTime()),t.set(r,e);else if(r instanceof RegExp)e=new RegExp(r),t.set(r,e);else if(Array.isArray(r)){e=new Array(r.length),t.set(r,e);for(let s=0;s<r.length;s++)e[s]=et(r[s],t)}else if(r instanceof Map){e=new Map,t.set(r,e);for(const[s,a]of r.entries())e.set(s,et(a,t))}else if(r instanceof Set){e=new Set,t.set(r,e);for(const s of r)e.add(et(s,t))}else if(r instanceof Object){e={},t.set(r,e);for(const[s,a]of Object.entries(r))e[s]=et(a,t)}else throw Error(`Unable to clone ${r}`);return e}class Ee{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 At,this._blacklist=new At,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Oe.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(e=>{e.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const e=Object.create(Object.getPrototypeOf(this));return e.type=this.type,e._typeCheck=this._typeCheck,e._whitelist=this._whitelist.clone(),e._blacklist=this._blacklist.clone(),e.internalTests=Object.assign({},this.internalTests),e.exclusiveTests=Object.assign({},this.exclusiveTests),e.deps=[...this.deps],e.conditions=[...this.conditions],e.tests=[...this.tests],e.transforms=[...this.transforms],e.spec=et(Object.assign({},this.spec,t)),e}label(t){let e=this.clone();return e.spec.label=t,e}meta(...t){if(t.length===0)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},t[0]),e}withMutation(t){let e=this._mutate;this._mutate=!0;let s=t(this);return this._mutate=e,s}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 e=this,s=t.clone();const a=Object.assign({},e.spec,s.spec);return s.spec=a,s.internalTests=Object.assign({},e.internalTests,s.internalTests),s._whitelist=e._whitelist.merge(t._whitelist,t._blacklist),s._blacklist=e._blacklist.merge(t._blacklist,t._whitelist),s.tests=e.tests,s.exclusiveTests=e.exclusiveTests,s.withMutation(n=>{t.tests.forEach(o=>{n.test(o.OPTIONS)})}),s.transforms=[...e.transforms,...s.transforms],s}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let e=this;if(e.conditions.length){let s=e.conditions;e=e.clone(),e.conditions=[],e=s.reduce((a,n)=>n.resolve(a,t),e),e=e.resolve(t)}return e}resolveOptions(t){var e,s,a,n;return Object.assign({},t,{from:t.from||[],strict:(e=t.strict)!=null?e:this.spec.strict,abortEarly:(s=t.abortEarly)!=null?s:this.spec.abortEarly,recursive:(a=t.recursive)!=null?a:this.spec.recursive,disableStackTrace:(n=t.disableStackTrace)!=null?n:this.spec.disableStackTrace})}cast(t,e={}){let s=this.resolve(Object.assign({value:t},e)),a=e.assert==="ignore-optionality",n=s._cast(t,e);if(e.assert!==!1&&!s.isType(n)){if(a&&De(n))return n;let o=Pe(t),l=Pe(n);throw new TypeError(`The value of ${e.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}".
|
|
27
|
+
text-ds-lg`,children:r}),t&&i.jsx("div",{className:"flex items-center space-x-2",children:t})]}),i.jsx("main",{className:"flex-1 overflow-auto",children:e})]})}function ks({options:r,value:t,onChange:e,children:s}){const a=v.useRef(null),[n,o]=v.useState({left:0,width:0});return v.useLayoutEffect(()=>{const l=a.current;if(!l)return;const c=()=>{const u=r.findIndex(T=>T.value===t);if(u<0)return;const f=l.children[u],m=f.querySelector("span"),g=(m==null?void 0:m.offsetWidth)??f.offsetWidth,x=f.offsetWidth,j=f.offsetLeft+(x-g)/2;o({left:j,width:g})};return c(),window.addEventListener("resize",c),l.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),l.removeEventListener("scroll",c)}},[t,r]),i.jsxs("div",{children:[i.jsxs("div",{className:"relative",children:[i.jsx("ul",{ref:a,role:"tablist",className:"flex justify-center overflow-x-auto border-b border-[var(--color-ds-border-default-50)]",children:r.map(l=>{const c=l.value===t;return i.jsx("li",{role:"tab","aria-selected":c,onClick:()=>e(l.value),className:z("cursor-pointer whitespace-nowrap px-4 py-2 transition-colors duration-150 ease-in-out",c?"text-[var(--color-ds-background-accent)]":"text-[var(--color-ds-text-primary)]"),children:i.jsx("span",{className:"inline-block",children:l.label})},l.value)})}),i.jsx("span",{className:"absolute bottom-0 h-1 bg-[var(--color-ds-background-accent)] transition-all duration-200 ease-in-out rounded-t-full",style:{left:n.left,width:n.width}})]}),i.jsx("div",{className:"mt-4 pb-4 border-b border-[var(--color-ds-border-default-50)]",children:s[t]})]})}const sr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},xo={sm:"h-6",md:"h-10",lg:"h-12"},vo={sm:"px-2",md:"px-2.5",lg:"px-3"},js={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Es(r,t,e,s,a,n,o,l,c){return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative flex items-center w-full",children:[i.jsx("select",{id:r,...s,disabled:a,className:z("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",sr[e],xo[e],vo[e],n?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",a?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-primary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]",l),children:t.map(u=>i.jsx("option",{value:u.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:u.label},u.value))}),c&&i.jsx("div",{className:"flex items-center h-full pr-2",children:c})]}),!o&&i.jsx("div",{className:"min-h-[18px] w-full",children:n!=null&&n.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:n.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function dt(r){const{control:t,name:e,rules:s,defaultValue:a,options:n=[],loadOptions:o,reloadDeps:l=[],value:c,onChange:u,size:f="sm",width:m="100%",label:g,labelHidden:x=!1,hasError:S=!1,errorMessage:j="",disableErrorPlaceholder:T=!1,disabled:w=!1,className:y,suffixButton:E}=r,V=v.useId(),N=e||V,[U,H]=v.useState(n),[_,W]=v.useState(!!o);if(v.useEffect(()=>{o&&(W(!0),o().then(q=>H(q)).finally(()=>W(!1)))},[o,...l]),v.useEffect(()=>{!t&&U.length>0&&(c===void 0||c===""||!U.some(q=>q.value===c))&&(u==null||u(U[0].value))},[U,c,u,t]),t&&e){const{field:q,fieldState:$}=qr({name:e,control:t,rules:s,defaultValue:a});return v.useEffect(()=>{if(!_&&U.length>0){const I=q.value;(I===void 0||!U.some(K=>K.value===I))&&q.onChange(U[0].value)}},[U,_,q]),i.jsxs("div",{className:z("flex flex-col",y),style:{width:m,maxWidth:"100%"},children:[g&&i.jsx("label",{htmlFor:N,className:z("pb-2 text-[var(--color-ds-text-primary)]",sr[f],x&&"sr-only"),children:g}),_?i.jsx(qe,{width:"100%",height:js[f],variant:"rect",className:"rounded-lg"}):Es(N,U,f,{value:q.value,onChange:I=>q.onChange(I.target.value)},w,$.error,T,y,E)]})}return i.jsxs("div",{className:z("flex flex-col",y),style:{width:m,maxWidth:"100%"},children:[g&&i.jsx("label",{htmlFor:N,className:z("pb-2 text-[var(--color-ds-text-primary)]",sr[f],x&&"sr-only"),children:g}),_?i.jsx(qe,{width:"100%",height:js[f],variant:"rect",className:"rounded-lg"}):Es(N,U,f,{value:c,onChange:q=>u==null?void 0:u(q.target.value)},w,S?{message:j}:void 0,T,y,E)]})}const Ss={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"};function Ns({groupLabel:r,inputs:t=[],separator:e=i.jsx("span",{className:"px-1 select-none",children:"/"}),useSeparator:s=!0,className:a,showVisibleLabel:n=!1,size:o="sm",width:l}){const c=t.length;return i.jsxs("div",{className:z("flex flex-col",a),style:l?{width:l}:void 0,children:[i.jsx("label",{className:z("sr-only pb-2",Ss[o]),children:r}),n&&i.jsx("label",{className:z("pb-2",Ss[o]),children:r}),i.jsx("div",{className:"flex items-center flex-nowrap",children:t.map((u,f)=>{const{width:m,className:g,options:x,loadOptions:S,...j}=u,T=Array.isArray(x)||typeof S=="function";let w="rounded-lg";!s&&c>1&&(f===0?w="rounded-l-lg rounded-r-none":f===c-1?w="rounded-r-lg rounded-l-none":w="rounded-none");const y=z("inline-flex items-center flex-shrink-0 overflow-hidden",typeof m=="string"&&m.startsWith("w-")?m:void 0),E=typeof m=="string"&&!m.startsWith("w-")?{width:m}:void 0,V=z(g,w);return i.jsxs("div",{className:y,style:E,children:[T?i.jsx(dt,{...j,size:o,className:V,options:x,loadOptions:S}):i.jsx(Et,{...j,size:o,className:V}),s&&f<c-1&&e]},f)})})]})}const _s={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},yo={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function Fs({groupLabel:r,options:t,control:e,name:s,rules:a,defaultValue:n,multiple:o=!0,size:l="sm",vertical:c=!0,className:u,showVisibleLabel:f=!0}){return i.jsx(Fe,{name:s,control:e,rules:a,defaultValue:n,render:({field:m,fieldState:g})=>{const{value:x,onChange:S}=m;g.error;const j=w=>o?Array.isArray(x)&&x.includes(w):x===w,T=w=>{if(o){const y=Array.isArray(x)?[...x]:[],E=y.indexOf(w);E>=0?y.splice(E,1):y.push(w),S(y)}else S(w)};return i.jsxs("div",{className:z("w-full",u),children:[i.jsx("label",{className:z("sr-only pb-2 text-[var(--color-ds-text-primary)]",_s[l]),children:r}),f&&i.jsx("label",{className:z("block pb-2 text-[var(--color-ds-text-primary)]",_s[l]),children:r}),i.jsx("div",{className:z(c?"flex flex-col gap-2":"flex flex-wrap gap-4"),children:t.map(w=>i.jsxs("label",{className:"inline-flex items-center space-x-2 cursor-pointer select-none",children:[i.jsx("input",{type:o?"checkbox":"radio",name:s,value:w.value,checked:j(w.value),onChange:()=>T(w.value),className:z(yo[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]")}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-md",children:w.label})]},w.value))})]})}})}function wo(r){function t(o){var l,c;for(const u of Object.keys(o)){if((l=o[u])!=null&&l.types||(c=o[u])!=null&&c.message)return u;if(typeof o[u]=="object"){const f=t(o[u]);if(f)return`${u}.${f}`}}return null}const e=t(r);if(!e)return;const s=`[name="${e}"]`,a=`[name^="${e}["], [name^="${e}."]`,n=document.querySelector(s)??document.querySelector(a);n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),n.focus({preventScroll:!0}))}const ko={success:"bg-green-100 border-green-500 text-green-800",error:"bg-red-100 border-red-500 text-red-800",info:"bg-blue-100 border-blue-500 text-blue-800",warning:"bg-yellow-100 border-yellow-500 text-yellow-800"},Ts=({id:r,message:t,variant:e="info",duration:s=5e3,onClose:a})=>(v.useEffect(()=>{const n=setTimeout(()=>a(r),s);return()=>clearTimeout(n)},[r,s,a]),i.jsxs("div",{className:z("w-80 max-w-full border-l-4 rounded shadow-md p-4 mb-2 flex justify-between items-start",ko[e]),role:"alert","aria-live":"assertive",children:[i.jsx("span",{className:"flex-1",children:t}),i.jsx("button",{onClick:()=>a(r),className:"ml-4 text-xl font-bold leading-none focus:outline-none",children:"×"})]}));let Nt;const jo=new Uint8Array(16);function Eo(){if(!Nt&&(Nt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Nt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Nt(jo)}const xe=[];for(let r=0;r<256;++r)xe.push((r+256).toString(16).slice(1));function So(r,t=0){return xe[r[t+0]]+xe[r[t+1]]+xe[r[t+2]]+xe[r[t+3]]+"-"+xe[r[t+4]]+xe[r[t+5]]+"-"+xe[r[t+6]]+xe[r[t+7]]+"-"+xe[r[t+8]]+xe[r[t+9]]+"-"+xe[r[t+10]]+xe[r[t+11]]+xe[r[t+12]]+xe[r[t+13]]+xe[r[t+14]]+xe[r[t+15]]}const Cs={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function No(r,t,e){if(Cs.randomUUID&&!r)return Cs.randomUUID();r=r||{};const s=r.random||(r.rng||Eo)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,So(s)}const As=v.createContext(null),Os=()=>{const r=v.useContext(As);if(!r)throw new Error("useToast debe usarse dentro de <ToastProvider>");return r},_o=({children:r})=>{const[t,e]=v.useState([]),s=(n,o="info",l=5e3)=>{const c=No();e(u=>[...u,{id:c,message:n,variant:o,duration:l}])},a=n=>{e(o=>o.filter(l=>l.id!==n))};return i.jsxs(As.Provider,{value:{show:s},children:[r,i.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col items-end",children:t.map(n=>i.jsx(Ts,{id:n.id,message:n.message,variant:n.variant,duration:n.duration,onClose:a},n.id))})]})},Ms=(r,t,e)=>{if(r&&"reportValidity"in r){const s=A(e,t);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},Vs=(r,t)=>{for(const e in t.fields){const s=t.fields[e];s&&s.ref&&"reportValidity"in s.ref?Ms(s.ref,e,r):s&&s.refs&&s.refs.forEach(a=>Ms(a,e,r))}},Fo=(r,t)=>{t.shouldUseNativeValidation&&Vs(r,t);const e={};for(const s in r){const a=A(t.fields,s),n=Object.assign(r[s]||{},{ref:a&&a.ref});if(To(t.names||Object.keys(r),s)){const o=Object.assign({},A(e,s));oe(o,"root",n),oe(e,s,o)}else oe(e,s,n)}return e},To=(r,t)=>{const e=$s(t);return r.some(s=>$s(s).match(`^${e}\\.\\d+`))};function $s(r){return r.replace(/\]|\[/g,"")}function Ds(r,t,e){return e===void 0&&(e={}),function(s,a,n){try{return Promise.resolve(function(o,l){try{var c=(t!=null&&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(r[e.mode==="sync"?"validateSync":"validate"](s,Object.assign({abortEarly:!1},t,{context:a}))).then(function(u){return n.shouldUseNativeValidation&&Vs({},n),{values:e.raw?Object.assign({},s):u,errors:{}}}))}catch(u){return l(u)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:Fo((l=o,c=!n.shouldUseNativeValidation&&n.criteriaMode==="all",(l.inner||[]).reduce(function(u,f){if(u[f.path]||(u[f.path]={message:f.message,type:f.type}),c){var m=u[f.path].types,g=m&&m[f.type];u[f.path]=Gr(f.path,c,u,f.type,g?[].concat(g,f.message):f.message)}return u},{})),n)};var l,c}))}catch(o){return Promise.reject(o)}}}var ar,zs;function Co(){if(zs)return ar;zs=1;function r(w){this._maxSize=w,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(w){return this._values[w]},r.prototype.set=function(w,y){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=y};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,e=/^\d+$/,s=/^\d/,a=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,n=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,l=new r(o),c=new r(o),u=new r(o);ar={Cache:r,split:m,normalizePath:f,setter:function(w){var y=f(w);return c.get(w)||c.set(w,function(V,N){for(var U=0,H=y.length,_=V;U<H-1;){var W=y[U];if(W==="__proto__"||W==="constructor"||W==="prototype")return V;_=_[y[U++]]}_[y[U]]=N})},getter:function(w,y){var E=f(w);return u.get(w)||u.set(w,function(N){for(var U=0,H=E.length;U<H;)if(N!=null||!y)N=N[E[U++]];else return;return N})},join:function(w){return w.reduce(function(y,E){return y+(x(E)||e.test(E)?"["+E+"]":(y?".":"")+E)},"")},forEach:function(w,y,E){g(Array.isArray(w)?w:m(w),y,E)}};function f(w){return l.get(w)||l.set(w,m(w).map(function(y){return y.replace(n,"$2")}))}function m(w){return w.match(t)||[""]}function g(w,y,E){var V=w.length,N,U,H,_;for(U=0;U<V;U++)N=w[U],N&&(T(N)&&(N='"'+N+'"'),_=x(N),H=!_&&/^\d+$/.test(N),y.call(E,N,_,H,U,w))}function x(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function S(w){return w.match(s)&&!w.match(e)}function j(w){return a.test(w)}function T(w){return!x(w)&&(S(w)||j(w))}return ar}var Ge=Co(),nr,Is;function Ao(){if(Is)return nr;Is=1;const r=/[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=f=>f.match(r)||[],e=f=>f[0].toUpperCase()+f.slice(1),s=(f,m)=>t(f).join(m).toLowerCase(),a=f=>t(f).reduce((m,g)=>`${m}${m?g[0].toUpperCase()+g.slice(1).toLowerCase():g.toLowerCase()}`,"");return nr={words:t,upperFirst:e,camelCase:a,pascalCase:f=>e(a(f)),snakeCase:f=>s(f,"_"),kebabCase:f=>s(f,"-"),sentenceCase:f=>e(s(f," ")),titleCase:f=>t(f).map(e).join(" ")},nr}var or=Ao(),_t={exports:{}},Ls;function Oo(){if(Ls)return _t.exports;Ls=1,_t.exports=function(a){return r(t(a),a)},_t.exports.array=r;function r(a,n){var o=a.length,l=new Array(o),c={},u=o,f=e(n),m=s(a);for(n.forEach(function(x){if(!m.has(x[0])||!m.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)c[u]||g(a[u],u,new Set);return l;function g(x,S,j){if(j.has(x)){var T;try{T=", node was:"+JSON.stringify(x)}catch{T=""}throw new Error("Cyclic dependency"+T)}if(!m.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!c[S]){c[S]=!0;var w=f.get(x)||new Set;if(w=Array.from(w),S=w.length){j.add(x);do{var y=w[--S];g(y,m.get(y),j)}while(S);j.delete(x)}l[--o]=x}}}function t(a){for(var n=new Set,o=0,l=a.length;o<l;o++){var c=a[o];n.add(c[0]),n.add(c[1])}return Array.from(n)}function e(a){for(var n=new Map,o=0,l=a.length;o<l;o++){var c=a[o];n.has(c[0])||n.set(c[0],new Set),n.has(c[1])||n.set(c[1],new Set),n.get(c[0]).add(c[1])}return n}function s(a){for(var n=new Map,o=0,l=a.length;o<l;o++)n.set(a[o],o);return n}return _t.exports}var Mo=Oo();const Vo=xa(Mo),$o=Object.prototype.toString,Do=Error.prototype.toString,zo=RegExp.prototype.toString,Io=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Lo=/^Symbol\((.*)\)(.*)$/;function Po(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function Ps(r,t=!1){if(r==null||r===!0||r===!1)return""+r;const e=typeof r;if(e==="number")return Po(r);if(e==="string")return t?`"${r}"`:r;if(e==="function")return"[Function "+(r.name||"anonymous")+"]";if(e==="symbol")return Io.call(r).replace(Lo,"Symbol($1)");const s=$o.call(r).slice(8,-1);return s==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):s==="Error"||r instanceof Error?"["+Do.call(r)+"]":s==="RegExp"?zo.call(r):null}function Pe(r,t){let e=Ps(r,t);return e!==null?e:JSON.stringify(r,function(s,a){let n=Ps(this[s],t);return n!==null?n:a},2)}function Rs(r){return r==null?[]:[].concat(r)}let Us,Bs,Ws,Ro=/\$\{\s*(\w+)\s*\}/g;Us=Symbol.toStringTag;class Zs{constructor(t,e,s,a){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[Us]="Error",this.name="ValidationError",this.value=e,this.path=s,this.type=a,this.errors=[],this.inner=[],Rs(t).forEach(n=>{if(we.isError(n)){this.errors.push(...n.errors);const o=n.inner.length?n.inner:[n];this.inner.push(...o)}else this.errors.push(n)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Bs=Symbol.hasInstance,Ws=Symbol.toStringTag;class we extends Error{static formatError(t,e){const s=e.label||e.path||"this";return e=Object.assign({},e,{path:s,originalPath:e.path}),typeof t=="string"?t.replace(Ro,(a,n)=>Pe(e[n])):typeof t=="function"?t(e):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,e,s,a,n){const o=new Zs(t,e,s,a);if(n)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Ws]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,we)}static[Bs](t){return Zs[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Oe={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:r,type:t,value:e,originalValue:s})=>{const a=s!=null&&s!==e?` (cast from the value \`${Pe(s,!0)}\`).`:".";return t!=="mixed"?`${r} must be a \`${t}\` type, but the final value was: \`${Pe(e,!0)}\``+a:`${r} must match the configured type. The validated value was: \`${Pe(e,!0)}\``+a}},ke={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"},Re={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"},ir={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Uo={isValue:"${path} field must be ${value}"},Ft={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:Oe,string:ke,number:Re,date:ir,object:Ft,array:{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"},boolean:Uo,tuple:{notType:r=>{const{path:t,value:e,spec:s}=r,a=s.types.length;if(Array.isArray(e)){if(e.length<a)return`${t} tuple value has too few items, expected a length of ${a} but got ${e.length} for value: \`${Pe(e,!0)}\``;if(e.length>a)return`${t} tuple value has too many items, expected a length of ${a} but got ${e.length} for value: \`${Pe(e,!0)}\``}return we.formatError(Oe.notType,r)}}});const lr=r=>r&&r.__isYupSchema__;class Tt{static fromOptions(t,e){if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:a,otherwise:n}=e,o=typeof s=="function"?s:(...l)=>l.every(c=>c===s);return new Tt(t,(l,c)=>{var u;let f=o(...l)?a:n;return(u=f==null?void 0:f(c))!=null?u:c})}constructor(t,e){this.fn=void 0,this.refs=t,this.refs=t,this.fn=e}resolve(t,e){let s=this.refs.map(n=>n.getValue(e==null?void 0:e.value,e==null?void 0:e.parent,e==null?void 0:e.context)),a=this.fn(s,t,e);if(a===void 0||a===t)return t;if(!lr(a))throw new TypeError("conditions must return a schema object");return a.resolve(e)}}const Ct={context:"$",value:"."};class He{constructor(t,e={}){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]===Ct.context,this.isValue=this.key[0]===Ct.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?Ct.context:this.isValue?Ct.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&Ge.getter(this.path,!0),this.map=e.map}getValue(t,e,s){let a=this.isContext?s:this.isValue?t:e;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(t,e){return this.getValue(t,e==null?void 0:e.parent,e==null?void 0:e.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}He.prototype.__isYupRef=!0;const De=r=>r==null;function Qe(r){function t({value:e,path:s="",options:a,originalValue:n,schema:o},l,c){const{name:u,test:f,params:m,message:g,skipAbsent:x}=r;let{parent:S,context:j,abortEarly:T=o.spec.abortEarly,disableStackTrace:w=o.spec.disableStackTrace}=a;function y($){return He.isRef($)?$.getValue(e,S,j):$}function E($={}){const I=Object.assign({value:e,originalValue:n,label:o.spec.label,path:$.path||s,spec:o.spec,disableStackTrace:$.disableStackTrace||w},m,$.params);for(const Q of Object.keys(I))I[Q]=y(I[Q]);const K=new we(we.formatError($.message||g,I),e,I.path,$.type||u,I.disableStackTrace);return K.params=I,K}const V=T?l:c;let N={path:s,parent:S,type:u,from:a.from,createError:E,resolve:y,options:a,originalValue:n,schema:o};const U=$=>{we.isError($)?V($):$?c(null):V(E())},H=$=>{we.isError($)?V($):l($)};if(x&&De(e))return U(!0);let W;try{var q;if(W=f.call(N,e,N),typeof((q=W)==null?void 0:q.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${N.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(W).then(U,H)}}catch($){H($);return}U(W)}return t.OPTIONS=r,t}function Bo(r,t,e,s=e){let a,n,o;return t?(Ge.forEach(t,(l,c,u)=>{let f=c?l.slice(1,l.length-1):l;r=r.resolve({context:s,parent:a,value:e});let m=r.type==="tuple",g=u?parseInt(f,10):0;if(r.innerType||m){if(m&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(e&&g>=e.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);a=e,e=e&&e[g],r=m?r.spec.types[g]:r.innerType}if(!u){if(!r.fields||!r.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${r.type}")`);a=e,e=e&&e[f],r=r.fields[f]}n=f,o=c?"["+l+"]":"."+l}),{schema:r,parent:a,parentPath:n}):{parent:a,parentPath:t,schema:r}}class At extends Set{describe(){const t=[];for(const e of this.values())t.push(He.isRef(e)?e.describe():e);return t}resolveAll(t){let e=[];for(const s of this.values())e.push(t(s));return e}clone(){return new At(this.values())}merge(t,e){const s=this.clone();return t.forEach(a=>s.add(a)),e.forEach(a=>s.delete(a)),s}}function et(r,t=new Map){if(lr(r)||!r||typeof r!="object")return r;if(t.has(r))return t.get(r);let e;if(r instanceof Date)e=new Date(r.getTime()),t.set(r,e);else if(r instanceof RegExp)e=new RegExp(r),t.set(r,e);else if(Array.isArray(r)){e=new Array(r.length),t.set(r,e);for(let s=0;s<r.length;s++)e[s]=et(r[s],t)}else if(r instanceof Map){e=new Map,t.set(r,e);for(const[s,a]of r.entries())e.set(s,et(a,t))}else if(r instanceof Set){e=new Set,t.set(r,e);for(const s of r)e.add(et(s,t))}else if(r instanceof Object){e={},t.set(r,e);for(const[s,a]of Object.entries(r))e[s]=et(a,t)}else throw Error(`Unable to clone ${r}`);return e}class Ee{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 At,this._blacklist=new At,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Oe.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(e=>{e.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const e=Object.create(Object.getPrototypeOf(this));return e.type=this.type,e._typeCheck=this._typeCheck,e._whitelist=this._whitelist.clone(),e._blacklist=this._blacklist.clone(),e.internalTests=Object.assign({},this.internalTests),e.exclusiveTests=Object.assign({},this.exclusiveTests),e.deps=[...this.deps],e.conditions=[...this.conditions],e.tests=[...this.tests],e.transforms=[...this.transforms],e.spec=et(Object.assign({},this.spec,t)),e}label(t){let e=this.clone();return e.spec.label=t,e}meta(...t){if(t.length===0)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},t[0]),e}withMutation(t){let e=this._mutate;this._mutate=!0;let s=t(this);return this._mutate=e,s}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 e=this,s=t.clone();const a=Object.assign({},e.spec,s.spec);return s.spec=a,s.internalTests=Object.assign({},e.internalTests,s.internalTests),s._whitelist=e._whitelist.merge(t._whitelist,t._blacklist),s._blacklist=e._blacklist.merge(t._blacklist,t._whitelist),s.tests=e.tests,s.exclusiveTests=e.exclusiveTests,s.withMutation(n=>{t.tests.forEach(o=>{n.test(o.OPTIONS)})}),s.transforms=[...e.transforms,...s.transforms],s}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let e=this;if(e.conditions.length){let s=e.conditions;e=e.clone(),e.conditions=[],e=s.reduce((a,n)=>n.resolve(a,t),e),e=e.resolve(t)}return e}resolveOptions(t){var e,s,a,n;return Object.assign({},t,{from:t.from||[],strict:(e=t.strict)!=null?e:this.spec.strict,abortEarly:(s=t.abortEarly)!=null?s:this.spec.abortEarly,recursive:(a=t.recursive)!=null?a:this.spec.recursive,disableStackTrace:(n=t.disableStackTrace)!=null?n:this.spec.disableStackTrace})}cast(t,e={}){let s=this.resolve(Object.assign({value:t},e)),a=e.assert==="ignore-optionality",n=s._cast(t,e);if(e.assert!==!1&&!s.isType(n)){if(a&&De(n))return n;let o=Pe(t),l=Pe(n);throw new TypeError(`The value of ${e.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}".
|
|
28
28
|
|
|
29
29
|
attempted value: ${o}
|
|
30
|
-
`+(l!==o?`result of cast: ${l}`:""))}return n}_cast(t,e){let s=t===void 0?t:this.transforms.reduce((a,n)=>n.call(this,a,t,this),t);return s===void 0&&(s=this.getDefault(e)),s}_validate(t,e={},s,a){let{path:n,originalValue:o=t,strict:l=this.spec.strict}=e,c=t;l||(c=this._cast(c,Object.assign({assert:!1},e)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:n,value:c,originalValue:o,options:e,tests:u},s,f=>{if(f.length)return a(f,c);this.runTests({path:n,value:c,originalValue:o,options:e,tests:this.tests},s,a)})}runTests(t,e,s){let a=!1,{tests:n,value:o,originalValue:l,path:c,options:u}=t,f=j=>{a||(a=!0,e(j,o))},p=j=>{a||(a=!0,s(j,o))},g=n.length,x=[];if(!g)return p([]);let E={value:o,originalValue:l,path:c,options:u,schema:this};for(let j=0;j<n.length;j++){const T=n[j];T(E,f,function(y){y&&(Array.isArray(y)?x.push(...y):x.push(y)),--g<=0&&p(x)})}}asNestedTest({key:t,index:e,parent:s,parentPath:a,originalParent:n,options:o}){const l=t??e;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof l=="number";let u=s[l];const f=Object.assign({},o,{strict:!0,parent:s,value:u,originalValue:n[l],key:void 0,[c?"index":"key"]:l,path:c||l.includes(".")?`${a||""}[${c?l:`"${l}"`}]`:(a?`${a}.`:"")+t});return(p,g,x)=>this.resolve(f)._validate(u,f,g,x)}validate(t,e){var s;let a=this.resolve(Object.assign({},e,{value:t})),n=(s=e==null?void 0:e.disableStackTrace)!=null?s:a.spec.disableStackTrace;return new Promise((o,l)=>a._validate(t,e,(c,u)=>{we.isError(c)&&(c.value=u),l(c)},(c,u)=>{c.length?l(new we(c,u,void 0,void 0,n)):o(u)}))}validateSync(t,e){var s;let a=this.resolve(Object.assign({},e,{value:t})),n,o=(s=e==null?void 0:e.disableStackTrace)!=null?s:a.spec.disableStackTrace;return a._validate(t,Object.assign({},e,{sync:!0}),(l,c)=>{throw we.isError(l)&&(l.value=c),l},(l,c)=>{if(l.length)throw new we(l,t,void 0,void 0,o);n=c}),n}isValid(t,e){return this.validate(t,e).then(()=>!0,s=>{if(we.isError(s))return!1;throw s})}isValidSync(t,e){try{return this.validateSync(t,e),!0}catch(s){if(we.isError(s))return!1;throw s}}_getDefault(t){let e=this.spec.default;return e==null?e:typeof e=="function"?e.call(this,t):et(e)}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,e){const s=this.clone({nullable:t});return s.internalTests.nullable=Qe({message:e,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),s}optionality(t,e){const s=this.clone({optional:t});return s.internalTests.optionality=Qe({message:e,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(t=Oe.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Oe.notNull){return this.nullability(!1,t)}required(t=Oe.required){return this.clone().withMutation(e=>e.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let e=this.clone();return e.transforms.push(t),e}test(...t){let e;if(t.length===1?typeof t[0]=="function"?e={test:t[0]}:e=t[0]:t.length===2?e={name:t[0],test:t[1]}:e={name:t[0],message:t[1],test:t[2]},e.message===void 0&&(e.message=Oe.default),typeof e.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),a=Qe(e),n=e.exclusive||e.name&&s.exclusiveTests[e.name]===!0;if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(s.exclusiveTests[e.name]=!!e.exclusive),s.tests=s.tests.filter(o=>!(o.OPTIONS.name===e.name&&(n||o.OPTIONS.test===a.OPTIONS.test))),s.tests.push(a),s}when(t,e){!Array.isArray(t)&&typeof t!="string"&&(e=t,t=".");let s=this.clone(),a=Rs(t).map(n=>new He(n));return a.forEach(n=>{n.isSibling&&s.deps.push(n.key)}),s.conditions.push(typeof e=="function"?new Tt(a,e):Tt.fromOptions(a,e)),s}typeError(t){let e=this.clone();return e.internalTests.typeError=Qe({message:t,name:"typeError",skipAbsent:!0,test(s){return this.schema._typeCheck(s)?!0:this.createError({params:{type:this.schema.type}})}}),e}oneOf(t,e=Oe.oneOf){let s=this.clone();return t.forEach(a=>{s._whitelist.add(a),s._blacklist.delete(a)}),s.internalTests.whiteList=Qe({message:e,name:"oneOf",skipAbsent:!0,test(a){let n=this.schema._whitelist,o=n.resolveAll(this.resolve);return o.includes(a)?!0:this.createError({params:{values:Array.from(n).join(", "),resolved:o}})}}),s}notOneOf(t,e=Oe.notOneOf){let s=this.clone();return t.forEach(a=>{s._blacklist.add(a),s._whitelist.delete(a)}),s.internalTests.blacklist=Qe({message:e,name:"notOneOf",test(a){let n=this.schema._blacklist,o=n.resolveAll(this.resolve);return o.includes(a)?this.createError({params:{values:Array.from(n).join(", "),resolved:o}}):!0}}),s}strip(t=!0){let e=this.clone();return e.spec.strip=t,e}describe(t){const e=(t?this.resolve(t):this).clone(),{label:s,meta:a,optional:n,nullable:o}=e.spec;return{meta:a,label:s,optional:n,nullable:o,default:e.getDefault(t),type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,u,f)=>f.findIndex(p=>p.name===c.name)===u)}}}Ee.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])Ee.prototype[`${r}At`]=function(t,e,s={}){const{parent:a,parentPath:n,schema:o}=Bo(this,t,e,s.context);return o[r](a&&a[n],Object.assign({},s,{parent:a,path:t}))};for(const r of["equals","is"])Ee.prototype[r]=Ee.prototype.oneOf;for(const r of["not","nope"])Ee.prototype[r]=Ee.prototype.notOneOf;const Wo=()=>!0;function cr(r){return new qs(r)}class qs extends Ee{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Wo},t))}}cr.prototype=qs.prototype;const Zo=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function qo(r){const t=dr(r);if(!t)return Date.parse?Date.parse(r):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 e=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(e=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(e=0-e)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+e,t.second,t.millisecond)}function dr(r){var t,e;const s=Zo.exec(r);return s?{year:ze(s[1]),month:ze(s[2],1)-1,day:ze(s[3],1),hour:ze(s[4]),minute:ze(s[5]),second:ze(s[6]),millisecond:s[7]?ze(s[7].substring(0,3)):0,precision:(t=(e=s[7])==null?void 0:e.length)!=null?t:void 0,z:s[8]||void 0,plusMinus:s[9]||void 0,hourOffset:ze(s[10]),minuteOffset:ze(s[11])}:null}function ze(r,t=0){return Number(r)||t}let Go=/^[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])?)*$/,Ho=/^((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,Yo=/^(?:[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,Xo="^\\d{4}-\\d{2}-\\d{2}",Ko="\\d{2}:\\d{2}:\\d{2}",Jo="(([+-]\\d{2}(:?\\d{2})?)|Z)",Qo=new RegExp(`${Xo}T${Ko}(\\.\\d+)?${Jo}$`),ei=r=>De(r)||r===r.trim(),ti={}.toString();function Gs(){return new Hs}class Hs extends Ee{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,e,s)=>{if(!s.spec.coerce||s.isType(t)||Array.isArray(t))return t;const a=t!=null&&t.toString?t.toString():t;return a===ti?t:a})})}required(t){return super.required(t).withMutation(e=>e.test({message:t||Oe.required,name:"required",skipAbsent:!0,test:s=>!!s.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(e=>e.OPTIONS.name!=="required"),t))}length(t,e=ke.length){return this.test({message:e,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(s){return s.length===this.resolve(t)}})}min(t,e=ke.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s.length>=this.resolve(t)}})}max(t,e=ke.max){return this.test({name:"max",exclusive:!0,message:e,params:{max:t},skipAbsent:!0,test(s){return s.length<=this.resolve(t)}})}matches(t,e){let s=!1,a,n;return e&&(typeof e=="object"?{excludeEmptyString:s=!1,message:a,name:n}=e:a=e),this.test({name:n||"matches",message:a||ke.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&s||o.search(t)!==-1})}email(t=ke.email){return this.matches(Go,{name:"email",message:t,excludeEmptyString:!0})}url(t=ke.url){return this.matches(Ho,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ke.uuid){return this.matches(Yo,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let e="",s,a;return t&&(typeof t=="object"?{message:e="",allowOffset:s=!1,precision:a=void 0}=t:e=t),this.matches(Qo,{name:"datetime",message:e||ke.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:e||ke.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:n=>{if(!n||s)return!0;const o=dr(n);return o?!!o.z:!1}}).test({name:"datetime_precision",message:e||ke.datetime_precision,params:{precision:a},skipAbsent:!0,test:n=>{if(!n||a==null)return!0;const o=dr(n);return o?o.precision===a:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ke.trim){return this.transform(e=>e!=null?e.trim():e).test({message:t,name:"trim",test:ei})}lowercase(t=ke.lowercase){return this.transform(e=>De(e)?e:e.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>De(e)||e===e.toLowerCase()})}uppercase(t=ke.uppercase){return this.transform(e=>De(e)?e:e.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>De(e)||e===e.toUpperCase()})}}Gs.prototype=Hs.prototype;let ri=r=>r!=+r;function Ys(){return new Xs}class Xs extends Ee{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!ri(t)}}),this.withMutation(()=>{this.transform((t,e,s)=>{if(!s.spec.coerce)return t;let a=t;if(typeof a=="string"){if(a=a.replace(/\s/g,""),a==="")return NaN;a=+a}return s.isType(a)||a===null?a:parseFloat(a)})})}min(t,e=Re.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(t)}})}max(t,e=Re.max){return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(t)}})}lessThan(t,e=Re.lessThan){return this.test({message:e,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(s){return s<this.resolve(t)}})}moreThan(t,e=Re.moreThan){return this.test({message:e,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(s){return s>this.resolve(t)}})}positive(t=Re.positive){return this.moreThan(0,t)}negative(t=Re.negative){return this.lessThan(0,t)}integer(t=Re.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(t=>De(t)?t:t|0)}round(t){var e;let s=["ceil","floor","round","trunc"];if(t=((e=t)==null?void 0:e.toLowerCase())||"round",t==="trunc")return this.truncate();if(s.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+s.join(", "));return this.transform(a=>De(a)?a:Math[t](a))}}Ys.prototype=Xs.prototype;let Ks=new Date(""),si=r=>Object.prototype.toString.call(r)==="[object Date]";function ur(){return new ut}class ut extends Ee{constructor(){super({type:"date",check(t){return si(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,e,s)=>!s.spec.coerce||s.isType(t)||t===null?t:(t=qo(t),isNaN(t)?ut.INVALID_DATE:new Date(t)))})}prepareParam(t,e){let s;if(He.isRef(t))s=t;else{let a=this.cast(t);if(!this._typeCheck(a))throw new TypeError(`\`${e}\` must be a Date or a value that can be \`cast()\` to a Date`);s=a}return s}min(t,e=ir.min){let s=this.prepareParam(t,"min");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(a){return a>=this.resolve(s)}})}max(t,e=ir.max){let s=this.prepareParam(t,"max");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(a){return a<=this.resolve(s)}})}}ut.INVALID_DATE=Ks,ur.prototype=ut.prototype,ur.INVALID_DATE=Ks;function ai(r,t=[]){let e=[],s=new Set,a=new Set(t.map(([o,l])=>`${o}-${l}`));function n(o,l){let c=Ge.split(o)[0];s.add(c),a.has(`${l}-${c}`)||e.push([l,c])}for(const o of Object.keys(r)){let l=r[o];s.add(o),He.isRef(l)&&l.isSibling?n(l.path,o):lr(l)&&"deps"in l&&l.deps.forEach(c=>n(c,o))}return Vo.array(Array.from(s),e).reverse()}function Js(r,t){let e=1/0;return r.some((s,a)=>{var n;if((n=t.path)!=null&&n.includes(s))return e=a,!0}),e}function Qs(r){return(t,e)=>Js(r,t)-Js(r,e)}const ni=(r,t,e)=>{if(typeof r!="string")return r;let s=r;try{s=JSON.parse(r)}catch{}return e.isType(s)?s:r};function Ot(r){if("fields"in r){const t={};for(const[e,s]of Object.entries(r.fields))t[e]=Ot(s);return r.setFields(t)}if(r.type==="array"){const t=r.optional();return t.innerType&&(t.innerType=Ot(t.innerType)),t}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(Ot)}):"optional"in r?r.optional():r}const oi=(r,t)=>{const e=[...Ge.normalizePath(t)];if(e.length===1)return e[0]in r;let s=e.pop(),a=Ge.getter(Ge.join(e),!0)(r);return!!(a&&s in a)};let ea=r=>Object.prototype.toString.call(r)==="[object Object]";function ta(r,t){let e=Object.keys(r.fields);return Object.keys(t).filter(s=>e.indexOf(s)===-1)}const ii=Qs([]);function ra(r){return new sa(r)}class sa extends Ee{constructor(t){super({type:"object",check(e){return ea(e)||typeof e=="function"}}),this.fields=Object.create(null),this._sortErrors=ii,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,e={}){var s;let a=super._cast(t,e);if(a===void 0)return this.getDefault(e);if(!this._typeCheck(a))return a;let n=this.fields,o=(s=e.stripUnknown)!=null?s:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(a).filter(p=>!this._nodes.includes(p))),c={},u=Object.assign({},e,{parent:c,__validating:e.__validating||!1}),f=!1;for(const p of l){let g=n[p],x=p in a;if(g){let E,j=a[p];u.path=(e.path?`${e.path}.`:"")+p,g=g.resolve({value:j,context:e.context,parent:c});let T=g instanceof Ee?g.spec:void 0,w=T==null?void 0:T.strict;if(T!=null&&T.strip){f=f||p in a;continue}E=!e.__validating||!w?g.cast(a[p],u):a[p],E!==void 0&&(c[p]=E)}else x&&!o&&(c[p]=a[p]);(x!==p in c||c[p]!==a[p])&&(f=!0)}return f?c:a}_validate(t,e={},s,a){let{from:n=[],originalValue:o=t,recursive:l=this.spec.recursive}=e;e.from=[{schema:this,value:o},...n],e.__validating=!0,e.originalValue=o,super._validate(t,e,s,(c,u)=>{if(!l||!ea(u)){a(c,u);return}o=o||u;let f=[];for(let p of this._nodes){let g=this.fields[p];!g||He.isRef(g)||f.push(g.asNestedTest({options:e,key:p,parent:u,parentPath:e.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:e},s,p=>{a(p.sort(this._sortErrors).concat(c),u)})})}clone(t){const e=super.clone(t);return e.fields=Object.assign({},this.fields),e._nodes=this._nodes,e._excludedEdges=this._excludedEdges,e._sortErrors=this._sortErrors,e}concat(t){let e=super.concat(t),s=e.fields;for(let[a,n]of Object.entries(this.fields)){const o=s[a];s[a]=o===void 0?n:o}return e.withMutation(a=>a.setFields(s,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let e={};return this._nodes.forEach(s=>{var a;const n=this.fields[s];let o=t;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[s]})),e[s]=n&&"getDefault"in n?n.getDefault(o):void 0}),e}setFields(t,e){let s=this.clone();return s.fields=t,s._nodes=ai(t,e),s._sortErrors=Qs(Object.keys(t)),e&&(s._excludedEdges=e),s}shape(t,e=[]){return this.clone().withMutation(s=>{let a=s._excludedEdges;return e.length&&(Array.isArray(e[0])||(e=[e]),a=[...s._excludedEdges,...e]),s.setFields(Object.assign(s.fields,t),a)})}partial(){const t={};for(const[e,s]of Object.entries(this.fields))t[e]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(t)}deepPartial(){return Ot(this)}pick(t){const e={};for(const s of t)this.fields[s]&&(e[s]=this.fields[s]);return this.setFields(e,this._excludedEdges.filter(([s,a])=>t.includes(s)&&t.includes(a)))}omit(t){const e=[];for(const s of Object.keys(this.fields))t.includes(s)||e.push(s);return this.pick(e)}from(t,e,s){let a=Ge.getter(t,!0);return this.transform(n=>{if(!n)return n;let o=n;return oi(n,t)&&(o=Object.assign({},n),s||delete o[t],o[e]=a(n)),o})}json(){return this.transform(ni)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Ft.exact,test(e){if(e==null)return!0;const s=ta(this.schema,e);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,e=Ft.noUnknown){typeof t!="boolean"&&(e=t,t=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:e,test(a){if(a==null)return!0;const n=ta(this.schema,a);return!t||n.length===0||this.createError({params:{unknown:n.join(", ")}})}});return s.spec.noUnknown=t,s}unknown(t=!0,e=Ft.noUnknown){return this.noUnknown(!t,e)}transformKeys(t){return this.transform(e=>{if(!e)return e;const s={};for(const a of Object.keys(e))s[t(a)]=e[a];return s})}camelCase(){return this.transformKeys(or.camelCase)}snakeCase(){return this.transformKeys(or.snakeCase)}constantCase(){return this.transformKeys(t=>or.snakeCase(t).toUpperCase())}describe(t){const e=(t?this.resolve(t):this).clone(),s=super.describe(t);s.fields={};for(const[n,o]of Object.entries(e.fields)){var a;let l=t;(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[n]})),s.fields[n]=o.describe(l)}return s}}ra.prototype=sa.prototype;function li({fields:r,explicitSchema:t}){return v.useMemo(()=>{if(t)return Ds(t);const e={};r.forEach(a=>{var o,l,c,u,f,p,g;let n;switch(a.type){case"text":case"password":case"email":if(n=Gs(),(o=a.validation)!=null&&o.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}(l=a.validation)!=null&&l.minLength&&(n=n.min(a.validation.minLength.value,a.validation.minLength.message)),(c=a.validation)!=null&&c.maxLength&&(n=n.max(a.validation.maxLength.value,a.validation.maxLength.message)),(u=a.validation)!=null&&u.pattern&&(n=n.matches(a.validation.pattern.value,a.validation.pattern.message)),a.type==="email"&&(n=n.email("Email inválido"));break;case"number":if(n=Ys(),(f=a.validation)!=null&&f.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}break;case"select":case"optionGroup":if(n=cr(),(p=a.validation)!=null&&p.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}break;case"date":if(n=ur(),(g=a.validation)!=null&&g.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}break;default:n=cr()}e[a.name]=n});const s=ra().shape(e);return Ds(s)},[r,t])}function ci(r){return v.useMemo(()=>{const t={};return r.forEach(e=>{t[e.name]=e}),t},[r])}function di(r){const t=v.useMemo(()=>r.filter(o=>o.type==="select"&&o.loadOptions),[r]),[e,s]=v.useState(t.length),[a,n]=v.useState({});return v.useEffect(()=>{t.length!==0&&t.forEach(o=>{o.loadOptions().then(l=>n(c=>({...c,[o.name]:l}))).finally(()=>s(l=>Math.max(0,l-1)))})},[t]),{loadingCount:e,optionsMap:a}}function ui(r,t){const e=v.useMemo(()=>r.filter(o=>o.disabledWhen),[r]),s=v.useMemo(()=>e.map(o=>o.disabledWhen.watchField),[e]),a=qt({control:t,name:s}),n={};return e.forEach(o=>{const l=s.indexOf(o.disabledWhen.watchField),c=a[l];n[o.name]=c===o.disabledWhen.watchValue}),n}const aa={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},fi={sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function fr({control:r,name:t,rules:e,defaultValue:s,size:a="sm",width:n="100%",label:o,labelHidden:l=!1,hasError:c=!1,errorMessage:u="",maxLength:f,showCounter:p=!1,className:g,...x}){const E=v.useId(),j=t||E,[T,w]=v.useState(s||"");if(r&&t)return i.jsx(Fe,{name:t,control:r,rules:e,defaultValue:s||"",render:({field:S,fieldState:O})=>{var _;return i.jsx(fr,{...x,size:a,width:n,label:o,labelHidden:l,hasError:!!O.error,errorMessage:((_=O.error)==null?void 0:_.message)||"",maxLength:f,showCounter:p,className:g,value:S.value,onChange:S.onChange})}});v.useEffect(()=>{w(s||"")},[s]);const y=S=>{var O;f!==void 0&&S.target.value.length>f||(w(S.target.value),(O=x.onChange)==null||O.call(x,S))};return i.jsxs("div",{className:D("flex flex-col",g),style:{width:n},children:[o&&i.jsx("label",{htmlFor:j,className:D("pb-2 text-[var(--color-ds-text-primary)]",aa[a],l&&"sr-only"),children:o}),i.jsx("textarea",{id:j,className:D("box-border bg-[var(--color-ds-background-page)] w-full resize vertical rounded-lg border outline-none transition font-[var(--font-primary)]",aa[a],fi[a],c?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",x.disabled?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-secondary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]"),value:T,onChange:y,maxLength:f,...x}),i.jsxs("div",{className:"flex justify-between pt-1 min-h-[18px]",children:[c&&u?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:u}):i.jsx("span",{"aria-hidden":"true",children:" "}),p&&f!==void 0&&i.jsxs("span",{className:"text-xs text-[var(--color-ds-text-secondary)]",children:[T.length,"/",f]})]})]})}const hi={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function na({control:r,name:t,rules:e,defaultValue:s=!1,label:a,labelHidden:n=!1,disabled:o=!1,size:l="sm",className:c,hasError:u=!1,errorMessage:f=""}){return i.jsx("div",{className:D("flex flex-col",c),children:i.jsx(Fe,{name:t,control:r,rules:e,defaultValue:s,render:({field:p,fieldState:g})=>{const x=g.error;return i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("input",{id:t,type:"checkbox",className:D(hi[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]",o&&"opacity-50 cursor-not-allowed"),checked:p.value,onChange:E=>p.onChange(E.target.checked),disabled:o}),i.jsx("span",{className:D("text-[var(--color-ds-text-primary)] text-ds-md",o&&"text-[var(--color-ds-text-secondary)]"),children:a}),u&&(x==null?void 0:x.message)&&i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:x.message})]})}})})}function oa({name:r,control:t,searchFn:e,resolveByValue:s,label:a,size:n="sm",width:o="100%",disabled:l=!1,searchMode:c="button",minChars:u=3,debounceMs:f=600}){const{watch:p,getValues:g,setValue:x}=nt(),E=qt({control:t,name:r}),[j,T]=v.useState([]),[w,y]=v.useState(!1),[S,O]=v.useState(!1),[_,z]=v.useState(""),Q=v.useRef(null),N=v.useRef(null),W=v.useRef(!1),G=v.useMemo(()=>{const I=new Map;for(const J of j)I.set(String(J.value),J.label??"");return I},[j]),V=async I=>{if(!I){T([]),O(!1);return}y(!0);try{const J=await e(I,{watch:p,getValues:g});T(J??[]),O(!0)}finally{y(!1)}};v.useEffect(()=>{function I(J){Q.current&&!Q.current.contains(J.target)&&O(!1)}if(S)return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[S]),v.useEffect(()=>{if(W.current)return;const I=E?String(E):"";if(!I){z("");return}const J=G.get(I);if(J){z(J);return}let Z=!1;return(async()=>{if(s)try{const h=await s(I);Z||z((h==null?void 0:h.label)??I)}catch{Z||z(I)}else z(I)})(),()=>{Z=!0}},[E,G,s]),v.useEffect(()=>{if(c!=="debounced"||l)return;N.current&&(window.clearTimeout(N.current),N.current=null);const I=(_||"").trim();return I.length>=u?N.current=window.setTimeout(()=>{V(I)},f):(T([]),O(!1)),()=>{N.current&&(window.clearTimeout(N.current),N.current=null)}},[_,c,u,f,l]);const U=n==="sm"?"text-ds-sm":n==="md"?"text-ds-md":"text-ds-lg",X=n==="sm"?"h-6":n==="md"?"h-10":"h-12",ee=I=>{if(l)return;const J=(_||"").trim();I.key==="Enter"&&(I.preventDefault(),c==="debounced"?J.length>=u&&V(J):V(J)),I.key==="Escape"&&O(!1)};return i.jsx(Fe,{name:r,control:t,render:({field:I,fieldState:J})=>{var Z;return i.jsxs("div",{ref:Q,className:"relative flex flex-col",style:{width:o},children:[a&&i.jsx("label",{className:`pb-2 text-[var(--color-ds-text-primary)] ${U}`,children:a}),i.jsx(Et,{className:c==="button"?"rounded-r-none":void 0,type:"text",size:n,width:"100%",value:_,onChange:h=>{const K=h.target.value;W.current=!0,z(K),E&&x(r,"",{shouldDirty:!0})},onKeyDown:ee,onBlur:()=>{W.current=!1},disabled:l,hasError:J.invalid,errorMessage:(Z=J.error)==null?void 0:Z.message,onFocus:()=>{W.current=!0;const h=(_||"").trim();h&&c==="button"&&V(h)},suffixButton:c==="button"?i.jsx(Me,{type:"button",className:"!rounded-l-none",size:n,variant:"primary",onClick:()=>V((_||"").trim()),disabled:l,children:"Buscar"}):void 0}),w&&i.jsx("div",{className:"absolute top-14 left-0 right-0 z-10",children:i.jsx(qe,{width:"100%",height:n==="sm"?"1.5rem":n==="md"?"2.5rem":"3rem",variant:"rect",className:"rounded-lg"})}),S&&!w&&j.length>0&&i.jsx("ul",{className:`
|
|
30
|
+
`+(l!==o?`result of cast: ${l}`:""))}return n}_cast(t,e){let s=t===void 0?t:this.transforms.reduce((a,n)=>n.call(this,a,t,this),t);return s===void 0&&(s=this.getDefault(e)),s}_validate(t,e={},s,a){let{path:n,originalValue:o=t,strict:l=this.spec.strict}=e,c=t;l||(c=this._cast(c,Object.assign({assert:!1},e)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:n,value:c,originalValue:o,options:e,tests:u},s,f=>{if(f.length)return a(f,c);this.runTests({path:n,value:c,originalValue:o,options:e,tests:this.tests},s,a)})}runTests(t,e,s){let a=!1,{tests:n,value:o,originalValue:l,path:c,options:u}=t,f=j=>{a||(a=!0,e(j,o))},m=j=>{a||(a=!0,s(j,o))},g=n.length,x=[];if(!g)return m([]);let S={value:o,originalValue:l,path:c,options:u,schema:this};for(let j=0;j<n.length;j++){const T=n[j];T(S,f,function(y){y&&(Array.isArray(y)?x.push(...y):x.push(y)),--g<=0&&m(x)})}}asNestedTest({key:t,index:e,parent:s,parentPath:a,originalParent:n,options:o}){const l=t??e;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof l=="number";let u=s[l];const f=Object.assign({},o,{strict:!0,parent:s,value:u,originalValue:n[l],key:void 0,[c?"index":"key"]:l,path:c||l.includes(".")?`${a||""}[${c?l:`"${l}"`}]`:(a?`${a}.`:"")+t});return(m,g,x)=>this.resolve(f)._validate(u,f,g,x)}validate(t,e){var s;let a=this.resolve(Object.assign({},e,{value:t})),n=(s=e==null?void 0:e.disableStackTrace)!=null?s:a.spec.disableStackTrace;return new Promise((o,l)=>a._validate(t,e,(c,u)=>{we.isError(c)&&(c.value=u),l(c)},(c,u)=>{c.length?l(new we(c,u,void 0,void 0,n)):o(u)}))}validateSync(t,e){var s;let a=this.resolve(Object.assign({},e,{value:t})),n,o=(s=e==null?void 0:e.disableStackTrace)!=null?s:a.spec.disableStackTrace;return a._validate(t,Object.assign({},e,{sync:!0}),(l,c)=>{throw we.isError(l)&&(l.value=c),l},(l,c)=>{if(l.length)throw new we(l,t,void 0,void 0,o);n=c}),n}isValid(t,e){return this.validate(t,e).then(()=>!0,s=>{if(we.isError(s))return!1;throw s})}isValidSync(t,e){try{return this.validateSync(t,e),!0}catch(s){if(we.isError(s))return!1;throw s}}_getDefault(t){let e=this.spec.default;return e==null?e:typeof e=="function"?e.call(this,t):et(e)}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,e){const s=this.clone({nullable:t});return s.internalTests.nullable=Qe({message:e,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),s}optionality(t,e){const s=this.clone({optional:t});return s.internalTests.optionality=Qe({message:e,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(t=Oe.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Oe.notNull){return this.nullability(!1,t)}required(t=Oe.required){return this.clone().withMutation(e=>e.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let e=this.clone();return e.transforms.push(t),e}test(...t){let e;if(t.length===1?typeof t[0]=="function"?e={test:t[0]}:e=t[0]:t.length===2?e={name:t[0],test:t[1]}:e={name:t[0],message:t[1],test:t[2]},e.message===void 0&&(e.message=Oe.default),typeof e.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),a=Qe(e),n=e.exclusive||e.name&&s.exclusiveTests[e.name]===!0;if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(s.exclusiveTests[e.name]=!!e.exclusive),s.tests=s.tests.filter(o=>!(o.OPTIONS.name===e.name&&(n||o.OPTIONS.test===a.OPTIONS.test))),s.tests.push(a),s}when(t,e){!Array.isArray(t)&&typeof t!="string"&&(e=t,t=".");let s=this.clone(),a=Rs(t).map(n=>new He(n));return a.forEach(n=>{n.isSibling&&s.deps.push(n.key)}),s.conditions.push(typeof e=="function"?new Tt(a,e):Tt.fromOptions(a,e)),s}typeError(t){let e=this.clone();return e.internalTests.typeError=Qe({message:t,name:"typeError",skipAbsent:!0,test(s){return this.schema._typeCheck(s)?!0:this.createError({params:{type:this.schema.type}})}}),e}oneOf(t,e=Oe.oneOf){let s=this.clone();return t.forEach(a=>{s._whitelist.add(a),s._blacklist.delete(a)}),s.internalTests.whiteList=Qe({message:e,name:"oneOf",skipAbsent:!0,test(a){let n=this.schema._whitelist,o=n.resolveAll(this.resolve);return o.includes(a)?!0:this.createError({params:{values:Array.from(n).join(", "),resolved:o}})}}),s}notOneOf(t,e=Oe.notOneOf){let s=this.clone();return t.forEach(a=>{s._blacklist.add(a),s._whitelist.delete(a)}),s.internalTests.blacklist=Qe({message:e,name:"notOneOf",test(a){let n=this.schema._blacklist,o=n.resolveAll(this.resolve);return o.includes(a)?this.createError({params:{values:Array.from(n).join(", "),resolved:o}}):!0}}),s}strip(t=!0){let e=this.clone();return e.spec.strip=t,e}describe(t){const e=(t?this.resolve(t):this).clone(),{label:s,meta:a,optional:n,nullable:o}=e.spec;return{meta:a,label:s,optional:n,nullable:o,default:e.getDefault(t),type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,u,f)=>f.findIndex(m=>m.name===c.name)===u)}}}Ee.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])Ee.prototype[`${r}At`]=function(t,e,s={}){const{parent:a,parentPath:n,schema:o}=Bo(this,t,e,s.context);return o[r](a&&a[n],Object.assign({},s,{parent:a,path:t}))};for(const r of["equals","is"])Ee.prototype[r]=Ee.prototype.oneOf;for(const r of["not","nope"])Ee.prototype[r]=Ee.prototype.notOneOf;const Wo=()=>!0;function cr(r){return new qs(r)}class qs extends Ee{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Wo},t))}}cr.prototype=qs.prototype;const Zo=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function qo(r){const t=dr(r);if(!t)return Date.parse?Date.parse(r):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 e=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(e=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(e=0-e)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+e,t.second,t.millisecond)}function dr(r){var t,e;const s=Zo.exec(r);return s?{year:ze(s[1]),month:ze(s[2],1)-1,day:ze(s[3],1),hour:ze(s[4]),minute:ze(s[5]),second:ze(s[6]),millisecond:s[7]?ze(s[7].substring(0,3)):0,precision:(t=(e=s[7])==null?void 0:e.length)!=null?t:void 0,z:s[8]||void 0,plusMinus:s[9]||void 0,hourOffset:ze(s[10]),minuteOffset:ze(s[11])}:null}function ze(r,t=0){return Number(r)||t}let Go=/^[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])?)*$/,Ho=/^((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,Yo=/^(?:[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,Xo="^\\d{4}-\\d{2}-\\d{2}",Ko="\\d{2}:\\d{2}:\\d{2}",Jo="(([+-]\\d{2}(:?\\d{2})?)|Z)",Qo=new RegExp(`${Xo}T${Ko}(\\.\\d+)?${Jo}$`),ei=r=>De(r)||r===r.trim(),ti={}.toString();function Gs(){return new Hs}class Hs extends Ee{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,e,s)=>{if(!s.spec.coerce||s.isType(t)||Array.isArray(t))return t;const a=t!=null&&t.toString?t.toString():t;return a===ti?t:a})})}required(t){return super.required(t).withMutation(e=>e.test({message:t||Oe.required,name:"required",skipAbsent:!0,test:s=>!!s.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(e=>e.OPTIONS.name!=="required"),t))}length(t,e=ke.length){return this.test({message:e,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(s){return s.length===this.resolve(t)}})}min(t,e=ke.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s.length>=this.resolve(t)}})}max(t,e=ke.max){return this.test({name:"max",exclusive:!0,message:e,params:{max:t},skipAbsent:!0,test(s){return s.length<=this.resolve(t)}})}matches(t,e){let s=!1,a,n;return e&&(typeof e=="object"?{excludeEmptyString:s=!1,message:a,name:n}=e:a=e),this.test({name:n||"matches",message:a||ke.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&s||o.search(t)!==-1})}email(t=ke.email){return this.matches(Go,{name:"email",message:t,excludeEmptyString:!0})}url(t=ke.url){return this.matches(Ho,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ke.uuid){return this.matches(Yo,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let e="",s,a;return t&&(typeof t=="object"?{message:e="",allowOffset:s=!1,precision:a=void 0}=t:e=t),this.matches(Qo,{name:"datetime",message:e||ke.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:e||ke.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:n=>{if(!n||s)return!0;const o=dr(n);return o?!!o.z:!1}}).test({name:"datetime_precision",message:e||ke.datetime_precision,params:{precision:a},skipAbsent:!0,test:n=>{if(!n||a==null)return!0;const o=dr(n);return o?o.precision===a:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ke.trim){return this.transform(e=>e!=null?e.trim():e).test({message:t,name:"trim",test:ei})}lowercase(t=ke.lowercase){return this.transform(e=>De(e)?e:e.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>De(e)||e===e.toLowerCase()})}uppercase(t=ke.uppercase){return this.transform(e=>De(e)?e:e.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>De(e)||e===e.toUpperCase()})}}Gs.prototype=Hs.prototype;let ri=r=>r!=+r;function Ys(){return new Xs}class Xs extends Ee{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!ri(t)}}),this.withMutation(()=>{this.transform((t,e,s)=>{if(!s.spec.coerce)return t;let a=t;if(typeof a=="string"){if(a=a.replace(/\s/g,""),a==="")return NaN;a=+a}return s.isType(a)||a===null?a:parseFloat(a)})})}min(t,e=Re.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(t)}})}max(t,e=Re.max){return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(t)}})}lessThan(t,e=Re.lessThan){return this.test({message:e,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(s){return s<this.resolve(t)}})}moreThan(t,e=Re.moreThan){return this.test({message:e,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(s){return s>this.resolve(t)}})}positive(t=Re.positive){return this.moreThan(0,t)}negative(t=Re.negative){return this.lessThan(0,t)}integer(t=Re.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(t=>De(t)?t:t|0)}round(t){var e;let s=["ceil","floor","round","trunc"];if(t=((e=t)==null?void 0:e.toLowerCase())||"round",t==="trunc")return this.truncate();if(s.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+s.join(", "));return this.transform(a=>De(a)?a:Math[t](a))}}Ys.prototype=Xs.prototype;let Ks=new Date(""),si=r=>Object.prototype.toString.call(r)==="[object Date]";function ur(){return new ut}class ut extends Ee{constructor(){super({type:"date",check(t){return si(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,e,s)=>!s.spec.coerce||s.isType(t)||t===null?t:(t=qo(t),isNaN(t)?ut.INVALID_DATE:new Date(t)))})}prepareParam(t,e){let s;if(He.isRef(t))s=t;else{let a=this.cast(t);if(!this._typeCheck(a))throw new TypeError(`\`${e}\` must be a Date or a value that can be \`cast()\` to a Date`);s=a}return s}min(t,e=ir.min){let s=this.prepareParam(t,"min");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(a){return a>=this.resolve(s)}})}max(t,e=ir.max){let s=this.prepareParam(t,"max");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(a){return a<=this.resolve(s)}})}}ut.INVALID_DATE=Ks,ur.prototype=ut.prototype,ur.INVALID_DATE=Ks;function ai(r,t=[]){let e=[],s=new Set,a=new Set(t.map(([o,l])=>`${o}-${l}`));function n(o,l){let c=Ge.split(o)[0];s.add(c),a.has(`${l}-${c}`)||e.push([l,c])}for(const o of Object.keys(r)){let l=r[o];s.add(o),He.isRef(l)&&l.isSibling?n(l.path,o):lr(l)&&"deps"in l&&l.deps.forEach(c=>n(c,o))}return Vo.array(Array.from(s),e).reverse()}function Js(r,t){let e=1/0;return r.some((s,a)=>{var n;if((n=t.path)!=null&&n.includes(s))return e=a,!0}),e}function Qs(r){return(t,e)=>Js(r,t)-Js(r,e)}const ni=(r,t,e)=>{if(typeof r!="string")return r;let s=r;try{s=JSON.parse(r)}catch{}return e.isType(s)?s:r};function Ot(r){if("fields"in r){const t={};for(const[e,s]of Object.entries(r.fields))t[e]=Ot(s);return r.setFields(t)}if(r.type==="array"){const t=r.optional();return t.innerType&&(t.innerType=Ot(t.innerType)),t}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(Ot)}):"optional"in r?r.optional():r}const oi=(r,t)=>{const e=[...Ge.normalizePath(t)];if(e.length===1)return e[0]in r;let s=e.pop(),a=Ge.getter(Ge.join(e),!0)(r);return!!(a&&s in a)};let ea=r=>Object.prototype.toString.call(r)==="[object Object]";function ta(r,t){let e=Object.keys(r.fields);return Object.keys(t).filter(s=>e.indexOf(s)===-1)}const ii=Qs([]);function ra(r){return new sa(r)}class sa extends Ee{constructor(t){super({type:"object",check(e){return ea(e)||typeof e=="function"}}),this.fields=Object.create(null),this._sortErrors=ii,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,e={}){var s;let a=super._cast(t,e);if(a===void 0)return this.getDefault(e);if(!this._typeCheck(a))return a;let n=this.fields,o=(s=e.stripUnknown)!=null?s:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(a).filter(m=>!this._nodes.includes(m))),c={},u=Object.assign({},e,{parent:c,__validating:e.__validating||!1}),f=!1;for(const m of l){let g=n[m],x=m in a;if(g){let S,j=a[m];u.path=(e.path?`${e.path}.`:"")+m,g=g.resolve({value:j,context:e.context,parent:c});let T=g instanceof Ee?g.spec:void 0,w=T==null?void 0:T.strict;if(T!=null&&T.strip){f=f||m in a;continue}S=!e.__validating||!w?g.cast(a[m],u):a[m],S!==void 0&&(c[m]=S)}else x&&!o&&(c[m]=a[m]);(x!==m in c||c[m]!==a[m])&&(f=!0)}return f?c:a}_validate(t,e={},s,a){let{from:n=[],originalValue:o=t,recursive:l=this.spec.recursive}=e;e.from=[{schema:this,value:o},...n],e.__validating=!0,e.originalValue=o,super._validate(t,e,s,(c,u)=>{if(!l||!ea(u)){a(c,u);return}o=o||u;let f=[];for(let m of this._nodes){let g=this.fields[m];!g||He.isRef(g)||f.push(g.asNestedTest({options:e,key:m,parent:u,parentPath:e.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:e},s,m=>{a(m.sort(this._sortErrors).concat(c),u)})})}clone(t){const e=super.clone(t);return e.fields=Object.assign({},this.fields),e._nodes=this._nodes,e._excludedEdges=this._excludedEdges,e._sortErrors=this._sortErrors,e}concat(t){let e=super.concat(t),s=e.fields;for(let[a,n]of Object.entries(this.fields)){const o=s[a];s[a]=o===void 0?n:o}return e.withMutation(a=>a.setFields(s,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let e={};return this._nodes.forEach(s=>{var a;const n=this.fields[s];let o=t;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[s]})),e[s]=n&&"getDefault"in n?n.getDefault(o):void 0}),e}setFields(t,e){let s=this.clone();return s.fields=t,s._nodes=ai(t,e),s._sortErrors=Qs(Object.keys(t)),e&&(s._excludedEdges=e),s}shape(t,e=[]){return this.clone().withMutation(s=>{let a=s._excludedEdges;return e.length&&(Array.isArray(e[0])||(e=[e]),a=[...s._excludedEdges,...e]),s.setFields(Object.assign(s.fields,t),a)})}partial(){const t={};for(const[e,s]of Object.entries(this.fields))t[e]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(t)}deepPartial(){return Ot(this)}pick(t){const e={};for(const s of t)this.fields[s]&&(e[s]=this.fields[s]);return this.setFields(e,this._excludedEdges.filter(([s,a])=>t.includes(s)&&t.includes(a)))}omit(t){const e=[];for(const s of Object.keys(this.fields))t.includes(s)||e.push(s);return this.pick(e)}from(t,e,s){let a=Ge.getter(t,!0);return this.transform(n=>{if(!n)return n;let o=n;return oi(n,t)&&(o=Object.assign({},n),s||delete o[t],o[e]=a(n)),o})}json(){return this.transform(ni)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Ft.exact,test(e){if(e==null)return!0;const s=ta(this.schema,e);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,e=Ft.noUnknown){typeof t!="boolean"&&(e=t,t=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:e,test(a){if(a==null)return!0;const n=ta(this.schema,a);return!t||n.length===0||this.createError({params:{unknown:n.join(", ")}})}});return s.spec.noUnknown=t,s}unknown(t=!0,e=Ft.noUnknown){return this.noUnknown(!t,e)}transformKeys(t){return this.transform(e=>{if(!e)return e;const s={};for(const a of Object.keys(e))s[t(a)]=e[a];return s})}camelCase(){return this.transformKeys(or.camelCase)}snakeCase(){return this.transformKeys(or.snakeCase)}constantCase(){return this.transformKeys(t=>or.snakeCase(t).toUpperCase())}describe(t){const e=(t?this.resolve(t):this).clone(),s=super.describe(t);s.fields={};for(const[n,o]of Object.entries(e.fields)){var a;let l=t;(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[n]})),s.fields[n]=o.describe(l)}return s}}ra.prototype=sa.prototype;function li({fields:r,explicitSchema:t}){return v.useMemo(()=>{if(t)return Ds(t);const e={};r.forEach(a=>{var o,l,c,u,f,m,g;let n;switch(a.type){case"text":case"password":case"email":if(n=Gs(),(o=a.validation)!=null&&o.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}(l=a.validation)!=null&&l.minLength&&(n=n.min(a.validation.minLength.value,a.validation.minLength.message)),(c=a.validation)!=null&&c.maxLength&&(n=n.max(a.validation.maxLength.value,a.validation.maxLength.message)),(u=a.validation)!=null&&u.pattern&&(n=n.matches(a.validation.pattern.value,a.validation.pattern.message)),a.type==="email"&&(n=n.email("Email inválido"));break;case"number":if(n=Ys(),(f=a.validation)!=null&&f.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}break;case"select":case"optionGroup":if(n=cr(),(m=a.validation)!=null&&m.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}break;case"date":if(n=ur(),(g=a.validation)!=null&&g.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}break;default:n=cr()}e[a.name]=n});const s=ra().shape(e);return Ds(s)},[r,t])}function ci(r){return v.useMemo(()=>{const t={};return r.forEach(e=>{t[e.name]=e}),t},[r])}function di(r){const t=v.useMemo(()=>r.filter(o=>o.type==="select"&&o.loadOptions),[r]),[e,s]=v.useState(t.length),[a,n]=v.useState({});return v.useEffect(()=>{t.length!==0&&t.forEach(o=>{o.loadOptions().then(l=>n(c=>({...c,[o.name]:l}))).finally(()=>s(l=>Math.max(0,l-1)))})},[t]),{loadingCount:e,optionsMap:a}}function ui(r,t){const e=v.useMemo(()=>r.filter(o=>o.disabledWhen),[r]),s=v.useMemo(()=>e.map(o=>o.disabledWhen.watchField),[e]),a=qt({control:t,name:s}),n={};return e.forEach(o=>{const l=s.indexOf(o.disabledWhen.watchField),c=a[l];n[o.name]=c===o.disabledWhen.watchValue}),n}const aa={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},fi={sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function fr({control:r,name:t,rules:e,defaultValue:s,size:a="sm",width:n="100%",label:o,labelHidden:l=!1,hasError:c=!1,errorMessage:u="",maxLength:f,showCounter:m=!1,className:g,...x}){const S=v.useId(),j=t||S,[T,w]=v.useState(s||"");if(r&&t)return i.jsx(Fe,{name:t,control:r,rules:e,defaultValue:s||"",render:({field:E,fieldState:V})=>{var N;return i.jsx(fr,{...x,size:a,width:n,label:o,labelHidden:l,hasError:!!V.error,errorMessage:((N=V.error)==null?void 0:N.message)||"",maxLength:f,showCounter:m,className:g,value:E.value,onChange:E.onChange})}});v.useEffect(()=>{w(s||"")},[s]);const y=E=>{var V;f!==void 0&&E.target.value.length>f||(w(E.target.value),(V=x.onChange)==null||V.call(x,E))};return i.jsxs("div",{className:z("flex flex-col",g),style:{width:n},children:[o&&i.jsx("label",{htmlFor:j,className:z("pb-2 text-[var(--color-ds-text-primary)]",aa[a],l&&"sr-only"),children:o}),i.jsx("textarea",{id:j,className:z("box-border bg-[var(--color-ds-background-page)] w-full resize vertical rounded-lg border outline-none transition font-[var(--font-primary)]",aa[a],fi[a],c?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",x.disabled?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-secondary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]"),value:T,onChange:y,maxLength:f,...x}),i.jsxs("div",{className:"flex justify-between pt-1 min-h-[18px]",children:[c&&u?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:u}):i.jsx("span",{"aria-hidden":"true",children:" "}),m&&f!==void 0&&i.jsxs("span",{className:"text-xs text-[var(--color-ds-text-secondary)]",children:[T.length,"/",f]})]})]})}const hi={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function na({control:r,name:t,rules:e,defaultValue:s=!1,label:a,labelHidden:n=!1,disabled:o=!1,size:l="sm",className:c,hasError:u=!1,errorMessage:f=""}){return i.jsx("div",{className:z("flex flex-col",c),children:i.jsx(Fe,{name:t,control:r,rules:e,defaultValue:s,render:({field:m,fieldState:g})=>{const x=g.error;return i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("input",{id:t,type:"checkbox",className:z(hi[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]",o&&"opacity-50 cursor-not-allowed"),checked:m.value,onChange:S=>m.onChange(S.target.checked),disabled:o}),i.jsx("span",{className:z("text-[var(--color-ds-text-primary)] text-ds-md",o&&"text-[var(--color-ds-text-secondary)]"),children:a}),u&&(x==null?void 0:x.message)&&i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:x.message})]})}})})}function oa({name:r,control:t,searchFn:e,resolveByValue:s,label:a,size:n="sm",width:o="100%",disabled:l=!1,searchMode:c="button",minChars:u=3,debounceMs:f=600}){const m=nt(),{watch:g,getValues:x,setValue:S}=m,j=qt({control:t,name:r}),[T,w]=v.useState([]),[y,E]=v.useState(!1),[V,N]=v.useState(!1),[U,H]=v.useState(""),_=v.useRef(null),W=v.useRef(null),q=v.useRef(!1),$=v.useMemo(()=>{const J=new Map;for(const M of T)J.set(String(M.value).trim(),M.label??"");return J},[T]),I=async J=>{const M=(J??"").trim();if(!M){w([]),N(!1);return}E(!0);try{const p=await e(M,{watch:g,getValues:x});w(p??[]),N(!0)}finally{E(!1)}};v.useEffect(()=>{function J(M){_.current&&!_.current.contains(M.target)&&N(!1)}if(V)return document.addEventListener("mousedown",J),()=>document.removeEventListener("mousedown",J)},[V]),v.useEffect(()=>{if(q.current)return;const M=(j?String(j):"").trim();if(!M){H("");return}const p=$.get(M);if(p){H(p);return}let B=!1;return(async()=>{if(s)try{const h=await s(M,{watch:g,getValues:x});B||H((h==null?void 0:h.label)??M)}catch{B||H(M)}else H(M)})(),()=>{B=!0}},[j,$,s,g,x]),v.useEffect(()=>{if(c!=="debounced"||l)return;W.current&&(window.clearTimeout(W.current),W.current=null);const J=(U||"").trim();return J.length>=u?W.current=window.setTimeout(()=>{I(J)},f):(w([]),N(!1)),()=>{W.current&&(window.clearTimeout(W.current),W.current=null)}},[U,c,u,f,l]);const K=n==="sm"?"text-ds-sm":n==="md"?"text-ds-md":"text-ds-lg",Q=n==="sm"?"h-6":n==="md"?"h-10":"h-12",ee=J=>{if(l)return;const M=(U||"").trim();J.key==="Enter"&&(J.preventDefault(),c==="debounced"?M.length>=u&&I(M):I(M)),J.key==="Escape"&&N(!1)};return i.jsx(Fe,{name:r,control:t,render:({field:J,fieldState:M})=>{var p;return i.jsxs("div",{ref:_,className:"relative flex flex-col",style:{width:o},children:[a&&i.jsx("label",{className:`pb-2 text-[var(--color-ds-text-primary)] ${K}`,children:a}),i.jsx(Et,{className:c==="button"?"rounded-r-none":void 0,type:"text",size:n,width:"100%",value:U,onChange:B=>{const h=B.target.value;q.current=!0,H(h),(j?String(j):"").trim()&&S(r,"",{shouldDirty:!0})},onKeyDown:ee,onBlur:()=>{q.current=!1},disabled:l,hasError:M.invalid,errorMessage:(p=M.error)==null?void 0:p.message,onFocus:()=>{q.current=!0;const B=(U||"").trim();B&&c==="button"&&I(B)},suffixButton:c==="button"?i.jsx(Me,{type:"button",className:"!rounded-l-none",size:n,variant:"primary",onClick:()=>I((U||"").trim()),disabled:l,children:"Buscar"}):void 0}),y&&i.jsx("div",{className:"absolute top-14 left-0 right-0 z-10",children:i.jsx(qe,{width:"100%",height:n==="sm"?"1.5rem":n==="md"?"2.5rem":"3rem",variant:"rect",className:"rounded-lg"})}),V&&!y&&T.length>0&&i.jsx("ul",{className:`
|
|
31
31
|
absolute top-14 left-0 right-0
|
|
32
32
|
border-[var(--color-ds-border-default)]
|
|
33
33
|
rounded-lg bg-[var(--color-ds-background-page)]
|
|
34
|
-
shadow-lg ${
|
|
35
|
-
`,children:
|
|
34
|
+
shadow-lg ${K} max-h-48 overflow-auto z-10
|
|
35
|
+
`,children:T.map(B=>i.jsx("li",{className:`px-2 ${Q} flex items-center cursor-pointer
|
|
36
36
|
text-[var(--color-ds-text-primary)]
|
|
37
|
-
hover:bg-[var(--color-ds-background-surface)]`,onClick:()=>{x(r,String(h.value),{shouldDirty:!0,shouldValidate:!0}),z(h.label??String(h.value)),W.current=!1,O(!1)},children:h.label},String(h.value)))})]})}})}function mi({schema:r}){const{layout:t,fields:e,onSubmit:s,successMessage:a,errorMessage:n,footerButtons:o,defaultValues:l,loadDefaultValues:c,validationSchema:u}=r,{show:f}=Os(),{t:p}=Qt(),g=li({fields:e,explicitSchema:u}),x=Gn({resolver:g,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),E=v.useMemo(()=>({getValues:x.getValues,watch:x.watch}),[x.getValues,x.watch]),{control:j,reset:T,watch:w,handleSubmit:y,formState:{errors:S,isSubmitting:O}}=x,[_,z]=v.useState(!1);v.useEffect(()=>{c&&(z(!0),c().then(Z=>T(Z)).finally(()=>z(!1)))},[c,T]);const{loadingCount:Q,optionsMap:N}=di(e),W=ci(e),G=ui(e,j),V=v.useMemo(()=>{const Z={};return t.forEach((h,K)=>{h.type==="tabs"&&(Z[K]=h.tabs[0].key)}),Z},[t]),[U,X]=v.useState(V),ee=v.useCallback(Z=>{if(_)return!1;const h=x.getValues(),{watchField:K,watchValue:m}=Z;return!(K in h)||h[K]===void 0?!1:typeof m=="function"?m(h):h[K]===m},[x,_]),I=v.useMemo(()=>e.filter(Z=>"clearWhen"in Z&&Z.clearWhen).map(Z=>({name:Z.name,rule:Z.clearWhen})),[e]);v.useEffect(()=>{if(!I.length)return;const Z=K=>{I.forEach(({name:m,rule:F})=>{if(!(F.watchField in K)||K[F.watchField]===void 0)return;if(typeof F.watchValue=="function"?F.watchValue(K):K[F.watchField]===F.watchValue){const B=F.clearTo??"";K[m]!==B&&x.setValue(m,B,{shouldDirty:!0,shouldValidate:!0})}})},h=x.watch((K,m)=>{if(!(m!=null&&m.name)||!I.some(({rule:B})=>B.watchField===m.name))return;const L=x.getValues();Z(L)});return()=>{var K;return(K=h==null?void 0:h.unsubscribe)==null?void 0:K.call(h)}},[x,I]);const J=v.useCallback(Z=>{var se,ce,ge,ae;let h;if(typeof Z=="string"){if(h=W[Z],!h)return null}else h=Z;if("visibleWhen"in h&&h.visibleWhen&&!ee(h.visibleWhen))return null;let K=!!h.disabled;const m="disabledWhen"in h&&!!h.disabledWhen;if(m&&(ee(h.disabledWhen)?K=!0:K=!1),!m&&"name"in h&&h.name&&G[h.name]&&(K=!0),h.type==="search"){const H=ue=>h.searchFn(ue,E),ne={};return h.searchMode&&(ne.searchMode=h.searchMode),h.minChars&&(ne.minChars=h.minChars),h.debounceMs&&(ne.debounceMs=h.debounceMs),h.resolveByValue&&(ne.resolveByValue=h.resolveByValue),i.jsx(oa,{name:h.name,control:j,searchFn:H,label:h.label,size:h.size,width:h.width,disabled:K||O,...ne},h.name)}if(h.type==="inputGroup"){const H=h,ne=H.inputs.map(ue=>{var ht;const ie=typeof ue=="string"?W[ue]:ue;if(!ie)return null;let Se=!!ie.disabled;const Mt="disabledWhen"in ie&&!!ie.disabledWhen;Mt&&(ee(ie.disabledWhen)?Se=!0:Se=!1),!Mt&&G[ie.name]&&(Se=!0);const ft={name:ie.name,control:j,rules:ie.validation,defaultValue:void 0,label:ie.label,size:ie.size,width:ie.width,placeholder:ie.placeholder,hasError:!!S[ie.name],errorMessage:((ht=S[ie.name])==null?void 0:ht.message)||"",loading:_,disabled:Se,suffixButton:ie.suffixButton};return ie.type==="select"?{...ft,options:ie.options??N[ie.name]??[],loadOptions:ie.options?void 0:ie.loadOptions}:ft}).filter(ue=>ue!==null);return i.jsx(Ns,{groupLabel:H.groupLabel,inputs:ne,separator:H.separator,useSeparator:H.useSeparator,className:H.className,showVisibleLabel:H.showVisibleLabel,size:H.size},`inputGroup_${H.groupLabel}`)}if(h.type==="button"){const H=h;return i.jsx("div",{className:"self-center",children:i.jsx(Me,{type:"button",variant:H.variant,size:H.size,width:H.width,icon:H.icon,iconPosition:H.iconPosition,ariaLabel:H.ariaLabel,onClick:H.onClick,disabled:K||O,children:H.label})},H.name)}const F=h.suffixButton,L=typeof F=="string"?J(F):F,B={name:h.name,control:j,disabled:K||O,label:h.label,size:h.size,width:h.width,placeholder:h.placeholder,info:h.info,suffixButton:L};switch(h.type){case"select":return i.jsx(Fe,{name:h.name,control:j,render:({field:H})=>{var ne;return i.jsx(dt,{...B,value:H.value,onChange:H.onChange,options:h.options??N[h.name]??[],loadOptions:h.options?void 0:h.loadOptions,hasError:!!S[h.name],errorMessage:(ne=S[h.name])==null?void 0:ne.message,suffixButton:L})}},h.name);case"textarea":return i.jsx(Fe,{name:h.name,control:j,render:({field:H,fieldState:ne})=>{var ue;return i.jsx(fr,{...B,value:H.value,onChange:H.onChange,maxLength:h.maxLength,showCounter:!!h.showCounter,hasError:!!ne.error,errorMessage:((ue=ne.error)==null?void 0:ue.message)||""})}},h.name);case"file":return i.jsx(vs,{...B,defaultValue:[],maxFiles:h.maxFiles,accept:h.accept,hasError:!!S[h.name],errorMessage:(se=S[h.name])==null?void 0:se.message},h.name);case"checkbox":return i.jsx(na,{...B,defaultValue:!1,hasError:!!S[h.name],errorMessage:(ce=S[h.name])==null?void 0:ce.message,name:h.name},h.name);case"date":return i.jsx(hs,{...B,defaultValue:"",showTime:!!h.showTime,hasError:!!S[h.name],errorMessage:(ge=S[h.name])==null?void 0:ge.message},h.name);case"optionGroup":return i.jsx(Fs,{...B,options:h.options||[],multiple:h.multiple,vertical:h.vertical,groupLabel:h.groupLabel,defaultValue:h.defaultValue,className:h.width?void 0:"w-full",name:h.name},h.name);default:return i.jsx(rr,{...B,type:h.type,loadingDefaults:_,hasError:!!S[h.name],errorMessage:(ae=S[h.name])==null?void 0:ae.message,suffixButton:L,name:h.name},h.name)}},[W,j,S,O,_,N,ee,G]);return i.jsx(On,{...x,children:i.jsxs("form",{noValidate:!0,onSubmit:y(async Z=>{await s(Z),f(a??p("ds.form.saveSuccess"),"success")},Z=>{console.log("❌ errores de validación:",Z),wo(Z),f(n??p("ds.form.saveError"),"error")}),className:"space-y-6",children:[t.map((Z,h)=>Z.type==="rows"?i.jsx(v.Fragment,{children:Z.sections.map((K,m)=>i.jsx("div",{className:"mb-6",children:i.jsx(Dt,{title:K.sectionTitle,defaultOpen:K.defaultOpen,children:K.rows.map((F,L)=>i.jsxs("div",{children:[F.title&&i.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:F.title}),i.jsx("div",{className:"flex flex-wrap -mx-2",children:F.columns.map((B,se)=>{var ce;return i.jsx("div",{className:`${B.width} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:B.fields?B.fields.map(ge=>J(ge)):(ce=B.rows)==null?void 0:ce.map((ge,ae)=>i.jsx("div",{className:"mb-1",children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:ge.columns.map((H,ne)=>{var ue;return i.jsx("div",{className:`${H.width} px-2`,children:(ue=H.fields)==null?void 0:ue.map(ie=>J(ie))},ne)})})},ae))})},se)})})]},L))})},m))},h):i.jsx(ks,{options:Z.tabs.map(K=>({label:K.label,value:K.key})),value:U[h],onChange:K=>X(m=>({...m,[h]:K})),children:Object.fromEntries(Z.tabs.map(K=>[K.key,i.jsx("div",{className:"space-y-6",children:K.sections.map((m,F)=>i.jsx("div",{className:"mb-6",children:i.jsx(Dt,{title:m.sectionTitle,defaultOpen:m.defaultOpen,children:m.rows.map((L,B)=>i.jsx("div",{children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:L.columns.map((se,ce)=>{var ge;return i.jsx("div",{className:`${se.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(ge=se.fields)==null?void 0:ge.map((ae,H)=>i.jsx(v.Fragment,{children:J(ae)},H))})},ce)})})},B))})},F))},K.key)]))},h)),i.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:o??i.jsx(Me,{type:"submit",variant:"primary",icon:Ta,size:"sm",disabled:O||_||Q>0,children:p(O?"ds.form.sending":"ds.form.submit")})})]})})}const pi={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function ia({icon:r,size:t="md",ariaLabel:e,disabled:s=!1,onClick:a,...n}){return i.jsx("button",{type:"button","aria-label":e,disabled:s,onClick:a,className:D("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",pi[t],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...n,children:i.jsx(r,{className:D(t==="sm"?"h-4 w-4":t==="md"?"h-5 w-5":"h-6 w-6")})})}function la({dark:r,onToggle:t}){return i.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:t,className:D("relative inline-flex items-center transition-colors focus:outline-none duration-200 ease-in-out","bg-[var(--color-ds-background-accent)]","h-6 w-12 rounded-full"),children:i.jsxs("div",{className:D("absolute bg-[var(--color-ds-background-page)] flex items-center justify-center rounded-full transition-transform duration-200 ease-in-out","h-5 w-5",r?"translate-x-6":"translate-x-1"),children:[i.jsx(Ce,{component:Ha,size:"sm",className:D("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),i.jsx(Ce,{component:qa,size:"sm",className:D("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const ca=v.createContext({theme:"light",toggle:()=>{}});function gi({children:r}){const[t,e]=v.useState(!1),[s,a]=v.useState("light");v.useEffect(()=>{if(typeof window>"u")return;const o=localStorage.getItem("ds-theme");o==="light"||o==="dark"?a(o):window.matchMedia("(prefers-color-scheme: dark)").matches&&a("dark"),e(!0)},[]),v.useEffect(()=>{t&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,t]);const n=()=>a(o=>o==="light"?"dark":"light");return t?i.jsx(ca.Provider,{value:{theme:s,toggle:n},children:r}):null}const da=()=>v.useContext(ca),ua=({pinnedPages:r,onRemovePinned:t,onBack:e,dark:s,locale:a,languageOptions:n,onChangeLocale:o,profile:l,profileOptions:c,onChangeProfile:u})=>{const f=r.slice(0,3),{toggle:p}=da(),{t:g,i18n:x}=Qt(),E=j=>{x.changeLanguage(j),o(j)};return i.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[i.jsx("div",{className:"flex items-center space-x-2",children:f.map(j=>i.jsxs("div",{className:"flex items-center",children:[i.jsx("a",{href:j.href,className:D("inline-flex items-center rounded-lg","py-1 px-1 my-1 text-ds-sm","bg-transparent text-[var(--color-ds-text-primary)]","transition-colors duration-200 ease-in-out","hover:bg-[var(--color-ds-border-muted)] hover:animate-pulse"),children:j.label}),i.jsx(ia,{icon:$t,size:"sm",ariaLabel:`${g("remove")} ${j.label}`,onClick:()=>t(j.id)})]},j.id))}),i.jsx("div",{className:"flex-grow"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(dt,{size:"sm",width:"auto",options:n,value:a,onChange:E,disableErrorPlaceholder:!0}),i.jsx(dt,{size:"sm",width:"auto",options:c,value:l,onChange:u,disableErrorPlaceholder:!0}),i.jsx(la,{dark:s,onToggle:p})]})]})},bi=({loading:r=!1,ariaLabel:t="Cargando..."})=>r?i.jsxs("div",{className:`\r
|
|
37
|
+
hover:bg-[var(--color-ds-background-surface)]`,onClick:()=>{const h=String(B.value).trim();S(r,h,{shouldDirty:!0,shouldValidate:!0}),H(B.label??h),q.current=!1,N(!1)},children:B.label},String(B.value)))})]})}})}function mi({schema:r}){const{layout:t,fields:e,onSubmit:s,successMessage:a,errorMessage:n,footerButtons:o,defaultValues:l,loadDefaultValues:c,validationSchema:u}=r,{show:f}=Os(),{t:m}=Qt(),g=li({fields:e,explicitSchema:u}),x=Gn({resolver:g,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),S=v.useMemo(()=>({getValues:x.getValues,watch:x.watch}),[x.getValues,x.watch]),{control:j,reset:T,watch:w,handleSubmit:y,formState:{errors:E,isSubmitting:V}}=x,[N,U]=v.useState(!1);v.useEffect(()=>{c&&(U(!0),c().then(M=>T(M)).finally(()=>U(!1)))},[c,T]);const{loadingCount:H,optionsMap:_}=di(e),W=ci(e),q=ui(e,j),$=v.useMemo(()=>{const M={};return t.forEach((p,B)=>{p.type==="tabs"&&(M[B]=p.tabs[0].key)}),M},[t]),[I,K]=v.useState($),Q=v.useCallback(M=>{if(N)return!1;const p=x.getValues(),{watchField:B,watchValue:h}=M;return!(B in p)||p[B]===void 0?!1:typeof h=="function"?h(p):p[B]===h},[x,N]),ee=v.useMemo(()=>e.filter(M=>"clearWhen"in M&&M.clearWhen).map(M=>({name:M.name,rule:M.clearWhen})),[e]);v.useEffect(()=>{if(!ee.length)return;const M=B=>{ee.forEach(({name:h,rule:F})=>{if(!(F.watchField in B)||B[F.watchField]===void 0)return;if(typeof F.watchValue=="function"?F.watchValue(B):B[F.watchField]===F.watchValue){const Z=F.clearTo??"";B[h]!==Z&&x.setValue(h,Z,{shouldDirty:!0,shouldValidate:!0})}})},p=x.watch((B,h)=>{if(!(h!=null&&h.name)||!ee.some(({rule:Z})=>Z.watchField===h.name))return;const L=x.getValues();M(L)});return()=>{var B;return(B=p==null?void 0:p.unsubscribe)==null?void 0:B.call(p)}},[x,ee]);const J=v.useCallback(M=>{var se,ce,ge,ae;let p;if(typeof M=="string"){if(p=W[M],!p)return null}else p=M;if("visibleWhen"in p&&p.visibleWhen&&!Q(p.visibleWhen))return null;let B=!!p.disabled;const h="disabledWhen"in p&&!!p.disabledWhen;if(h&&(Q(p.disabledWhen)?B=!0:B=!1),!h&&"name"in p&&p.name&&q[p.name]&&(B=!0),p.type==="search"){const Y=ue=>p.searchFn(ue,S),ne={};return p.searchMode&&(ne.searchMode=p.searchMode),p.minChars&&(ne.minChars=p.minChars),p.debounceMs&&(ne.debounceMs=p.debounceMs),p.resolveByValue&&(ne.resolveByValue=p.resolveByValue),i.jsx(oa,{name:p.name,control:j,searchFn:Y,label:p.label,size:p.size,width:p.width,disabled:B||V,...ne},p.name)}if(p.type==="inputGroup"){const Y=p,ne=Y.inputs.map(ue=>{var ht;const ie=typeof ue=="string"?W[ue]:ue;if(!ie)return null;let Se=!!ie.disabled;const Mt="disabledWhen"in ie&&!!ie.disabledWhen;Mt&&(Q(ie.disabledWhen)?Se=!0:Se=!1),!Mt&&q[ie.name]&&(Se=!0);const ft={name:ie.name,control:j,rules:ie.validation,defaultValue:void 0,label:ie.label,size:ie.size,width:ie.width,placeholder:ie.placeholder,hasError:!!E[ie.name],errorMessage:((ht=E[ie.name])==null?void 0:ht.message)||"",loading:N,disabled:Se,suffixButton:ie.suffixButton};return ie.type==="select"?{...ft,options:ie.options??_[ie.name]??[],loadOptions:ie.options?void 0:ie.loadOptions}:ft}).filter(ue=>ue!==null);return i.jsx(Ns,{groupLabel:Y.groupLabel,inputs:ne,separator:Y.separator,useSeparator:Y.useSeparator,className:Y.className,showVisibleLabel:Y.showVisibleLabel,size:Y.size},`inputGroup_${Y.groupLabel}`)}if(p.type==="button"){const Y=p;return i.jsx("div",{className:"self-center",children:i.jsx(Me,{type:"button",variant:Y.variant,size:Y.size,width:Y.width,icon:Y.icon,iconPosition:Y.iconPosition,ariaLabel:Y.ariaLabel,onClick:Y.onClick,disabled:B||V,children:Y.label})},Y.name)}const F=p.suffixButton,L=typeof F=="string"?J(F):F,Z={name:p.name,control:j,disabled:B||V,label:p.label,size:p.size,width:p.width,placeholder:p.placeholder,info:p.info,suffixButton:L};switch(p.type){case"select":return i.jsx(Fe,{name:p.name,control:j,render:({field:Y})=>{var ne;return i.jsx(dt,{...Z,value:Y.value,onChange:Y.onChange,options:p.options??_[p.name]??[],loadOptions:p.options?void 0:p.loadOptions,hasError:!!E[p.name],errorMessage:(ne=E[p.name])==null?void 0:ne.message,suffixButton:L})}},p.name);case"textarea":return i.jsx(Fe,{name:p.name,control:j,render:({field:Y,fieldState:ne})=>{var ue;return i.jsx(fr,{...Z,value:Y.value,onChange:Y.onChange,maxLength:p.maxLength,showCounter:!!p.showCounter,hasError:!!ne.error,errorMessage:((ue=ne.error)==null?void 0:ue.message)||""})}},p.name);case"file":return i.jsx(vs,{...Z,defaultValue:[],maxFiles:p.maxFiles,accept:p.accept,hasError:!!E[p.name],errorMessage:(se=E[p.name])==null?void 0:se.message},p.name);case"checkbox":return i.jsx(na,{...Z,defaultValue:!1,hasError:!!E[p.name],errorMessage:(ce=E[p.name])==null?void 0:ce.message,name:p.name},p.name);case"date":return i.jsx(hs,{...Z,defaultValue:"",showTime:!!p.showTime,hasError:!!E[p.name],errorMessage:(ge=E[p.name])==null?void 0:ge.message},p.name);case"optionGroup":return i.jsx(Fs,{...Z,options:p.options||[],multiple:p.multiple,vertical:p.vertical,groupLabel:p.groupLabel,defaultValue:p.defaultValue,className:p.width?void 0:"w-full",name:p.name},p.name);default:return i.jsx(rr,{...Z,type:p.type,loadingDefaults:N,hasError:!!E[p.name],errorMessage:(ae=E[p.name])==null?void 0:ae.message,suffixButton:L,name:p.name},p.name)}},[W,j,E,V,N,_,Q,q]);return i.jsx(On,{...x,children:i.jsxs("form",{noValidate:!0,onSubmit:y(async M=>{await s(M),f(a??m("ds.form.saveSuccess"),"success")},M=>{console.log("❌ errores de validación:",M),wo(M),f(n??m("ds.form.saveError"),"error")}),className:"space-y-6",children:[t.map((M,p)=>M.type==="rows"?i.jsx(v.Fragment,{children:M.sections.map((B,h)=>i.jsx("div",{className:"mb-6",children:i.jsx(Dt,{title:B.sectionTitle,defaultOpen:B.defaultOpen,children:B.rows.map((F,L)=>i.jsxs("div",{children:[F.title&&i.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:F.title}),i.jsx("div",{className:"flex flex-wrap -mx-2",children:F.columns.map((Z,se)=>{var ce;return i.jsx("div",{className:`${Z.width} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:Z.fields?Z.fields.map(ge=>J(ge)):(ce=Z.rows)==null?void 0:ce.map((ge,ae)=>i.jsx("div",{className:"mb-1",children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:ge.columns.map((Y,ne)=>{var ue;return i.jsx("div",{className:`${Y.width} px-2`,children:(ue=Y.fields)==null?void 0:ue.map(ie=>J(ie))},ne)})})},ae))})},se)})})]},L))})},h))},p):i.jsx(ks,{options:M.tabs.map(B=>({label:B.label,value:B.key})),value:I[p],onChange:B=>K(h=>({...h,[p]:B})),children:Object.fromEntries(M.tabs.map(B=>[B.key,i.jsx("div",{className:"space-y-6",children:B.sections.map((h,F)=>i.jsx("div",{className:"mb-6",children:i.jsx(Dt,{title:h.sectionTitle,defaultOpen:h.defaultOpen,children:h.rows.map((L,Z)=>i.jsx("div",{children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:L.columns.map((se,ce)=>{var ge;return i.jsx("div",{className:`${se.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(ge=se.fields)==null?void 0:ge.map((ae,Y)=>i.jsx(v.Fragment,{children:J(ae)},Y))})},ce)})})},Z))})},F))},B.key)]))},p)),i.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:o??i.jsx(Me,{type:"submit",variant:"primary",icon:Ta,size:"sm",disabled:V||N||H>0,children:m(V?"ds.form.sending":"ds.form.submit")})})]})})}const pi={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function ia({icon:r,size:t="md",ariaLabel:e,disabled:s=!1,onClick:a,...n}){return i.jsx("button",{type:"button","aria-label":e,disabled:s,onClick:a,className:z("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",pi[t],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...n,children:i.jsx(r,{className:z(t==="sm"?"h-4 w-4":t==="md"?"h-5 w-5":"h-6 w-6")})})}function la({dark:r,onToggle:t}){return i.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:t,className:z("relative inline-flex items-center transition-colors focus:outline-none duration-200 ease-in-out","bg-[var(--color-ds-background-accent)]","h-6 w-12 rounded-full"),children:i.jsxs("div",{className:z("absolute bg-[var(--color-ds-background-page)] flex items-center justify-center rounded-full transition-transform duration-200 ease-in-out","h-5 w-5",r?"translate-x-6":"translate-x-1"),children:[i.jsx(Ce,{component:Ha,size:"sm",className:z("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),i.jsx(Ce,{component:qa,size:"sm",className:z("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const ca=v.createContext({theme:"light",toggle:()=>{}});function gi({children:r}){const[t,e]=v.useState(!1),[s,a]=v.useState("light");v.useEffect(()=>{if(typeof window>"u")return;const o=localStorage.getItem("ds-theme");o==="light"||o==="dark"?a(o):window.matchMedia("(prefers-color-scheme: dark)").matches&&a("dark"),e(!0)},[]),v.useEffect(()=>{t&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,t]);const n=()=>a(o=>o==="light"?"dark":"light");return t?i.jsx(ca.Provider,{value:{theme:s,toggle:n},children:r}):null}const da=()=>v.useContext(ca),ua=({pinnedPages:r,onRemovePinned:t,onBack:e,dark:s,locale:a,languageOptions:n,onChangeLocale:o,profile:l,profileOptions:c,onChangeProfile:u})=>{const f=r.slice(0,3),{toggle:m}=da(),{t:g,i18n:x}=Qt(),S=j=>{x.changeLanguage(j),o(j)};return i.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[i.jsx("div",{className:"flex items-center space-x-2",children:f.map(j=>i.jsxs("div",{className:"flex items-center",children:[i.jsx("a",{href:j.href,className:z("inline-flex items-center rounded-lg","py-1 px-1 my-1 text-ds-sm","bg-transparent text-[var(--color-ds-text-primary)]","transition-colors duration-200 ease-in-out","hover:bg-[var(--color-ds-border-muted)] hover:animate-pulse"),children:j.label}),i.jsx(ia,{icon:$t,size:"sm",ariaLabel:`${g("remove")} ${j.label}`,onClick:()=>t(j.id)})]},j.id))}),i.jsx("div",{className:"flex-grow"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(dt,{size:"sm",width:"auto",options:n,value:a,onChange:S,disableErrorPlaceholder:!0}),i.jsx(dt,{size:"sm",width:"auto",options:c,value:l,onChange:u,disableErrorPlaceholder:!0}),i.jsx(la,{dark:s,onToggle:m})]})]})},bi=({loading:r=!1,ariaLabel:t="Cargando..."})=>r?i.jsxs("div",{className:`\r
|
|
38
38
|
fixed inset-0\r
|
|
39
39
|
flex items-center justify-center\r
|
|
40
40
|
bg-[var(--color-ds-background-surface)]/90\r
|
|
@@ -59,4 +59,4 @@ attempted value: ${o}
|
|
|
59
59
|
dark:bg-[var(--color-ds-background-surface)]\r
|
|
60
60
|
hover:bg-[var(--color-ds-background-accent)]/10\r
|
|
61
61
|
focus:outline-none\r
|
|
62
|
-
`,children:[i.jsx($t,{className:"w-5 h-5 text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]"}),i.jsx("span",{className:"sr-only",children:"Cerrar modal"})]})]}),i.jsx("div",{className:"px-6 py-6 text-[var(--color-ds-text-primary)]",children:s}),a&&i.jsx("div",{className:"px-6 py-4 border-t border-[var(--color-ds-border-muted)] bg-[var(--color-ds-background-surface)]",children:a})]})})]}),document.body):null),hr=({items:r,selected:t,onSelect:e,level:s=0})=>{const[a,n]=v.useState(new Set),o=l=>{const c=new Set(a);s===0?(c.clear(),a.has(l)||c.add(l)):c.has(l)?c.delete(l):c.add(l),n(c)};return i.jsx("ul",{className:D(s>0?"mt-1":"mt-0"),children:r.map(l=>{var E;const c=l.value===t,u=a.has(l.value),f=["pl-2","pl-2","pl-2"][s]||"pl-4",p=s===0?u||c?"bg-[var(--color-ds-background-accent)] text-[var(--color-ds-text-on-accent)] rounded-r-lg":"text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]":c?"bg-[var(--color-ds-background-surface)] text-[var(--color-ds-text-primary)]":"text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]",g=s===0&&(u||c)?"text-[var(--color-ds-text-on-accent)]":"text-[var(--color-ds-text-secondary)]",x=!!((E=l.children)!=null&&E.length);return i.jsxs("li",{children:[i.jsxs("button",{type:"button",onClick:()=>x?o(l.value):e(l.value),"aria-expanded":x?u:void 0,className:D("w-full flex items-center justify-between h-8 transition-colors",f,p),children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[s===0&&l.icon&&i.jsx(l.icon,{className:"w-5 h-5 ml-2"}),i.jsx("span",{className:"text-ds-sm",children:l.label})]}),x&&(u?i.jsx(kr,{className:D("w-4 h-4",g)}):i.jsx(Oa,{className:D("w-4 h-4",g)}))]}),x&&i.jsx("div",{className:D("overflow-hidden transition-[max-height] duration-300 ease-in-out","border-l-1 border-[var(--color-ds-background-accent)] ml-6",u?"max-h-screen":"max-h-0"),children:i.jsx(hr,{items:l.children,selected:t,onSelect:e,level:s+1})})]},l.value)})})},vi="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20250%20250'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20186)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23FFFFFF;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M101.7,82.72c1.6.57,3.25,1.09,4.98,1.53,11.93,3.07,17.85,7.44,17.85,13.01,0,2.72-1.14,5-3.43,6.86-2.29,1.86-5.14,2.79-8.57,2.79s-6.49-1.13-8.9-3.36c-2.62,6.82-6.19,13.16-10.51,18.91,5.53,3.09,11.9,4.68,19.13,4.68,10.14,0,18.64-3,25.43-9.01,3.7-3.24,6.35-6.96,8.02-11.11,1.77,3.2,4.03,6.17,6.81,8.9,7.64,7.51,17.28,11.22,28.78,11.22,9.14,0,17.21-2.43,24.21-7.22,2.24-1.55,4.24-3.27,6.05-5.14l-14.05-13.73h-.14c-2.57,4.29-8.57,7.44-15.64,7.44-8.78,0-15.5-5.22-17.85-13.58h57.06c.36-1.57.57-3.79.57-6.58,0-11.37-3.86-20.73-11.5-28.24-7.71-7.44-17.28-11.15-28.71-11.15s-21.14,3.72-28.78,11.15c-5.19,5.09-8.59,11.03-10.26,17.78-1.11-1.42-2.37-2.71-3.78-3.83-6.07-4.79-12.07-7.36-20.64-9.73-11-2.93-16.5-7.08-16.5-12.58,0-2.51,1-4.65,3.07-6.37,2.07-1.71,4.57-2.57,7.57-2.57,3.21,0,5.93,1,8,3,2.07,2,3.14,4.5,3.14,7.5h23.21c0-8.79-3.29-16.08-9.78-21.95-6.5-5.86-14.71-8.79-24.57-8.79s-17.44,2.77-23.89,8.31C74.82,12.54,53.44.47,29.27,0v24.08c27.07.77,48.86,23.04,48.86,50.32s-21.79,49.55-48.86,50.32v24.08c37.54-.72,68.34-29.42,72.44-66.08ZM181.29,67.38c8.21,0,15,5.08,17.21,13.3h-34.5c2.57-8.22,8.93-13.3,17.28-13.3Z'/%3e%3cpath%20class='st0'%20d='M29.35,160.65v29.07h10.94c4.12,0,7.57-1.38,10.31-4.16,2.74-2.76,4.12-6.21,4.12-10.39s-1.38-7.61-4.12-10.39c-2.74-2.76-6.19-4.14-10.31-4.14h-10.94ZM52.1,175.17c0,3.46-1.14,6.34-3.39,8.64-2.25,2.3-5.07,3.46-8.46,3.46h-8.36v-24.17h8.36c3.39,0,6.21,1.15,8.46,3.46,2.25,2.3,3.39,5.18,3.39,8.62Z'/%3e%3cpath%20class='st0'%20d='M60.61,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3crect%20class='st0'%20x='57.63'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M64.15,168.24v29.48h2.41v-13.19c.85,1.77,2.09,3.17,3.69,4.18,1.6,1.01,3.41,1.52,5.44,1.52,3.11,0,5.7-1.07,7.75-3.23,2.05-2.16,3.07-4.83,3.07-8.04s-1.04-5.86-3.09-8.02c-2.05-2.14-4.63-3.21-7.73-3.21-2.03,0-3.84.49-5.44,1.5-1.6,1.01-2.84,2.41-3.69,4.18v-5.16h-2.41ZM69.06,172.62c1.64-1.69,3.73-2.53,6.23-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36c-1.66,1.71-3.73,2.55-6.23,2.55s-4.59-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33Z'/%3e%3cpath%20class='st0'%20d='M107.73,189.71v-21.48h-2.42v12.59c0,2.1-.65,3.79-1.97,5.08-1.32,1.3-3.05,1.95-5.18,1.95s-3.69-.64-4.93-1.91c-1.26-1.28-1.89-2.96-1.89-5.04v-12.67h-2.4v13.35c0,2.61.79,4.69,2.35,6.27,1.56,1.58,3.61,2.37,6.15,2.37,3.65-.02,6.27-1.52,7.85-4.53v4.01h2.42Z'/%3e%3cpolygon%20class='st0'%20points='117.35%20189.71%20117.35%20170.46%20122.55%20170.46%20122.55%20168.24%20117.35%20168.24%20117.35%20161.9%20114.94%20162.38%20114.94%20168.24%20110.01%20168.24%20110.01%20170.46%20114.94%20170.46%20114.94%20189.71%20117.35%20189.71'/%3e%3cpath%20class='st0'%20d='M144.27,189.71v-21.48h-2.42v5.12c-.87-1.75-2.13-3.13-3.73-4.14-1.6-1.01-3.41-1.5-5.4-1.5-3.08,0-5.64,1.07-7.69,3.21-2.05,2.16-3.09,4.83-3.09,8.02s1.04,5.88,3.09,8.04c2.05,2.16,4.63,3.23,7.69,3.23,1.99,0,3.79-.51,5.4-1.52,1.6-1.01,2.84-2.39,3.73-4.13v5.14h2.42ZM139.36,185.31c-1.66,1.71-3.73,2.55-6.23,2.55s-4.53-.84-6.19-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.19-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36Z'/%3e%3cpath%20class='st0'%20d='M158.18,170.09c2.09,0,3.9.62,5.46,1.85,1.54,1.23,2.56,2.84,3.02,4.83h2.5c-.47-2.63-1.73-4.79-3.73-6.5-2.03-1.71-4.44-2.55-7.25-2.55-3.19,0-5.84,1.07-8,3.21-2.15,2.16-3.23,4.83-3.23,8.02s1.08,5.88,3.23,8.04c2.13,2.16,4.81,3.23,8,3.23,2.8,0,5.22-.84,7.25-2.55,2.01-1.71,3.27-3.87,3.73-6.52h-2.5c-.47,2-1.48,3.62-3.02,4.85-1.56,1.23-3.37,1.85-5.46,1.85-2.5,0-4.57-.84-6.23-2.55-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3crect%20class='st0'%20x='171.72'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M174.71,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3cpath%20class='st0'%20d='M176.86,178.95c0,3.21,1.08,5.88,3.23,8.04,2.15,2.16,4.83,3.23,8.02,3.23s5.85-1.07,7.98-3.23c2.13-2.16,3.19-4.83,3.19-8.04s-1.06-5.86-3.19-8.02c-2.13-2.14-4.79-3.21-7.98-3.21s-5.86,1.07-8.02,3.21c-2.15,2.16-3.23,4.83-3.23,8.02ZM188.09,170.09c2.5,0,4.57.84,6.21,2.53,1.64,1.71,2.48,3.8,2.48,6.33s-.83,4.65-2.48,6.36c-1.64,1.71-3.71,2.55-6.21,2.55s-4.57-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3cpolygon%20class='st0'%20points='194.03%20160.01%20190.83%20160.01%20186.46%20165.15%20189.08%20165.15%20194.03%20160.01'/%3e%3cpath%20class='st0'%20d='M221.5,189.71v-13.02c0-2.69-.81-4.86-2.44-6.5-1.64-1.65-3.79-2.47-6.45-2.47-3.75,0-6.68,1.67-8.22,4.71v-4.2h-2.42v21.48h2.42v-12.22c0-2.22.69-4.01,2.07-5.37,1.38-1.36,3.19-2.04,5.44-2.04s3.92.66,5.24,2c1.32,1.34,1.97,3.11,1.97,5.33v12.3h2.4Z'/%3e%3cpath%20class='st0'%20d='M57.27,225.24c-2.82-2.23-5.61-3.43-9.59-4.53-5.11-1.37-7.66-3.3-7.66-5.87,0-1.17.46-2.17,1.43-2.97.96-.8,2.12-1.2,3.52-1.2,1.49,0,2.75.47,3.72,1.4.96.93,1.46,2.1,1.46,3.5h10.78c0-4.1-1.53-7.5-4.55-10.23-3.02-2.73-6.83-4.1-11.42-4.1s-8.23,1.33-11.25,4c-3.02,2.67-4.51,6-4.51,10s1.26,7.4,3.75,9.73c2.49,2.37,5.68,4.03,9.56,5.03,5.54,1.43,8.29,3.47,8.29,6.06,0,1.27-.53,2.33-1.59,3.2-1.06.87-2.39,1.3-3.98,1.3s-3.05-.53-4.18-1.6c-1.16-1.07-1.73-2.37-1.73-3.93h-10.82c0,4.3,1.59,7.86,4.78,10.7,3.15,2.83,7.1,4.26,11.81,4.26s8.66-1.4,11.81-4.2c3.15-2.77,4.71-6.26,4.71-10.43,0-4.43-1.56-7.9-4.35-10.13Z'/%3e%3cpolygon%20class='st0'%20points='118.26%20236.54%20110.23%20214.38%2098.88%20214.38%20113.02%20249.17%20123.21%20249.17%20137.28%20214.38%20126.19%20214.38%20118.26%20236.54'/%3e%3crect%20class='st0'%20x='139.25'%20y='214.38'%20width='9.92'%20height='34.79'/%3e%3cpath%20class='st0'%20d='M144.2,199.53c-1.72,0-3.18.57-4.35,1.73-1.16,1.17-1.76,2.6-1.76,4.33s.6,3.23,1.76,4.4c1.16,1.17,2.62,1.73,4.35,1.73s3.25-.57,4.45-1.73c1.16-1.17,1.76-2.63,1.76-4.4s-.6-3.17-1.76-4.33c-1.19-1.17-2.69-1.73-4.45-1.73Z'/%3e%3crect%20class='st0'%20x='154.93'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3crect%20class='st0'%20x='170.61'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3cpath%20class='st0'%20d='M211.58,214.38v3.8c-2.82-3.1-6.34-4.63-10.49-4.63-4.75,0-8.73,1.73-11.91,5.2-3.22,3.5-4.81,7.83-4.81,13s1.59,9.53,4.81,13.03c3.19,3.5,7.17,5.23,11.91,5.23,4.18-.03,7.67-1.57,10.49-4.67v3.83h9.92v-34.79h-9.92ZM209.19,237.9c-1.63,1.63-3.65,2.47-6.11,2.47s-4.41-.83-6.01-2.47c-1.63-1.63-2.42-3.7-2.42-6.17s.8-4.5,2.42-6.13c1.59-1.63,3.58-2.43,6.01-2.43s4.45.8,6.07,2.43c1.63,1.63,2.42,3.7,2.42,6.13s-.8,4.53-2.39,6.17Z'/%3e%3cpath%20class='st0'%20d='M82.34,213.54c-5.34,0-9.82,1.73-13.37,5.2-3.55,3.5-5.34,7.83-5.34,13s1.79,9.53,5.34,13.03c3.55,3.5,8.03,5.23,13.37,5.23,4.25,0,8-1.13,11.25-3.37,1.05-.73,1.99-1.55,2.84-2.43l-6.5-6.37h-.13c-1.19,2-3.98,3.47-7.27,3.47-4.08,0-7.2-2.43-8.29-6.33h26.51c.17-.73.27-1.77.27-3.07,0-5.3-1.79-9.66-5.34-13.16-3.58-3.47-8.03-5.2-13.34-5.2ZM74.31,228.34c1.19-3.83,4.15-6.2,8.03-6.2s6.97,2.37,8,6.2h-16.03Z'/%3e%3c/svg%3e",yi="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20250%20250'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20186)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23005751;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M101.7,82.72c1.6.57,3.25,1.09,4.98,1.53,11.93,3.07,17.85,7.44,17.85,13.01,0,2.72-1.14,5-3.43,6.86-2.29,1.86-5.14,2.79-8.57,2.79s-6.49-1.13-8.9-3.36c-2.62,6.82-6.19,13.16-10.51,18.91,5.53,3.09,11.9,4.68,19.13,4.68,10.14,0,18.64-3,25.43-9.01,3.7-3.24,6.35-6.96,8.02-11.11,1.77,3.2,4.03,6.17,6.81,8.9,7.64,7.51,17.28,11.22,28.78,11.22,9.14,0,17.21-2.43,24.21-7.22,2.24-1.55,4.24-3.27,6.05-5.14l-14.05-13.73h-.14c-2.57,4.29-8.57,7.44-15.64,7.44-8.78,0-15.5-5.22-17.85-13.58h57.06c.36-1.57.57-3.79.57-6.58,0-11.37-3.86-20.73-11.5-28.24-7.71-7.44-17.28-11.15-28.71-11.15s-21.14,3.72-28.78,11.15c-5.19,5.09-8.59,11.03-10.26,17.78-1.11-1.42-2.37-2.71-3.78-3.83-6.07-4.79-12.07-7.36-20.64-9.73-11-2.93-16.5-7.08-16.5-12.58,0-2.51,1-4.65,3.07-6.37,2.07-1.71,4.57-2.57,7.57-2.57,3.21,0,5.93,1,8,3,2.07,2,3.14,4.5,3.14,7.5h23.21c0-8.79-3.29-16.08-9.78-21.95-6.5-5.86-14.71-8.79-24.57-8.79s-17.44,2.77-23.89,8.31C74.82,12.54,53.44.47,29.27,0v24.08c27.07.77,48.86,23.04,48.86,50.32s-21.79,49.55-48.86,50.32v24.08c37.54-.72,68.34-29.42,72.44-66.08ZM181.29,67.38c8.21,0,15,5.08,17.21,13.3h-34.5c2.57-8.22,8.93-13.3,17.28-13.3Z'/%3e%3cpath%20class='st0'%20d='M29.35,160.65v29.07h10.94c4.12,0,7.57-1.38,10.31-4.16,2.74-2.76,4.12-6.21,4.12-10.39s-1.38-7.61-4.12-10.39c-2.74-2.76-6.19-4.14-10.31-4.14h-10.94ZM52.1,175.17c0,3.46-1.14,6.34-3.39,8.64-2.25,2.3-5.07,3.46-8.46,3.46h-8.36v-24.17h8.36c3.39,0,6.21,1.15,8.46,3.46,2.25,2.3,3.39,5.18,3.39,8.62Z'/%3e%3cpath%20class='st0'%20d='M60.61,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3crect%20class='st0'%20x='57.63'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M64.15,168.24v29.48h2.41v-13.19c.85,1.77,2.09,3.17,3.69,4.18,1.6,1.01,3.41,1.52,5.44,1.52,3.11,0,5.7-1.07,7.75-3.23,2.05-2.16,3.07-4.83,3.07-8.04s-1.04-5.86-3.09-8.02c-2.05-2.14-4.63-3.21-7.73-3.21-2.03,0-3.84.49-5.44,1.5-1.6,1.01-2.84,2.41-3.69,4.18v-5.16h-2.41ZM69.06,172.62c1.64-1.69,3.73-2.53,6.23-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36c-1.66,1.71-3.73,2.55-6.23,2.55s-4.59-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33Z'/%3e%3cpath%20class='st0'%20d='M107.73,189.71v-21.48h-2.42v12.59c0,2.1-.65,3.79-1.97,5.08-1.32,1.3-3.05,1.95-5.18,1.95s-3.69-.64-4.93-1.91c-1.26-1.28-1.89-2.96-1.89-5.04v-12.67h-2.4v13.35c0,2.61.79,4.69,2.35,6.27,1.56,1.58,3.61,2.37,6.15,2.37,3.65-.02,6.27-1.52,7.85-4.53v4.01h2.42Z'/%3e%3cpolygon%20class='st0'%20points='117.35%20189.71%20117.35%20170.46%20122.55%20170.46%20122.55%20168.24%20117.35%20168.24%20117.35%20161.9%20114.94%20162.38%20114.94%20168.24%20110.01%20168.24%20110.01%20170.46%20114.94%20170.46%20114.94%20189.71%20117.35%20189.71'/%3e%3cpath%20class='st0'%20d='M144.27,189.71v-21.48h-2.42v5.12c-.87-1.75-2.13-3.13-3.73-4.14-1.6-1.01-3.41-1.5-5.4-1.5-3.08,0-5.64,1.07-7.69,3.21-2.05,2.16-3.09,4.83-3.09,8.02s1.04,5.88,3.09,8.04c2.05,2.16,4.63,3.23,7.69,3.23,1.99,0,3.79-.51,5.4-1.52,1.6-1.01,2.84-2.39,3.73-4.13v5.14h2.42ZM139.36,185.31c-1.66,1.71-3.73,2.55-6.23,2.55s-4.53-.84-6.19-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.19-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36Z'/%3e%3cpath%20class='st0'%20d='M158.18,170.09c2.09,0,3.9.62,5.46,1.85,1.54,1.23,2.56,2.84,3.02,4.83h2.5c-.47-2.63-1.73-4.79-3.73-6.5-2.03-1.71-4.44-2.55-7.25-2.55-3.19,0-5.84,1.07-8,3.21-2.15,2.16-3.23,4.83-3.23,8.02s1.08,5.88,3.23,8.04c2.13,2.16,4.81,3.23,8,3.23,2.8,0,5.22-.84,7.25-2.55,2.01-1.71,3.27-3.87,3.73-6.52h-2.5c-.47,2-1.48,3.62-3.02,4.85-1.56,1.23-3.37,1.85-5.46,1.85-2.5,0-4.57-.84-6.23-2.55-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3crect%20class='st0'%20x='171.72'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M174.71,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3cpath%20class='st0'%20d='M176.86,178.95c0,3.21,1.08,5.88,3.23,8.04,2.15,2.16,4.83,3.23,8.02,3.23s5.85-1.07,7.98-3.23c2.13-2.16,3.19-4.83,3.19-8.04s-1.06-5.86-3.19-8.02c-2.13-2.14-4.79-3.21-7.98-3.21s-5.86,1.07-8.02,3.21c-2.15,2.16-3.23,4.83-3.23,8.02ZM188.09,170.09c2.5,0,4.57.84,6.21,2.53,1.64,1.71,2.48,3.8,2.48,6.33s-.83,4.65-2.48,6.36c-1.64,1.71-3.71,2.55-6.21,2.55s-4.57-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3cpolygon%20class='st0'%20points='194.03%20160.01%20190.83%20160.01%20186.46%20165.15%20189.08%20165.15%20194.03%20160.01'/%3e%3cpath%20class='st0'%20d='M221.5,189.71v-13.02c0-2.69-.81-4.86-2.44-6.5-1.64-1.65-3.79-2.47-6.45-2.47-3.75,0-6.68,1.67-8.22,4.71v-4.2h-2.42v21.48h2.42v-12.22c0-2.22.69-4.01,2.07-5.37,1.38-1.36,3.19-2.04,5.44-2.04s3.92.66,5.24,2c1.32,1.34,1.97,3.11,1.97,5.33v12.3h2.4Z'/%3e%3cpath%20class='st0'%20d='M57.27,225.24c-2.82-2.23-5.61-3.43-9.59-4.53-5.11-1.37-7.66-3.3-7.66-5.87,0-1.17.46-2.17,1.43-2.97.96-.8,2.12-1.2,3.52-1.2,1.49,0,2.75.47,3.72,1.4.96.93,1.46,2.1,1.46,3.5h10.78c0-4.1-1.53-7.5-4.55-10.23-3.02-2.73-6.83-4.1-11.42-4.1s-8.23,1.33-11.25,4c-3.02,2.67-4.51,6-4.51,10s1.26,7.4,3.75,9.73c2.49,2.37,5.68,4.03,9.56,5.03,5.54,1.43,8.29,3.47,8.29,6.06,0,1.27-.53,2.33-1.59,3.2-1.06.87-2.39,1.3-3.98,1.3s-3.05-.53-4.18-1.6c-1.16-1.07-1.73-2.37-1.73-3.93h-10.82c0,4.3,1.59,7.86,4.78,10.7,3.15,2.83,7.1,4.26,11.81,4.26s8.66-1.4,11.81-4.2c3.15-2.77,4.71-6.26,4.71-10.43,0-4.43-1.56-7.9-4.35-10.13Z'/%3e%3cpolygon%20class='st0'%20points='118.26%20236.54%20110.23%20214.38%2098.88%20214.38%20113.02%20249.17%20123.21%20249.17%20137.28%20214.38%20126.19%20214.38%20118.26%20236.54'/%3e%3crect%20class='st0'%20x='139.25'%20y='214.38'%20width='9.92'%20height='34.79'/%3e%3cpath%20class='st0'%20d='M144.2,199.53c-1.72,0-3.18.57-4.35,1.73-1.16,1.17-1.76,2.6-1.76,4.33s.6,3.23,1.76,4.4c1.16,1.17,2.62,1.73,4.35,1.73s3.25-.57,4.45-1.73c1.16-1.17,1.76-2.63,1.76-4.4s-.6-3.17-1.76-4.33c-1.19-1.17-2.69-1.73-4.45-1.73Z'/%3e%3crect%20class='st0'%20x='154.93'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3crect%20class='st0'%20x='170.61'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3cpath%20class='st0'%20d='M211.58,214.38v3.8c-2.82-3.1-6.34-4.63-10.49-4.63-4.75,0-8.73,1.73-11.91,5.2-3.22,3.5-4.81,7.83-4.81,13s1.59,9.53,4.81,13.03c3.19,3.5,7.17,5.23,11.91,5.23,4.18-.03,7.67-1.57,10.49-4.67v3.83h9.92v-34.79h-9.92ZM209.19,237.9c-1.63,1.63-3.65,2.47-6.11,2.47s-4.41-.83-6.01-2.47c-1.63-1.63-2.42-3.7-2.42-6.17s.8-4.5,2.42-6.13c1.59-1.63,3.58-2.43,6.01-2.43s4.45.8,6.07,2.43c1.63,1.63,2.42,3.7,2.42,6.13s-.8,4.53-2.39,6.17Z'/%3e%3cpath%20class='st0'%20d='M82.34,213.54c-5.34,0-9.82,1.73-13.37,5.2-3.55,3.5-5.34,7.83-5.34,13s1.79,9.53,5.34,13.03c3.55,3.5,8.03,5.23,13.37,5.23,4.25,0,8-1.13,11.25-3.37,1.05-.73,1.99-1.55,2.84-2.43l-6.5-6.37h-.13c-1.19,2-3.98,3.47-7.27,3.47-4.08,0-7.2-2.43-8.29-6.33h26.51c.17-.73.27-1.77.27-3.07,0-5.3-1.79-9.66-5.34-13.16-3.58-3.47-8.03-5.2-13.34-5.2ZM74.31,228.34c1.19-3.83,4.15-6.2,8.03-6.2s6.97,2.37,8,6.2h-16.03Z'/%3e%3c/svg%3e",fa=({appName:r,orgName:t,username:e,footerText:s,navItems:a,selectedNav:n,onSelectNav:o,width:l="200px"})=>{const{theme:c}=da(),u=c==="dark"?vi:yi;return i.jsxs("aside",{className:"flex flex-col h-screen bg-[var(--color-ds-background-page)]",style:{width:l},children:[i.jsxs("div",{className:"flex gap-1 flex-col items-center py-4 space-y-1",children:[i.jsx("img",{src:u,alt:"Logo Diputación",className:"w-20 h-20"}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-lg ",children:r}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:t}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:e}),i.jsx("div",{className:"w-1/5 h-0.5 rounded-full bg-[var(--color-ds-background-accent)] mt-2"})]}),i.jsx("nav",{className:"flex-1 overflow-auto pt-3",children:i.jsx(hr,{items:a,selected:n,onSelect:o})}),i.jsx("div",{className:"px-4 w-full py-3",children:i.jsx("span",{className:"text-ds-sm w-full text-center text-[var(--color-ds-text-secondary)]",children:s})})]})};function wi({sidebar:r,header:t,children:e}){return i.jsxs("div",{className:"flex h-screen overflow-hidden bg-[var(--color-ds-background-page)]",children:[i.jsx(fa,{...r}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-auto px-10 [scrollbar-gutter:stable_both-edges]",children:[i.jsx(ua,{...t}),i.jsx("main",{className:"flex-1 ",children:e})]})]})}function ki({columns:r,data:t,loadData:e,loading:s,idAccessor:a,multiSelect:n=!1,onSelectionChange:o,pageSize:l=10,initialSort:c,onSort:u,className:f}){const p=t!==void 0,[g,x]=v.useState([]),[E,j]=v.useState(!1),T=v.useRef(null);v.useEffect(()=>{var F;if(!e||p)return;(F=T.current)==null||F.abort();const m=new AbortController;return T.current=m,j(!0),e().then(L=>{m.signal.aborted||x(L)}).finally(()=>{m.signal.aborted||j(!1)}),()=>m.abort()},[e,p]);const w=v.useMemo(()=>p?t:g,[t,g,p]),y=s??(e?E:!1),[S,O]=v.useState(new Set),[_,z]=v.useState(1),[Q,N]=v.useState(c==null?void 0:c.sortBy),[W,G]=v.useState((c==null?void 0:c.sortDir)??"asc"),V=m=>typeof a=="function"?a(m):m[a],U=v.useRef(null);v.useEffect(()=>{U.current!==w&&(O(new Set),z(1),U.current=w)},[w]);const X=v.useMemo(()=>{if(!Q)return w;const m=W==="asc"?1:-1;return[...w].sort((F,L)=>{const B=F[Q],se=L[Q];return B==null?-m:se==null||B>se?m:B<se?-m:0})},[w,Q,W]),ee=Math.max(1,Math.ceil(X.length/l)),I=v.useMemo(()=>{const m=(_-1)*l;return X.slice(m,m+l)},[X,_,l]),J=m=>{const F=new Set(S);F.has(m)?F.delete(m):F.add(m),O(F),o==null||o(w.filter(L=>F.has(V(L))))},Z=()=>{const m=I.every(L=>S.has(V(L))),F=new Set(S);I.forEach(L=>{m?F.delete(V(L)):F.add(V(L))}),O(F),o==null||o(w.filter(L=>F.has(V(L))))},h=m=>{if(!m.sortable)return;const F=typeof m.accessor=="string"?m.accessor:m.sortKey;if(Q===F){const L=W==="asc"?"desc":"asc";G(L),u==null||u(F,L)}else N(F),G("asc"),u==null||u(F,"asc");z(1)},K=()=>y?i.jsx("tbody",{children:Array.from({length:l}).map((m,F)=>i.jsxs("tr",{children:[n&&i.jsx("td",{children:i.jsx(qe,{width:"1rem",height:"1rem",variant:"circle"})}),r.map((L,B)=>i.jsx("td",{children:i.jsx(qe,{width:"100%",height:"1em",variant:"rect"})},B))]},F))}):I.length?i.jsx("tbody",{children:I.map(m=>{const F=V(m);return i.jsxs("tr",{className:"hover:bg-gray-50",children:[n&&i.jsx("td",{children:i.jsx("input",{type:"checkbox",checked:S.has(F),onChange:()=>J(F)})}),r.map((L,B)=>{const se=L.render?L.render(m):typeof L.accessor=="function"?L.accessor(m):m[L.accessor];return i.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm",children:se},B)})]},F)})}):i.jsx("tbody",{children:i.jsx("tr",{children:i.jsx("td",{colSpan:r.length+(n?1:0),children:"No hay datos"})})});return i.jsxs("div",{className:D("w-full overflow-auto",f),children:[i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsxs("tr",{children:[n&&i.jsx("th",{children:i.jsx("input",{type:"checkbox",checked:I.length>0&&I.every(m=>S.has(V(m))),onChange:Z})}),r.map(m=>{const F=typeof m.accessor=="string"?m.accessor:m.header,L=Q===(typeof m.accessor=="string"?m.accessor:m.sortKey);return i.jsx("th",{className:D("px-4 py-2 text-left text-sm font-medium text-gray-700",m.width),onClick:()=>h(m),children:i.jsxs("div",{className:"inline-flex items-center space-x-1 cursor-pointer",children:[i.jsx("span",{children:m.header}),m.sortable&&i.jsx("span",{className:"text-xs",children:L?W==="asc"?"▲":"▼":"⇵"})]})},F)})]})}),K()]}),i.jsxs("div",{className:"flex items-center justify-between py-2 px-4",children:[i.jsx("span",{className:"text-sm text-gray-700",children:y?"Cargando...":`Página ${_} de ${ee}`}),i.jsxs("div",{className:"space-x-2",children:[i.jsx(Me,{size:"sm",variant:"outline",disabled:y||_<=1,onClick:()=>z(m=>Math.max(1,m-1)),children:"Prev"}),i.jsx(Me,{size:"sm",variant:"outline",disabled:y||_>=ee,onClick:()=>z(m=>Math.min(ee,m+1)),children:"Next"})]})]})]})}function ha({control:r,name:t,rules:e,defaultValue:s=!1,checked:a,onChange:n,disabled:o=!1,label:l,labelPosition:c="right",errorMessage:u="",className:f}){const p=v.useId();if(r&&t)return i.jsx(Fe,{name:t,control:r,rules:e,defaultValue:s,render:({field:x,fieldState:E})=>{var j;return i.jsx(ha,{checked:x.value,onChange:x.onChange,disabled:o,label:l,labelPosition:c,errorMessage:((j=E.error)==null?void 0:j.message)||"",className:f})}});const g=!!a;return i.jsxs("div",{className:D("flex flex-col",f),children:[i.jsxs("label",{className:D("inline-flex items-center space-x-3 select-none",o&&"opacity-50 cursor-not-allowed"),htmlFor:p,children:[l&&c==="left"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l}),i.jsx("button",{id:p,type:"button",role:"switch","aria-checked":g,disabled:o,onClick:()=>!o&&(n==null?void 0:n(!g)),className:D("relative inline-flex items-center h-8 w-16","bg-[var(--color-ds-background-accent)] rounded-full transition-colors duration-200","focus:outline-none "),children:i.jsx("div",{className:D("absolute h-6 w-6 bg-[var(--color-ds-background-page)] rounded-full shadow transform transition-transform duration-200",g?"translate-x-9":"translate-x-1")})}),l&&c==="right"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l})]}),i.jsx("div",{className:"pt-1 min-h-[18px] w-full",children:u?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:u}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}te.Button=Me,te.Checkbox=na,te.CollapsibleSection=Dt,te.DateInput=hs,te.DropdownMenu=Xn,te.FileUploader=vs,te.FormFieldInput=rr,te.FormPageLayout=bo,te.FormRenderer=mi,te.Header=ua,te.Icon=Ce,te.IconButton=ia,te.InfoButton=ws,te.Input=Et,te.InputGroup=Ns,te.LoadingScreen=bi,te.Modal=xi,te.OptionGroup=Fs,te.PageLayout=wi,te.SearchField=oa,te.Select=dt,te.Sidebar=fa,te.SidebarNav=hr,te.SkeletonLoader=qe,te.Table=ki,te.Tabs=ks,te.TextArea=fr,te.ThemeProvider=gi,te.ThemeToggle=la,te.Toast=Ts,te.ToastProvider=_o,te.ToggleSwitch=ha,te.useToast=Os,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|
|
62
|
+
`,children:[i.jsx($t,{className:"w-5 h-5 text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]"}),i.jsx("span",{className:"sr-only",children:"Cerrar modal"})]})]}),i.jsx("div",{className:"px-6 py-6 text-[var(--color-ds-text-primary)]",children:s}),a&&i.jsx("div",{className:"px-6 py-4 border-t border-[var(--color-ds-border-muted)] bg-[var(--color-ds-background-surface)]",children:a})]})})]}),document.body):null),hr=({items:r,selected:t,onSelect:e,level:s=0})=>{const[a,n]=v.useState(new Set),o=l=>{const c=new Set(a);s===0?(c.clear(),a.has(l)||c.add(l)):c.has(l)?c.delete(l):c.add(l),n(c)};return i.jsx("ul",{className:z(s>0?"mt-1":"mt-0"),children:r.map(l=>{var S;const c=l.value===t,u=a.has(l.value),f=["pl-2","pl-2","pl-2"][s]||"pl-4",m=s===0?u||c?"bg-[var(--color-ds-background-accent)] text-[var(--color-ds-text-on-accent)] rounded-r-lg":"text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]":c?"bg-[var(--color-ds-background-surface)] text-[var(--color-ds-text-primary)]":"text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]",g=s===0&&(u||c)?"text-[var(--color-ds-text-on-accent)]":"text-[var(--color-ds-text-secondary)]",x=!!((S=l.children)!=null&&S.length);return i.jsxs("li",{children:[i.jsxs("button",{type:"button",onClick:()=>x?o(l.value):e(l.value),"aria-expanded":x?u:void 0,className:z("w-full flex items-center justify-between h-8 transition-colors",f,m),children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[s===0&&l.icon&&i.jsx(l.icon,{className:"w-5 h-5 ml-2"}),i.jsx("span",{className:"text-ds-sm",children:l.label})]}),x&&(u?i.jsx(kr,{className:z("w-4 h-4",g)}):i.jsx(Oa,{className:z("w-4 h-4",g)}))]}),x&&i.jsx("div",{className:z("overflow-hidden transition-[max-height] duration-300 ease-in-out","border-l-1 border-[var(--color-ds-background-accent)] ml-6",u?"max-h-screen":"max-h-0"),children:i.jsx(hr,{items:l.children,selected:t,onSelect:e,level:s+1})})]},l.value)})})},vi="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20250%20250'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20186)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23FFFFFF;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M101.7,82.72c1.6.57,3.25,1.09,4.98,1.53,11.93,3.07,17.85,7.44,17.85,13.01,0,2.72-1.14,5-3.43,6.86-2.29,1.86-5.14,2.79-8.57,2.79s-6.49-1.13-8.9-3.36c-2.62,6.82-6.19,13.16-10.51,18.91,5.53,3.09,11.9,4.68,19.13,4.68,10.14,0,18.64-3,25.43-9.01,3.7-3.24,6.35-6.96,8.02-11.11,1.77,3.2,4.03,6.17,6.81,8.9,7.64,7.51,17.28,11.22,28.78,11.22,9.14,0,17.21-2.43,24.21-7.22,2.24-1.55,4.24-3.27,6.05-5.14l-14.05-13.73h-.14c-2.57,4.29-8.57,7.44-15.64,7.44-8.78,0-15.5-5.22-17.85-13.58h57.06c.36-1.57.57-3.79.57-6.58,0-11.37-3.86-20.73-11.5-28.24-7.71-7.44-17.28-11.15-28.71-11.15s-21.14,3.72-28.78,11.15c-5.19,5.09-8.59,11.03-10.26,17.78-1.11-1.42-2.37-2.71-3.78-3.83-6.07-4.79-12.07-7.36-20.64-9.73-11-2.93-16.5-7.08-16.5-12.58,0-2.51,1-4.65,3.07-6.37,2.07-1.71,4.57-2.57,7.57-2.57,3.21,0,5.93,1,8,3,2.07,2,3.14,4.5,3.14,7.5h23.21c0-8.79-3.29-16.08-9.78-21.95-6.5-5.86-14.71-8.79-24.57-8.79s-17.44,2.77-23.89,8.31C74.82,12.54,53.44.47,29.27,0v24.08c27.07.77,48.86,23.04,48.86,50.32s-21.79,49.55-48.86,50.32v24.08c37.54-.72,68.34-29.42,72.44-66.08ZM181.29,67.38c8.21,0,15,5.08,17.21,13.3h-34.5c2.57-8.22,8.93-13.3,17.28-13.3Z'/%3e%3cpath%20class='st0'%20d='M29.35,160.65v29.07h10.94c4.12,0,7.57-1.38,10.31-4.16,2.74-2.76,4.12-6.21,4.12-10.39s-1.38-7.61-4.12-10.39c-2.74-2.76-6.19-4.14-10.31-4.14h-10.94ZM52.1,175.17c0,3.46-1.14,6.34-3.39,8.64-2.25,2.3-5.07,3.46-8.46,3.46h-8.36v-24.17h8.36c3.39,0,6.21,1.15,8.46,3.46,2.25,2.3,3.39,5.18,3.39,8.62Z'/%3e%3cpath%20class='st0'%20d='M60.61,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3crect%20class='st0'%20x='57.63'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M64.15,168.24v29.48h2.41v-13.19c.85,1.77,2.09,3.17,3.69,4.18,1.6,1.01,3.41,1.52,5.44,1.52,3.11,0,5.7-1.07,7.75-3.23,2.05-2.16,3.07-4.83,3.07-8.04s-1.04-5.86-3.09-8.02c-2.05-2.14-4.63-3.21-7.73-3.21-2.03,0-3.84.49-5.44,1.5-1.6,1.01-2.84,2.41-3.69,4.18v-5.16h-2.41ZM69.06,172.62c1.64-1.69,3.73-2.53,6.23-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36c-1.66,1.71-3.73,2.55-6.23,2.55s-4.59-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33Z'/%3e%3cpath%20class='st0'%20d='M107.73,189.71v-21.48h-2.42v12.59c0,2.1-.65,3.79-1.97,5.08-1.32,1.3-3.05,1.95-5.18,1.95s-3.69-.64-4.93-1.91c-1.26-1.28-1.89-2.96-1.89-5.04v-12.67h-2.4v13.35c0,2.61.79,4.69,2.35,6.27,1.56,1.58,3.61,2.37,6.15,2.37,3.65-.02,6.27-1.52,7.85-4.53v4.01h2.42Z'/%3e%3cpolygon%20class='st0'%20points='117.35%20189.71%20117.35%20170.46%20122.55%20170.46%20122.55%20168.24%20117.35%20168.24%20117.35%20161.9%20114.94%20162.38%20114.94%20168.24%20110.01%20168.24%20110.01%20170.46%20114.94%20170.46%20114.94%20189.71%20117.35%20189.71'/%3e%3cpath%20class='st0'%20d='M144.27,189.71v-21.48h-2.42v5.12c-.87-1.75-2.13-3.13-3.73-4.14-1.6-1.01-3.41-1.5-5.4-1.5-3.08,0-5.64,1.07-7.69,3.21-2.05,2.16-3.09,4.83-3.09,8.02s1.04,5.88,3.09,8.04c2.05,2.16,4.63,3.23,7.69,3.23,1.99,0,3.79-.51,5.4-1.52,1.6-1.01,2.84-2.39,3.73-4.13v5.14h2.42ZM139.36,185.31c-1.66,1.71-3.73,2.55-6.23,2.55s-4.53-.84-6.19-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.19-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36Z'/%3e%3cpath%20class='st0'%20d='M158.18,170.09c2.09,0,3.9.62,5.46,1.85,1.54,1.23,2.56,2.84,3.02,4.83h2.5c-.47-2.63-1.73-4.79-3.73-6.5-2.03-1.71-4.44-2.55-7.25-2.55-3.19,0-5.84,1.07-8,3.21-2.15,2.16-3.23,4.83-3.23,8.02s1.08,5.88,3.23,8.04c2.13,2.16,4.81,3.23,8,3.23,2.8,0,5.22-.84,7.25-2.55,2.01-1.71,3.27-3.87,3.73-6.52h-2.5c-.47,2-1.48,3.62-3.02,4.85-1.56,1.23-3.37,1.85-5.46,1.85-2.5,0-4.57-.84-6.23-2.55-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3crect%20class='st0'%20x='171.72'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M174.71,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3cpath%20class='st0'%20d='M176.86,178.95c0,3.21,1.08,5.88,3.23,8.04,2.15,2.16,4.83,3.23,8.02,3.23s5.85-1.07,7.98-3.23c2.13-2.16,3.19-4.83,3.19-8.04s-1.06-5.86-3.19-8.02c-2.13-2.14-4.79-3.21-7.98-3.21s-5.86,1.07-8.02,3.21c-2.15,2.16-3.23,4.83-3.23,8.02ZM188.09,170.09c2.5,0,4.57.84,6.21,2.53,1.64,1.71,2.48,3.8,2.48,6.33s-.83,4.65-2.48,6.36c-1.64,1.71-3.71,2.55-6.21,2.55s-4.57-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3cpolygon%20class='st0'%20points='194.03%20160.01%20190.83%20160.01%20186.46%20165.15%20189.08%20165.15%20194.03%20160.01'/%3e%3cpath%20class='st0'%20d='M221.5,189.71v-13.02c0-2.69-.81-4.86-2.44-6.5-1.64-1.65-3.79-2.47-6.45-2.47-3.75,0-6.68,1.67-8.22,4.71v-4.2h-2.42v21.48h2.42v-12.22c0-2.22.69-4.01,2.07-5.37,1.38-1.36,3.19-2.04,5.44-2.04s3.92.66,5.24,2c1.32,1.34,1.97,3.11,1.97,5.33v12.3h2.4Z'/%3e%3cpath%20class='st0'%20d='M57.27,225.24c-2.82-2.23-5.61-3.43-9.59-4.53-5.11-1.37-7.66-3.3-7.66-5.87,0-1.17.46-2.17,1.43-2.97.96-.8,2.12-1.2,3.52-1.2,1.49,0,2.75.47,3.72,1.4.96.93,1.46,2.1,1.46,3.5h10.78c0-4.1-1.53-7.5-4.55-10.23-3.02-2.73-6.83-4.1-11.42-4.1s-8.23,1.33-11.25,4c-3.02,2.67-4.51,6-4.51,10s1.26,7.4,3.75,9.73c2.49,2.37,5.68,4.03,9.56,5.03,5.54,1.43,8.29,3.47,8.29,6.06,0,1.27-.53,2.33-1.59,3.2-1.06.87-2.39,1.3-3.98,1.3s-3.05-.53-4.18-1.6c-1.16-1.07-1.73-2.37-1.73-3.93h-10.82c0,4.3,1.59,7.86,4.78,10.7,3.15,2.83,7.1,4.26,11.81,4.26s8.66-1.4,11.81-4.2c3.15-2.77,4.71-6.26,4.71-10.43,0-4.43-1.56-7.9-4.35-10.13Z'/%3e%3cpolygon%20class='st0'%20points='118.26%20236.54%20110.23%20214.38%2098.88%20214.38%20113.02%20249.17%20123.21%20249.17%20137.28%20214.38%20126.19%20214.38%20118.26%20236.54'/%3e%3crect%20class='st0'%20x='139.25'%20y='214.38'%20width='9.92'%20height='34.79'/%3e%3cpath%20class='st0'%20d='M144.2,199.53c-1.72,0-3.18.57-4.35,1.73-1.16,1.17-1.76,2.6-1.76,4.33s.6,3.23,1.76,4.4c1.16,1.17,2.62,1.73,4.35,1.73s3.25-.57,4.45-1.73c1.16-1.17,1.76-2.63,1.76-4.4s-.6-3.17-1.76-4.33c-1.19-1.17-2.69-1.73-4.45-1.73Z'/%3e%3crect%20class='st0'%20x='154.93'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3crect%20class='st0'%20x='170.61'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3cpath%20class='st0'%20d='M211.58,214.38v3.8c-2.82-3.1-6.34-4.63-10.49-4.63-4.75,0-8.73,1.73-11.91,5.2-3.22,3.5-4.81,7.83-4.81,13s1.59,9.53,4.81,13.03c3.19,3.5,7.17,5.23,11.91,5.23,4.18-.03,7.67-1.57,10.49-4.67v3.83h9.92v-34.79h-9.92ZM209.19,237.9c-1.63,1.63-3.65,2.47-6.11,2.47s-4.41-.83-6.01-2.47c-1.63-1.63-2.42-3.7-2.42-6.17s.8-4.5,2.42-6.13c1.59-1.63,3.58-2.43,6.01-2.43s4.45.8,6.07,2.43c1.63,1.63,2.42,3.7,2.42,6.13s-.8,4.53-2.39,6.17Z'/%3e%3cpath%20class='st0'%20d='M82.34,213.54c-5.34,0-9.82,1.73-13.37,5.2-3.55,3.5-5.34,7.83-5.34,13s1.79,9.53,5.34,13.03c3.55,3.5,8.03,5.23,13.37,5.23,4.25,0,8-1.13,11.25-3.37,1.05-.73,1.99-1.55,2.84-2.43l-6.5-6.37h-.13c-1.19,2-3.98,3.47-7.27,3.47-4.08,0-7.2-2.43-8.29-6.33h26.51c.17-.73.27-1.77.27-3.07,0-5.3-1.79-9.66-5.34-13.16-3.58-3.47-8.03-5.2-13.34-5.2ZM74.31,228.34c1.19-3.83,4.15-6.2,8.03-6.2s6.97,2.37,8,6.2h-16.03Z'/%3e%3c/svg%3e",yi="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20250%20250'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20186)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23005751;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M101.7,82.72c1.6.57,3.25,1.09,4.98,1.53,11.93,3.07,17.85,7.44,17.85,13.01,0,2.72-1.14,5-3.43,6.86-2.29,1.86-5.14,2.79-8.57,2.79s-6.49-1.13-8.9-3.36c-2.62,6.82-6.19,13.16-10.51,18.91,5.53,3.09,11.9,4.68,19.13,4.68,10.14,0,18.64-3,25.43-9.01,3.7-3.24,6.35-6.96,8.02-11.11,1.77,3.2,4.03,6.17,6.81,8.9,7.64,7.51,17.28,11.22,28.78,11.22,9.14,0,17.21-2.43,24.21-7.22,2.24-1.55,4.24-3.27,6.05-5.14l-14.05-13.73h-.14c-2.57,4.29-8.57,7.44-15.64,7.44-8.78,0-15.5-5.22-17.85-13.58h57.06c.36-1.57.57-3.79.57-6.58,0-11.37-3.86-20.73-11.5-28.24-7.71-7.44-17.28-11.15-28.71-11.15s-21.14,3.72-28.78,11.15c-5.19,5.09-8.59,11.03-10.26,17.78-1.11-1.42-2.37-2.71-3.78-3.83-6.07-4.79-12.07-7.36-20.64-9.73-11-2.93-16.5-7.08-16.5-12.58,0-2.51,1-4.65,3.07-6.37,2.07-1.71,4.57-2.57,7.57-2.57,3.21,0,5.93,1,8,3,2.07,2,3.14,4.5,3.14,7.5h23.21c0-8.79-3.29-16.08-9.78-21.95-6.5-5.86-14.71-8.79-24.57-8.79s-17.44,2.77-23.89,8.31C74.82,12.54,53.44.47,29.27,0v24.08c27.07.77,48.86,23.04,48.86,50.32s-21.79,49.55-48.86,50.32v24.08c37.54-.72,68.34-29.42,72.44-66.08ZM181.29,67.38c8.21,0,15,5.08,17.21,13.3h-34.5c2.57-8.22,8.93-13.3,17.28-13.3Z'/%3e%3cpath%20class='st0'%20d='M29.35,160.65v29.07h10.94c4.12,0,7.57-1.38,10.31-4.16,2.74-2.76,4.12-6.21,4.12-10.39s-1.38-7.61-4.12-10.39c-2.74-2.76-6.19-4.14-10.31-4.14h-10.94ZM52.1,175.17c0,3.46-1.14,6.34-3.39,8.64-2.25,2.3-5.07,3.46-8.46,3.46h-8.36v-24.17h8.36c3.39,0,6.21,1.15,8.46,3.46,2.25,2.3,3.39,5.18,3.39,8.62Z'/%3e%3cpath%20class='st0'%20d='M60.61,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3crect%20class='st0'%20x='57.63'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M64.15,168.24v29.48h2.41v-13.19c.85,1.77,2.09,3.17,3.69,4.18,1.6,1.01,3.41,1.52,5.44,1.52,3.11,0,5.7-1.07,7.75-3.23,2.05-2.16,3.07-4.83,3.07-8.04s-1.04-5.86-3.09-8.02c-2.05-2.14-4.63-3.21-7.73-3.21-2.03,0-3.84.49-5.44,1.5-1.6,1.01-2.84,2.41-3.69,4.18v-5.16h-2.41ZM69.06,172.62c1.64-1.69,3.73-2.53,6.23-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36c-1.66,1.71-3.73,2.55-6.23,2.55s-4.59-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33Z'/%3e%3cpath%20class='st0'%20d='M107.73,189.71v-21.48h-2.42v12.59c0,2.1-.65,3.79-1.97,5.08-1.32,1.3-3.05,1.95-5.18,1.95s-3.69-.64-4.93-1.91c-1.26-1.28-1.89-2.96-1.89-5.04v-12.67h-2.4v13.35c0,2.61.79,4.69,2.35,6.27,1.56,1.58,3.61,2.37,6.15,2.37,3.65-.02,6.27-1.52,7.85-4.53v4.01h2.42Z'/%3e%3cpolygon%20class='st0'%20points='117.35%20189.71%20117.35%20170.46%20122.55%20170.46%20122.55%20168.24%20117.35%20168.24%20117.35%20161.9%20114.94%20162.38%20114.94%20168.24%20110.01%20168.24%20110.01%20170.46%20114.94%20170.46%20114.94%20189.71%20117.35%20189.71'/%3e%3cpath%20class='st0'%20d='M144.27,189.71v-21.48h-2.42v5.12c-.87-1.75-2.13-3.13-3.73-4.14-1.6-1.01-3.41-1.5-5.4-1.5-3.08,0-5.64,1.07-7.69,3.21-2.05,2.16-3.09,4.83-3.09,8.02s1.04,5.88,3.09,8.04c2.05,2.16,4.63,3.23,7.69,3.23,1.99,0,3.79-.51,5.4-1.52,1.6-1.01,2.84-2.39,3.73-4.13v5.14h2.42ZM139.36,185.31c-1.66,1.71-3.73,2.55-6.23,2.55s-4.53-.84-6.19-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.19-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36Z'/%3e%3cpath%20class='st0'%20d='M158.18,170.09c2.09,0,3.9.62,5.46,1.85,1.54,1.23,2.56,2.84,3.02,4.83h2.5c-.47-2.63-1.73-4.79-3.73-6.5-2.03-1.71-4.44-2.55-7.25-2.55-3.19,0-5.84,1.07-8,3.21-2.15,2.16-3.23,4.83-3.23,8.02s1.08,5.88,3.23,8.04c2.13,2.16,4.81,3.23,8,3.23,2.8,0,5.22-.84,7.25-2.55,2.01-1.71,3.27-3.87,3.73-6.52h-2.5c-.47,2-1.48,3.62-3.02,4.85-1.56,1.23-3.37,1.85-5.46,1.85-2.5,0-4.57-.84-6.23-2.55-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3crect%20class='st0'%20x='171.72'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M174.71,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3cpath%20class='st0'%20d='M176.86,178.95c0,3.21,1.08,5.88,3.23,8.04,2.15,2.16,4.83,3.23,8.02,3.23s5.85-1.07,7.98-3.23c2.13-2.16,3.19-4.83,3.19-8.04s-1.06-5.86-3.19-8.02c-2.13-2.14-4.79-3.21-7.98-3.21s-5.86,1.07-8.02,3.21c-2.15,2.16-3.23,4.83-3.23,8.02ZM188.09,170.09c2.5,0,4.57.84,6.21,2.53,1.64,1.71,2.48,3.8,2.48,6.33s-.83,4.65-2.48,6.36c-1.64,1.71-3.71,2.55-6.21,2.55s-4.57-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3cpolygon%20class='st0'%20points='194.03%20160.01%20190.83%20160.01%20186.46%20165.15%20189.08%20165.15%20194.03%20160.01'/%3e%3cpath%20class='st0'%20d='M221.5,189.71v-13.02c0-2.69-.81-4.86-2.44-6.5-1.64-1.65-3.79-2.47-6.45-2.47-3.75,0-6.68,1.67-8.22,4.71v-4.2h-2.42v21.48h2.42v-12.22c0-2.22.69-4.01,2.07-5.37,1.38-1.36,3.19-2.04,5.44-2.04s3.92.66,5.24,2c1.32,1.34,1.97,3.11,1.97,5.33v12.3h2.4Z'/%3e%3cpath%20class='st0'%20d='M57.27,225.24c-2.82-2.23-5.61-3.43-9.59-4.53-5.11-1.37-7.66-3.3-7.66-5.87,0-1.17.46-2.17,1.43-2.97.96-.8,2.12-1.2,3.52-1.2,1.49,0,2.75.47,3.72,1.4.96.93,1.46,2.1,1.46,3.5h10.78c0-4.1-1.53-7.5-4.55-10.23-3.02-2.73-6.83-4.1-11.42-4.1s-8.23,1.33-11.25,4c-3.02,2.67-4.51,6-4.51,10s1.26,7.4,3.75,9.73c2.49,2.37,5.68,4.03,9.56,5.03,5.54,1.43,8.29,3.47,8.29,6.06,0,1.27-.53,2.33-1.59,3.2-1.06.87-2.39,1.3-3.98,1.3s-3.05-.53-4.18-1.6c-1.16-1.07-1.73-2.37-1.73-3.93h-10.82c0,4.3,1.59,7.86,4.78,10.7,3.15,2.83,7.1,4.26,11.81,4.26s8.66-1.4,11.81-4.2c3.15-2.77,4.71-6.26,4.71-10.43,0-4.43-1.56-7.9-4.35-10.13Z'/%3e%3cpolygon%20class='st0'%20points='118.26%20236.54%20110.23%20214.38%2098.88%20214.38%20113.02%20249.17%20123.21%20249.17%20137.28%20214.38%20126.19%20214.38%20118.26%20236.54'/%3e%3crect%20class='st0'%20x='139.25'%20y='214.38'%20width='9.92'%20height='34.79'/%3e%3cpath%20class='st0'%20d='M144.2,199.53c-1.72,0-3.18.57-4.35,1.73-1.16,1.17-1.76,2.6-1.76,4.33s.6,3.23,1.76,4.4c1.16,1.17,2.62,1.73,4.35,1.73s3.25-.57,4.45-1.73c1.16-1.17,1.76-2.63,1.76-4.4s-.6-3.17-1.76-4.33c-1.19-1.17-2.69-1.73-4.45-1.73Z'/%3e%3crect%20class='st0'%20x='154.93'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3crect%20class='st0'%20x='170.61'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3cpath%20class='st0'%20d='M211.58,214.38v3.8c-2.82-3.1-6.34-4.63-10.49-4.63-4.75,0-8.73,1.73-11.91,5.2-3.22,3.5-4.81,7.83-4.81,13s1.59,9.53,4.81,13.03c3.19,3.5,7.17,5.23,11.91,5.23,4.18-.03,7.67-1.57,10.49-4.67v3.83h9.92v-34.79h-9.92ZM209.19,237.9c-1.63,1.63-3.65,2.47-6.11,2.47s-4.41-.83-6.01-2.47c-1.63-1.63-2.42-3.7-2.42-6.17s.8-4.5,2.42-6.13c1.59-1.63,3.58-2.43,6.01-2.43s4.45.8,6.07,2.43c1.63,1.63,2.42,3.7,2.42,6.13s-.8,4.53-2.39,6.17Z'/%3e%3cpath%20class='st0'%20d='M82.34,213.54c-5.34,0-9.82,1.73-13.37,5.2-3.55,3.5-5.34,7.83-5.34,13s1.79,9.53,5.34,13.03c3.55,3.5,8.03,5.23,13.37,5.23,4.25,0,8-1.13,11.25-3.37,1.05-.73,1.99-1.55,2.84-2.43l-6.5-6.37h-.13c-1.19,2-3.98,3.47-7.27,3.47-4.08,0-7.2-2.43-8.29-6.33h26.51c.17-.73.27-1.77.27-3.07,0-5.3-1.79-9.66-5.34-13.16-3.58-3.47-8.03-5.2-13.34-5.2ZM74.31,228.34c1.19-3.83,4.15-6.2,8.03-6.2s6.97,2.37,8,6.2h-16.03Z'/%3e%3c/svg%3e",fa=({appName:r,orgName:t,username:e,footerText:s,navItems:a,selectedNav:n,onSelectNav:o,width:l="200px"})=>{const{theme:c}=da(),u=c==="dark"?vi:yi;return i.jsxs("aside",{className:"flex flex-col h-screen bg-[var(--color-ds-background-page)]",style:{width:l},children:[i.jsxs("div",{className:"flex gap-1 flex-col items-center py-4 space-y-1",children:[i.jsx("img",{src:u,alt:"Logo Diputación",className:"w-20 h-20"}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-lg ",children:r}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:t}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:e}),i.jsx("div",{className:"w-1/5 h-0.5 rounded-full bg-[var(--color-ds-background-accent)] mt-2"})]}),i.jsx("nav",{className:"flex-1 overflow-auto pt-3",children:i.jsx(hr,{items:a,selected:n,onSelect:o})}),i.jsx("div",{className:"px-4 w-full py-3",children:i.jsx("span",{className:"text-ds-sm w-full text-center text-[var(--color-ds-text-secondary)]",children:s})})]})};function wi({sidebar:r,header:t,children:e}){return i.jsxs("div",{className:"flex h-screen overflow-hidden bg-[var(--color-ds-background-page)]",children:[i.jsx(fa,{...r}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-auto px-10 [scrollbar-gutter:stable_both-edges]",children:[i.jsx(ua,{...t}),i.jsx("main",{className:"flex-1 ",children:e})]})]})}function ki({columns:r,data:t,loadData:e,loading:s,idAccessor:a,multiSelect:n=!1,onSelectionChange:o,pageSize:l=10,initialSort:c,onSort:u,className:f}){const m=t!==void 0,[g,x]=v.useState([]),[S,j]=v.useState(!1),T=v.useRef(null);v.useEffect(()=>{var F;if(!e||m)return;(F=T.current)==null||F.abort();const h=new AbortController;return T.current=h,j(!0),e().then(L=>{h.signal.aborted||x(L)}).finally(()=>{h.signal.aborted||j(!1)}),()=>h.abort()},[e,m]);const w=v.useMemo(()=>m?t:g,[t,g,m]),y=s??(e?S:!1),[E,V]=v.useState(new Set),[N,U]=v.useState(1),[H,_]=v.useState(c==null?void 0:c.sortBy),[W,q]=v.useState((c==null?void 0:c.sortDir)??"asc"),$=h=>typeof a=="function"?a(h):h[a],I=v.useRef(null);v.useEffect(()=>{I.current!==w&&(V(new Set),U(1),I.current=w)},[w]);const K=v.useMemo(()=>{if(!H)return w;const h=W==="asc"?1:-1;return[...w].sort((F,L)=>{const Z=F[H],se=L[H];return Z==null?-h:se==null||Z>se?h:Z<se?-h:0})},[w,H,W]),Q=Math.max(1,Math.ceil(K.length/l)),ee=v.useMemo(()=>{const h=(N-1)*l;return K.slice(h,h+l)},[K,N,l]),J=h=>{const F=new Set(E);F.has(h)?F.delete(h):F.add(h),V(F),o==null||o(w.filter(L=>F.has($(L))))},M=()=>{const h=ee.every(L=>E.has($(L))),F=new Set(E);ee.forEach(L=>{h?F.delete($(L)):F.add($(L))}),V(F),o==null||o(w.filter(L=>F.has($(L))))},p=h=>{if(!h.sortable)return;const F=typeof h.accessor=="string"?h.accessor:h.sortKey;if(H===F){const L=W==="asc"?"desc":"asc";q(L),u==null||u(F,L)}else _(F),q("asc"),u==null||u(F,"asc");U(1)},B=()=>y?i.jsx("tbody",{children:Array.from({length:l}).map((h,F)=>i.jsxs("tr",{children:[n&&i.jsx("td",{children:i.jsx(qe,{width:"1rem",height:"1rem",variant:"circle"})}),r.map((L,Z)=>i.jsx("td",{children:i.jsx(qe,{width:"100%",height:"1em",variant:"rect"})},Z))]},F))}):ee.length?i.jsx("tbody",{children:ee.map(h=>{const F=$(h);return i.jsxs("tr",{className:"hover:bg-gray-50",children:[n&&i.jsx("td",{children:i.jsx("input",{type:"checkbox",checked:E.has(F),onChange:()=>J(F)})}),r.map((L,Z)=>{const se=L.render?L.render(h):typeof L.accessor=="function"?L.accessor(h):h[L.accessor];return i.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm",children:se},Z)})]},F)})}):i.jsx("tbody",{children:i.jsx("tr",{children:i.jsx("td",{colSpan:r.length+(n?1:0),children:"No hay datos"})})});return i.jsxs("div",{className:z("w-full overflow-auto",f),children:[i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsxs("tr",{children:[n&&i.jsx("th",{children:i.jsx("input",{type:"checkbox",checked:ee.length>0&&ee.every(h=>E.has($(h))),onChange:M})}),r.map(h=>{const F=typeof h.accessor=="string"?h.accessor:h.header,L=H===(typeof h.accessor=="string"?h.accessor:h.sortKey);return i.jsx("th",{className:z("px-4 py-2 text-left text-sm font-medium text-gray-700",h.width),onClick:()=>p(h),children:i.jsxs("div",{className:"inline-flex items-center space-x-1 cursor-pointer",children:[i.jsx("span",{children:h.header}),h.sortable&&i.jsx("span",{className:"text-xs",children:L?W==="asc"?"▲":"▼":"⇵"})]})},F)})]})}),B()]}),i.jsxs("div",{className:"flex items-center justify-between py-2 px-4",children:[i.jsx("span",{className:"text-sm text-gray-700",children:y?"Cargando...":`Página ${N} de ${Q}`}),i.jsxs("div",{className:"space-x-2",children:[i.jsx(Me,{size:"sm",variant:"outline",disabled:y||N<=1,onClick:()=>U(h=>Math.max(1,h-1)),children:"Prev"}),i.jsx(Me,{size:"sm",variant:"outline",disabled:y||N>=Q,onClick:()=>U(h=>Math.min(Q,h+1)),children:"Next"})]})]})]})}function ha({control:r,name:t,rules:e,defaultValue:s=!1,checked:a,onChange:n,disabled:o=!1,label:l,labelPosition:c="right",errorMessage:u="",className:f}){const m=v.useId();if(r&&t)return i.jsx(Fe,{name:t,control:r,rules:e,defaultValue:s,render:({field:x,fieldState:S})=>{var j;return i.jsx(ha,{checked:x.value,onChange:x.onChange,disabled:o,label:l,labelPosition:c,errorMessage:((j=S.error)==null?void 0:j.message)||"",className:f})}});const g=!!a;return i.jsxs("div",{className:z("flex flex-col",f),children:[i.jsxs("label",{className:z("inline-flex items-center space-x-3 select-none",o&&"opacity-50 cursor-not-allowed"),htmlFor:m,children:[l&&c==="left"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l}),i.jsx("button",{id:m,type:"button",role:"switch","aria-checked":g,disabled:o,onClick:()=>!o&&(n==null?void 0:n(!g)),className:z("relative inline-flex items-center h-8 w-16","bg-[var(--color-ds-background-accent)] rounded-full transition-colors duration-200","focus:outline-none "),children:i.jsx("div",{className:z("absolute h-6 w-6 bg-[var(--color-ds-background-page)] rounded-full shadow transform transition-transform duration-200",g?"translate-x-9":"translate-x-1")})}),l&&c==="right"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l})]}),i.jsx("div",{className:"pt-1 min-h-[18px] w-full",children:u?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:u}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}te.Button=Me,te.Checkbox=na,te.CollapsibleSection=Dt,te.DateInput=hs,te.DropdownMenu=Xn,te.FileUploader=vs,te.FormFieldInput=rr,te.FormPageLayout=bo,te.FormRenderer=mi,te.Header=ua,te.Icon=Ce,te.IconButton=ia,te.InfoButton=ws,te.Input=Et,te.InputGroup=Ns,te.LoadingScreen=bi,te.Modal=xi,te.OptionGroup=Fs,te.PageLayout=wi,te.SearchField=oa,te.Select=dt,te.Sidebar=fa,te.SidebarNav=hr,te.SkeletonLoader=qe,te.Table=ki,te.Tabs=ks,te.TextArea=fr,te.ThemeProvider=gi,te.ThemeToggle=la,te.Toast=Ts,te.ToastProvider=_o,te.ToggleSwitch=ha,te.useToast=Os,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|