@dipusevilla/componentes-iu 1.0.38 → 1.0.39
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 +8 -8
- package/dist/index.es.js +512 -512
- package/dist/index.umd.js +9 -9
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(te,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(te=typeof globalThis<"u"?globalThis:te||self,x(te.DesignSystem={},te.React,te.ReactDOM))})(this,function(te,x,Cr){"use strict";var Ar=document.createElement("style");Ar.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-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--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-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@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-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--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;--leading-snug:1.375;--radius-sm:.25rem;--radius-md:.375rem;--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}.not-sr-only{clip:auto;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.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}.isolation-auto{isolation:auto}.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}}.m-0{margin:calc(var(--spacing)*0)}.-mx-2{margin-inline:calc(var(--spacing)*-2)}.mx-1{margin-inline:calc(var(--spacing)*1)}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.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}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.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-2{height:calc(var(--spacing)*2)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.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-\\[calc\\(100vh-80px\\)\\]{height:calc(100vh - 80px)}.h-full{height:100%}.h-px{height:1px}.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-0{min-height:calc(var(--spacing)*0)}.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{width:calc(var(--spacing)*2)}.w-2\\/3{width:66.6667%}.w-2\\/5{width:40%}.w-3\\.5{width:calc(var(--spacing)*3.5)}.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-24{width:calc(var(--spacing)*24)}.w-28{width:calc(var(--spacing)*28)}.w-32{width:calc(var(--spacing)*32)}.w-40{width:calc(var(--spacing)*40)}.w-44{width:calc(var(--spacing)*44)}.w-56{width:calc(var(--spacing)*56)}.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-0{min-width:calc(var(--spacing)*0)}.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}.shrink-0{flex-shrink:0}.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)}.translate-none{translate:none}.scale-3d{scale:var(--tw-scale-x)var(--tw-scale-y)var(--tw-scale-z)}.rotate-0{rotate:none}.rotate-180{rotate:180deg}.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}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}.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-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\\[260px_1fr_320px\\]{grid-template-columns:260px 1fr 320px}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.grid-rows-\\[auto_1fr\\]{grid-template-rows:auto 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}.items-stretch{align-items:stretch}.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-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*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-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}: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(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-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-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}:where(.divide-\\[var\\(--color-ds-border-default-50\\)\\]>:not(:last-child)){border-color:var(--color-ds-border-default-50)}: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-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.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{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.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-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.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{border-top-right-radius:.25rem}.rounded-tr-\\[20px\\]{border-top-right-radius:20px}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.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-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l,.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-danger-400\\)\\]{border-color:var(--color-danger-400)}.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-\\[var\\(--color-success-400\\)\\]{border-color:var(--color-success-400)}.border-black\\/10{border-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.border-black\\/10{border-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.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-transparent{border-color:#0000}.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-default-50\\)\\]{background-color:var(--color-ds-border-default-50)}.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-current{background-color:currentColor}.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)}.bg-repeat{background-repeat:repeat}.mask-no-clip{-webkit-mask-clip:no-clip;mask-clip:no-clip}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.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-0{padding-inline:calc(var(--spacing)*0)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.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-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.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-2{padding-top:calc(var(--spacing)*2)}.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-1{padding-bottom:calc(var(--spacing)*1)}.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))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.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}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[var\\(--color-danger-600\\)\\]{color:var(--color-danger-600)}.text-\\[var\\(--color-ds-background-accent\\)\\]{color:var(--color-ds-background-accent)}.text-\\[var\\(--color-ds-border-default\\)\\]{color:var(--color-ds-border-default)}.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-\\[var\\(--color-success-600\\)\\]{color:var(--color-success-600)}.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)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.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,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.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-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.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)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-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,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a))drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);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}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,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-\\[grid-template-rows\\]{transition-property:grid-template-rows;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}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@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-\\[color-mix\\(in_srgb\\,var\\(--color-ds-background-accent\\)_8\\%\\,transparent\\)\\]:hover{background-color:#0a464214}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-\\[color-mix\\(in_srgb\\,var\\(--color-ds-background-accent\\)_8\\%\\,transparent\\)\\]:hover{background-color:color-mix(in srgb,var(--color-ds-background-accent)8%,transparent)}}.hover\\:bg-\\[color-mix\\(in_srgb\\,var\\(--color-ds-background-surface\\)_80\\%\\,transparent\\)\\]:hover{background-color:#e0e8e7cc}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-\\[color-mix\\(in_srgb\\,var\\(--color-ds-background-surface\\)_80\\%\\,transparent\\)\\]:hover{background-color:color-mix(in srgb,var(--color-ds-background-surface)80%,transparent)}}.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-page\\)\\]:hover{background-color:var(--color-ds-background-page)}.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)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + 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)}.focus-visible\\:ring-\\[var\\(--color-ds-background-accent\\)\\]:focus-visible{--tw-ring-color:var(--color-ds-background-accent)}.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-72{width:calc(var(--spacing)*72)}.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\\: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\\/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-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}@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-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{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-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@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-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Ar);function Va(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(Ar);function Va(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const Y=Va(x);function $a(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var wt={exports:{}},ot={};/**
|
|
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 Mr;function Da(){return Mr||(Mr=1,process.env.NODE_ENV!=="production"&&function(){function r(E){if(E==null)return null;if(typeof E=="function")return E.$$typeof===Q?null:E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case k:return"Fragment";case y:return"Profiler";case
|
|
18
|
+
*/var Mr;function Da(){return Mr||(Mr=1,process.env.NODE_ENV!=="production"&&function(){function r(E){if(E==null)return null;if(typeof E=="function")return E.$$typeof===Q?null:E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case k:return"Fragment";case y:return"Profiler";case S:return"StrictMode";case F:return"Suspense";case B:return"SuspenseList";case M:return"Activity"}if(typeof E=="object")switch(typeof E.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),E.$$typeof){case g:return"Portal";case T:return(E.displayName||"Context")+".Provider";case b:return(E._context.displayName||"Context")+".Consumer";case z:var j=E.render;return E=E.displayName,E||(E=j.displayName||j.name||"",E=E!==""?"ForwardRef("+E+")":"ForwardRef"),E;case W:return j=E.displayName||null,j!==null?j:r(E.type)||"Memo";case _:j=E._payload,E=E._init;try{return r(E(j))}catch{}}return null}function e(E){return""+E}function t(E){try{e(E);var j=!1}catch{j=!0}if(j){j=console;var O=j.error,L=typeof Symbol=="function"&&Symbol.toStringTag&&E[Symbol.toStringTag]||E.constructor.name||"Object";return O.call(j,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",L),e(E)}}function s(E){if(E===k)return"<>";if(typeof E=="object"&&E!==null&&E.$$typeof===_)return"<...>";try{var j=r(E);return j?"<"+j+">":"<...>"}catch{return"<...>"}}function a(){var E=Z.A;return E===null?null:E.getOwner()}function n(){return Error("react-stack-top-frame")}function o(E){if(D.call(E,"key")){var j=Object.getOwnPropertyDescriptor(E,"key").get;if(j&&j.isReactWarning)return!1}return E.key!==void 0}function l(E,j){function O(){G||(G=!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)",j))}O.isReactWarning=!0,Object.defineProperty(E,"key",{get:O,configurable:!0})}function c(){var E=r(this.type);return X[E]||(X[E]=!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.")),E=this.props.ref,E!==void 0?E:null}function d(E,j,O,L,ee,ae,de,ne){return O=ae.ref,E={$$typeof:w,type:E,key:j,props:ae,_owner:ee},(O!==void 0?O:null)!==null?Object.defineProperty(E,"ref",{enumerable:!1,get:c}):Object.defineProperty(E,"ref",{enumerable:!1,value:null}),E._store={},Object.defineProperty(E._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(E,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(E,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:de}),Object.defineProperty(E,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ne}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E}function u(E,j,O,L,ee,ae,de,ne){var ie=j.children;if(ie!==void 0)if(L)if(H(ie)){for(L=0;L<ie.length;L++)m(ie[L]);Object.freeze&&Object.freeze(ie)}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(ie);if(D.call(j,"key")){ie=r(E);var me=Object.keys(j).filter(function(se){return se!=="key"});L=0<me.length?"{key: someKey, "+me.join(": ..., ")+": ...}":"{key: someKey}",q[ie+L]||(me=0<me.length?"{"+me.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} />`,L,ie,me,ie),W[ie+L]=!0)}if(ie=null,O!==void 0&&(t(O),ie=""+O),o(j)&&(t(j.key),ie=""+j.key),"key"in j){O={};for(var we in j)we!=="key"&&(O[we]=j[we])}else O=j;return ie&&l(O,typeof E=="function"?E.displayName||E.name||"Unknown":E),d(E,ie,ae,ee,a(),O,de,ne)}function m(E){typeof E=="object"&&E!==null&&E.$$typeof===w&&E._store&&(E._store.validated=1)}var h=x,w=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),T=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),Q=Symbol.for("react.client.reference"),Z=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,H=Array.isArray,J=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(E){return E()}};var q,X={},A=h["react-stack-bottom-frame"].bind(h,n)(),p=J(s(n)),W={};it.Fragment=k,it.jsx=function(E,j,O,L,ee){var ae=1e4>Z.recentlyCreatedOwnerStacks++;return u(E,j,O,!1,L,ee,ae?Error("react-stack-top-frame"):A,ae?J(s(E)):p)},it.jsxs=function(E,j,O,L,ee){var ae=1e4>Z.recentlyCreatedOwnerStacks++;return u(E,j,O,!0,L,ee,ae?Error("react-stack-top-frame"):A,ae?J(s(E)):p)}}()),it}var Vr;function Ia(){return Vr||(Vr=1,process.env.NODE_ENV==="production"?wt.exports=za():wt.exports=Da()),wt.exports}var i=Ia();function $r(r){var e,t,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(t=$r(r[e]))&&(s&&(s+=" "),s+=t)}else for(t in r)r[t]&&(s&&(s+=" "),s+=t);return s}function I(){for(var r,e,t=0,s="",a=arguments.length;t<a;t++)(r=arguments[t])&&(e=$r(r))&&(s&&(s+=" "),s+=e);return s}const La={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 Oe({component:r,size:e="sm",className:t,...s}){return i.jsx(r,{className:I(La[e],t),"aria-hidden":s["aria-label"]?void 0:!0,...s})}const Pa="inline-flex items-center justify-center box-border font-[var(--font-primary)] font-medium rounded-lg transition focus:outline-none",Ra={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"},Ua={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"},Ba={sm:"h-6 w-6 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},Za="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 De({type:r="button",variant:e="primary",size:t="sm",width:s,disabled:a=!1,icon:n,iconPosition:o="left",ariaLabel:l,children:c,onClick:d,className:u}){const m=!!n,h=m&&!c,w=h?Ba[t]:Ua[t];return i.jsxs("button",{type:r,onClick:d,disabled:a,"aria-label":h?l:void 0,style:s?{width:s}:void 0,className:I(Pa,Ra[e],w,Za,u,m&&c&&"gap-2"),children:[n&&o==="left"&&i.jsx(Oe,{component:n,size:t}),c,n&&o==="right"&&i.jsx(Oe,{component:n,size:t})]})}function Wa({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const qa=G.forwardRef(Wa);function Ga({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Wt=G.forwardRef(Ga);function Ya({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const Ha=G.forwardRef(Ya);function Xa({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Ka=G.forwardRef(Xa);function Ja({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},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 Qa=G.forwardRef(Ja);function en({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},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 zr=G.forwardRef(en);function tn({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},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 rn=G.forwardRef(tn);function sn({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},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 Dr=G.forwardRef(sn);function an({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},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 nn=G.forwardRef(an);function on({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},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 ln=G.forwardRef(on);function cn({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},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 dn=G.forwardRef(cn);function un({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},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 fn=G.forwardRef(un);function pn({title:r,titleId:e,...t},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":e},t),r?G.createElement("title",{id:e},r):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const qt=G.forwardRef(pn),hn={default:{wrapper:"box-border w-full rounded-lg bg-[var(--color-ds-background-surface)] overflow-hidden",padX:"px-6",padY:"py-4"},plain:{wrapper:"box-border w-full overflow-hidden",padX:"px-0",padY:"py-2"},soft:{wrapper:"box-border w-full rounded-lg bg-[color-mix(in srgb,var(--color-ds-background-surface) 60%, transparent 40%)] overflow-hidden",padX:"px-4",padY:"py-3"},ghost:{wrapper:"box-border w-full overflow-hidden",padX:"px-6",padY:"py-3"}};function Gt({title:r,children:e,defaultOpen:t=!0,className:s,type:a="default",contentClassName:n,headerClassName:o}){const[l,c]=x.useState(t),d=x.useRef(null),[u,m]=x.useState(0),h=()=>{d.current&&m(d.current.scrollHeight)};x.useLayoutEffect(()=>{h()},[l]),x.useEffect(()=>{const g=d.current;if(!g)return;const k=new ResizeObserver(()=>h());return k.observe(g),()=>k.disconnect()},[]);const w=hn[a];return i.jsxs("div",{className:I("flex flex-col w-full gap-3",s),children:[i.jsxs("button",{type:"button",onClick:()=>c(g=>!g),"aria-expanded":l,className:I("flex items-center justify-between w-full transition-colors","hover:bg-[var(--color-ds-surface-hover)]",o),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})]}),l?i.jsx(Ka,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"}):i.jsx(Wt,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"})]}),i.jsx("div",{className:w.wrapper,children:i.jsx("div",{className:w.padX,children:i.jsx("div",{className:I("overflow-hidden transition-all duration-300 ease-in-out",l?"opacity-100":"opacity-0"),style:{maxHeight:l?`${u}px`:"0px"},children:i.jsx("div",{ref:d,className:I(w.padY,n),children:e})})})})]})}const Yt="-",mn=r=>{const e=bn(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:o=>{const l=o.split(Yt);return l[0]===""&&l.length!==1&&l.shift(),Ir(l,e)||gn(o)},getConflictingClassGroupIds:(o,l)=>{const c=t[o]||[];return l&&s[o]?[...c,...s[o]]:c}}},Ir=(r,e)=>{var o;if(r.length===0)return e.classGroupId;const t=r[0],s=e.nextPart.get(t),a=s?Ir(r.slice(1),s):void 0;if(a)return a;if(e.validators.length===0)return;const n=r.join(Yt);return(o=e.validators.find(({validator:l})=>l(n)))==null?void 0:o.classGroupId},Lr=/^\[(.+)\]$/,gn=r=>{if(Lr.test(r)){const e=Lr.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},bn=r=>{const{theme:e,classGroups:t}=r,s={nextPart:new Map,validators:[]};for(const a in t)Ht(t[a],s,a,e);return s},Ht=(r,e,t,s)=>{r.forEach(a=>{if(typeof a=="string"){const n=a===""?e:Pr(e,a);n.classGroupId=t;return}if(typeof a=="function"){if(vn(a)){Ht(a(s),e,t,s);return}e.validators.push({validator:a,classGroupId:t});return}Object.entries(a).forEach(([n,o])=>{Ht(o,Pr(e,n),t,s)})})},Pr=(r,e)=>{let t=r;return e.split(Yt).forEach(s=>{t.nextPart.has(s)||t.nextPart.set(s,{nextPart:new Map,validators:[]}),t=t.nextPart.get(s)}),t},vn=r=>r.isThemeGetter,xn=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,s=new Map;const a=(n,o)=>{t.set(n,o),e++,e>r&&(e=0,s=t,t=new Map)};return{get(n){let o=t.get(n);if(o!==void 0)return o;if((o=s.get(n))!==void 0)return a(n,o),o},set(n,o){t.has(n)?t.set(n,o):a(n,o)}}},Xt="!",Kt=":",wn=Kt.length,yn=r=>{const{prefix:e,experimentalParseClassName:t}=r;let s=a=>{const n=[];let o=0,l=0,c=0,d;for(let g=0;g<a.length;g++){let k=a[g];if(o===0&&l===0){if(k===Kt){n.push(a.slice(c,g)),c=g+wn;continue}if(k==="/"){d=g;continue}}k==="["?o++:k==="]"?o--:k==="("?l++:k===")"&&l--}const u=n.length===0?a:a.substring(c),m=kn(u),h=m!==u,w=d&&d>c?d-c:void 0;return{modifiers:n,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:w}};if(e){const a=e+Kt,n=s;s=o=>o.startsWith(a)?n(o.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(t){const a=s;s=n=>t({className:n,parseClassName:a})}return s},kn=r=>r.endsWith(Xt)?r.substring(0,r.length-1):r.startsWith(Xt)?r.substring(1):r,jn=r=>{const e=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]==="["||e[o]?(a.push(...n.sort(),o),n=[]):n.push(o)}),a.push(...n.sort()),a}},En=r=>({cache:xn(r.cacheSize),parseClassName:yn(r),sortModifiers:jn(r),...mn(r)}),Nn=/\s+/,Sn=(r,e)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:n}=e,o=[],l=r.trim().split(Nn);let c="";for(let d=l.length-1;d>=0;d-=1){const u=l[d],{isExternal:m,modifiers:h,hasImportantModifier:w,baseClassName:g,maybePostfixModifierPosition:k}=t(u);if(m){c=u+(c.length>0?" "+c:c);continue}let _=!!k,y=s(_?g.substring(0,k):g);if(!y){if(!_){c=u+(c.length>0?" "+c:c);continue}if(y=s(g),!y){c=u+(c.length>0?" "+c:c);continue}_=!1}const b=n(h).join(":"),T=w?b+Xt:b,V=T+y;if(o.includes(V))continue;o.push(V);const F=a(y,_);for(let R=0;R<F.length;++R){const Y=F[R];o.push(T+Y)}c=u+(c.length>0?" "+c:c)}return c};function _n(){let r=0,e,t,s="";for(;r<arguments.length;)(e=arguments[r++])&&(t=Rr(e))&&(s&&(s+=" "),s+=t);return s}const Rr=r=>{if(typeof r=="string")return r;let e,t="";for(let s=0;s<r.length;s++)r[s]&&(e=Rr(r[s]))&&(t&&(t+=" "),t+=e);return t};function Fn(r,...e){let t,s,a,n=o;function o(c){const d=e.reduce((u,m)=>m(u),r());return t=En(d),s=t.cache.get,a=t.cache.set,n=l,l(c)}function l(c){const d=s(c);if(d)return d;const u=Sn(c,t);return a(c,u),u}return function(){return n(_n.apply(null,arguments))}}const ge=r=>{const e=t=>t[r]||[];return e.isThemeGetter=!0,e},Ur=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Br=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tn=/^\d+\/\d+$/,Cn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,An=/\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$/,On=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Mn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qe=r=>Tn.test(r),re=r=>!!r&&!Number.isNaN(Number(r)),Be=r=>!!r&&Number.isInteger(Number(r)),Jt=r=>r.endsWith("%")&&re(r.slice(0,-1)),Ie=r=>Cn.test(r),$n=()=>!0,zn=r=>An.test(r)&&!On.test(r),Zr=()=>!1,Dn=r=>Mn.test(r),In=r=>Vn.test(r),Ln=r=>!U(r)&&!B(r),Pn=r=>et(r,Hr,Zr),U=r=>Ur.test(r),Ge=r=>et(r,Xr,zn),Qt=r=>et(r,Wn,re),Wr=r=>et(r,Gr,Zr),Rn=r=>et(r,Yr,In),yt=r=>et(r,Kr,Dn),B=r=>Br.test(r),lt=r=>tt(r,Xr),Un=r=>tt(r,qn),qr=r=>tt(r,Gr),Bn=r=>tt(r,Hr),Zn=r=>tt(r,Yr),kt=r=>tt(r,Kr,!0),et=(r,e,t)=>{const s=Ur.exec(r);return s?s[1]?e(s[1]):t(s[2]):!1},tt=(r,e,t=!1)=>{const s=Br.exec(r);return s?s[1]?e(s[1]):t:!1},Gr=r=>r==="position"||r==="percentage",Yr=r=>r==="image"||r==="url",Hr=r=>r==="length"||r==="size"||r==="bg-size",Xr=r=>r==="length",Wn=r=>r==="number",qn=r=>r==="family-name",Kr=r=>r==="shadow",Gn=Fn(()=>{const r=ge("color"),e=ge("font"),t=ge("text"),s=ge("font-weight"),a=ge("tracking"),n=ge("leading"),o=ge("breakpoint"),l=ge("container"),c=ge("spacing"),d=ge("radius"),u=ge("shadow"),m=ge("inset-shadow"),h=ge("text-shadow"),w=ge("drop-shadow"),g=ge("blur"),k=ge("perspective"),_=ge("aspect"),y=ge("ease"),b=ge("animate"),T=()=>["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"],F=()=>[...V(),B,U],R=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto","contain","none"],S=()=>[B,U,c],D=()=>[Qe,"full","auto",...S()],Q=()=>[Be,"none","subgrid",B,U],Z=()=>["auto",{span:["full",Be,B,U]},Be,B,U],z=()=>[Be,"auto",B,U],H=()=>["auto","min","max","fr",B,U],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],X=()=>["auto",...S()],A=()=>[Qe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],p=()=>[r,B,U],W=()=>[...V(),qr,Wr,{position:[B,U]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],j=()=>["auto","cover","contain",Bn,Pn,{size:[B,U]}],O=()=>[Jt,lt,Ge],L=()=>["","none","full",d,B,U],ee=()=>["",re,lt,Ge],ae=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[re,Jt,qr,Wr],ie=()=>["","none",g,B,U],me=()=>["none",re,B,U],we=()=>["none",re,B,U],se=()=>[re,B,U],pe=()=>[Qe,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ie],breakpoint:[Ie],color:[$n],container:[Ie],"drop-shadow":[Ie],ease:["in","out","in-out"],font:[Ln],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ie],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ie],shadow:[Ie],spacing:["px",re],text:[Ie],"text-shadow":[Ie],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qe,U,B,_]}],container:["container"],columns:[{columns:[re,U,B,l]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:F()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Be,"auto",B,U]}],basis:[{basis:[Qe,"full","auto",l,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,Qe,"auto","initial","none",U]}],grow:[{grow:["",re,B,U]}],shrink:[{shrink:["",re,B,U]}],order:[{order:[Be,"first","last","none",B,U]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:X()}],mx:[{mx:X()}],my:[{my:X()}],ms:[{ms:X()}],me:[{me:X()}],mt:[{mt:X()}],mr:[{mr:X()}],mb:[{mb:X()}],ml:[{ml:X()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],w:[{w:[l,"screen",...A()]}],"min-w":[{"min-w":[l,"screen","none",...A()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",t,lt,Ge]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,B,Qt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jt,U]}],"font-family":[{font:[Un,U,e]}],"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,B,U]}],"line-clamp":[{"line-clamp":[re,"none",B,Qt]}],leading:[{leading:[n,...S()]}],"list-image":[{"list-image":["none",B,U]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",B,U]}],"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:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",B,Ge]}],"text-decoration-color":[{decoration:p()}],"underline-offset":[{"underline-offset":[re,"auto",B,U]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B,U]}],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",B,U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:W()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Be,B,U],radial:["",B,U],conic:[Be,B,U]},Zn,Rn]}],"bg-color":[{bg:p()}],"gradient-from-pos":[{from:O()}],"gradient-via-pos":[{via:O()}],"gradient-to-pos":[{to:O()}],"gradient-from":[{from:p()}],"gradient-via":[{via:p()}],"gradient-to":[{to:p()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"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:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,B,U]}],"outline-w":[{outline:["",re,lt,Ge]}],"outline-color":[{outline:p()}],shadow:[{shadow:["","none",u,kt,yt]}],"shadow-color":[{shadow:p()}],"inset-shadow":[{"inset-shadow":["none",m,kt,yt]}],"inset-shadow-color":[{"inset-shadow":p()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:p()}],"ring-offset-w":[{"ring-offset":[re,Ge]}],"ring-offset-color":[{"ring-offset":p()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":p()}],"text-shadow":[{"text-shadow":["none",h,kt,yt]}],"text-shadow-color":[{"text-shadow":p()}],opacity:[{opacity:[re,B,U]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"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":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"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":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"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":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"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":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"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":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"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":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"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":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":p()}],"mask-image-y-to-color":[{"mask-y-to":p()}],"mask-image-radial":[{"mask-radial":[B,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"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":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"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:W()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",B,U]}],filter:[{filter:["","none",B,U]}],blur:[{blur:ie()}],brightness:[{brightness:[re,B,U]}],contrast:[{contrast:[re,B,U]}],"drop-shadow":[{"drop-shadow":["","none",w,kt,yt]}],"drop-shadow-color":[{"drop-shadow":p()}],grayscale:[{grayscale:["",re,B,U]}],"hue-rotate":[{"hue-rotate":[re,B,U]}],invert:[{invert:["",re,B,U]}],saturate:[{saturate:[re,B,U]}],sepia:[{sepia:["",re,B,U]}],"backdrop-filter":[{"backdrop-filter":["","none",B,U]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[re,B,U]}],"backdrop-contrast":[{"backdrop-contrast":[re,B,U]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,B,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,B,U]}],"backdrop-invert":[{"backdrop-invert":["",re,B,U]}],"backdrop-opacity":[{"backdrop-opacity":[re,B,U]}],"backdrop-saturate":[{"backdrop-saturate":[re,B,U]}],"backdrop-sepia":[{"backdrop-sepia":["",re,B,U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",B,U]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",B,U]}],ease:[{ease:["linear","initial",y,B,U]}],delay:[{delay:[re,B,U]}],animate:[{animate:["none",b,B,U]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,B,U]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:we()}],"scale-x":[{"scale-x":we()}],"scale-y":[{"scale-y":we()}],"scale-z":[{"scale-z":we()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[B,U,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"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",B,U]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",B,U]}],fill:[{fill:["none",...p()]}],"stroke-w":[{stroke:[re,lt,Ge,Qt]}],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 ct=r=>r.type==="checkbox",Ye=r=>r instanceof Date,ye=r=>r==null;const Jr=r=>typeof r=="object";var ue=r=>!ye(r)&&!Array.isArray(r)&&Jr(r)&&!Ye(r),Qr=r=>ue(r)&&r.target?ct(r.target)?r.target.checked:r.target.value:r,Yn=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,es=(r,e)=>r.has(Yn(e)),Hn=r=>{const e=r.constructor&&r.constructor.prototype;return ue(e)&&e.hasOwnProperty("isPrototypeOf")},er=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ve(r){let e;const t=Array.isArray(r),s=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)e=new Date(r);else if(r instanceof Set)e=new Set(r);else if(!(er&&(r instanceof Blob||s))&&(t||ue(r)))if(e=t?[]:{},!t&&!Hn(r))e=r;else for(const a in r)r.hasOwnProperty(a)&&(e[a]=ve(r[a]));else return r;return e}var jt=r=>Array.isArray(r)?r.filter(Boolean):[],fe=r=>r===void 0,M=(r,e,t)=>{if(!e||!ue(r))return t;const s=jt(e.split(/[,[\].]+?/)).reduce((a,n)=>ye(a)?a:a[n],r);return fe(s)||s===r?fe(r[e])?t:r[e]:s},Se=r=>typeof r=="boolean",tr=r=>/^\w*$/.test(r),ts=r=>jt(r.replace(/["|']|\]/g,"").split(/\.|\[/)),oe=(r,e,t)=>{let s=-1;const a=tr(e)?[e]:ts(e),n=a.length,o=n-1;for(;++s<n;){const l=a[s];let c=t;if(s!==o){const d=r[l];c=ue(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=c,r=r[l]}};const Et={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Te={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Le={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},rs=x.createContext(null),dt=()=>x.useContext(rs),Xn=r=>{const{children:e,...t}=r;return x.createElement(rs.Provider,{value:t},e)};var ss=(r,e,t,s=!0)=>{const a={defaultValues:e._defaultValues};for(const n in r)Object.defineProperty(a,n,{get:()=>{const o=n;return e._proxyFormState[o]!==Te.all&&(e._proxyFormState[o]=!s||Te.all),t&&(t[o]=!0),r[o]}});return a};const rr=typeof window<"u"?G.useLayoutEffect:G.useEffect;function Kn(r){const e=dt(),{control:t=e.control,disabled:s,name:a,exact:n}=r||{},[o,l]=x.useState(t._formState),c=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return rr(()=>t._subscribe({name:a,formState:c.current,exact:n,callback:d=>{!s&&l({...t._formState,...d})}}),[a,s,n]),x.useEffect(()=>{c.current.isValid&&t._setValid(!0)},[t]),x.useMemo(()=>ss(o,t,c.current,!1),[o,t])}var Me=r=>typeof r=="string",as=(r,e,t,s,a)=>Me(r)?(s&&e.watch.add(r),M(t,r,a)):Array.isArray(r)?r.map(n=>(s&&e.watch.add(n),M(t,n))):(s&&(e.watchAll=!0),t);function sr(r){const e=dt(),{control:t=e.control,name:s,defaultValue:a,disabled:n,exact:o}=r||{},l=x.useRef(a),[c,d]=x.useState(t._getWatch(s,l.current));return rr(()=>t._subscribe({name:s,formState:{values:!0},exact:o,callback:u=>!n&&d(as(s,t._names,u.values||t._formValues,!1,l.current))}),[s,t,n,o]),x.useEffect(()=>t._removeUnmounted()),c}function ns(r){const e=dt(),{name:t,disabled:s,control:a=e.control,shouldUnregister:n}=r,o=es(a._names.array,t),l=sr({control:a,name:t,defaultValue:M(a._formValues,t,M(a._defaultValues,t,r.defaultValue)),exact:!0}),c=Kn({control:a,name:t,exact:!0}),d=x.useRef(r),u=x.useRef(a.register(t,{...r.rules,value:l,...Se(r.disabled)?{disabled:r.disabled}:{}})),m=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!M(c.errors,t)},isDirty:{enumerable:!0,get:()=>!!M(c.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!M(c.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!M(c.validatingFields,t)},error:{enumerable:!0,get:()=>M(c.errors,t)}}),[c,t]),h=x.useCallback(_=>u.current.onChange({target:{value:Qr(_),name:t},type:Et.CHANGE}),[t]),w=x.useCallback(()=>u.current.onBlur({target:{value:M(a._formValues,t),name:t},type:Et.BLUR}),[t,a._formValues]),g=x.useCallback(_=>{const y=M(a._fields,t);y&&_&&(y._f.ref={focus:()=>_.focus(),select:()=>_.select(),setCustomValidity:b=>_.setCustomValidity(b),reportValidity:()=>_.reportValidity()})},[a._fields,t]),k=x.useMemo(()=>({name:t,value:l,...Se(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:h,onBlur:w,ref:g}),[t,s,c.disabled,h,w,g,l]);return x.useEffect(()=>{const _=a._options.shouldUnregister||n;a.register(t,{...d.current.rules,...Se(d.current.disabled)?{disabled:d.current.disabled}:{}});const y=(b,T)=>{const V=M(a._fields,b);V&&V._f&&(V._f.mount=T)};if(y(t,!0),_){const b=ve(M(a._options.defaultValues,t));oe(a._defaultValues,t,b),fe(M(a._formValues,t))&&oe(a._formValues,t,b)}return!o&&a.register(t),()=>{(o?_&&!a._state.action:_)?a.unregister(t):y(t,!1)}},[t,a,o,n]),x.useEffect(()=>{a._setDisabledField({disabled:s,name:t})},[s,t,a]),x.useMemo(()=>({field:k,formState:c,fieldState:m}),[k,c,m])}const _e=r=>r.render(ns(r));var os=(r,e,t,s,a)=>e?{...t[r],types:{...t[r]&&t[r].types?t[r].types:{},[s]:a||!0}}:{},ut=r=>Array.isArray(r)?r:[r],is=()=>{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=[]}}},ar=r=>ye(r)||!Jr(r);function Ze(r,e){if(ar(r)||ar(e))return r===e;if(Ye(r)&&Ye(e))return r.getTime()===e.getTime();const t=Object.keys(r),s=Object.keys(e);if(t.length!==s.length)return!1;for(const a of t){const n=r[a];if(!s.includes(a))return!1;if(a!=="ref"){const o=e[a];if(Ye(n)&&Ye(o)||ue(n)&&ue(o)||Array.isArray(n)&&Array.isArray(o)?!Ze(n,o):n!==o)return!1}}return!0}var ke=r=>ue(r)&&!Object.keys(r).length,nr=r=>r.type==="file",Ce=r=>typeof r=="function",Nt=r=>{if(!er)return!1;const e=r?r.ownerDocument:0;return r instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},ls=r=>r.type==="select-multiple",or=r=>r.type==="radio",Jn=r=>or(r)||ct(r),ir=r=>Nt(r)&&r.isConnected;function Qn(r,e){const t=e.slice(0,-1).length;let s=0;for(;s<t;)r=fe(r)?s++:r[e[s++]];return r}function eo(r){for(const e in r)if(r.hasOwnProperty(e)&&!fe(r[e]))return!1;return!0}function be(r,e){const t=Array.isArray(e)?e:tr(e)?[e]:ts(e),s=t.length===1?r:Qn(r,t),a=t.length-1,n=t[a];return s&&delete s[n],a!==0&&(ue(s)&&ke(s)||Array.isArray(s)&&eo(s))&&be(r,t.slice(0,-1)),r}var cs=r=>{for(const e in r)if(Ce(r[e]))return!0;return!1};function St(r,e={}){const t=Array.isArray(r);if(ue(r)||t)for(const s in r)Array.isArray(r[s])||ue(r[s])&&!cs(r[s])?(e[s]=Array.isArray(r[s])?[]:{},St(r[s],e[s])):ye(r[s])||(e[s]=!0);return e}function ds(r,e,t){const s=Array.isArray(r);if(ue(r)||s)for(const a in r)Array.isArray(r[a])||ue(r[a])&&!cs(r[a])?fe(e)||ar(t[a])?t[a]=Array.isArray(r[a])?St(r[a],[]):{...St(r[a])}:ds(r[a],ye(e)?{}:e[a],t[a]):t[a]=!Ze(r[a],e[a]);return t}var ft=(r,e)=>ds(r,e,St(e));const us={value:!1,isValid:!1},fs={value:!0,isValid:!0};var ps=r=>{if(Array.isArray(r)){if(r.length>1){const e=r.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:e,isValid:!!e.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!fe(r[0].attributes.value)?fe(r[0].value)||r[0].value===""?fs:{value:r[0].value,isValid:!0}:fs:us}return us},hs=(r,{valueAsNumber:e,valueAsDate:t,setValueAs:s})=>fe(r)?r:e?r===""?NaN:r&&+r:t&&Me(r)?new Date(r):s?s(r):r;const ms={isValid:!1,value:null};var gs=r=>Array.isArray(r)?r.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,ms):ms;function bs(r){const e=r.ref;return nr(e)?e.files:or(e)?gs(r.refs).value:ls(e)?[...e.selectedOptions].map(({value:t})=>t):ct(e)?ps(r.refs).value:hs(fe(e.value)?r.ref.value:e.value,r)}var to=(r,e,t,s)=>{const a={};for(const n of r){const o=M(e,n);o&&oe(a,n,o._f)}return{criteriaMode:t,names:[...r],fields:a,shouldUseNativeValidation:s}},_t=r=>r instanceof RegExp,pt=r=>fe(r)?r:_t(r)?r.source:ue(r)?_t(r.value)?r.value.source:r.value:r,vs=r=>({isOnSubmit:!r||r===Te.onSubmit,isOnBlur:r===Te.onBlur,isOnChange:r===Te.onChange,isOnAll:r===Te.all,isOnTouch:r===Te.onTouched});const xs="AsyncFunction";var ro=r=>!!r&&!!r.validate&&!!(Ce(r.validate)&&r.validate.constructor.name===xs||ue(r.validate)&&Object.values(r.validate).find(e=>e.constructor.name===xs)),so=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),ws=(r,e,t)=>!t&&(e.watchAll||e.watch.has(r)||[...e.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const ht=(r,e,t,s)=>{for(const a of t||Object.keys(r)){const n=M(r,a);if(n){const{_f:o,...l}=n;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],a)&&!s)return!0;if(o.ref&&e(o.ref,o.name)&&!s)return!0;if(ht(l,e))break}else if(ue(l)&&ht(l,e))break}}};function ys(r,e,t){const s=M(r,t);if(s||tr(t))return{error:s,name:t};const a=t.split(".");for(;a.length;){const n=a.join("."),o=M(e,n),l=M(r,n);if(o&&!Array.isArray(o)&&t!==n)return{name:t};if(l&&l.type)return{name:n,error:l};a.pop()}return{name:t}}var ao=(r,e,t,s)=>{t(r);const{name:a,...n}=r;return ke(n)||Object.keys(n).length>=Object.keys(e).length||Object.keys(n).find(o=>e[o]===(!s||Te.all))},no=(r,e,t)=>!r||!e||r===e||ut(r).some(s=>s&&(t?s===e:s.startsWith(e)||e.startsWith(s))),oo=(r,e,t,s,a)=>a.isOnAll?!1:!t&&a.isOnTouch?!(e||r):(t?s.isOnBlur:a.isOnBlur)?!r:(t?s.isOnChange:a.isOnChange)?r:!0,io=(r,e)=>!jt(M(r,e)).length&&be(r,e),lo=(r,e,t)=>{const s=ut(M(r,t));return oe(s,"root",e[t]),oe(r,t,s),r},Ft=r=>Me(r);function ks(r,e,t="validate"){if(Ft(r)||Array.isArray(r)&&r.every(Ft)||Se(r)&&!r)return{type:t,message:Ft(r)?r:"",ref:e}}var rt=r=>ue(r)&&!_t(r)?r:{value:r,message:""},js=async(r,e,t,s,a,n)=>{const{ref:o,refs:l,required:c,maxLength:d,minLength:u,min:m,max:h,pattern:w,validate:g,name:k,valueAsNumber:_,mount:y}=r._f,b=M(t,k);if(!y||e.has(k))return{};const T=l?l[0]:o,V=z=>{a&&T.reportValidity&&(T.setCustomValidity(Se(z)?"":z||""),T.reportValidity())},F={},R=or(o),Y=ct(o),S=R||Y,D=(_||nr(o))&&fe(o.value)&&fe(b)||Nt(o)&&o.value===""||b===""||Array.isArray(b)&&!b.length,Q=os.bind(null,k,s,F),Z=(z,H,J,q=Le.maxLength,X=Le.minLength)=>{const A=z?H:J;F[k]={type:z?q:X,message:A,ref:o,...Q(z?q:X,A)}};if(n?!Array.isArray(b)||!b.length:c&&(!S&&(D||ye(b))||Se(b)&&!b||Y&&!ps(l).isValid||R&&!gs(l).isValid)){const{value:z,message:H}=Ft(c)?{value:!!c,message:c}:rt(c);if(z&&(F[k]={type:Le.required,message:H,ref:T,...Q(Le.required,H)},!s))return V(H),F}if(!D&&(!ye(m)||!ye(h))){let z,H;const J=rt(h),q=rt(m);if(!ye(b)&&!isNaN(b)){const X=o.valueAsNumber||b&&+b;ye(J.value)||(z=X>J.value),ye(q.value)||(H=X<q.value)}else{const X=o.valueAsDate||new Date(b),A=E=>new Date(new Date().toDateString()+" "+E),p=o.type=="time",W=o.type=="week";Me(J.value)&&b&&(z=p?A(b)>A(J.value):W?b>J.value:X>new Date(J.value)),Me(q.value)&&b&&(H=p?A(b)<A(q.value):W?b<q.value:X<new Date(q.value))}if((z||H)&&(Z(!!z,J.message,q.message,Le.max,Le.min),!s))return V(F[k].message),F}if((d||u)&&!D&&(Me(b)||n&&Array.isArray(b))){const z=rt(d),H=rt(u),J=!ye(z.value)&&b.length>+z.value,q=!ye(H.value)&&b.length<+H.value;if((J||q)&&(Z(J,z.message,H.message),!s))return V(F[k].message),F}if(w&&!D&&Me(b)){const{value:z,message:H}=rt(w);if(_t(z)&&!b.match(z)&&(F[k]={type:Le.pattern,message:H,ref:o,...Q(Le.pattern,H)},!s))return V(H),F}if(g){if(Ce(g)){const z=await g(b,t),H=ks(z,T);if(H&&(F[k]={...H,...Q(Le.validate,H.message)},!s))return V(H.message),F}else if(ue(g)){let z={};for(const H in g){if(!ke(z)&&!s)break;const J=ks(await g[H](b,t),T,H);J&&(z={...J,...Q(H,J.message)},V(J.message),s&&(F[k]=z))}if(!ke(z)&&(F[k]={ref:T,...z},!s))return F}}return V(!0),F};const co={mode:Te.onSubmit,reValidateMode:Te.onChange,shouldFocusError:!0};function uo(r={}){let e={...co,...r},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ce(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1};const s={};let a=ue(e.defaultValues)||ue(e.values)?ve(e.defaultValues||e.values)||{}:{},n=e.shouldUnregister?{}:ve(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,d=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...u};const h={array:is(),state:is()},w=e.criteriaMode===Te.all,g=f=>v=>{clearTimeout(d),d=setTimeout(f,v)},k=async f=>{if(!e.disabled&&(u.isValid||m.isValid||f)){const v=e.resolver?ke((await Y()).errors):await D(s,!0);v!==t.isValid&&h.state.next({isValid:v})}},_=(f,v)=>{!e.disabled&&(u.isValidating||u.validatingFields||m.isValidating||m.validatingFields)&&((f||Array.from(l.mount)).forEach(N=>{N&&(v?oe(t.validatingFields,N,v):be(t.validatingFields,N))}),h.state.next({validatingFields:t.validatingFields,isValidating:!ke(t.validatingFields)}))},y=(f,v=[],N,P,$=!0,C=!0)=>{if(P&&N&&!e.disabled){if(o.action=!0,C&&Array.isArray(M(s,f))){const K=N(M(s,f),P.argA,P.argB);$&&oe(s,f,K)}if(C&&Array.isArray(M(t.errors,f))){const K=N(M(t.errors,f),P.argA,P.argB);$&&oe(t.errors,f,K),io(t.errors,f)}if((u.touchedFields||m.touchedFields)&&C&&Array.isArray(M(t.touchedFields,f))){const K=N(M(t.touchedFields,f),P.argA,P.argB);$&&oe(t.touchedFields,f,K)}(u.dirtyFields||m.dirtyFields)&&(t.dirtyFields=ft(a,n)),h.state.next({name:f,isDirty:Z(f,v),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else oe(n,f,v)},b=(f,v)=>{oe(t.errors,f,v),h.state.next({errors:t.errors})},T=f=>{t.errors=f,h.state.next({errors:t.errors,isValid:!1})},V=(f,v,N,P)=>{const $=M(s,f);if($){const C=M(n,f,fe(N)?M(a,f):N);fe(C)||P&&P.defaultChecked||v?oe(n,f,v?C:bs($._f)):J(f,C),o.mount&&k()}},F=(f,v,N,P,$)=>{let C=!1,K=!1;const le={name:f};if(!e.disabled){if(!N||P){(u.isDirty||m.isDirty)&&(K=t.isDirty,t.isDirty=le.isDirty=Z(),C=K!==le.isDirty);const ce=Ze(M(a,f),v);K=!!M(t.dirtyFields,f),ce?be(t.dirtyFields,f):oe(t.dirtyFields,f,!0),le.dirtyFields=t.dirtyFields,C=C||(u.dirtyFields||m.dirtyFields)&&K!==!ce}if(N){const ce=M(t.touchedFields,f);ce||(oe(t.touchedFields,f,N),le.touchedFields=t.touchedFields,C=C||(u.touchedFields||m.touchedFields)&&ce!==N)}C&&$&&h.state.next(le)}return C?le:{}},R=(f,v,N,P)=>{const $=M(t.errors,f),C=(u.isValid||m.isValid)&&Se(v)&&t.isValid!==v;if(e.delayError&&N?(c=g(()=>b(f,N)),c(e.delayError)):(clearTimeout(d),c=null,N?oe(t.errors,f,N):be(t.errors,f)),(N?!Ze($,N):$)||!ke(P)||C){const K={...P,...C&&Se(v)?{isValid:v}:{},errors:t.errors,name:f};t={...t,...K},h.state.next(K)}},Y=async f=>{_(f,!0);const v=await e.resolver(n,e.context,to(f||l.mount,s,e.criteriaMode,e.shouldUseNativeValidation));return _(f),v},S=async f=>{const{errors:v}=await Y(f);if(f)for(const N of f){const P=M(v,N);P?oe(t.errors,N,P):be(t.errors,N)}else t.errors=v;return v},D=async(f,v,N={valid:!0})=>{for(const P in f){const $=f[P];if($){const{_f:C,...K}=$;if(C){const le=l.array.has(C.name),ce=$._f&&ro($._f);ce&&u.validatingFields&&_([P],!0);const Fe=await js($,l.disabled,n,w,e.shouldUseNativeValidation&&!v,le);if(ce&&u.validatingFields&&_([P]),Fe[C.name]&&(N.valid=!1,v))break;!v&&(M(Fe,C.name)?le?lo(t.errors,Fe,C.name):oe(t.errors,C.name,Fe[C.name]):be(t.errors,C.name))}!ke(K)&&await D(K,v,N)}}return N.valid},Q=()=>{for(const f of l.unMount){const v=M(s,f);v&&(v._f.refs?v._f.refs.every(N=>!ir(N)):!ir(v._f.ref))&&ne(f)}l.unMount=new Set},Z=(f,v)=>!e.disabled&&(f&&v&&oe(n,f,v),!Ze(E(),a)),z=(f,v,N)=>as(f,l,{...o.mount?n:fe(v)?a:Me(f)?{[f]:v}:v},N,v),H=f=>jt(M(o.mount?n:a,f,e.shouldUnregister?M(a,f,[]):[])),J=(f,v,N={})=>{const P=M(s,f);let $=v;if(P){const C=P._f;C&&(!C.disabled&&oe(n,f,hs(v,C)),$=Nt(C.ref)&&ye(v)?"":v,ls(C.ref)?[...C.ref.options].forEach(K=>K.selected=$.includes(K.value)):C.refs?ct(C.ref)?C.refs.forEach(K=>{(!K.defaultChecked||!K.disabled)&&(Array.isArray($)?K.checked=!!$.find(le=>le===K.value):K.checked=$===K.value||!!$)}):C.refs.forEach(K=>K.checked=K.value===$):nr(C.ref)?C.ref.value="":(C.ref.value=$,C.ref.type||h.state.next({name:f,values:ve(n)})))}(N.shouldDirty||N.shouldTouch)&&F(f,$,N.shouldTouch,N.shouldDirty,!0),N.shouldValidate&&W(f)},q=(f,v,N)=>{for(const P in v){if(!v.hasOwnProperty(P))return;const $=v[P],C=`${f}.${P}`,K=M(s,C);(l.array.has(f)||ue($)||K&&!K._f)&&!Ye($)?q(C,$,N):J(C,$,N)}},X=(f,v,N={})=>{const P=M(s,f),$=l.array.has(f),C=ve(v);oe(n,f,C),$?(h.array.next({name:f,values:ve(n)}),(u.isDirty||u.dirtyFields||m.isDirty||m.dirtyFields)&&N.shouldDirty&&h.state.next({name:f,dirtyFields:ft(a,n),isDirty:Z(f,C)})):P&&!P._f&&!ye(C)?q(f,C,N):J(f,C,N),ws(f,l)&&h.state.next({...t}),h.state.next({name:o.mount?f:void 0,values:ve(n)})},A=async f=>{o.mount=!0;const v=f.target;let N=v.name,P=!0;const $=M(s,N),C=ce=>{P=Number.isNaN(ce)||Ye(ce)&&isNaN(ce.getTime())||Ze(ce,M(n,N,ce))},K=vs(e.mode),le=vs(e.reValidateMode);if($){let ce,Fe;const Zt=v.type?bs($._f):Qr(f),qe=f.type===Et.BLUR||f.type===Et.FOCUS_OUT,el=!so($._f)&&!e.resolver&&!M(t.errors,N)&&!$._f.deps||oo(qe,M(t.touchedFields,N),t.isSubmitted,le,K),Fr=ws(N,l,qe);oe(n,N,Zt),qe?($._f.onBlur&&$._f.onBlur(f),c&&c(0)):$._f.onChange&&$._f.onChange(f);const Tr=F(N,Zt,qe),tl=!ke(Tr)||Fr;if(!qe&&h.state.next({name:N,type:f.type,values:ve(n)}),el)return(u.isValid||m.isValid)&&(e.mode==="onBlur"?qe&&k():qe||k()),tl&&h.state.next({name:N,...Fr?{}:Tr});if(!qe&&Fr&&h.state.next({...t}),e.resolver){const{errors:Oa}=await Y([N]);if(C(Zt),P){const rl=ys(t.errors,s,N),Ma=ys(Oa,s,rl.name||N);ce=Ma.error,N=Ma.name,Fe=ke(Oa)}}else _([N],!0),ce=(await js($,l.disabled,n,w,e.shouldUseNativeValidation))[N],_([N]),C(Zt),P&&(ce?Fe=!1:(u.isValid||m.isValid)&&(Fe=await D(s,!0)));P&&($._f.deps&&W($._f.deps),R(N,Fe,ce,Tr))}},p=(f,v)=>{if(M(t.errors,v)&&f.focus)return f.focus(),1},W=async(f,v={})=>{let N,P;const $=ut(f);if(e.resolver){const C=await S(fe(f)?f:$);N=ke(C),P=f?!$.some(K=>M(C,K)):N}else f?(P=(await Promise.all($.map(async C=>{const K=M(s,C);return await D(K&&K._f?{[C]:K}:K)}))).every(Boolean),!(!P&&!t.isValid)&&k()):P=N=await D(s);return h.state.next({...!Me(f)||(u.isValid||m.isValid)&&N!==t.isValid?{}:{name:f},...e.resolver||!f?{isValid:N}:{},errors:t.errors}),v.shouldFocus&&!P&&ht(s,p,f?$:l.mount),P},E=f=>{const v={...o.mount?n:a};return fe(f)?v:Me(f)?M(v,f):f.map(N=>M(v,N))},j=(f,v)=>({invalid:!!M((v||t).errors,f),isDirty:!!M((v||t).dirtyFields,f),error:M((v||t).errors,f),isValidating:!!M(t.validatingFields,f),isTouched:!!M((v||t).touchedFields,f)}),O=f=>{f&&ut(f).forEach(v=>be(t.errors,v)),h.state.next({errors:f?t.errors:{}})},L=(f,v,N)=>{const P=(M(s,f,{_f:{}})._f||{}).ref,$=M(t.errors,f)||{},{ref:C,message:K,type:le,...ce}=$;oe(t.errors,f,{...ce,...v,ref:P}),h.state.next({name:f,errors:t.errors,isValid:!1}),N&&N.shouldFocus&&P&&P.focus&&P.focus()},ee=(f,v)=>Ce(f)?h.state.subscribe({next:N=>f(z(void 0,v),N)}):z(f,v,!0),ae=f=>h.state.subscribe({next:v=>{no(f.name,v.name,f.exact)&&ao(v,f.formState||u,Sr,f.reRenderRoot)&&f.callback({values:{...n},...t,...v})}}).unsubscribe,de=f=>(o.mount=!0,m={...m,...f.formState},ae({...f,formState:m})),ne=(f,v={})=>{for(const N of f?ut(f):l.mount)l.mount.delete(N),l.array.delete(N),v.keepValue||(be(s,N),be(n,N)),!v.keepError&&be(t.errors,N),!v.keepDirty&&be(t.dirtyFields,N),!v.keepTouched&&be(t.touchedFields,N),!v.keepIsValidating&&be(t.validatingFields,N),!e.shouldUnregister&&!v.keepDefaultValue&&be(a,N);h.state.next({values:ve(n)}),h.state.next({...t,...v.keepDirty?{isDirty:Z()}:{}}),!v.keepIsValid&&k()},ie=({disabled:f,name:v})=>{(Se(f)&&o.mount||f||l.disabled.has(v))&&(f?l.disabled.add(v):l.disabled.delete(v))},me=(f,v={})=>{let N=M(s,f);const P=Se(v.disabled)||Se(e.disabled);return oe(s,f,{...N||{},_f:{...N&&N._f?N._f:{ref:{name:f}},name:f,mount:!0,...v}}),l.mount.add(f),N?ie({disabled:Se(v.disabled)?v.disabled:e.disabled,name:f}):V(f,!0,v.value),{...P?{disabled:v.disabled||e.disabled}:{},...e.progressive?{required:!!v.required,min:pt(v.min),max:pt(v.max),minLength:pt(v.minLength),maxLength:pt(v.maxLength),pattern:pt(v.pattern)}:{},name:f,onChange:A,onBlur:A,ref:$=>{if($){me(f,v),N=M(s,f);const C=fe($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,K=Jn(C),le=N._f.refs||[];if(K?le.find(ce=>ce===C):C===N._f.ref)return;oe(s,f,{_f:{...N._f,...K?{refs:[...le.filter(ir),C,...Array.isArray(M(a,f))?[{}]:[]],ref:{type:C.type,name:f}}:{ref:C}}}),V(f,!1,void 0,C)}else N=M(s,f,{}),N._f&&(N._f.mount=!1),(e.shouldUnregister||v.shouldUnregister)&&!(es(l.array,f)&&o.action)&&l.unMount.add(f)}}},we=()=>e.shouldFocusError&&ht(s,p,l.mount),se=f=>{Se(f)&&(h.state.next({disabled:f}),ht(s,(v,N)=>{const P=M(s,N);P&&(v.disabled=P._f.disabled||f,Array.isArray(P._f.refs)&&P._f.refs.forEach($=>{$.disabled=P._f.disabled||f}))},0,!1))},pe=(f,v)=>async N=>{let P;N&&(N.preventDefault&&N.preventDefault(),N.persist&&N.persist());let $=ve(n);if(h.state.next({isSubmitting:!0}),e.resolver){const{errors:C,values:K}=await Y();t.errors=C,$=K}else await D(s);if(l.disabled.size)for(const C of l.disabled)oe($,C,void 0);if(be(t.errors,"root"),ke(t.errors)){h.state.next({errors:{}});try{await f($,N)}catch(C){P=C}}else v&&await v({...t.errors},N),we(),setTimeout(we);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ke(t.errors)&&!P,submitCount:t.submitCount+1,errors:t.errors}),P)throw P},$e=(f,v={})=>{M(s,f)&&(fe(v.defaultValue)?X(f,ve(M(a,f))):(X(f,v.defaultValue),oe(a,f,ve(v.defaultValue))),v.keepTouched||be(t.touchedFields,f),v.keepDirty||(be(t.dirtyFields,f),t.isDirty=v.defaultValue?Z(f,ve(M(a,f))):Z()),v.keepError||(be(t.errors,f),u.isValid&&k()),h.state.next({...t}))},he=(f,v={})=>{const N=f?ve(f):a,P=ve(N),$=ke(f),C=$?a:P;if(v.keepDefaultValues||(a=N),!v.keepValues){if(v.keepDirtyValues){const K=new Set([...l.mount,...Object.keys(ft(a,n))]);for(const le of Array.from(K))M(t.dirtyFields,le)?oe(C,le,M(n,le)):X(le,M(C,le))}else{if(er&&fe(f))for(const K of l.mount){const le=M(s,K);if(le&&le._f){const ce=Array.isArray(le._f.refs)?le._f.refs[0]:le._f.ref;if(Nt(ce)){const Fe=ce.closest("form");if(Fe){Fe.reset();break}}}}for(const K of l.mount)X(K,M(C,K))}n=ve(C),h.array.next({values:{...C}}),h.state.next({values:{...C}})}l={mount:v.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!v.keepIsValid||!!v.keepDirtyValues,o.watch=!!e.shouldUnregister,h.state.next({submitCount:v.keepSubmitCount?t.submitCount:0,isDirty:$?!1:v.keepDirty?t.isDirty:!!(v.keepDefaultValues&&!Ze(f,a)),isSubmitted:v.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:$?{}:v.keepDirtyValues?v.keepDefaultValues&&n?ft(a,n):t.dirtyFields:v.keepDefaultValues&&f?ft(a,f):v.keepDirty?t.dirtyFields:{},touchedFields:v.keepTouched?t.touchedFields:{},errors:v.keepErrors?t.errors:{},isSubmitSuccessful:v.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},ze=(f,v)=>he(Ce(f)?f(n):f,v),vt=(f,v={})=>{const N=M(s,f),P=N&&N._f;if(P){const $=P.refs?P.refs[0]:P.ref;$.focus&&($.focus(),v.shouldSelect&&Ce($.select)&&$.select())}},Sr=f=>{t={...t,...f}},xt={control:{register:me,unregister:ne,getFieldState:j,handleSubmit:pe,setError:L,_subscribe:ae,_runSchema:Y,_getWatch:z,_getDirty:Z,_setValid:k,_setFieldArray:y,_setDisabledField:ie,_setErrors:T,_getFieldArray:H,_reset:he,_resetDefaultValues:()=>Ce(e.defaultValues)&&e.defaultValues().then(f=>{ze(f,e.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:Q,_disableForm:se,_subjects:h,_proxyFormState:u,get _fields(){return s},get _formValues(){return n},get _state(){return o},set _state(f){o=f},get _defaultValues(){return a},get _names(){return l},set _names(f){l=f},get _formState(){return t},get _options(){return e},set _options(f){e={...e,...f}}},subscribe:de,trigger:W,register:me,handleSubmit:pe,watch:ee,setValue:X,getValues:E,reset:ze,resetField:$e,clearErrors:O,unregister:ne,setError:L,setFocus:vt,getFieldState:j};return{...xt,formControl:xt}}function fo(r={}){const e=x.useRef(void 0),t=x.useRef(void 0),[s,a]=x.useState({isDirty:!1,isValidating:!1,isLoading:Ce(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:Ce(r.defaultValues)?void 0:r.defaultValues});e.current||(e.current={...r.formControl?r.formControl:uo(r),formState:s},r.formControl&&r.defaultValues&&!Ce(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const n=e.current.control;return n._options=r,rr(()=>{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]),x.useEffect(()=>n._disableForm(r.disabled),[n,r.disabled]),x.useEffect(()=>{r.mode&&(n._options.mode=r.mode),r.reValidateMode&&(n._options.reValidateMode=r.reValidateMode),r.errors&&!ke(r.errors)&&n._setErrors(r.errors)},[n,r.errors,r.mode,r.reValidateMode]),x.useEffect(()=>{r.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,r.shouldUnregister]),x.useEffect(()=>{if(n._proxyFormState.isDirty){const o=n._getDirty();o!==s.isDirty&&n._subjects.state.next({isDirty:o})}},[n,s.isDirty]),x.useEffect(()=>{r.values&&!Ze(r.values,t.current)?(n._reset(r.values,n._options.resetOptions),t.current=r.values,a(o=>({...o}))):n._resetDefaultValues()},[n,r.values]),x.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()}),e.current.formState=ss(s,n),e.current}const Es={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},po={sm:"h-6",md:"h-10",lg:"h-12"},ho={sm:"px-2",md:"px-2.5",lg:"px-3"};function Ns(r,e,t,s,a,n,o){const l=e?"datetime-local":"date",c=I("box-border w-full rounded-lg border outline-none transition font-[var(--font-primary)]",Es[t],po[t],ho[t],n?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]"),m=Gn(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 Ss(r){const{control:e,name:t,rules:s,defaultValue:a,showTime:n=!1,size:o="sm",width:l="100%",label:c,labelHidden:d=!1,hasError:u=!1,errorMessage:m="",disabled:h=!1,className:w,onChange:g}=r,k=x.useId(),_=t||k;return i.jsxs("div",{className:I("flex flex-col",w),style:{width:l,maxWidth:"100%"},children:[c&&i.jsx("label",{htmlFor:_,className:I("pb-2 text-[var(--color-ds-text-primary)]",Es[o],d&&"sr-only"),children:c}),e&&t?i.jsx(_e,{name:t,control:e,rules:s,defaultValue:a,render:({field:y,fieldState:b})=>Ns(_,n,o,{value:y.value,onChange:y.onChange,onBlur:y.onBlur},h,b.error,w)}):Ns(_,n,o,{defaultValue:a,onChange:g},h,u?{message:m}:void 0,w)]})}const mo=({trigger:r,items:e,align:t="left",className:s})=>{const[a,n]=x.useState(!1),o=x.useRef(null),l=x.useRef([]);x.useEffect(()=>{const d=u=>{o.current&&!o.current.contains(u.target)&&n(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]);const c=d=>{var m,h;const u=l.current.findIndex(w=>w===document.activeElement);if(d.key==="Escape")n(!1);else if(d.key==="ArrowDown"){d.preventDefault();const w=(u+1)%e.length;(m=l.current[w])==null||m.focus()}else if(d.key==="ArrowUp"){d.preventDefault();const w=(u-1+e.length)%e.length;(h=l.current[w])==null||h.focus()}};return i.jsxs("div",{className:I("relative inline-block",s),ref:o,children:[i.jsx("button",{type:"button",onClick:()=>n(d=>!d),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:I("absolute mt-2 min-w-[160px] bg-[var(--color-ds-background-page)]","border border-[var(--color-ds-border-muted)] rounded shadow-lg z-10",t==="right"?"right-0":"left-0"),onKeyDown:c,children:e.map((d,u)=>{const{label:m,onSelect:h,disabled:w,icon:g}=d;return i.jsxs("button",{role:"menuitem",type:"button",disabled:w,ref:k=>{l.current[u]=k},className:I("w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",w?"opacity-50 cursor-not-allowed":"hover:bg-[var(--color-ds-background-surface)]"),onClick:()=>{w||(h(),n(!1))},children:[g&&i.jsx(g,{className:"w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]"}),m]},u)})})]})},go=(r,e,t,s)=>{var n,o,l,c;const a=[t,{code:e,...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);He(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)},_s={},lr=(r,e,t,s)=>{He(t)&&_s[t]||(He(t)&&(_s[t]=new Date),go(r,e,t,s))},Fs=(r,e)=>()=>{if(r.isInitialized)e();else{const t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},cr=(r,e,t)=>{r.loadNamespaces(e,Fs(r,t))},Ts=(r,e,t,s)=>{if(He(t)&&(t=[t]),r.options.preload&&r.options.preload.indexOf(e)>-1)return cr(r,t,s);t.forEach(a=>{r.options.ns.indexOf(a)<0&&r.options.ns.push(a)}),r.loadLanguages(e,Fs(r,s))},bo=(r,e,t={})=>!e.languages||!e.languages.length?(lr(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(s,a)=>{var n;if(((n=t.bindI18n)==null?void 0:n.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!a(s.isLanguageChangingTo,r))return!1}}),He=r=>typeof r=="string",vo=r=>typeof r=="object"&&r!==null,xo=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,wo={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},yo=r=>wo[r];let ko={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:r=>r.replace(xo,yo)};const jo=()=>ko;let Eo;const No=()=>Eo,So=x.createContext();class _o{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Fo=(r,e)=>{const t=x.useRef();return x.useEffect(()=>{t.current=r},[r,e]),t.current},Cs=(r,e,t,s)=>r.getFixedT(e,t,s),To=(r,e,t,s)=>x.useCallback(Cs(r,e,t,s),[r,e,t,s]),dr=(r,e={})=>{var V,F,R,Y;const{i18n:t}=e,{i18n:s,defaultNS:a}=x.useContext(So)||{},n=t||s||No();if(n&&!n.reportNamespaces&&(n.reportNamespaces=new _o),!n){lr(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const S=(Q,Z)=>He(Z)?Z:vo(Z)&&He(Z.defaultValue)?Z.defaultValue:Array.isArray(Q)?Q[Q.length-1]:Q,D=[S,{},!1];return D.t=S,D.i18n={},D.ready=!1,D}(V=n.options.react)!=null&&V.wait&&lr(n,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...jo(),...n.options.react,...e},{useSuspense:l,keyPrefix:c}=o;let d=a||((F=n.options)==null?void 0:F.defaultNS);d=He(d)?[d]:d||["translation"],(Y=(R=n.reportNamespaces).addUsedNamespaces)==null||Y.call(R,d);const u=(n.isInitialized||n.initializedStoreOnce)&&d.every(S=>bo(S,n,o)),m=To(n,e.lng||null,o.nsMode==="fallback"?d:d[0],c),h=()=>m,w=()=>Cs(n,e.lng||null,o.nsMode==="fallback"?d:d[0],c),[g,k]=x.useState(h);let _=d.join();e.lng&&(_=`${e.lng}${_}`);const y=Fo(_),b=x.useRef(!0);x.useEffect(()=>{const{bindI18n:S,bindI18nStore:D}=o;b.current=!0,!u&&!l&&(e.lng?Ts(n,e.lng,d,()=>{b.current&&k(w)}):cr(n,d,()=>{b.current&&k(w)})),u&&y&&y!==_&&b.current&&k(w);const Q=()=>{b.current&&k(w)};return S&&(n==null||n.on(S,Q)),D&&(n==null||n.store.on(D,Q)),()=>{b.current=!1,n&&(S==null||S.split(" ").forEach(Z=>n.off(Z,Q))),D&&n&&D.split(" ").forEach(Z=>n.store.off(Z,Q))}},[n,_]),x.useEffect(()=>{b.current&&u&&k(h)},[n,c,u]);const T=[g,n,u];if(T.t=g,T.i18n=n,T.ready=u,u||!u&&!l)return T;throw new Promise(S=>{e.lng?Ts(n,e.lng,d,()=>S()):cr(n,d,()=>S())})},ur={sm:"text-sm",md:"text-base",lg:"text-lg"};function As(r,e,t,s,a,n,o,l,c){const{t:d}=dr(),u=x.useRef(null),m=typeof s=="number"&&e.length>=s,h=()=>{var b;!o&&!m&&((b=u.current)==null||b.click())},w=b=>{const T=b.target.files;if(!T)return;const V=Array.from(T);let F=e.concat(V);s&&(F=F.slice(0,s)),t(F),b.target.value=""},g=b=>{if(b.preventDefault(),o||m)return;const T=Array.from(b.dataTransfer.files);let V=e.concat(T);s&&(V=V.slice(0,s)),t(V)},k=b=>{b.preventDefault()},_=b=>{const T=URL.createObjectURL(b);window.open(T)},y=b=>{const T=e.filter((V,F)=>F!==b);t(T)};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"self-start mb-4 w-auto",children:i.jsx(De,{type:"button",variant:"outline",size:n,icon:zr,onClick:h,disabled:o||m,children:d("ds.fileUploader.browse","Browse files")})}),!m&&i.jsxs("div",{className:I("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)]",ur[n],c),onDrop:g,onDragOver:k,children:[i.jsx("input",{id:r,type:"file",ref:u,className:"hidden",multiple:s!==1,accept:a,onChange:w,disabled:o}),i.jsx(Oe,{component:Qa,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:d("ds.fileUploader.dragDrop","Drag & drop your files here or click to browse")})]}),e.length>0&&i.jsx("ul",{className:"mt-4 space-y-1",children:e.map((b,T)=>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(zr,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),i.jsx("span",{className:"truncate pr-2",children:b.name})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(De,{variant:"ghost",size:"sm",icon:Dr,ariaLabel:d("ds.fileUploader.view","View"),onClick:()=>_(b)}),i.jsx(De,{variant:"ghost",size:"sm",icon:qt,ariaLabel:d("ds.fileUploader.remove","Remove"),onClick:()=>y(T)})]})]},T))}),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 Os(r){const{control:e,name:t,rules:s,defaultValue:a,maxFiles:n,accept:o,size:l="sm",width:c="100%",label:d,labelHidden:u=!1,disabled:m=!1,hasError:h=!1,errorMessage:w="",className:g}=r,k=x.useId(),_=t||k;if(e&&t)return i.jsxs("div",{className:I("flex flex-col",g),style:{width:c},children:[d&&i.jsx("label",{htmlFor:_,className:I("pb-[10px] text-[var(--color-ds-text-primary)]",ur[l],u&&"sr-only"),children:d}),i.jsx(_e,{name:t,control:e,rules:s,defaultValue:a instanceof FileList?Array.from(a):a||[],render:({field:T,fieldState:V})=>As(_,T.value,F=>T.onChange(F),n,o,l,m,V.error,g)})]});const[y,b]=x.useState(a instanceof FileList?Array.from(a):a||[]);return i.jsxs("div",{className:I("flex flex-col",g),style:{width:c},children:[d&&i.jsx("label",{htmlFor:_,className:I("pb-[10px] text-[var(--color-ds-text-primary)]",ur[l],u&&"sr-only"),children:d}),As(_,y,b,n,o,l,m,h?{message:w}:void 0,g)]})}const Xe=({count:r=1,width:e,height:t="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:I("bg-[var(--color-ds-border-muted)] animate-pulse inline-block",s==="circle"?"rounded-full":"rounded",a),style:{width:e??"auto",height:t}},l))})},Tt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Co={sm:"h-6",md:"h-10",lg:"h-12"},Ao={sm:"px-2",md:"px-2.5",lg:"px-3"},Ms={sm:"pl-2",md:"pl-2.5",lg:"pl-3"},Oo={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Ct({id:r,type:e="text",size:t="sm",width:s="100%",label:a,labelHidden:n=!1,hasError:o=!1,errorMessage:l="",prefixIcon:c,suffixIcon:d,separator:u,suffixButton:m,disabled:h=!1,control:w,name:g,rules:k,defaultValue:_,reserveErrorSpace:y,disableErrorPlaceholder:b,loading:T=!1,className:V,...F}){const R=x.useId(),[Y,S]=x.useState(!1),D=r||R,Q=e==="password",z=c??(e==="number"?nn:void 0),H=Q?Y?rn:Dr:d,J=typeof y=="boolean"?y:typeof b=="boolean"?!b:!!w,q=I("box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",Tt[t],Co[t],Ao[t],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 T?i.jsxs("div",{className:"flex flex-col",style:{width:s,maxWidth:"100%"},children:[!n&&a&&i.jsx("label",{htmlFor:D,className:I("pb-2",Tt[t]),children:a}),i.jsx(Xe,{width:"100%",height:Oo[t],variant:"rect",className:"rounded-lg"}),i.jsx("div",{className:"min-h-[18px] w-full",children:i.jsx("span",{"aria-hidden":"true",children:" "})})]}):w&&g?i.jsx(_e,{name:g,control:w,rules:k,defaultValue:_,render:({field:X,fieldState:A})=>i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!n&&a&&i.jsx("label",{htmlFor:D,className:I("pb-2 text-[var(--color-ds-text-primary)]",Tt[t]),children:a}),i.jsxs("div",{className:"relative flex items-center w-full",children:[z&&i.jsx("div",{className:I("absolute left-0 flex items-center h-full",Ms[t]),children:i.jsx(Oe,{component:z,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...X,id:D,type:Q?Y?"text":"password":e,disabled:h,"aria-invalid":!!A.error,className:I(q,z&&"pl-9",H&&"pr-9",V),onInvalid:p=>p.preventDefault(),style:Q&&!Y?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),u&&i.jsx("div",{className:"flex items-center h-full",children:u}),m&&i.jsx("div",{className:"flex items-center h-full pr-2",children:m}),H&&i.jsx("button",{type:"button",onClick:()=>S(p=>!p),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Oe,{component:H,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),J?i.jsx("div",{className:"min-h-[18px]",children:A.error?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:A.error.message}):i.jsx("span",{"aria-hidden":"true",children:" "})}):A.error?i.jsx("div",{className:"pt-1",children:i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:A.error.message})}):null]})}):i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!n&&a&&i.jsx("label",{htmlFor:D,className:I("pb-2 text-[var(--color-ds-text-primary)]",Tt[t]),children:a}),i.jsxs("div",{className:"relative flex items-center w-full",children:[z&&i.jsx("div",{className:I("absolute left-0 flex items-center h-full",Ms[t]),children:i.jsx(Oe,{component:z,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...F,id:D,type:Q?Y?"text":"password":e,disabled:h,"aria-invalid":o,className:I(q,z&&"pl-9",H&&"pr-9",V),onInvalid:X=>X.preventDefault(),style:Q&&!Y?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),u&&i.jsx("div",{className:"flex items-center h-full",children:u}),m&&i.jsx("div",{className:"flex items-center h-full",children:m}),H&&i.jsx("button",{type:"button",onClick:()=>S(X=>!X),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Oe,{component:H,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),J?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:" "})}):o&&l?i.jsx("div",{className:"pt-1",children:i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l})}):null]})}const Mo={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},fr=400,At=8,Vs=({children:r,size:e="sm",position:t="top",className:s})=>{const[a,n]=x.useState(!1),[o,l]=x.useState({x:0,y:0}),c=x.useRef(null),d=x.useId();x.useEffect(()=>{if(a&&c.current){const h=c.current.getBoundingClientRect();let w=0,g=0;switch(t){case"top":w=h.left+h.width/2-fr/2,g=h.top-At;break;case"bottom":w=h.left+h.width/2-fr/2,g=h.bottom+At;break;case"left":w=h.left-fr-At,g=h.top+h.height/2;break;case"right":w=h.right+At,g=h.top+h.height/2;break}l({x:w,y:g})}},[a,t]);const u=()=>typeof r=="string"?i.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):i.jsx(i.Fragment,{children:r}),m=a?i.jsx("div",{id:d,role:"tooltip",className:I("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:t==="left"||t==="right"?"translateY(-50%)":t==="top"?"translateY(-100%)":void 0},children:u()}):null;return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button","aria-describedby":d,ref:c,className:I("inline-flex items-center justify-center focus:outline-none",Mo[e],"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(ln,{className:"w-full h-full"})}),Cr.createPortal(m,document.body)]})};function Vo({name:r,label:e,type:t="text",size:s="sm",width:a,placeholder:n,validation:o,loadingDefaults:l,disabled:c,info:d}){var _;const{control:u,formState:{errors:m}}=dt(),h=!!m[r],w=((_=m[r])==null?void 0:_.message)||"",g="relative",k=a??"w-full";return i.jsxs("div",{className:g,children:[i.jsx(_e,{name:r,control:u,rules:o,render:({field:y})=>i.jsx(Ct,{label:e,size:s,width:k,placeholder:n,hasError:h,errorMessage:w,loading:l,type:t,...y,disabled:c,reserveErrorSpace:!0})}),d&&i.jsx(Vs,{size:s,position:"left",className:"absolute top-1/2 right-2 -translate-y-1/2",children:d})]})}const pr=x.memo(Vo);pr.displayName="FormFieldInput";function $o({title:r,headerButtons:e,children:t,className:s}){return i.jsxs("div",{className:I("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} />`,L,ie,me,ie),q[ie+L]=!0)}if(ie=null,O!==void 0&&(t(O),ie=""+O),o(j)&&(t(j.key),ie=""+j.key),"key"in j){O={};for(var we in j)we!=="key"&&(O[we]=j[we])}else O=j;return ie&&l(O,typeof E=="function"?E.displayName||E.name||"Unknown":E),d(E,ie,ae,ee,a(),O,de,ne)}function m(E){typeof E=="object"&&E!==null&&E.$$typeof===w&&E._store&&(E._store.validated=1)}var h=x,w=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),T=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),Q=Symbol.for("react.client.reference"),Z=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=Object.prototype.hasOwnProperty,H=Array.isArray,J=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(E){return E()}};var G,X={},A=h["react-stack-bottom-frame"].bind(h,n)(),p=J(s(n)),q={};it.Fragment=k,it.jsx=function(E,j,O,L,ee){var ae=1e4>Z.recentlyCreatedOwnerStacks++;return u(E,j,O,!1,L,ee,ae?Error("react-stack-top-frame"):A,ae?J(s(E)):p)},it.jsxs=function(E,j,O,L,ee){var ae=1e4>Z.recentlyCreatedOwnerStacks++;return u(E,j,O,!0,L,ee,ae?Error("react-stack-top-frame"):A,ae?J(s(E)):p)}}()),it}var Vr;function Ia(){return Vr||(Vr=1,process.env.NODE_ENV==="production"?wt.exports=za():wt.exports=Da()),wt.exports}var i=Ia();function $r(r){var e,t,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(t=$r(r[e]))&&(s&&(s+=" "),s+=t)}else for(t in r)r[t]&&(s&&(s+=" "),s+=t);return s}function I(){for(var r,e,t=0,s="",a=arguments.length;t<a;t++)(r=arguments[t])&&(e=$r(r))&&(s&&(s+=" "),s+=e);return s}const La={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 Oe({component:r,size:e="sm",className:t,...s}){return i.jsx(r,{className:I(La[e],t),"aria-hidden":s["aria-label"]?void 0:!0,...s})}const Pa="inline-flex items-center justify-center box-border font-[var(--font-primary)] font-medium rounded-lg transition focus:outline-none",Ra={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"},Ua={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"},Ba={sm:"h-6 w-6 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},Za="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 De({type:r="button",variant:e="primary",size:t="sm",width:s,disabled:a=!1,icon:n,iconPosition:o="left",ariaLabel:l,children:c,onClick:d,className:u}){const m=!!n,h=m&&!c,w=h?Ba[t]:Ua[t];return i.jsxs("button",{type:r,onClick:d,disabled:a,"aria-label":h?l:void 0,style:s?{width:s}:void 0,className:I(Pa,Ra[e],w,Za,u,m&&c&&"gap-2"),children:[n&&o==="left"&&i.jsx(Oe,{component:n,size:t}),c,n&&o==="right"&&i.jsx(Oe,{component:n,size:t})]})}function Wa({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const qa=Y.forwardRef(Wa);function Ga({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Wt=Y.forwardRef(Ga);function Ya({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const Ha=Y.forwardRef(Ya);function Xa({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Ka=Y.forwardRef(Xa);function Ja({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.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 Qa=Y.forwardRef(Ja);function en({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.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 zr=Y.forwardRef(en);function tn({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.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 rn=Y.forwardRef(tn);function sn({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.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"}),Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const Dr=Y.forwardRef(sn);function an({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.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 nn=Y.forwardRef(an);function on({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.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 ln=Y.forwardRef(on);function cn({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.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 dn=Y.forwardRef(cn);function un({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.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 fn=Y.forwardRef(un);function pn({title:r,titleId:e,...t},s){return Y.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":e},t),r?Y.createElement("title",{id:e},r):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const qt=Y.forwardRef(pn),hn={default:{wrapper:"box-border w-full rounded-lg bg-[var(--color-ds-background-surface)] overflow-hidden",padX:"px-6",padY:"py-4"},plain:{wrapper:"box-border w-full overflow-hidden",padX:"px-0",padY:"py-2"},soft:{wrapper:"box-border w-full rounded-lg bg-[color-mix(in srgb,var(--color-ds-background-surface) 60%, transparent 40%)] overflow-hidden",padX:"px-4",padY:"py-3"},ghost:{wrapper:"box-border w-full overflow-hidden",padX:"px-6",padY:"py-3"}};function Gt({title:r,children:e,defaultOpen:t=!0,className:s,type:a="default",contentClassName:n,headerClassName:o}){const[l,c]=x.useState(t),d=x.useRef(null),[u,m]=x.useState(0),h=()=>{d.current&&m(d.current.scrollHeight)};x.useLayoutEffect(()=>{h()},[l]),x.useEffect(()=>{const g=d.current;if(!g)return;const k=new ResizeObserver(()=>h());return k.observe(g),()=>k.disconnect()},[]);const w=hn[a];return i.jsxs("div",{className:I("flex flex-col w-full gap-3",s),children:[i.jsxs("button",{type:"button",onClick:()=>c(g=>!g),"aria-expanded":l,className:I("flex items-center justify-between w-full transition-colors","hover:bg-[var(--color-ds-surface-hover)]",o),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})]}),l?i.jsx(Ka,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"}):i.jsx(Wt,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"})]}),i.jsx("div",{className:w.wrapper,children:i.jsx("div",{className:w.padX,children:i.jsx("div",{className:I("overflow-hidden transition-all duration-300 ease-in-out",l?"opacity-100":"opacity-0"),style:{maxHeight:l?`${u}px`:"0px"},children:i.jsx("div",{ref:d,className:I(w.padY,n),children:e})})})})]})}const Yt="-",mn=r=>{const e=bn(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:o=>{const l=o.split(Yt);return l[0]===""&&l.length!==1&&l.shift(),Ir(l,e)||gn(o)},getConflictingClassGroupIds:(o,l)=>{const c=t[o]||[];return l&&s[o]?[...c,...s[o]]:c}}},Ir=(r,e)=>{var o;if(r.length===0)return e.classGroupId;const t=r[0],s=e.nextPart.get(t),a=s?Ir(r.slice(1),s):void 0;if(a)return a;if(e.validators.length===0)return;const n=r.join(Yt);return(o=e.validators.find(({validator:l})=>l(n)))==null?void 0:o.classGroupId},Lr=/^\[(.+)\]$/,gn=r=>{if(Lr.test(r)){const e=Lr.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},bn=r=>{const{theme:e,classGroups:t}=r,s={nextPart:new Map,validators:[]};for(const a in t)Ht(t[a],s,a,e);return s},Ht=(r,e,t,s)=>{r.forEach(a=>{if(typeof a=="string"){const n=a===""?e:Pr(e,a);n.classGroupId=t;return}if(typeof a=="function"){if(vn(a)){Ht(a(s),e,t,s);return}e.validators.push({validator:a,classGroupId:t});return}Object.entries(a).forEach(([n,o])=>{Ht(o,Pr(e,n),t,s)})})},Pr=(r,e)=>{let t=r;return e.split(Yt).forEach(s=>{t.nextPart.has(s)||t.nextPart.set(s,{nextPart:new Map,validators:[]}),t=t.nextPart.get(s)}),t},vn=r=>r.isThemeGetter,xn=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,s=new Map;const a=(n,o)=>{t.set(n,o),e++,e>r&&(e=0,s=t,t=new Map)};return{get(n){let o=t.get(n);if(o!==void 0)return o;if((o=s.get(n))!==void 0)return a(n,o),o},set(n,o){t.has(n)?t.set(n,o):a(n,o)}}},Xt="!",Kt=":",wn=Kt.length,yn=r=>{const{prefix:e,experimentalParseClassName:t}=r;let s=a=>{const n=[];let o=0,l=0,c=0,d;for(let g=0;g<a.length;g++){let k=a[g];if(o===0&&l===0){if(k===Kt){n.push(a.slice(c,g)),c=g+wn;continue}if(k==="/"){d=g;continue}}k==="["?o++:k==="]"?o--:k==="("?l++:k===")"&&l--}const u=n.length===0?a:a.substring(c),m=kn(u),h=m!==u,w=d&&d>c?d-c:void 0;return{modifiers:n,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:w}};if(e){const a=e+Kt,n=s;s=o=>o.startsWith(a)?n(o.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(t){const a=s;s=n=>t({className:n,parseClassName:a})}return s},kn=r=>r.endsWith(Xt)?r.substring(0,r.length-1):r.startsWith(Xt)?r.substring(1):r,jn=r=>{const e=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]==="["||e[o]?(a.push(...n.sort(),o),n=[]):n.push(o)}),a.push(...n.sort()),a}},En=r=>({cache:xn(r.cacheSize),parseClassName:yn(r),sortModifiers:jn(r),...mn(r)}),Nn=/\s+/,Sn=(r,e)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:n}=e,o=[],l=r.trim().split(Nn);let c="";for(let d=l.length-1;d>=0;d-=1){const u=l[d],{isExternal:m,modifiers:h,hasImportantModifier:w,baseClassName:g,maybePostfixModifierPosition:k}=t(u);if(m){c=u+(c.length>0?" "+c:c);continue}let S=!!k,y=s(S?g.substring(0,k):g);if(!y){if(!S){c=u+(c.length>0?" "+c:c);continue}if(y=s(g),!y){c=u+(c.length>0?" "+c:c);continue}S=!1}const b=n(h).join(":"),T=w?b+Xt:b,z=T+y;if(o.includes(z))continue;o.push(z);const F=a(y,S);for(let B=0;B<F.length;++B){const W=F[B];o.push(T+W)}c=u+(c.length>0?" "+c:c)}return c};function _n(){let r=0,e,t,s="";for(;r<arguments.length;)(e=arguments[r++])&&(t=Rr(e))&&(s&&(s+=" "),s+=t);return s}const Rr=r=>{if(typeof r=="string")return r;let e,t="";for(let s=0;s<r.length;s++)r[s]&&(e=Rr(r[s]))&&(t&&(t+=" "),t+=e);return t};function Fn(r,...e){let t,s,a,n=o;function o(c){const d=e.reduce((u,m)=>m(u),r());return t=En(d),s=t.cache.get,a=t.cache.set,n=l,l(c)}function l(c){const d=s(c);if(d)return d;const u=Sn(c,t);return a(c,u),u}return function(){return n(_n.apply(null,arguments))}}const ge=r=>{const e=t=>t[r]||[];return e.isThemeGetter=!0,e},Ur=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Br=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tn=/^\d+\/\d+$/,Cn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,An=/\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$/,On=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Mn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qe=r=>Tn.test(r),re=r=>!!r&&!Number.isNaN(Number(r)),Be=r=>!!r&&Number.isInteger(Number(r)),Jt=r=>r.endsWith("%")&&re(r.slice(0,-1)),Ie=r=>Cn.test(r),$n=()=>!0,zn=r=>An.test(r)&&!On.test(r),Zr=()=>!1,Dn=r=>Mn.test(r),In=r=>Vn.test(r),Ln=r=>!R(r)&&!U(r),Pn=r=>et(r,Hr,Zr),R=r=>Ur.test(r),Ge=r=>et(r,Xr,zn),Qt=r=>et(r,Wn,re),Wr=r=>et(r,Gr,Zr),Rn=r=>et(r,Yr,In),yt=r=>et(r,Kr,Dn),U=r=>Br.test(r),lt=r=>tt(r,Xr),Un=r=>tt(r,qn),qr=r=>tt(r,Gr),Bn=r=>tt(r,Hr),Zn=r=>tt(r,Yr),kt=r=>tt(r,Kr,!0),et=(r,e,t)=>{const s=Ur.exec(r);return s?s[1]?e(s[1]):t(s[2]):!1},tt=(r,e,t=!1)=>{const s=Br.exec(r);return s?s[1]?e(s[1]):t:!1},Gr=r=>r==="position"||r==="percentage",Yr=r=>r==="image"||r==="url",Hr=r=>r==="length"||r==="size"||r==="bg-size",Xr=r=>r==="length",Wn=r=>r==="number",qn=r=>r==="family-name",Kr=r=>r==="shadow",Gn=Fn(()=>{const r=ge("color"),e=ge("font"),t=ge("text"),s=ge("font-weight"),a=ge("tracking"),n=ge("leading"),o=ge("breakpoint"),l=ge("container"),c=ge("spacing"),d=ge("radius"),u=ge("shadow"),m=ge("inset-shadow"),h=ge("text-shadow"),w=ge("drop-shadow"),g=ge("blur"),k=ge("perspective"),S=ge("aspect"),y=ge("ease"),b=ge("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...z(),U,R],B=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],_=()=>[U,R,c],M=()=>[Qe,"full","auto",..._()],Q=()=>[Be,"none","subgrid",U,R],Z=()=>["auto",{span:["full",Be,U,R]},Be,U,R],D=()=>[Be,"auto",U,R],H=()=>["auto","min","max","fr",U,R],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],X=()=>["auto",..._()],A=()=>[Qe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],p=()=>[r,U,R],q=()=>[...z(),qr,Wr,{position:[U,R]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],j=()=>["auto","cover","contain",Bn,Pn,{size:[U,R]}],O=()=>[Jt,lt,Ge],L=()=>["","none","full",d,U,R],ee=()=>["",re,lt,Ge],ae=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[re,Jt,qr,Wr],ie=()=>["","none",g,U,R],me=()=>["none",re,U,R],we=()=>["none",re,U,R],se=()=>[re,U,R],pe=()=>[Qe,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ie],breakpoint:[Ie],color:[$n],container:[Ie],"drop-shadow":[Ie],ease:["in","out","in-out"],font:[Ln],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ie],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ie],shadow:[Ie],spacing:["px",re],text:[Ie],"text-shadow":[Ie],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qe,R,U,S]}],container:["container"],columns:[{columns:[re,R,U,l]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:F()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Be,"auto",U,R]}],basis:[{basis:[Qe,"full","auto",l,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,Qe,"auto","initial","none",R]}],grow:[{grow:["",re,U,R]}],shrink:[{shrink:["",re,U,R]}],order:[{order:[Be,"first","last","none",U,R]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:X()}],mx:[{mx:X()}],my:[{my:X()}],ms:[{ms:X()}],me:[{me:X()}],mt:[{mt:X()}],mr:[{mr:X()}],mb:[{mb:X()}],ml:[{ml:X()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],w:[{w:[l,"screen",...A()]}],"min-w":[{"min-w":[l,"screen","none",...A()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",t,lt,Ge]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,U,Qt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jt,R]}],"font-family":[{font:[Un,R,e]}],"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,U,R]}],"line-clamp":[{"line-clamp":[re,"none",U,Qt]}],leading:[{leading:[n,..._()]}],"list-image":[{"list-image":["none",U,R]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",U,R]}],"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:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",U,Ge]}],"text-decoration-color":[{decoration:p()}],"underline-offset":[{"underline-offset":[re,"auto",U,R]}],"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",U,R]}],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",U,R]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Be,U,R],radial:["",U,R],conic:[Be,U,R]},Zn,Rn]}],"bg-color":[{bg:p()}],"gradient-from-pos":[{from:O()}],"gradient-via-pos":[{via:O()}],"gradient-to-pos":[{to:O()}],"gradient-from":[{from:p()}],"gradient-via":[{via:p()}],"gradient-to":[{to:p()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"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:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,U,R]}],"outline-w":[{outline:["",re,lt,Ge]}],"outline-color":[{outline:p()}],shadow:[{shadow:["","none",u,kt,yt]}],"shadow-color":[{shadow:p()}],"inset-shadow":[{"inset-shadow":["none",m,kt,yt]}],"inset-shadow-color":[{"inset-shadow":p()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:p()}],"ring-offset-w":[{"ring-offset":[re,Ge]}],"ring-offset-color":[{"ring-offset":p()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":p()}],"text-shadow":[{"text-shadow":["none",h,kt,yt]}],"text-shadow-color":[{"text-shadow":p()}],opacity:[{opacity:[re,U,R]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"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":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"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":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"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":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"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":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"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":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"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":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"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":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":p()}],"mask-image-y-to-color":[{"mask-y-to":p()}],"mask-image-radial":[{"mask-radial":[U,R]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"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":z()}],"mask-image-conic-pos":[{"mask-conic":[re]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"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:q()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",U,R]}],filter:[{filter:["","none",U,R]}],blur:[{blur:ie()}],brightness:[{brightness:[re,U,R]}],contrast:[{contrast:[re,U,R]}],"drop-shadow":[{"drop-shadow":["","none",w,kt,yt]}],"drop-shadow-color":[{"drop-shadow":p()}],grayscale:[{grayscale:["",re,U,R]}],"hue-rotate":[{"hue-rotate":[re,U,R]}],invert:[{invert:["",re,U,R]}],saturate:[{saturate:[re,U,R]}],sepia:[{sepia:["",re,U,R]}],"backdrop-filter":[{"backdrop-filter":["","none",U,R]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[re,U,R]}],"backdrop-contrast":[{"backdrop-contrast":[re,U,R]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,U,R]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,U,R]}],"backdrop-invert":[{"backdrop-invert":["",re,U,R]}],"backdrop-opacity":[{"backdrop-opacity":[re,U,R]}],"backdrop-saturate":[{"backdrop-saturate":[re,U,R]}],"backdrop-sepia":[{"backdrop-sepia":["",re,U,R]}],"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",U,R]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",U,R]}],ease:[{ease:["linear","initial",y,U,R]}],delay:[{delay:[re,U,R]}],animate:[{animate:["none",b,U,R]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,U,R]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:we()}],"scale-x":[{"scale-x":we()}],"scale-y":[{"scale-y":we()}],"scale-z":[{"scale-z":we()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[U,R,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"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",U,R]}],"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",U,R]}],fill:[{fill:["none",...p()]}],"stroke-w":[{stroke:[re,lt,Ge,Qt]}],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 ct=r=>r.type==="checkbox",Ye=r=>r instanceof Date,ye=r=>r==null;const Jr=r=>typeof r=="object";var ue=r=>!ye(r)&&!Array.isArray(r)&&Jr(r)&&!Ye(r),Qr=r=>ue(r)&&r.target?ct(r.target)?r.target.checked:r.target.value:r,Yn=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,es=(r,e)=>r.has(Yn(e)),Hn=r=>{const e=r.constructor&&r.constructor.prototype;return ue(e)&&e.hasOwnProperty("isPrototypeOf")},er=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ve(r){let e;const t=Array.isArray(r),s=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)e=new Date(r);else if(r instanceof Set)e=new Set(r);else if(!(er&&(r instanceof Blob||s))&&(t||ue(r)))if(e=t?[]:{},!t&&!Hn(r))e=r;else for(const a in r)r.hasOwnProperty(a)&&(e[a]=ve(r[a]));else return r;return e}var jt=r=>Array.isArray(r)?r.filter(Boolean):[],fe=r=>r===void 0,V=(r,e,t)=>{if(!e||!ue(r))return t;const s=jt(e.split(/[,[\].]+?/)).reduce((a,n)=>ye(a)?a:a[n],r);return fe(s)||s===r?fe(r[e])?t:r[e]:s},Se=r=>typeof r=="boolean",tr=r=>/^\w*$/.test(r),ts=r=>jt(r.replace(/["|']|\]/g,"").split(/\.|\[/)),oe=(r,e,t)=>{let s=-1;const a=tr(e)?[e]:ts(e),n=a.length,o=n-1;for(;++s<n;){const l=a[s];let c=t;if(s!==o){const d=r[l];c=ue(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=c,r=r[l]}};const Et={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Te={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Le={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},rs=x.createContext(null),dt=()=>x.useContext(rs),Xn=r=>{const{children:e,...t}=r;return x.createElement(rs.Provider,{value:t},e)};var ss=(r,e,t,s=!0)=>{const a={defaultValues:e._defaultValues};for(const n in r)Object.defineProperty(a,n,{get:()=>{const o=n;return e._proxyFormState[o]!==Te.all&&(e._proxyFormState[o]=!s||Te.all),t&&(t[o]=!0),r[o]}});return a};const rr=typeof window<"u"?Y.useLayoutEffect:Y.useEffect;function Kn(r){const e=dt(),{control:t=e.control,disabled:s,name:a,exact:n}=r||{},[o,l]=x.useState(t._formState),c=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return rr(()=>t._subscribe({name:a,formState:c.current,exact:n,callback:d=>{!s&&l({...t._formState,...d})}}),[a,s,n]),x.useEffect(()=>{c.current.isValid&&t._setValid(!0)},[t]),x.useMemo(()=>ss(o,t,c.current,!1),[o,t])}var Me=r=>typeof r=="string",as=(r,e,t,s,a)=>Me(r)?(s&&e.watch.add(r),V(t,r,a)):Array.isArray(r)?r.map(n=>(s&&e.watch.add(n),V(t,n))):(s&&(e.watchAll=!0),t);function sr(r){const e=dt(),{control:t=e.control,name:s,defaultValue:a,disabled:n,exact:o}=r||{},l=x.useRef(a),[c,d]=x.useState(t._getWatch(s,l.current));return rr(()=>t._subscribe({name:s,formState:{values:!0},exact:o,callback:u=>!n&&d(as(s,t._names,u.values||t._formValues,!1,l.current))}),[s,t,n,o]),x.useEffect(()=>t._removeUnmounted()),c}function ns(r){const e=dt(),{name:t,disabled:s,control:a=e.control,shouldUnregister:n}=r,o=es(a._names.array,t),l=sr({control:a,name:t,defaultValue:V(a._formValues,t,V(a._defaultValues,t,r.defaultValue)),exact:!0}),c=Kn({control:a,name:t,exact:!0}),d=x.useRef(r),u=x.useRef(a.register(t,{...r.rules,value:l,...Se(r.disabled)?{disabled:r.disabled}:{}})),m=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!V(c.errors,t)},isDirty:{enumerable:!0,get:()=>!!V(c.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!V(c.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!V(c.validatingFields,t)},error:{enumerable:!0,get:()=>V(c.errors,t)}}),[c,t]),h=x.useCallback(S=>u.current.onChange({target:{value:Qr(S),name:t},type:Et.CHANGE}),[t]),w=x.useCallback(()=>u.current.onBlur({target:{value:V(a._formValues,t),name:t},type:Et.BLUR}),[t,a._formValues]),g=x.useCallback(S=>{const y=V(a._fields,t);y&&S&&(y._f.ref={focus:()=>S.focus(),select:()=>S.select(),setCustomValidity:b=>S.setCustomValidity(b),reportValidity:()=>S.reportValidity()})},[a._fields,t]),k=x.useMemo(()=>({name:t,value:l,...Se(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:h,onBlur:w,ref:g}),[t,s,c.disabled,h,w,g,l]);return x.useEffect(()=>{const S=a._options.shouldUnregister||n;a.register(t,{...d.current.rules,...Se(d.current.disabled)?{disabled:d.current.disabled}:{}});const y=(b,T)=>{const z=V(a._fields,b);z&&z._f&&(z._f.mount=T)};if(y(t,!0),S){const b=ve(V(a._options.defaultValues,t));oe(a._defaultValues,t,b),fe(V(a._formValues,t))&&oe(a._formValues,t,b)}return!o&&a.register(t),()=>{(o?S&&!a._state.action:S)?a.unregister(t):y(t,!1)}},[t,a,o,n]),x.useEffect(()=>{a._setDisabledField({disabled:s,name:t})},[s,t,a]),x.useMemo(()=>({field:k,formState:c,fieldState:m}),[k,c,m])}const _e=r=>r.render(ns(r));var os=(r,e,t,s,a)=>e?{...t[r],types:{...t[r]&&t[r].types?t[r].types:{},[s]:a||!0}}:{},ut=r=>Array.isArray(r)?r:[r],is=()=>{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=[]}}},ar=r=>ye(r)||!Jr(r);function Ze(r,e){if(ar(r)||ar(e))return r===e;if(Ye(r)&&Ye(e))return r.getTime()===e.getTime();const t=Object.keys(r),s=Object.keys(e);if(t.length!==s.length)return!1;for(const a of t){const n=r[a];if(!s.includes(a))return!1;if(a!=="ref"){const o=e[a];if(Ye(n)&&Ye(o)||ue(n)&&ue(o)||Array.isArray(n)&&Array.isArray(o)?!Ze(n,o):n!==o)return!1}}return!0}var ke=r=>ue(r)&&!Object.keys(r).length,nr=r=>r.type==="file",Ce=r=>typeof r=="function",Nt=r=>{if(!er)return!1;const e=r?r.ownerDocument:0;return r instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},ls=r=>r.type==="select-multiple",or=r=>r.type==="radio",Jn=r=>or(r)||ct(r),ir=r=>Nt(r)&&r.isConnected;function Qn(r,e){const t=e.slice(0,-1).length;let s=0;for(;s<t;)r=fe(r)?s++:r[e[s++]];return r}function eo(r){for(const e in r)if(r.hasOwnProperty(e)&&!fe(r[e]))return!1;return!0}function be(r,e){const t=Array.isArray(e)?e:tr(e)?[e]:ts(e),s=t.length===1?r:Qn(r,t),a=t.length-1,n=t[a];return s&&delete s[n],a!==0&&(ue(s)&&ke(s)||Array.isArray(s)&&eo(s))&&be(r,t.slice(0,-1)),r}var cs=r=>{for(const e in r)if(Ce(r[e]))return!0;return!1};function St(r,e={}){const t=Array.isArray(r);if(ue(r)||t)for(const s in r)Array.isArray(r[s])||ue(r[s])&&!cs(r[s])?(e[s]=Array.isArray(r[s])?[]:{},St(r[s],e[s])):ye(r[s])||(e[s]=!0);return e}function ds(r,e,t){const s=Array.isArray(r);if(ue(r)||s)for(const a in r)Array.isArray(r[a])||ue(r[a])&&!cs(r[a])?fe(e)||ar(t[a])?t[a]=Array.isArray(r[a])?St(r[a],[]):{...St(r[a])}:ds(r[a],ye(e)?{}:e[a],t[a]):t[a]=!Ze(r[a],e[a]);return t}var ft=(r,e)=>ds(r,e,St(e));const us={value:!1,isValid:!1},fs={value:!0,isValid:!0};var ps=r=>{if(Array.isArray(r)){if(r.length>1){const e=r.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:e,isValid:!!e.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!fe(r[0].attributes.value)?fe(r[0].value)||r[0].value===""?fs:{value:r[0].value,isValid:!0}:fs:us}return us},hs=(r,{valueAsNumber:e,valueAsDate:t,setValueAs:s})=>fe(r)?r:e?r===""?NaN:r&&+r:t&&Me(r)?new Date(r):s?s(r):r;const ms={isValid:!1,value:null};var gs=r=>Array.isArray(r)?r.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,ms):ms;function bs(r){const e=r.ref;return nr(e)?e.files:or(e)?gs(r.refs).value:ls(e)?[...e.selectedOptions].map(({value:t})=>t):ct(e)?ps(r.refs).value:hs(fe(e.value)?r.ref.value:e.value,r)}var to=(r,e,t,s)=>{const a={};for(const n of r){const o=V(e,n);o&&oe(a,n,o._f)}return{criteriaMode:t,names:[...r],fields:a,shouldUseNativeValidation:s}},_t=r=>r instanceof RegExp,pt=r=>fe(r)?r:_t(r)?r.source:ue(r)?_t(r.value)?r.value.source:r.value:r,vs=r=>({isOnSubmit:!r||r===Te.onSubmit,isOnBlur:r===Te.onBlur,isOnChange:r===Te.onChange,isOnAll:r===Te.all,isOnTouch:r===Te.onTouched});const xs="AsyncFunction";var ro=r=>!!r&&!!r.validate&&!!(Ce(r.validate)&&r.validate.constructor.name===xs||ue(r.validate)&&Object.values(r.validate).find(e=>e.constructor.name===xs)),so=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),ws=(r,e,t)=>!t&&(e.watchAll||e.watch.has(r)||[...e.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const ht=(r,e,t,s)=>{for(const a of t||Object.keys(r)){const n=V(r,a);if(n){const{_f:o,...l}=n;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],a)&&!s)return!0;if(o.ref&&e(o.ref,o.name)&&!s)return!0;if(ht(l,e))break}else if(ue(l)&&ht(l,e))break}}};function ys(r,e,t){const s=V(r,t);if(s||tr(t))return{error:s,name:t};const a=t.split(".");for(;a.length;){const n=a.join("."),o=V(e,n),l=V(r,n);if(o&&!Array.isArray(o)&&t!==n)return{name:t};if(l&&l.type)return{name:n,error:l};a.pop()}return{name:t}}var ao=(r,e,t,s)=>{t(r);const{name:a,...n}=r;return ke(n)||Object.keys(n).length>=Object.keys(e).length||Object.keys(n).find(o=>e[o]===(!s||Te.all))},no=(r,e,t)=>!r||!e||r===e||ut(r).some(s=>s&&(t?s===e:s.startsWith(e)||e.startsWith(s))),oo=(r,e,t,s,a)=>a.isOnAll?!1:!t&&a.isOnTouch?!(e||r):(t?s.isOnBlur:a.isOnBlur)?!r:(t?s.isOnChange:a.isOnChange)?r:!0,io=(r,e)=>!jt(V(r,e)).length&&be(r,e),lo=(r,e,t)=>{const s=ut(V(r,t));return oe(s,"root",e[t]),oe(r,t,s),r},Ft=r=>Me(r);function ks(r,e,t="validate"){if(Ft(r)||Array.isArray(r)&&r.every(Ft)||Se(r)&&!r)return{type:t,message:Ft(r)?r:"",ref:e}}var rt=r=>ue(r)&&!_t(r)?r:{value:r,message:""},js=async(r,e,t,s,a,n)=>{const{ref:o,refs:l,required:c,maxLength:d,minLength:u,min:m,max:h,pattern:w,validate:g,name:k,valueAsNumber:S,mount:y}=r._f,b=V(t,k);if(!y||e.has(k))return{};const T=l?l[0]:o,z=D=>{a&&T.reportValidity&&(T.setCustomValidity(Se(D)?"":D||""),T.reportValidity())},F={},B=or(o),W=ct(o),_=B||W,M=(S||nr(o))&&fe(o.value)&&fe(b)||Nt(o)&&o.value===""||b===""||Array.isArray(b)&&!b.length,Q=os.bind(null,k,s,F),Z=(D,H,J,G=Le.maxLength,X=Le.minLength)=>{const A=D?H:J;F[k]={type:D?G:X,message:A,ref:o,...Q(D?G:X,A)}};if(n?!Array.isArray(b)||!b.length:c&&(!_&&(M||ye(b))||Se(b)&&!b||W&&!ps(l).isValid||B&&!gs(l).isValid)){const{value:D,message:H}=Ft(c)?{value:!!c,message:c}:rt(c);if(D&&(F[k]={type:Le.required,message:H,ref:T,...Q(Le.required,H)},!s))return z(H),F}if(!M&&(!ye(m)||!ye(h))){let D,H;const J=rt(h),G=rt(m);if(!ye(b)&&!isNaN(b)){const X=o.valueAsNumber||b&&+b;ye(J.value)||(D=X>J.value),ye(G.value)||(H=X<G.value)}else{const X=o.valueAsDate||new Date(b),A=E=>new Date(new Date().toDateString()+" "+E),p=o.type=="time",q=o.type=="week";Me(J.value)&&b&&(D=p?A(b)>A(J.value):q?b>J.value:X>new Date(J.value)),Me(G.value)&&b&&(H=p?A(b)<A(G.value):q?b<G.value:X<new Date(G.value))}if((D||H)&&(Z(!!D,J.message,G.message,Le.max,Le.min),!s))return z(F[k].message),F}if((d||u)&&!M&&(Me(b)||n&&Array.isArray(b))){const D=rt(d),H=rt(u),J=!ye(D.value)&&b.length>+D.value,G=!ye(H.value)&&b.length<+H.value;if((J||G)&&(Z(J,D.message,H.message),!s))return z(F[k].message),F}if(w&&!M&&Me(b)){const{value:D,message:H}=rt(w);if(_t(D)&&!b.match(D)&&(F[k]={type:Le.pattern,message:H,ref:o,...Q(Le.pattern,H)},!s))return z(H),F}if(g){if(Ce(g)){const D=await g(b,t),H=ks(D,T);if(H&&(F[k]={...H,...Q(Le.validate,H.message)},!s))return z(H.message),F}else if(ue(g)){let D={};for(const H in g){if(!ke(D)&&!s)break;const J=ks(await g[H](b,t),T,H);J&&(D={...J,...Q(H,J.message)},z(J.message),s&&(F[k]=D))}if(!ke(D)&&(F[k]={ref:T,...D},!s))return F}}return z(!0),F};const co={mode:Te.onSubmit,reValidateMode:Te.onChange,shouldFocusError:!0};function uo(r={}){let e={...co,...r},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ce(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1};const s={};let a=ue(e.defaultValues)||ue(e.values)?ve(e.defaultValues||e.values)||{}:{},n=e.shouldUnregister?{}:ve(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,d=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...u};const h={array:is(),state:is()},w=e.criteriaMode===Te.all,g=f=>v=>{clearTimeout(d),d=setTimeout(f,v)},k=async f=>{if(!e.disabled&&(u.isValid||m.isValid||f)){const v=e.resolver?ke((await W()).errors):await M(s,!0);v!==t.isValid&&h.state.next({isValid:v})}},S=(f,v)=>{!e.disabled&&(u.isValidating||u.validatingFields||m.isValidating||m.validatingFields)&&((f||Array.from(l.mount)).forEach(N=>{N&&(v?oe(t.validatingFields,N,v):be(t.validatingFields,N))}),h.state.next({validatingFields:t.validatingFields,isValidating:!ke(t.validatingFields)}))},y=(f,v=[],N,P,$=!0,C=!0)=>{if(P&&N&&!e.disabled){if(o.action=!0,C&&Array.isArray(V(s,f))){const K=N(V(s,f),P.argA,P.argB);$&&oe(s,f,K)}if(C&&Array.isArray(V(t.errors,f))){const K=N(V(t.errors,f),P.argA,P.argB);$&&oe(t.errors,f,K),io(t.errors,f)}if((u.touchedFields||m.touchedFields)&&C&&Array.isArray(V(t.touchedFields,f))){const K=N(V(t.touchedFields,f),P.argA,P.argB);$&&oe(t.touchedFields,f,K)}(u.dirtyFields||m.dirtyFields)&&(t.dirtyFields=ft(a,n)),h.state.next({name:f,isDirty:Z(f,v),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else oe(n,f,v)},b=(f,v)=>{oe(t.errors,f,v),h.state.next({errors:t.errors})},T=f=>{t.errors=f,h.state.next({errors:t.errors,isValid:!1})},z=(f,v,N,P)=>{const $=V(s,f);if($){const C=V(n,f,fe(N)?V(a,f):N);fe(C)||P&&P.defaultChecked||v?oe(n,f,v?C:bs($._f)):J(f,C),o.mount&&k()}},F=(f,v,N,P,$)=>{let C=!1,K=!1;const le={name:f};if(!e.disabled){if(!N||P){(u.isDirty||m.isDirty)&&(K=t.isDirty,t.isDirty=le.isDirty=Z(),C=K!==le.isDirty);const ce=Ze(V(a,f),v);K=!!V(t.dirtyFields,f),ce?be(t.dirtyFields,f):oe(t.dirtyFields,f,!0),le.dirtyFields=t.dirtyFields,C=C||(u.dirtyFields||m.dirtyFields)&&K!==!ce}if(N){const ce=V(t.touchedFields,f);ce||(oe(t.touchedFields,f,N),le.touchedFields=t.touchedFields,C=C||(u.touchedFields||m.touchedFields)&&ce!==N)}C&&$&&h.state.next(le)}return C?le:{}},B=(f,v,N,P)=>{const $=V(t.errors,f),C=(u.isValid||m.isValid)&&Se(v)&&t.isValid!==v;if(e.delayError&&N?(c=g(()=>b(f,N)),c(e.delayError)):(clearTimeout(d),c=null,N?oe(t.errors,f,N):be(t.errors,f)),(N?!Ze($,N):$)||!ke(P)||C){const K={...P,...C&&Se(v)?{isValid:v}:{},errors:t.errors,name:f};t={...t,...K},h.state.next(K)}},W=async f=>{S(f,!0);const v=await e.resolver(n,e.context,to(f||l.mount,s,e.criteriaMode,e.shouldUseNativeValidation));return S(f),v},_=async f=>{const{errors:v}=await W(f);if(f)for(const N of f){const P=V(v,N);P?oe(t.errors,N,P):be(t.errors,N)}else t.errors=v;return v},M=async(f,v,N={valid:!0})=>{for(const P in f){const $=f[P];if($){const{_f:C,...K}=$;if(C){const le=l.array.has(C.name),ce=$._f&&ro($._f);ce&&u.validatingFields&&S([P],!0);const Fe=await js($,l.disabled,n,w,e.shouldUseNativeValidation&&!v,le);if(ce&&u.validatingFields&&S([P]),Fe[C.name]&&(N.valid=!1,v))break;!v&&(V(Fe,C.name)?le?lo(t.errors,Fe,C.name):oe(t.errors,C.name,Fe[C.name]):be(t.errors,C.name))}!ke(K)&&await M(K,v,N)}}return N.valid},Q=()=>{for(const f of l.unMount){const v=V(s,f);v&&(v._f.refs?v._f.refs.every(N=>!ir(N)):!ir(v._f.ref))&&ne(f)}l.unMount=new Set},Z=(f,v)=>!e.disabled&&(f&&v&&oe(n,f,v),!Ze(E(),a)),D=(f,v,N)=>as(f,l,{...o.mount?n:fe(v)?a:Me(f)?{[f]:v}:v},N,v),H=f=>jt(V(o.mount?n:a,f,e.shouldUnregister?V(a,f,[]):[])),J=(f,v,N={})=>{const P=V(s,f);let $=v;if(P){const C=P._f;C&&(!C.disabled&&oe(n,f,hs(v,C)),$=Nt(C.ref)&&ye(v)?"":v,ls(C.ref)?[...C.ref.options].forEach(K=>K.selected=$.includes(K.value)):C.refs?ct(C.ref)?C.refs.forEach(K=>{(!K.defaultChecked||!K.disabled)&&(Array.isArray($)?K.checked=!!$.find(le=>le===K.value):K.checked=$===K.value||!!$)}):C.refs.forEach(K=>K.checked=K.value===$):nr(C.ref)?C.ref.value="":(C.ref.value=$,C.ref.type||h.state.next({name:f,values:ve(n)})))}(N.shouldDirty||N.shouldTouch)&&F(f,$,N.shouldTouch,N.shouldDirty,!0),N.shouldValidate&&q(f)},G=(f,v,N)=>{for(const P in v){if(!v.hasOwnProperty(P))return;const $=v[P],C=`${f}.${P}`,K=V(s,C);(l.array.has(f)||ue($)||K&&!K._f)&&!Ye($)?G(C,$,N):J(C,$,N)}},X=(f,v,N={})=>{const P=V(s,f),$=l.array.has(f),C=ve(v);oe(n,f,C),$?(h.array.next({name:f,values:ve(n)}),(u.isDirty||u.dirtyFields||m.isDirty||m.dirtyFields)&&N.shouldDirty&&h.state.next({name:f,dirtyFields:ft(a,n),isDirty:Z(f,C)})):P&&!P._f&&!ye(C)?G(f,C,N):J(f,C,N),ws(f,l)&&h.state.next({...t}),h.state.next({name:o.mount?f:void 0,values:ve(n)})},A=async f=>{o.mount=!0;const v=f.target;let N=v.name,P=!0;const $=V(s,N),C=ce=>{P=Number.isNaN(ce)||Ye(ce)&&isNaN(ce.getTime())||Ze(ce,V(n,N,ce))},K=vs(e.mode),le=vs(e.reValidateMode);if($){let ce,Fe;const Zt=v.type?bs($._f):Qr(f),qe=f.type===Et.BLUR||f.type===Et.FOCUS_OUT,el=!so($._f)&&!e.resolver&&!V(t.errors,N)&&!$._f.deps||oo(qe,V(t.touchedFields,N),t.isSubmitted,le,K),Fr=ws(N,l,qe);oe(n,N,Zt),qe?($._f.onBlur&&$._f.onBlur(f),c&&c(0)):$._f.onChange&&$._f.onChange(f);const Tr=F(N,Zt,qe),tl=!ke(Tr)||Fr;if(!qe&&h.state.next({name:N,type:f.type,values:ve(n)}),el)return(u.isValid||m.isValid)&&(e.mode==="onBlur"?qe&&k():qe||k()),tl&&h.state.next({name:N,...Fr?{}:Tr});if(!qe&&Fr&&h.state.next({...t}),e.resolver){const{errors:Oa}=await W([N]);if(C(Zt),P){const rl=ys(t.errors,s,N),Ma=ys(Oa,s,rl.name||N);ce=Ma.error,N=Ma.name,Fe=ke(Oa)}}else S([N],!0),ce=(await js($,l.disabled,n,w,e.shouldUseNativeValidation))[N],S([N]),C(Zt),P&&(ce?Fe=!1:(u.isValid||m.isValid)&&(Fe=await M(s,!0)));P&&($._f.deps&&q($._f.deps),B(N,Fe,ce,Tr))}},p=(f,v)=>{if(V(t.errors,v)&&f.focus)return f.focus(),1},q=async(f,v={})=>{let N,P;const $=ut(f);if(e.resolver){const C=await _(fe(f)?f:$);N=ke(C),P=f?!$.some(K=>V(C,K)):N}else f?(P=(await Promise.all($.map(async C=>{const K=V(s,C);return await M(K&&K._f?{[C]:K}:K)}))).every(Boolean),!(!P&&!t.isValid)&&k()):P=N=await M(s);return h.state.next({...!Me(f)||(u.isValid||m.isValid)&&N!==t.isValid?{}:{name:f},...e.resolver||!f?{isValid:N}:{},errors:t.errors}),v.shouldFocus&&!P&&ht(s,p,f?$:l.mount),P},E=f=>{const v={...o.mount?n:a};return fe(f)?v:Me(f)?V(v,f):f.map(N=>V(v,N))},j=(f,v)=>({invalid:!!V((v||t).errors,f),isDirty:!!V((v||t).dirtyFields,f),error:V((v||t).errors,f),isValidating:!!V(t.validatingFields,f),isTouched:!!V((v||t).touchedFields,f)}),O=f=>{f&&ut(f).forEach(v=>be(t.errors,v)),h.state.next({errors:f?t.errors:{}})},L=(f,v,N)=>{const P=(V(s,f,{_f:{}})._f||{}).ref,$=V(t.errors,f)||{},{ref:C,message:K,type:le,...ce}=$;oe(t.errors,f,{...ce,...v,ref:P}),h.state.next({name:f,errors:t.errors,isValid:!1}),N&&N.shouldFocus&&P&&P.focus&&P.focus()},ee=(f,v)=>Ce(f)?h.state.subscribe({next:N=>f(D(void 0,v),N)}):D(f,v,!0),ae=f=>h.state.subscribe({next:v=>{no(f.name,v.name,f.exact)&&ao(v,f.formState||u,Sr,f.reRenderRoot)&&f.callback({values:{...n},...t,...v})}}).unsubscribe,de=f=>(o.mount=!0,m={...m,...f.formState},ae({...f,formState:m})),ne=(f,v={})=>{for(const N of f?ut(f):l.mount)l.mount.delete(N),l.array.delete(N),v.keepValue||(be(s,N),be(n,N)),!v.keepError&&be(t.errors,N),!v.keepDirty&&be(t.dirtyFields,N),!v.keepTouched&&be(t.touchedFields,N),!v.keepIsValidating&&be(t.validatingFields,N),!e.shouldUnregister&&!v.keepDefaultValue&&be(a,N);h.state.next({values:ve(n)}),h.state.next({...t,...v.keepDirty?{isDirty:Z()}:{}}),!v.keepIsValid&&k()},ie=({disabled:f,name:v})=>{(Se(f)&&o.mount||f||l.disabled.has(v))&&(f?l.disabled.add(v):l.disabled.delete(v))},me=(f,v={})=>{let N=V(s,f);const P=Se(v.disabled)||Se(e.disabled);return oe(s,f,{...N||{},_f:{...N&&N._f?N._f:{ref:{name:f}},name:f,mount:!0,...v}}),l.mount.add(f),N?ie({disabled:Se(v.disabled)?v.disabled:e.disabled,name:f}):z(f,!0,v.value),{...P?{disabled:v.disabled||e.disabled}:{},...e.progressive?{required:!!v.required,min:pt(v.min),max:pt(v.max),minLength:pt(v.minLength),maxLength:pt(v.maxLength),pattern:pt(v.pattern)}:{},name:f,onChange:A,onBlur:A,ref:$=>{if($){me(f,v),N=V(s,f);const C=fe($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,K=Jn(C),le=N._f.refs||[];if(K?le.find(ce=>ce===C):C===N._f.ref)return;oe(s,f,{_f:{...N._f,...K?{refs:[...le.filter(ir),C,...Array.isArray(V(a,f))?[{}]:[]],ref:{type:C.type,name:f}}:{ref:C}}}),z(f,!1,void 0,C)}else N=V(s,f,{}),N._f&&(N._f.mount=!1),(e.shouldUnregister||v.shouldUnregister)&&!(es(l.array,f)&&o.action)&&l.unMount.add(f)}}},we=()=>e.shouldFocusError&&ht(s,p,l.mount),se=f=>{Se(f)&&(h.state.next({disabled:f}),ht(s,(v,N)=>{const P=V(s,N);P&&(v.disabled=P._f.disabled||f,Array.isArray(P._f.refs)&&P._f.refs.forEach($=>{$.disabled=P._f.disabled||f}))},0,!1))},pe=(f,v)=>async N=>{let P;N&&(N.preventDefault&&N.preventDefault(),N.persist&&N.persist());let $=ve(n);if(h.state.next({isSubmitting:!0}),e.resolver){const{errors:C,values:K}=await W();t.errors=C,$=K}else await M(s);if(l.disabled.size)for(const C of l.disabled)oe($,C,void 0);if(be(t.errors,"root"),ke(t.errors)){h.state.next({errors:{}});try{await f($,N)}catch(C){P=C}}else v&&await v({...t.errors},N),we(),setTimeout(we);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ke(t.errors)&&!P,submitCount:t.submitCount+1,errors:t.errors}),P)throw P},$e=(f,v={})=>{V(s,f)&&(fe(v.defaultValue)?X(f,ve(V(a,f))):(X(f,v.defaultValue),oe(a,f,ve(v.defaultValue))),v.keepTouched||be(t.touchedFields,f),v.keepDirty||(be(t.dirtyFields,f),t.isDirty=v.defaultValue?Z(f,ve(V(a,f))):Z()),v.keepError||(be(t.errors,f),u.isValid&&k()),h.state.next({...t}))},he=(f,v={})=>{const N=f?ve(f):a,P=ve(N),$=ke(f),C=$?a:P;if(v.keepDefaultValues||(a=N),!v.keepValues){if(v.keepDirtyValues){const K=new Set([...l.mount,...Object.keys(ft(a,n))]);for(const le of Array.from(K))V(t.dirtyFields,le)?oe(C,le,V(n,le)):X(le,V(C,le))}else{if(er&&fe(f))for(const K of l.mount){const le=V(s,K);if(le&&le._f){const ce=Array.isArray(le._f.refs)?le._f.refs[0]:le._f.ref;if(Nt(ce)){const Fe=ce.closest("form");if(Fe){Fe.reset();break}}}}for(const K of l.mount)X(K,V(C,K))}n=ve(C),h.array.next({values:{...C}}),h.state.next({values:{...C}})}l={mount:v.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!v.keepIsValid||!!v.keepDirtyValues,o.watch=!!e.shouldUnregister,h.state.next({submitCount:v.keepSubmitCount?t.submitCount:0,isDirty:$?!1:v.keepDirty?t.isDirty:!!(v.keepDefaultValues&&!Ze(f,a)),isSubmitted:v.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:$?{}:v.keepDirtyValues?v.keepDefaultValues&&n?ft(a,n):t.dirtyFields:v.keepDefaultValues&&f?ft(a,f):v.keepDirty?t.dirtyFields:{},touchedFields:v.keepTouched?t.touchedFields:{},errors:v.keepErrors?t.errors:{},isSubmitSuccessful:v.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},ze=(f,v)=>he(Ce(f)?f(n):f,v),vt=(f,v={})=>{const N=V(s,f),P=N&&N._f;if(P){const $=P.refs?P.refs[0]:P.ref;$.focus&&($.focus(),v.shouldSelect&&Ce($.select)&&$.select())}},Sr=f=>{t={...t,...f}},xt={control:{register:me,unregister:ne,getFieldState:j,handleSubmit:pe,setError:L,_subscribe:ae,_runSchema:W,_getWatch:D,_getDirty:Z,_setValid:k,_setFieldArray:y,_setDisabledField:ie,_setErrors:T,_getFieldArray:H,_reset:he,_resetDefaultValues:()=>Ce(e.defaultValues)&&e.defaultValues().then(f=>{ze(f,e.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:Q,_disableForm:se,_subjects:h,_proxyFormState:u,get _fields(){return s},get _formValues(){return n},get _state(){return o},set _state(f){o=f},get _defaultValues(){return a},get _names(){return l},set _names(f){l=f},get _formState(){return t},get _options(){return e},set _options(f){e={...e,...f}}},subscribe:de,trigger:q,register:me,handleSubmit:pe,watch:ee,setValue:X,getValues:E,reset:ze,resetField:$e,clearErrors:O,unregister:ne,setError:L,setFocus:vt,getFieldState:j};return{...xt,formControl:xt}}function fo(r={}){const e=x.useRef(void 0),t=x.useRef(void 0),[s,a]=x.useState({isDirty:!1,isValidating:!1,isLoading:Ce(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:Ce(r.defaultValues)?void 0:r.defaultValues});e.current||(e.current={...r.formControl?r.formControl:uo(r),formState:s},r.formControl&&r.defaultValues&&!Ce(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const n=e.current.control;return n._options=r,rr(()=>{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]),x.useEffect(()=>n._disableForm(r.disabled),[n,r.disabled]),x.useEffect(()=>{r.mode&&(n._options.mode=r.mode),r.reValidateMode&&(n._options.reValidateMode=r.reValidateMode),r.errors&&!ke(r.errors)&&n._setErrors(r.errors)},[n,r.errors,r.mode,r.reValidateMode]),x.useEffect(()=>{r.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,r.shouldUnregister]),x.useEffect(()=>{if(n._proxyFormState.isDirty){const o=n._getDirty();o!==s.isDirty&&n._subjects.state.next({isDirty:o})}},[n,s.isDirty]),x.useEffect(()=>{r.values&&!Ze(r.values,t.current)?(n._reset(r.values,n._options.resetOptions),t.current=r.values,a(o=>({...o}))):n._resetDefaultValues()},[n,r.values]),x.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()}),e.current.formState=ss(s,n),e.current}const Es={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},po={sm:"h-6",md:"h-10",lg:"h-12"},ho={sm:"px-2",md:"px-2.5",lg:"px-3"};function Ns(r,e,t,s,a,n,o){const l=e?"datetime-local":"date",c=I("box-border w-full rounded-lg border outline-none transition font-[var(--font-primary)]",Es[t],po[t],ho[t],n?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]"),m=Gn(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 Ss(r){const{control:e,name:t,rules:s,defaultValue:a,showTime:n=!1,size:o="sm",width:l="100%",label:c,labelHidden:d=!1,hasError:u=!1,errorMessage:m="",disabled:h=!1,className:w,onChange:g}=r,k=x.useId(),S=t||k;return i.jsxs("div",{className:I("flex flex-col",w),style:{width:l,maxWidth:"100%"},children:[c&&i.jsx("label",{htmlFor:S,className:I("pb-2 text-[var(--color-ds-text-primary)]",Es[o],d&&"sr-only"),children:c}),e&&t?i.jsx(_e,{name:t,control:e,rules:s,defaultValue:a,render:({field:y,fieldState:b})=>Ns(S,n,o,{value:y.value,onChange:y.onChange,onBlur:y.onBlur},h,b.error,w)}):Ns(S,n,o,{defaultValue:a,onChange:g},h,u?{message:m}:void 0,w)]})}const mo=({trigger:r,items:e,align:t="left",className:s})=>{const[a,n]=x.useState(!1),o=x.useRef(null),l=x.useRef([]);x.useEffect(()=>{const d=u=>{o.current&&!o.current.contains(u.target)&&n(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]);const c=d=>{var m,h;const u=l.current.findIndex(w=>w===document.activeElement);if(d.key==="Escape")n(!1);else if(d.key==="ArrowDown"){d.preventDefault();const w=(u+1)%e.length;(m=l.current[w])==null||m.focus()}else if(d.key==="ArrowUp"){d.preventDefault();const w=(u-1+e.length)%e.length;(h=l.current[w])==null||h.focus()}};return i.jsxs("div",{className:I("relative inline-block",s),ref:o,children:[i.jsx("button",{type:"button",onClick:()=>n(d=>!d),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:I("absolute mt-2 min-w-[160px] bg-[var(--color-ds-background-page)]","border border-[var(--color-ds-border-muted)] rounded shadow-lg z-10",t==="right"?"right-0":"left-0"),onKeyDown:c,children:e.map((d,u)=>{const{label:m,onSelect:h,disabled:w,icon:g}=d;return i.jsxs("button",{role:"menuitem",type:"button",disabled:w,ref:k=>{l.current[u]=k},className:I("w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",w?"opacity-50 cursor-not-allowed":"hover:bg-[var(--color-ds-background-surface)]"),onClick:()=>{w||(h(),n(!1))},children:[g&&i.jsx(g,{className:"w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]"}),m]},u)})})]})},go=(r,e,t,s)=>{var n,o,l,c;const a=[t,{code:e,...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);He(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)},_s={},lr=(r,e,t,s)=>{He(t)&&_s[t]||(He(t)&&(_s[t]=new Date),go(r,e,t,s))},Fs=(r,e)=>()=>{if(r.isInitialized)e();else{const t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},cr=(r,e,t)=>{r.loadNamespaces(e,Fs(r,t))},Ts=(r,e,t,s)=>{if(He(t)&&(t=[t]),r.options.preload&&r.options.preload.indexOf(e)>-1)return cr(r,t,s);t.forEach(a=>{r.options.ns.indexOf(a)<0&&r.options.ns.push(a)}),r.loadLanguages(e,Fs(r,s))},bo=(r,e,t={})=>!e.languages||!e.languages.length?(lr(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(s,a)=>{var n;if(((n=t.bindI18n)==null?void 0:n.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!a(s.isLanguageChangingTo,r))return!1}}),He=r=>typeof r=="string",vo=r=>typeof r=="object"&&r!==null,xo=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,wo={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},yo=r=>wo[r];let ko={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:r=>r.replace(xo,yo)};const jo=()=>ko;let Eo;const No=()=>Eo,So=x.createContext();class _o{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Fo=(r,e)=>{const t=x.useRef();return x.useEffect(()=>{t.current=r},[r,e]),t.current},Cs=(r,e,t,s)=>r.getFixedT(e,t,s),To=(r,e,t,s)=>x.useCallback(Cs(r,e,t,s),[r,e,t,s]),dr=(r,e={})=>{var z,F,B,W;const{i18n:t}=e,{i18n:s,defaultNS:a}=x.useContext(So)||{},n=t||s||No();if(n&&!n.reportNamespaces&&(n.reportNamespaces=new _o),!n){lr(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const _=(Q,Z)=>He(Z)?Z:vo(Z)&&He(Z.defaultValue)?Z.defaultValue:Array.isArray(Q)?Q[Q.length-1]:Q,M=[_,{},!1];return M.t=_,M.i18n={},M.ready=!1,M}(z=n.options.react)!=null&&z.wait&&lr(n,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...jo(),...n.options.react,...e},{useSuspense:l,keyPrefix:c}=o;let d=a||((F=n.options)==null?void 0:F.defaultNS);d=He(d)?[d]:d||["translation"],(W=(B=n.reportNamespaces).addUsedNamespaces)==null||W.call(B,d);const u=(n.isInitialized||n.initializedStoreOnce)&&d.every(_=>bo(_,n,o)),m=To(n,e.lng||null,o.nsMode==="fallback"?d:d[0],c),h=()=>m,w=()=>Cs(n,e.lng||null,o.nsMode==="fallback"?d:d[0],c),[g,k]=x.useState(h);let S=d.join();e.lng&&(S=`${e.lng}${S}`);const y=Fo(S),b=x.useRef(!0);x.useEffect(()=>{const{bindI18n:_,bindI18nStore:M}=o;b.current=!0,!u&&!l&&(e.lng?Ts(n,e.lng,d,()=>{b.current&&k(w)}):cr(n,d,()=>{b.current&&k(w)})),u&&y&&y!==S&&b.current&&k(w);const Q=()=>{b.current&&k(w)};return _&&(n==null||n.on(_,Q)),M&&(n==null||n.store.on(M,Q)),()=>{b.current=!1,n&&(_==null||_.split(" ").forEach(Z=>n.off(Z,Q))),M&&n&&M.split(" ").forEach(Z=>n.store.off(Z,Q))}},[n,S]),x.useEffect(()=>{b.current&&u&&k(h)},[n,c,u]);const T=[g,n,u];if(T.t=g,T.i18n=n,T.ready=u,u||!u&&!l)return T;throw new Promise(_=>{e.lng?Ts(n,e.lng,d,()=>_()):cr(n,d,()=>_())})},ur={sm:"text-sm",md:"text-base",lg:"text-lg"};function As(r,e,t,s,a,n,o,l,c){const{t:d}=dr(),u=x.useRef(null),m=typeof s=="number"&&e.length>=s,h=()=>{var b;!o&&!m&&((b=u.current)==null||b.click())},w=b=>{const T=b.target.files;if(!T)return;const z=Array.from(T);let F=e.concat(z);s&&(F=F.slice(0,s)),t(F),b.target.value=""},g=b=>{if(b.preventDefault(),o||m)return;const T=Array.from(b.dataTransfer.files);let z=e.concat(T);s&&(z=z.slice(0,s)),t(z)},k=b=>{b.preventDefault()},S=b=>{const T=URL.createObjectURL(b);window.open(T)},y=b=>{const T=e.filter((z,F)=>F!==b);t(T)};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"self-start mb-4 w-auto",children:i.jsx(De,{type:"button",variant:"outline",size:n,icon:zr,onClick:h,disabled:o||m,children:d("ds.fileUploader.browse","Browse files")})}),!m&&i.jsxs("div",{className:I("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)]",ur[n],c),onDrop:g,onDragOver:k,children:[i.jsx("input",{id:r,type:"file",ref:u,className:"hidden",multiple:s!==1,accept:a,onChange:w,disabled:o}),i.jsx(Oe,{component:Qa,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:d("ds.fileUploader.dragDrop","Drag & drop your files here or click to browse")})]}),e.length>0&&i.jsx("ul",{className:"mt-4 space-y-1",children:e.map((b,T)=>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(zr,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),i.jsx("span",{className:"truncate pr-2",children:b.name})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(De,{variant:"ghost",size:"sm",icon:Dr,ariaLabel:d("ds.fileUploader.view","View"),onClick:()=>S(b)}),i.jsx(De,{variant:"ghost",size:"sm",icon:qt,ariaLabel:d("ds.fileUploader.remove","Remove"),onClick:()=>y(T)})]})]},T))}),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 Os(r){const{control:e,name:t,rules:s,defaultValue:a,maxFiles:n,accept:o,size:l="sm",width:c="100%",label:d,labelHidden:u=!1,disabled:m=!1,hasError:h=!1,errorMessage:w="",className:g}=r,k=x.useId(),S=t||k;if(e&&t)return i.jsxs("div",{className:I("flex flex-col",g),style:{width:c},children:[d&&i.jsx("label",{htmlFor:S,className:I("pb-[10px] text-[var(--color-ds-text-primary)]",ur[l],u&&"sr-only"),children:d}),i.jsx(_e,{name:t,control:e,rules:s,defaultValue:a instanceof FileList?Array.from(a):a||[],render:({field:T,fieldState:z})=>As(S,T.value,F=>T.onChange(F),n,o,l,m,z.error,g)})]});const[y,b]=x.useState(a instanceof FileList?Array.from(a):a||[]);return i.jsxs("div",{className:I("flex flex-col",g),style:{width:c},children:[d&&i.jsx("label",{htmlFor:S,className:I("pb-[10px] text-[var(--color-ds-text-primary)]",ur[l],u&&"sr-only"),children:d}),As(S,y,b,n,o,l,m,h?{message:w}:void 0,g)]})}const Xe=({count:r=1,width:e,height:t="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:I("bg-[var(--color-ds-border-muted)] animate-pulse inline-block",s==="circle"?"rounded-full":"rounded",a),style:{width:e??"auto",height:t}},l))})},Tt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Co={sm:"h-6",md:"h-10",lg:"h-12"},Ao={sm:"px-2",md:"px-2.5",lg:"px-3"},Ms={sm:"pl-2",md:"pl-2.5",lg:"pl-3"},Oo={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Ct({id:r,type:e="text",size:t="sm",width:s="100%",label:a,labelHidden:n=!1,hasError:o=!1,errorMessage:l="",prefixIcon:c,suffixIcon:d,separator:u,suffixButton:m,disabled:h=!1,control:w,name:g,rules:k,defaultValue:S,reserveErrorSpace:y,disableErrorPlaceholder:b,loading:T=!1,className:z,...F}){const B=x.useId(),[W,_]=x.useState(!1),M=r||B,Q=e==="password",D=c??(e==="number"?nn:void 0),H=Q?W?rn:Dr:d,J=typeof y=="boolean"?y:typeof b=="boolean"?!b:!!w,G=I("box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",Tt[t],Co[t],Ao[t],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 T?i.jsxs("div",{className:"flex flex-col",style:{width:s,maxWidth:"100%"},children:[!n&&a&&i.jsx("label",{htmlFor:M,className:I("pb-2",Tt[t]),children:a}),i.jsx(Xe,{width:"100%",height:Oo[t],variant:"rect",className:"rounded-lg"}),i.jsx("div",{className:"min-h-[18px] w-full",children:i.jsx("span",{"aria-hidden":"true",children:" "})})]}):w&&g?i.jsx(_e,{name:g,control:w,rules:k,defaultValue:S,render:({field:X,fieldState:A})=>i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!n&&a&&i.jsx("label",{htmlFor:M,className:I("pb-2 text-[var(--color-ds-text-primary)]",Tt[t]),children:a}),i.jsxs("div",{className:"relative flex items-center w-full",children:[D&&i.jsx("div",{className:I("absolute left-0 flex items-center h-full",Ms[t]),children:i.jsx(Oe,{component:D,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...X,id:M,type:Q?W?"text":"password":e,disabled:h,"aria-invalid":!!A.error,className:I(G,D&&"pl-9",H&&"pr-9",z),onInvalid:p=>p.preventDefault(),style:Q&&!W?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),u&&i.jsx("div",{className:"flex items-center h-full",children:u}),m&&i.jsx("div",{className:"flex items-center h-full pr-2",children:m}),H&&i.jsx("button",{type:"button",onClick:()=>_(p=>!p),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Oe,{component:H,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),J?i.jsx("div",{className:"min-h-[18px]",children:A.error?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:A.error.message}):i.jsx("span",{"aria-hidden":"true",children:" "})}):A.error?i.jsx("div",{className:"pt-1",children:i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:A.error.message})}):null]})}):i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!n&&a&&i.jsx("label",{htmlFor:M,className:I("pb-2 text-[var(--color-ds-text-primary)]",Tt[t]),children:a}),i.jsxs("div",{className:"relative flex items-center w-full",children:[D&&i.jsx("div",{className:I("absolute left-0 flex items-center h-full",Ms[t]),children:i.jsx(Oe,{component:D,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...F,id:M,type:Q?W?"text":"password":e,disabled:h,"aria-invalid":o,className:I(G,D&&"pl-9",H&&"pr-9",z),onInvalid:X=>X.preventDefault(),style:Q&&!W?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),u&&i.jsx("div",{className:"flex items-center h-full",children:u}),m&&i.jsx("div",{className:"flex items-center h-full",children:m}),H&&i.jsx("button",{type:"button",onClick:()=>_(X=>!X),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Oe,{component:H,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),J?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:" "})}):o&&l?i.jsx("div",{className:"pt-1",children:i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l})}):null]})}const Mo={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},fr=400,At=8,Vs=({children:r,size:e="sm",position:t="top",className:s})=>{const[a,n]=x.useState(!1),[o,l]=x.useState({x:0,y:0}),c=x.useRef(null),d=x.useId();x.useEffect(()=>{if(a&&c.current){const h=c.current.getBoundingClientRect();let w=0,g=0;switch(t){case"top":w=h.left+h.width/2-fr/2,g=h.top-At;break;case"bottom":w=h.left+h.width/2-fr/2,g=h.bottom+At;break;case"left":w=h.left-fr-At,g=h.top+h.height/2;break;case"right":w=h.right+At,g=h.top+h.height/2;break}l({x:w,y:g})}},[a,t]);const u=()=>typeof r=="string"?i.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):i.jsx(i.Fragment,{children:r}),m=a?i.jsx("div",{id:d,role:"tooltip",className:I("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:t==="left"||t==="right"?"translateY(-50%)":t==="top"?"translateY(-100%)":void 0},children:u()}):null;return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button","aria-describedby":d,ref:c,className:I("inline-flex items-center justify-center focus:outline-none",Mo[e],"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(ln,{className:"w-full h-full"})}),Cr.createPortal(m,document.body)]})};function Vo({name:r,label:e,type:t="text",size:s="sm",width:a,placeholder:n,validation:o,loadingDefaults:l,disabled:c,info:d}){var S;const{control:u,formState:{errors:m}}=dt(),h=!!m[r],w=((S=m[r])==null?void 0:S.message)||"",g="relative",k=a??"w-full";return i.jsxs("div",{className:g,children:[i.jsx(_e,{name:r,control:u,rules:o,render:({field:y})=>i.jsx(Ct,{label:e,size:s,width:k,placeholder:n,hasError:h,errorMessage:w,loading:l,type:t,...y,disabled:c,reserveErrorSpace:!0})}),d&&i.jsx(Vs,{size:s,position:"left",className:"absolute top-1/2 right-2 -translate-y-1/2",children:d})]})}const pr=x.memo(Vo);pr.displayName="FormFieldInput";function $o({title:r,headerButtons:e,children:t,className:s}){return i.jsxs("div",{className:I("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}),e&&i.jsx("div",{className:"flex items-center space-x-2",children:e})]}),i.jsx("main",{className:"flex-1 overflow-auto",children:t})]})}const $s=(r,e,t)=>{if(r&&"reportValidity"in r){const s=M(t,e);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},zs=(r,e)=>{for(const t in e.fields){const s=e.fields[t];s&&s.ref&&"reportValidity"in s.ref?$s(s.ref,t,r):s&&s.refs&&s.refs.forEach(a=>$s(a,t,r))}},zo=(r,e)=>{e.shouldUseNativeValidation&&zs(r,e);const t={};for(const s in r){const a=M(e.fields,s),n=Object.assign(r[s]||{},{ref:a&&a.ref});if(Do(e.names||Object.keys(r),s)){const o=Object.assign({},M(t,s));oe(o,"root",n),oe(t,s,o)}else oe(t,s,n)}return t},Do=(r,e)=>{const t=Ds(e);return r.some(s=>Ds(s).match(`^${t}\\.\\d+`))};function Ds(r){return r.replace(/\]|\[/g,"")}function Io(r,e,t){return t===void 0&&(t={}),function(s,a,n){try{return Promise.resolve(function(o,l){try{var c=(e!=null&&e.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[t.mode==="sync"?"validateSync":"validate"](s,Object.assign({abortEarly:!1},e,{context:a}))).then(function(d){return n.shouldUseNativeValidation&&zs({},n),{values:t.raw?Object.assign({},s):d,errors:{}}}))}catch(d){return l(d)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:zo((l=o,c=!n.shouldUseNativeValidation&&n.criteriaMode==="all",(l.inner||[]).reduce(function(d,u){if(d[u.path]||(d[u.path]={message:u.message,type:u.type}),c){var m=d[u.path].types,h=m&&m[u.type];d[u.path]=os(u.path,c,d,u.type,h?[].concat(h,u.message):u.message)}return d},{})),n)};var l,c}))}catch(o){return Promise.reject(o)}}}var hr,Is;function Lo(){if(Is)return hr;Is=1;function r(y){this._maxSize=y,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(y){return this._values[y]},r.prototype.set=function(y,b){return this._size>=this._maxSize&&this.clear(),y in this._values||this._size++,this._values[y]=b};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,t=/^\d+$/,s=/^\d/,a=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,n=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,l=new r(o),c=new r(o),d=new r(o);hr={Cache:r,split:m,normalizePath:u,setter:function(y){var b=u(y);return c.get(y)||c.set(y,function(V,F){for(var R=0,Y=b.length,S=V;R<Y-1;){var D=b[R];if(D==="__proto__"||D==="constructor"||D==="prototype")return V;S=S[b[R++]]}S[b[R]]=F})},getter:function(y,b){var T=u(y);return d.get(y)||d.set(y,function(F){for(var R=0,Y=T.length;R<Y;)if(F!=null||!b)F=F[T[R++]];else return;return F})},join:function(y){return y.reduce(function(b,T){return b+(w(T)||t.test(T)?"["+T+"]":(b?".":"")+T)},"")},forEach:function(y,b,T){h(Array.isArray(y)?y:m(y),b,T)}};function u(y){return l.get(y)||l.set(y,m(y).map(function(b){return b.replace(n,"$2")}))}function m(y){return y.match(e)||[""]}function h(y,b,T){var V=y.length,F,R,Y,S;for(R=0;R<V;R++)F=y[R],F&&(_(F)&&(F='"'+F+'"'),S=w(F),Y=!S&&/^\d+$/.test(F),b.call(T,F,S,Y,R,y))}function w(y){return typeof y=="string"&&y&&["'",'"'].indexOf(y.charAt(0))!==-1}function g(y){return y.match(s)&&!y.match(t)}function k(y){return a.test(y)}function _(y){return!w(y)&&(g(y)||k(y))}return hr}var Ke=Lo(),mr,Ls;function Po(){if(Ls)return mr;Ls=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,e=u=>u.match(r)||[],t=u=>u[0].toUpperCase()+u.slice(1),s=(u,m)=>e(u).join(m).toLowerCase(),a=u=>e(u).reduce((m,h)=>`${m}${m?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return mr={words:e,upperFirst:t,camelCase:a,pascalCase:u=>t(a(u)),snakeCase:u=>s(u,"_"),kebabCase:u=>s(u,"-"),sentenceCase:u=>t(s(u," ")),titleCase:u=>e(u).map(t).join(" ")},mr}var gr=Po(),Ot={exports:{}},Ps;function Ro(){if(Ps)return Ot.exports;Ps=1,Ot.exports=function(a){return r(e(a),a)},Ot.exports.array=r;function r(a,n){var o=a.length,l=new Array(o),c={},d=o,u=t(n),m=s(a);for(n.forEach(function(w){if(!m.has(w[0])||!m.has(w[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)c[d]||h(a[d],d,new Set);return l;function h(w,g,k){if(k.has(w)){var _;try{_=", node was:"+JSON.stringify(w)}catch{_=""}throw new Error("Cyclic dependency"+_)}if(!m.has(w))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(w));if(!c[g]){c[g]=!0;var y=u.get(w)||new Set;if(y=Array.from(y),g=y.length){k.add(w);do{var b=y[--g];h(b,m.get(b),k)}while(g);k.delete(w)}l[--o]=w}}}function e(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 t(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 Ot.exports}var Uo=Ro();const Bo=$a(Uo),Zo=Object.prototype.toString,Wo=Error.prototype.toString,qo=RegExp.prototype.toString,Go=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Yo=/^Symbol\((.*)\)(.*)$/;function Ho(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function Rs(r,e=!1){if(r==null||r===!0||r===!1)return""+r;const t=typeof r;if(t==="number")return Ho(r);if(t==="string")return e?`"${r}"`:r;if(t==="function")return"[Function "+(r.name||"anonymous")+"]";if(t==="symbol")return Go.call(r).replace(Yo,"Symbol($1)");const s=Zo.call(r).slice(8,-1);return s==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):s==="Error"||r instanceof Error?"["+Wo.call(r)+"]":s==="RegExp"?qo.call(r):null}function Pe(r,e){let t=Rs(r,e);return t!==null?t:JSON.stringify(r,function(s,a){let n=Rs(this[s],e);return n!==null?n:a},2)}function Us(r){return r==null?[]:[].concat(r)}let Bs,Zs,Ws,Xo=/\$\{\s*(\w+)\s*\}/g;Bs=Symbol.toStringTag;class qs{constructor(e,t,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[Bs]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=a,this.errors=[],this.inner=[],Us(e).forEach(n=>{if(je.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]}}Zs=Symbol.hasInstance,Ws=Symbol.toStringTag;class je extends Error{static formatError(e,t){const s=t.label||t.path||"this";return t=Object.assign({},t,{path:s,originalPath:t.path}),typeof e=="string"?e.replace(Xo,(a,n)=>Pe(t[n])):typeof e=="function"?e(t):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,t,s,a,n){const o=new qs(e,t,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,je)}static[Zs](e){return qs[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Ve={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:e,value:t,originalValue:s})=>{const a=s!=null&&s!==t?` (cast from the value \`${Pe(s,!0)}\`).`:".";return e!=="mixed"?`${r} must be a \`${e}\` type, but the final value was: \`${Pe(t,!0)}\``+a:`${r} must match the configured type. The validated value was: \`${Pe(t,!0)}\``+a}},Ee={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"},We={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"},br={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},vr={isValue:"${path} field must be ${value}"},Mt={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Vt={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:Ve,string:Ee,number:We,date:br,object:Mt,array:Vt,boolean:vr,tuple:{notType:r=>{const{path:e,value:t,spec:s}=r,a=s.types.length;if(Array.isArray(t)){if(t.length<a)return`${e} tuple value has too few items, expected a length of ${a} but got ${t.length} for value: \`${Pe(t,!0)}\``;if(t.length>a)return`${e} tuple value has too many items, expected a length of ${a} but got ${t.length} for value: \`${Pe(t,!0)}\``}return je.formatError(Ve.notType,r)}}});const $t=r=>r&&r.__isYupSchema__;class zt{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:a,otherwise:n}=t,o=typeof s=="function"?s:(...l)=>l.every(c=>c===s);return new zt(e,(l,c)=>{var d;let u=o(...l)?a:n;return(d=u==null?void 0:u(c))!=null?d:c})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let s=this.refs.map(n=>n.getValue(t==null?void 0:t.value,t==null?void 0:t.parent,t==null?void 0:t.context)),a=this.fn(s,e,t);if(a===void 0||a===e)return e;if(!$t(a))throw new TypeError("conditions must return a schema object");return a.resolve(t)}}const Dt={context:"$",value:"."};class Je{constructor(e,t={}){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 e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Dt.context,this.isValue=this.key[0]===Dt.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?Dt.context:this.isValue?Dt.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&Ke.getter(this.path,!0),this.map=t.map}getValue(e,t,s){let a=this.isContext?s:this.isValue?e:t;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(e,t){return this.getValue(e,t==null?void 0:t.parent,t==null?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Je.prototype.__isYupRef=!0;const Ae=r=>r==null;function st(r){function e({value:t,path:s="",options:a,originalValue:n,schema:o},l,c){const{name:d,test:u,params:m,message:h,skipAbsent:w}=r;let{parent:g,context:k,abortEarly:_=o.spec.abortEarly,disableStackTrace:y=o.spec.disableStackTrace}=a;function b(Z){return Je.isRef(Z)?Z.getValue(t,g,k):Z}function T(Z={}){const z=Object.assign({value:t,originalValue:n,label:o.spec.label,path:Z.path||s,spec:o.spec,disableStackTrace:Z.disableStackTrace||y},m,Z.params);for(const J of Object.keys(z))z[J]=b(z[J]);const H=new je(je.formatError(Z.message||h,z),t,z.path,Z.type||d,z.disableStackTrace);return H.params=z,H}const V=_?l:c;let F={path:s,parent:g,type:d,from:a.from,createError:T,resolve:b,options:a,originalValue:n,schema:o};const R=Z=>{je.isError(Z)?V(Z):Z?c(null):V(T())},Y=Z=>{je.isError(Z)?V(Z):l(Z)};if(w&&Ae(t))return R(!0);let D;try{var Q;if(D=u.call(F,t,F),typeof((Q=D)==null?void 0:Q.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${F.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(D).then(R,Y)}}catch(Z){Y(Z);return}R(D)}return e.OPTIONS=r,e}function Ko(r,e,t,s=t){let a,n,o;return e?(Ke.forEach(e,(l,c,d)=>{let u=c?l.slice(1,l.length-1):l;r=r.resolve({context:s,parent:a,value:t});let m=r.type==="tuple",h=d?parseInt(u,10):0;if(r.innerType||m){if(m&&!d)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(t&&h>=t.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${e}. because there is no value at that index. `);a=t,t=t&&t[h],r=m?r.spec.types[h]:r.innerType}if(!d){if(!r.fields||!r.fields[u])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${o} which is a type: "${r.type}")`);a=t,t=t&&t[u],r=r.fields[u]}n=u,o=c?"["+l+"]":"."+l}),{schema:r,parent:a,parentPath:n}):{parent:a,parentPath:e,schema:r}}class It extends Set{describe(){const e=[];for(const t of this.values())e.push(Je.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const s of this.values())t.push(e(s));return t}clone(){return new It(this.values())}merge(e,t){const s=this.clone();return e.forEach(a=>s.add(a)),t.forEach(a=>s.delete(a)),s}}function at(r,e=new Map){if($t(r)||!r||typeof r!="object")return r;if(e.has(r))return e.get(r);let t;if(r instanceof Date)t=new Date(r.getTime()),e.set(r,t);else if(r instanceof RegExp)t=new RegExp(r),e.set(r,t);else if(Array.isArray(r)){t=new Array(r.length),e.set(r,t);for(let s=0;s<r.length;s++)t[s]=at(r[s],e)}else if(r instanceof Map){t=new Map,e.set(r,t);for(const[s,a]of r.entries())t.set(s,at(a,e))}else if(r instanceof Set){t=new Set,e.set(r,t);for(const s of r)t.add(at(s,e))}else if(r instanceof Object){t={},e.set(r,t);for(const[s,a]of Object.entries(r))t[s]=at(a,e)}else throw Error(`Unable to clone ${r}`);return t}class Ne{constructor(e){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 It,this._blacklist=new It,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ve.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(t=>{t.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=at(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(e.length===0)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let s=e(this);return this._mutate=t,s}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,s=e.clone();const a=Object.assign({},t.spec,s.spec);return s.spec=a,s.internalTests=Object.assign({},t.internalTests,s.internalTests),s._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),s._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),s.tests=t.tests,s.exclusiveTests=t.exclusiveTests,s.withMutation(n=>{e.tests.forEach(o=>{n.test(o.OPTIONS)})}),s.transforms=[...t.transforms,...s.transforms],s}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let s=t.conditions;t=t.clone(),t.conditions=[],t=s.reduce((a,n)=>n.resolve(a,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,a,n;return Object.assign({},e,{from:e.from||[],strict:(t=e.strict)!=null?t:this.spec.strict,abortEarly:(s=e.abortEarly)!=null?s:this.spec.abortEarly,recursive:(a=e.recursive)!=null?a:this.spec.recursive,disableStackTrace:(n=e.disableStackTrace)!=null?n:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),a=t.assert==="ignore-optionality",n=s._cast(e,t);if(t.assert!==!1&&!s.isType(n)){if(a&&Ae(n))return n;let o=Pe(e),l=Pe(n);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}".
|
|
27
|
+
text-ds-lg`,children:r}),e&&i.jsx("div",{className:"flex items-center space-x-2",children:e})]}),i.jsx("main",{className:"flex-1 overflow-auto",children:t})]})}const $s=(r,e,t)=>{if(r&&"reportValidity"in r){const s=V(t,e);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},zs=(r,e)=>{for(const t in e.fields){const s=e.fields[t];s&&s.ref&&"reportValidity"in s.ref?$s(s.ref,t,r):s&&s.refs&&s.refs.forEach(a=>$s(a,t,r))}},zo=(r,e)=>{e.shouldUseNativeValidation&&zs(r,e);const t={};for(const s in r){const a=V(e.fields,s),n=Object.assign(r[s]||{},{ref:a&&a.ref});if(Do(e.names||Object.keys(r),s)){const o=Object.assign({},V(t,s));oe(o,"root",n),oe(t,s,o)}else oe(t,s,n)}return t},Do=(r,e)=>{const t=Ds(e);return r.some(s=>Ds(s).match(`^${t}\\.\\d+`))};function Ds(r){return r.replace(/\]|\[/g,"")}function Io(r,e,t){return t===void 0&&(t={}),function(s,a,n){try{return Promise.resolve(function(o,l){try{var c=(e!=null&&e.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[t.mode==="sync"?"validateSync":"validate"](s,Object.assign({abortEarly:!1},e,{context:a}))).then(function(d){return n.shouldUseNativeValidation&&zs({},n),{values:t.raw?Object.assign({},s):d,errors:{}}}))}catch(d){return l(d)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:zo((l=o,c=!n.shouldUseNativeValidation&&n.criteriaMode==="all",(l.inner||[]).reduce(function(d,u){if(d[u.path]||(d[u.path]={message:u.message,type:u.type}),c){var m=d[u.path].types,h=m&&m[u.type];d[u.path]=os(u.path,c,d,u.type,h?[].concat(h,u.message):u.message)}return d},{})),n)};var l,c}))}catch(o){return Promise.reject(o)}}}var hr,Is;function Lo(){if(Is)return hr;Is=1;function r(y){this._maxSize=y,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(y){return this._values[y]},r.prototype.set=function(y,b){return this._size>=this._maxSize&&this.clear(),y in this._values||this._size++,this._values[y]=b};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,t=/^\d+$/,s=/^\d/,a=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,n=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,l=new r(o),c=new r(o),d=new r(o);hr={Cache:r,split:m,normalizePath:u,setter:function(y){var b=u(y);return c.get(y)||c.set(y,function(z,F){for(var B=0,W=b.length,_=z;B<W-1;){var M=b[B];if(M==="__proto__"||M==="constructor"||M==="prototype")return z;_=_[b[B++]]}_[b[B]]=F})},getter:function(y,b){var T=u(y);return d.get(y)||d.set(y,function(F){for(var B=0,W=T.length;B<W;)if(F!=null||!b)F=F[T[B++]];else return;return F})},join:function(y){return y.reduce(function(b,T){return b+(w(T)||t.test(T)?"["+T+"]":(b?".":"")+T)},"")},forEach:function(y,b,T){h(Array.isArray(y)?y:m(y),b,T)}};function u(y){return l.get(y)||l.set(y,m(y).map(function(b){return b.replace(n,"$2")}))}function m(y){return y.match(e)||[""]}function h(y,b,T){var z=y.length,F,B,W,_;for(B=0;B<z;B++)F=y[B],F&&(S(F)&&(F='"'+F+'"'),_=w(F),W=!_&&/^\d+$/.test(F),b.call(T,F,_,W,B,y))}function w(y){return typeof y=="string"&&y&&["'",'"'].indexOf(y.charAt(0))!==-1}function g(y){return y.match(s)&&!y.match(t)}function k(y){return a.test(y)}function S(y){return!w(y)&&(g(y)||k(y))}return hr}var Ke=Lo(),mr,Ls;function Po(){if(Ls)return mr;Ls=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,e=u=>u.match(r)||[],t=u=>u[0].toUpperCase()+u.slice(1),s=(u,m)=>e(u).join(m).toLowerCase(),a=u=>e(u).reduce((m,h)=>`${m}${m?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return mr={words:e,upperFirst:t,camelCase:a,pascalCase:u=>t(a(u)),snakeCase:u=>s(u,"_"),kebabCase:u=>s(u,"-"),sentenceCase:u=>t(s(u," ")),titleCase:u=>e(u).map(t).join(" ")},mr}var gr=Po(),Ot={exports:{}},Ps;function Ro(){if(Ps)return Ot.exports;Ps=1,Ot.exports=function(a){return r(e(a),a)},Ot.exports.array=r;function r(a,n){var o=a.length,l=new Array(o),c={},d=o,u=t(n),m=s(a);for(n.forEach(function(w){if(!m.has(w[0])||!m.has(w[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)c[d]||h(a[d],d,new Set);return l;function h(w,g,k){if(k.has(w)){var S;try{S=", node was:"+JSON.stringify(w)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!m.has(w))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(w));if(!c[g]){c[g]=!0;var y=u.get(w)||new Set;if(y=Array.from(y),g=y.length){k.add(w);do{var b=y[--g];h(b,m.get(b),k)}while(g);k.delete(w)}l[--o]=w}}}function e(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 t(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 Ot.exports}var Uo=Ro();const Bo=$a(Uo),Zo=Object.prototype.toString,Wo=Error.prototype.toString,qo=RegExp.prototype.toString,Go=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Yo=/^Symbol\((.*)\)(.*)$/;function Ho(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function Rs(r,e=!1){if(r==null||r===!0||r===!1)return""+r;const t=typeof r;if(t==="number")return Ho(r);if(t==="string")return e?`"${r}"`:r;if(t==="function")return"[Function "+(r.name||"anonymous")+"]";if(t==="symbol")return Go.call(r).replace(Yo,"Symbol($1)");const s=Zo.call(r).slice(8,-1);return s==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):s==="Error"||r instanceof Error?"["+Wo.call(r)+"]":s==="RegExp"?qo.call(r):null}function Pe(r,e){let t=Rs(r,e);return t!==null?t:JSON.stringify(r,function(s,a){let n=Rs(this[s],e);return n!==null?n:a},2)}function Us(r){return r==null?[]:[].concat(r)}let Bs,Zs,Ws,Xo=/\$\{\s*(\w+)\s*\}/g;Bs=Symbol.toStringTag;class qs{constructor(e,t,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[Bs]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=a,this.errors=[],this.inner=[],Us(e).forEach(n=>{if(je.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]}}Zs=Symbol.hasInstance,Ws=Symbol.toStringTag;class je extends Error{static formatError(e,t){const s=t.label||t.path||"this";return t=Object.assign({},t,{path:s,originalPath:t.path}),typeof e=="string"?e.replace(Xo,(a,n)=>Pe(t[n])):typeof e=="function"?e(t):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,t,s,a,n){const o=new qs(e,t,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,je)}static[Zs](e){return qs[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Ve={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:e,value:t,originalValue:s})=>{const a=s!=null&&s!==t?` (cast from the value \`${Pe(s,!0)}\`).`:".";return e!=="mixed"?`${r} must be a \`${e}\` type, but the final value was: \`${Pe(t,!0)}\``+a:`${r} must match the configured type. The validated value was: \`${Pe(t,!0)}\``+a}},Ee={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"},We={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"},br={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},vr={isValue:"${path} field must be ${value}"},Mt={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Vt={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:Ve,string:Ee,number:We,date:br,object:Mt,array:Vt,boolean:vr,tuple:{notType:r=>{const{path:e,value:t,spec:s}=r,a=s.types.length;if(Array.isArray(t)){if(t.length<a)return`${e} tuple value has too few items, expected a length of ${a} but got ${t.length} for value: \`${Pe(t,!0)}\``;if(t.length>a)return`${e} tuple value has too many items, expected a length of ${a} but got ${t.length} for value: \`${Pe(t,!0)}\``}return je.formatError(Ve.notType,r)}}});const $t=r=>r&&r.__isYupSchema__;class zt{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:a,otherwise:n}=t,o=typeof s=="function"?s:(...l)=>l.every(c=>c===s);return new zt(e,(l,c)=>{var d;let u=o(...l)?a:n;return(d=u==null?void 0:u(c))!=null?d:c})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let s=this.refs.map(n=>n.getValue(t==null?void 0:t.value,t==null?void 0:t.parent,t==null?void 0:t.context)),a=this.fn(s,e,t);if(a===void 0||a===e)return e;if(!$t(a))throw new TypeError("conditions must return a schema object");return a.resolve(t)}}const Dt={context:"$",value:"."};class Je{constructor(e,t={}){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 e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Dt.context,this.isValue=this.key[0]===Dt.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?Dt.context:this.isValue?Dt.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&Ke.getter(this.path,!0),this.map=t.map}getValue(e,t,s){let a=this.isContext?s:this.isValue?e:t;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(e,t){return this.getValue(e,t==null?void 0:t.parent,t==null?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Je.prototype.__isYupRef=!0;const Ae=r=>r==null;function st(r){function e({value:t,path:s="",options:a,originalValue:n,schema:o},l,c){const{name:d,test:u,params:m,message:h,skipAbsent:w}=r;let{parent:g,context:k,abortEarly:S=o.spec.abortEarly,disableStackTrace:y=o.spec.disableStackTrace}=a;function b(Z){return Je.isRef(Z)?Z.getValue(t,g,k):Z}function T(Z={}){const D=Object.assign({value:t,originalValue:n,label:o.spec.label,path:Z.path||s,spec:o.spec,disableStackTrace:Z.disableStackTrace||y},m,Z.params);for(const J of Object.keys(D))D[J]=b(D[J]);const H=new je(je.formatError(Z.message||h,D),t,D.path,Z.type||d,D.disableStackTrace);return H.params=D,H}const z=S?l:c;let F={path:s,parent:g,type:d,from:a.from,createError:T,resolve:b,options:a,originalValue:n,schema:o};const B=Z=>{je.isError(Z)?z(Z):Z?c(null):z(T())},W=Z=>{je.isError(Z)?z(Z):l(Z)};if(w&&Ae(t))return B(!0);let M;try{var Q;if(M=u.call(F,t,F),typeof((Q=M)==null?void 0:Q.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${F.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(M).then(B,W)}}catch(Z){W(Z);return}B(M)}return e.OPTIONS=r,e}function Ko(r,e,t,s=t){let a,n,o;return e?(Ke.forEach(e,(l,c,d)=>{let u=c?l.slice(1,l.length-1):l;r=r.resolve({context:s,parent:a,value:t});let m=r.type==="tuple",h=d?parseInt(u,10):0;if(r.innerType||m){if(m&&!d)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(t&&h>=t.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${e}. because there is no value at that index. `);a=t,t=t&&t[h],r=m?r.spec.types[h]:r.innerType}if(!d){if(!r.fields||!r.fields[u])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${o} which is a type: "${r.type}")`);a=t,t=t&&t[u],r=r.fields[u]}n=u,o=c?"["+l+"]":"."+l}),{schema:r,parent:a,parentPath:n}):{parent:a,parentPath:e,schema:r}}class It extends Set{describe(){const e=[];for(const t of this.values())e.push(Je.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const s of this.values())t.push(e(s));return t}clone(){return new It(this.values())}merge(e,t){const s=this.clone();return e.forEach(a=>s.add(a)),t.forEach(a=>s.delete(a)),s}}function at(r,e=new Map){if($t(r)||!r||typeof r!="object")return r;if(e.has(r))return e.get(r);let t;if(r instanceof Date)t=new Date(r.getTime()),e.set(r,t);else if(r instanceof RegExp)t=new RegExp(r),e.set(r,t);else if(Array.isArray(r)){t=new Array(r.length),e.set(r,t);for(let s=0;s<r.length;s++)t[s]=at(r[s],e)}else if(r instanceof Map){t=new Map,e.set(r,t);for(const[s,a]of r.entries())t.set(s,at(a,e))}else if(r instanceof Set){t=new Set,e.set(r,t);for(const s of r)t.add(at(s,e))}else if(r instanceof Object){t={},e.set(r,t);for(const[s,a]of Object.entries(r))t[s]=at(a,e)}else throw Error(`Unable to clone ${r}`);return t}class Ne{constructor(e){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 It,this._blacklist=new It,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ve.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(t=>{t.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=at(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(e.length===0)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let s=e(this);return this._mutate=t,s}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,s=e.clone();const a=Object.assign({},t.spec,s.spec);return s.spec=a,s.internalTests=Object.assign({},t.internalTests,s.internalTests),s._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),s._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),s.tests=t.tests,s.exclusiveTests=t.exclusiveTests,s.withMutation(n=>{e.tests.forEach(o=>{n.test(o.OPTIONS)})}),s.transforms=[...t.transforms,...s.transforms],s}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let s=t.conditions;t=t.clone(),t.conditions=[],t=s.reduce((a,n)=>n.resolve(a,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,a,n;return Object.assign({},e,{from:e.from||[],strict:(t=e.strict)!=null?t:this.spec.strict,abortEarly:(s=e.abortEarly)!=null?s:this.spec.abortEarly,recursive:(a=e.recursive)!=null?a:this.spec.recursive,disableStackTrace:(n=e.disableStackTrace)!=null?n:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),a=t.assert==="ignore-optionality",n=s._cast(e,t);if(t.assert!==!1&&!s.isType(n)){if(a&&Ae(n))return n;let o=Pe(e),l=Pe(n);throw new TypeError(`The value of ${t.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(e,t){let s=e===void 0?e:this.transforms.reduce((a,n)=>n.call(this,a,e,this),e);return s===void 0&&(s=this.getDefault(t)),s}_validate(e,t={},s,a){let{path:n,originalValue:o=e,strict:l=this.spec.strict}=t,c=e;l||(c=this._cast(c,Object.assign({assert:!1},t)));let d=[];for(let u of Object.values(this.internalTests))u&&d.push(u);this.runTests({path:n,value:c,originalValue:o,options:t,tests:d},s,u=>{if(u.length)return a(u,c);this.runTests({path:n,value:c,originalValue:o,options:t,tests:this.tests},s,a)})}runTests(e,t,s){let a=!1,{tests:n,value:o,originalValue:l,path:c,options:d}=e,u=k=>{a||(a=!0,t(k,o))},m=k=>{a||(a=!0,s(k,o))},h=n.length,w=[];if(!h)return m([]);let g={value:o,originalValue:l,path:c,options:d,schema:this};for(let k=0;k<n.length;k++){const _=n[k];_(g,u,function(b){b&&(Array.isArray(b)?w.push(...b):w.push(b)),--h<=0&&m(w)})}}asNestedTest({key:e,index:t,parent:s,parentPath:a,originalParent:n,options:o}){const l=e??t;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof l=="number";let d=s[l];const u=Object.assign({},o,{strict:!0,parent:s,value:d,originalValue:n[l],key:void 0,[c?"index":"key"]:l,path:c||l.includes(".")?`${a||""}[${c?l:`"${l}"`}]`:(a?`${a}.`:"")+e});return(m,h,w)=>this.resolve(u)._validate(d,u,h,w)}validate(e,t){var s;let a=this.resolve(Object.assign({},t,{value:e})),n=(s=t==null?void 0:t.disableStackTrace)!=null?s:a.spec.disableStackTrace;return new Promise((o,l)=>a._validate(e,t,(c,d)=>{je.isError(c)&&(c.value=d),l(c)},(c,d)=>{c.length?l(new je(c,d,void 0,void 0,n)):o(d)}))}validateSync(e,t){var s;let a=this.resolve(Object.assign({},t,{value:e})),n,o=(s=t==null?void 0:t.disableStackTrace)!=null?s:a.spec.disableStackTrace;return a._validate(e,Object.assign({},t,{sync:!0}),(l,c)=>{throw je.isError(l)&&(l.value=c),l},(l,c)=>{if(l.length)throw new je(l,e,void 0,void 0,o);n=c}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,s=>{if(je.isError(s))return!1;throw s})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(s){if(je.isError(s))return!1;throw s}}_getDefault(e){let t=this.spec.default;return t==null?t:typeof t=="function"?t.call(this,e):at(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const s=this.clone({nullable:e});return s.internalTests.nullable=st({message:t,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),s}optionality(e,t){const s=this.clone({optional:e});return s.internalTests.optionality=st({message:t,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(e=Ve.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Ve.notNull){return this.nullability(!1,e)}required(e=Ve.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(e.length===1?typeof e[0]=="function"?t={test:e[0]}:t=e[0]:e.length===2?t={name:e[0],test:e[1]}:t={name:e[0],message:e[1],test:e[2]},t.message===void 0&&(t.message=Ve.default),typeof t.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),a=st(t),n=t.exclusive||t.name&&s.exclusiveTests[t.name]===!0;if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(s.exclusiveTests[t.name]=!!t.exclusive),s.tests=s.tests.filter(o=>!(o.OPTIONS.name===t.name&&(n||o.OPTIONS.test===a.OPTIONS.test))),s.tests.push(a),s}when(e,t){!Array.isArray(e)&&typeof e!="string"&&(t=e,e=".");let s=this.clone(),a=Us(e).map(n=>new Je(n));return a.forEach(n=>{n.isSibling&&s.deps.push(n.key)}),s.conditions.push(typeof t=="function"?new zt(a,t):zt.fromOptions(a,t)),s}typeError(e){let t=this.clone();return t.internalTests.typeError=st({message:e,name:"typeError",skipAbsent:!0,test(s){return this.schema._typeCheck(s)?!0:this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=Ve.oneOf){let s=this.clone();return e.forEach(a=>{s._whitelist.add(a),s._blacklist.delete(a)}),s.internalTests.whiteList=st({message:t,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(e,t=Ve.notOneOf){let s=this.clone();return e.forEach(a=>{s._blacklist.add(a),s._whitelist.delete(a)}),s.internalTests.blacklist=st({message:t,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(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:s,meta:a,optional:n,nullable:o}=t.spec;return{meta:a,label:s,optional:n,nullable:o,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,d,u)=>u.findIndex(m=>m.name===c.name)===d)}}}Ne.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])Ne.prototype[`${r}At`]=function(e,t,s={}){const{parent:a,parentPath:n,schema:o}=Ko(this,e,t,s.context);return o[r](a&&a[n],Object.assign({},s,{parent:a,path:e}))};for(const r of["equals","is"])Ne.prototype[r]=Ne.prototype.oneOf;for(const r of["not","nope"])Ne.prototype[r]=Ne.prototype.notOneOf;const Jo=()=>!0;function xr(r){return new Gs(r)}class Gs extends Ne{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Jo},e))}}xr.prototype=Gs.prototype;function Ys(){return new Hs}class Hs extends Ne{constructor(){super({type:"boolean",check(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(s.spec.coerce&&!s.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}isTrue(e=vr.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(t){return Ae(t)||t===!0}})}isFalse(e=vr.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(t){return Ae(t)||t===!1}})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}}Ys.prototype=Hs.prototype;const Qo=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ei(r){const e=wr(r);if(!e)return Date.parse?Date.parse(r):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let t=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(t=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(t=0-t)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+t,e.second,e.millisecond)}function wr(r){var e,t;const s=Qo.exec(r);return s?{year:Re(s[1]),month:Re(s[2],1)-1,day:Re(s[3],1),hour:Re(s[4]),minute:Re(s[5]),second:Re(s[6]),millisecond:s[7]?Re(s[7].substring(0,3)):0,precision:(e=(t=s[7])==null?void 0:t.length)!=null?e:void 0,z:s[8]||void 0,plusMinus:s[9]||void 0,hourOffset:Re(s[10]),minuteOffset:Re(s[11])}:null}function Re(r,e=0){return Number(r)||e}let ti=/^[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])?)*$/,ri=/^((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,si=/^(?:[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,ai="^\\d{4}-\\d{2}-\\d{2}",ni="\\d{2}:\\d{2}:\\d{2}",oi="(([+-]\\d{2}(:?\\d{2})?)|Z)",ii=new RegExp(`${ai}T${ni}(\\.\\d+)?${oi}$`),li=r=>Ae(r)||r===r.trim(),ci={}.toString();function nt(){return new Xs}class Xs extends Ne{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(!s.spec.coerce||s.isType(e)||Array.isArray(e))return e;const a=e!=null&&e.toString?e.toString():e;return a===ci?e:a})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||Ve.required,name:"required",skipAbsent:!0,test:s=>!!s.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(t=>t.OPTIONS.name!=="required"),e))}length(e,t=Ee.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(s){return s.length===this.resolve(e)}})}min(e,t=Ee.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s.length>=this.resolve(e)}})}max(e,t=Ee.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(s){return s.length<=this.resolve(e)}})}matches(e,t){let s=!1,a,n;return t&&(typeof t=="object"?{excludeEmptyString:s=!1,message:a,name:n}=t:a=t),this.test({name:n||"matches",message:a||Ee.matches,params:{regex:e},skipAbsent:!0,test:o=>o===""&&s||o.search(e)!==-1})}email(e=Ee.email){return this.matches(ti,{name:"email",message:e,excludeEmptyString:!0})}url(e=Ee.url){return this.matches(ri,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Ee.uuid){return this.matches(si,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t="",s,a;return e&&(typeof e=="object"?{message:t="",allowOffset:s=!1,precision:a=void 0}=e:t=e),this.matches(ii,{name:"datetime",message:t||Ee.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:t||Ee.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:n=>{if(!n||s)return!0;const o=wr(n);return o?!!o.z:!1}}).test({name:"datetime_precision",message:t||Ee.datetime_precision,params:{precision:a},skipAbsent:!0,test:n=>{if(!n||a==null)return!0;const o=wr(n);return o?o.precision===a:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Ee.trim){return this.transform(t=>t!=null?t.trim():t).test({message:e,name:"trim",test:li})}lowercase(e=Ee.lowercase){return this.transform(t=>Ae(t)?t:t.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Ae(t)||t===t.toLowerCase()})}uppercase(e=Ee.uppercase){return this.transform(t=>Ae(t)?t:t.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Ae(t)||t===t.toUpperCase()})}}nt.prototype=Xs.prototype;let di=r=>r!=+r;function Ks(){return new Js}class Js extends Ne{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!di(e)}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(!s.spec.coerce)return e;let a=e;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(e,t=We.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s>=this.resolve(e)}})}max(e,t=We.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(s){return s<=this.resolve(e)}})}lessThan(e,t=We.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(s){return s<this.resolve(e)}})}moreThan(e,t=We.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(s){return s>this.resolve(e)}})}positive(e=We.positive){return this.moreThan(0,e)}negative(e=We.negative){return this.lessThan(0,e)}integer(e=We.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:t=>Number.isInteger(t)})}truncate(){return this.transform(e=>Ae(e)?e:e|0)}round(e){var t;let s=["ceil","floor","round","trunc"];if(e=((t=e)==null?void 0:t.toLowerCase())||"round",e==="trunc")return this.truncate();if(s.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+s.join(", "));return this.transform(a=>Ae(a)?a:Math[e](a))}}Ks.prototype=Js.prototype;let Qs=new Date(""),ui=r=>Object.prototype.toString.call(r)==="[object Date]";function yr(){return new mt}class mt extends Ne{constructor(){super({type:"date",check(e){return ui(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,t,s)=>!s.spec.coerce||s.isType(e)||e===null?e:(e=ei(e),isNaN(e)?mt.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let s;if(Je.isRef(e))s=e;else{let a=this.cast(e);if(!this._typeCheck(a))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=a}return s}min(e,t=br.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(a){return a>=this.resolve(s)}})}max(e,t=br.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(a){return a<=this.resolve(s)}})}}mt.INVALID_DATE=Qs,yr.prototype=mt.prototype,yr.INVALID_DATE=Qs;function fi(r,e=[]){let t=[],s=new Set,a=new Set(e.map(([o,l])=>`${o}-${l}`));function n(o,l){let c=Ke.split(o)[0];s.add(c),a.has(`${l}-${c}`)||t.push([l,c])}for(const o of Object.keys(r)){let l=r[o];s.add(o),Je.isRef(l)&&l.isSibling?n(l.path,o):$t(l)&&"deps"in l&&l.deps.forEach(c=>n(c,o))}return Bo.array(Array.from(s),t).reverse()}function ea(r,e){let t=1/0;return r.some((s,a)=>{var n;if((n=e.path)!=null&&n.includes(s))return t=a,!0}),t}function ta(r){return(e,t)=>ea(r,e)-ea(r,t)}const ra=(r,e,t)=>{if(typeof r!="string")return r;let s=r;try{s=JSON.parse(r)}catch{}return t.isType(s)?s:r};function Lt(r){if("fields"in r){const e={};for(const[t,s]of Object.entries(r.fields))e[t]=Lt(s);return r.setFields(e)}if(r.type==="array"){const e=r.optional();return e.innerType&&(e.innerType=Lt(e.innerType)),e}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(Lt)}):"optional"in r?r.optional():r}const pi=(r,e)=>{const t=[...Ke.normalizePath(e)];if(t.length===1)return t[0]in r;let s=t.pop(),a=Ke.getter(Ke.join(t),!0)(r);return!!(a&&s in a)};let sa=r=>Object.prototype.toString.call(r)==="[object Object]";function aa(r,e){let t=Object.keys(r.fields);return Object.keys(e).filter(s=>t.indexOf(s)===-1)}const hi=ta([]);function na(r){return new oa(r)}class oa extends Ne{constructor(e){super({type:"object",check(t){return sa(t)||typeof t=="function"}}),this.fields=Object.create(null),this._sortErrors=hi,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var s;let a=super._cast(e,t);if(a===void 0)return this.getDefault(t);if(!this._typeCheck(a))return a;let n=this.fields,o=(s=t.stripUnknown)!=null?s:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(a).filter(m=>!this._nodes.includes(m))),c={},d=Object.assign({},t,{parent:c,__validating:t.__validating||!1}),u=!1;for(const m of l){let h=n[m],w=m in a;if(h){let g,k=a[m];d.path=(t.path?`${t.path}.`:"")+m,h=h.resolve({value:k,context:t.context,parent:c});let _=h instanceof Ne?h.spec:void 0,y=_==null?void 0:_.strict;if(_!=null&&_.strip){u=u||m in a;continue}g=!t.__validating||!y?h.cast(a[m],d):a[m],g!==void 0&&(c[m]=g)}else w&&!o&&(c[m]=a[m]);(w!==m in c||c[m]!==a[m])&&(u=!0)}return u?c:a}_validate(e,t={},s,a){let{from:n=[],originalValue:o=e,recursive:l=this.spec.recursive}=t;t.from=[{schema:this,value:o},...n],t.__validating=!0,t.originalValue=o,super._validate(e,t,s,(c,d)=>{if(!l||!sa(d)){a(c,d);return}o=o||d;let u=[];for(let m of this._nodes){let h=this.fields[m];!h||Je.isRef(h)||u.push(h.asNestedTest({options:t,key:m,parent:d,parentPath:t.path,originalParent:o}))}this.runTests({tests:u,value:d,originalValue:o,options:t},s,m=>{a(m.sort(this._sortErrors).concat(c),d)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),s=t.fields;for(let[a,n]of Object.entries(this.fields)){const o=s[a];s[a]=o===void 0?n:o}return t.withMutation(a=>a.setFields(s,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(s=>{var a;const n=this.fields[s];let o=e;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[s]})),t[s]=n&&"getDefault"in n?n.getDefault(o):void 0}),t}setFields(e,t){let s=this.clone();return s.fields=e,s._nodes=fi(e,t),s._sortErrors=ta(Object.keys(e)),t&&(s._excludedEdges=t),s}shape(e,t=[]){return this.clone().withMutation(s=>{let a=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),a=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),a)})}partial(){const e={};for(const[t,s]of Object.entries(this.fields))e[t]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(e)}deepPartial(){return Lt(this)}pick(e){const t={};for(const s of e)this.fields[s]&&(t[s]=this.fields[s]);return this.setFields(t,this._excludedEdges.filter(([s,a])=>e.includes(s)&&e.includes(a)))}omit(e){const t=[];for(const s of Object.keys(this.fields))e.includes(s)||t.push(s);return this.pick(t)}from(e,t,s){let a=Ke.getter(e,!0);return this.transform(n=>{if(!n)return n;let o=n;return pi(n,e)&&(o=Object.assign({},n),s||delete o[e],o[t]=a(n)),o})}json(){return this.transform(ra)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Mt.exact,test(t){if(t==null)return!0;const s=aa(this.schema,t);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Mt.noUnknown){typeof e!="boolean"&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(a){if(a==null)return!0;const n=aa(this.schema,a);return!e||n.length===0||this.createError({params:{unknown:n.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=Mt.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const s={};for(const a of Object.keys(t))s[e(a)]=t[a];return s})}camelCase(){return this.transformKeys(gr.camelCase)}snakeCase(){return this.transformKeys(gr.snakeCase)}constantCase(){return this.transformKeys(e=>gr.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[n,o]of Object.entries(t.fields)){var a;let l=e;(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[n]})),s.fields[n]=o.describe(l)}return s}}na.prototype=oa.prototype;function kr(r){return new ia(r)}class ia extends Ne{constructor(e){super({type:"array",spec:{types:e},check(t){return Array.isArray(t)}}),this.innerType=void 0,this.innerType=e}_cast(e,t){const s=super._cast(e,t);if(!this._typeCheck(s)||!this.innerType)return s;let a=!1;const n=s.map((o,l)=>{const c=this.innerType.cast(o,Object.assign({},t,{path:`${t.path||""}[${l}]`}));return c!==o&&(a=!0),c});return a?n:s}_validate(e,t={},s,a){var n;let o=this.innerType,l=(n=t.recursive)!=null?n:this.spec.recursive;t.originalValue!=null&&t.originalValue,super._validate(e,t,s,(c,d)=>{var u;if(!l||!o||!this._typeCheck(d)){a(c,d);return}let m=new Array(d.length);for(let w=0;w<d.length;w++){var h;m[w]=o.asNestedTest({options:t,index:w,parent:d,parentPath:t.path,originalParent:(h=t.originalValue)!=null?h:e})}this.runTests({value:d,tests:m,originalValue:(u=t.originalValue)!=null?u:e,options:t},s,w=>a(w.concat(c),d))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(ra)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!$t(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Pe(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=Vt.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(s){return s.length===this.resolve(e)}})}min(e,t){return t=t||Vt.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s.length>=this.resolve(e)}})}max(e,t){return t=t||Vt.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(s){return s.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:t==null?[]:[].concat(t))}compact(e){let t=e?(s,a,n)=>!e(s,a,n):s=>!!s;return this.transform(s=>s!=null?s.filter(t):s)}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);if(t.innerType){var a;let n=e;(a=n)!=null&&a.value&&(n=Object.assign({},n,{parent:n.value,value:n.value[0]})),s.innerType=t.innerType.describe(n)}return s}}kr.prototype=ia.prototype;function mi(r){return r.validation??{}}function gi(r){return!!r.multiple}function jr(r){const e=r.maxFiles;return typeof e=="number"?e:void 0}function Ue(r,e){return e.required?r.required(e.requiredMessage||"Requerido"):r}function Pt(r,e){var s,a,n;let t=r;return((s=e.minLength)==null?void 0:s.value)!=null&&(t=t.min(e.minLength.value,e.minLength.message||`Mín. ${e.minLength.value} caracteres`)),((a=e.maxLength)==null?void 0:a.value)!=null&&(t=t.max(e.maxLength.value,e.maxLength.message||`Máx. ${e.maxLength.value} caracteres`)),((n=e.pattern)==null?void 0:n.value)instanceof RegExp&&(t=t.matches(e.pattern.value,e.pattern.message||"Formato inválido")),t}function bi(r){var t;const e=mi(r);switch(r.type){case"text":case"password":{let s=nt().trim();return s=Pt(s,e),Ue(s,e)}case"email":{let s=nt().trim().email(e.emailMessage||"Email inválido");return s=Pt(s,e),Ue(s,e)}case"number":{let s=Ks().transform((a,n)=>n===""||n===null?void 0:a).typeError(e.typeError||"Debe ser un número");return((t=e.pattern)==null?void 0:t.value)instanceof RegExp&&(s=s.test("pattern-number",e.pattern.message||"Formato inválido",a=>a==null||e.pattern.value.test(String(a)))),Ue(s,e)}case"select":{if(gi(r)){const a=kr().of(nt());return Ue(a,e)}let s=nt().trim();return s=Pt(s,e),Ue(s,e)}case"checkbox":{let s=Ys();return e.required&&(s=s.oneOf([!0],e.requiredMessage||"Debes marcar esta casilla")),s}case"textarea":{let s=nt().trim();return s=Pt(s,e),Ue(s,e)}case"date":{const s=yr().typeError(e.typeError||"Fecha inválida").transform((a,n)=>n?new Date(n):void 0);return Ue(s,e)}case"file":{const s=kr().of(xr()).test("max-files",jr(r)?`Máx. ${jr(r)} fichero(s)`:"Número de ficheros inválido",a=>{const n=jr(r);return!Array.isArray(a)||!n||a.length<=n});return Ue(s,e)}default:{const s=xr();return Ue(s,e)}}}function vi(r){const e={};for(const t of r.fields){const s=t;s.name&&(e[s.name]=bi(s))}return na(e)}function la({options:r,value:e,onChange:t,children:s}){const a=x.useRef(null),[n,o]=x.useState({left:0,width:0});return x.useLayoutEffect(()=>{const l=a.current;if(!l)return;const c=()=>{const d=r.findIndex(_=>_.value===e);if(d<0)return;const u=l.children[d],m=u.querySelector("span"),h=(m==null?void 0:m.offsetWidth)??u.offsetWidth,w=u.offsetWidth,k=u.offsetLeft+(w-h)/2;o({left:k,width:h})};return c(),window.addEventListener("resize",c),l.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),l.removeEventListener("scroll",c)}},[e,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===e;return i.jsx("li",{role:"tab","aria-selected":c,onClick:()=>t(l.value),className:I("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[e]})]})}const Rt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},ca={sm:"h-6",md:"h-10",lg:"h-12"},da={sm:"px-2",md:"px-2.5",lg:"px-3"},ua={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function fa({id:r,size:e,disabled:t,error:s,reserveErrorSpace:a,className:n,suffixButton:o,children:l}){return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative flex items-center w-full",children:[i.jsx("div",{className:"relative w-full",children:l}),o&&i.jsx("div",{className:"flex items-center h-full pr-2",children:o})]}),a?i.jsx("div",{className:"min-h-[18px] w-full",children:s!=null&&s.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:s.message}):i.jsx("span",{"aria-hidden":"true",children:" "})}):s!=null&&s.message?i.jsx("div",{className:"pt-1",children:i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:s.message})}):null]})}function gt(r){const{control:e,name:t,rules:s,defaultValue:a,options:n=[],loadOptions:o,reloadDeps:l=[],value:c,onChange:d,size:u="sm",width:m="100%",label:h,labelHidden:w=!1,hasError:g=!1,errorMessage:k="",reserveErrorSpace:_,disableErrorPlaceholder:y,disabled:b=!1,className:T,suffixButton:V,loading:F=!1,coerceFirstValid:R=!0}=r,Y=x.useId(),S=t||Y,[D,Q]=x.useState(n),[Z,z]=x.useState(!!o);x.useEffect(()=>{o&&(z(!0),o().then(q=>Q(q)).finally(()=>z(!1)))},[o,...l]);const H=q=>q.find(X=>X.value!==""&&X.value!==void 0)??q[0],J=typeof _=="boolean"?_:!!e;if(e&&t){const{field:q,fieldState:X}=ns({name:t,control:e,rules:s,defaultValue:a});return x.useEffect(()=>{if(!Z&&D.length>0&&R){const A=q.value,p=D.some(W=>String(W.value)===String(A));(A===void 0||!p)&&q.onChange(H(D).value)}},[D,Z,q,R]),i.jsxs("div",{className:I("flex flex-col",T),style:{width:m,maxWidth:"100%"},children:[h&&i.jsx("label",{htmlFor:S,className:I("pb-2 text-[var(--color-ds-text-primary)]",Rt[u],w&&"sr-only"),children:h}),F||Z?i.jsx(Xe,{width:"100%",height:ua[u],variant:"rect",className:"rounded-lg"}):i.jsx(fa,{id:S,size:u,disabled:b,error:X.error,reserveErrorSpace:typeof y=="boolean"?!y:J,className:T,suffixButton:V,children:i.jsx("select",{id:S,value:q.value,onChange:A=>q.onChange(A.target.value),disabled:b,className:I("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",Rt[u],ca[u],da[u],X.error?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",b?"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)]"),children:D.map(A=>i.jsx("option",{value:A.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:A.label},A.value))})})]})}return x.useEffect(()=>{if(!e&&D.length>0&&R){const q=D.some(A=>String(A.value)===String(c));(c===void 0||c===""||!q)&&d&&d(H(D).value)}},[D,c,d,e,R]),i.jsxs("div",{className:I("flex flex-col",T),style:{width:m,maxWidth:"100%"},children:[h&&i.jsx("label",{htmlFor:S,className:I("pb-2 text-[var(--color-ds-text-primary)]",Rt[u],w&&"sr-only"),children:h}),F||Z?i.jsx(Xe,{width:"100%",height:ua[u],variant:"rect",className:"rounded-lg"}):i.jsx(fa,{id:S,size:u,disabled:b,error:g?{message:k}:void 0,reserveErrorSpace:typeof y=="boolean"?!y:!!(_??!1),className:T,suffixButton:V,children:i.jsx("select",{id:S,value:c,onChange:q=>d==null?void 0:d(q.target.value),disabled:b,className:I("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",Rt[u],ca[u],da[u],g?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",b?"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)]"),children:D.map(q=>i.jsx("option",{value:q.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:q.label},q.value))})})]})}const pa={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"};function xi(r){return"options"in r||"loadOptions"in r}function ha({groupLabel:r,inputs:e=[],separator:t=i.jsx("span",{className:"px-1 select-none",children:"/"}),useSeparator:s=!0,className:a,showVisibleLabel:n=!1,size:o="sm",width:l}){const c=e.length;return i.jsxs("div",{className:I("flex flex-col",a),style:l?{width:l}:void 0,children:[i.jsx("label",{className:I("sr-only pb-2",pa[o]),children:r}),n&&i.jsx("label",{className:I("pb-2",pa[o]),children:r}),i.jsx("div",{className:"flex items-center flex-nowrap",children:e.map((d,u)=>{const{width:m,className:h,control:w,name:g,...k}=d,_=xi(d);let y="rounded-lg";!s&&c>1&&(u===0?y="rounded-l-lg rounded-r-none":u===c-1?y="rounded-r-lg rounded-l-none":y="rounded-none");const b=I("inline-flex items-center flex-shrink-0 overflow-hidden",typeof m=="string"&&m.startsWith("w-")?m:void 0),T=typeof m=="string"&&!m.startsWith("w-")?{width:m}:void 0,V=I(h,y),F=R=>w&&g?i.jsx(_e,{name:g,control:w,render:({field:Y})=>{const S=Y.value;return R({...k,name:g,value:_?S===null?void 0:S??void 0:S??"",onChange:Y.onChange,className:V,size:o})}}):R({...k,name:g,className:V,size:o});return i.jsxs("div",{className:b,style:T,children:[F(_?R=>i.jsx(gt,{...R,options:d.options,loadOptions:d.loadOptions}):R=>i.jsx(Ct,{...R})),s&&u<c-1&&t]},u)})})]})}const ma={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},wi={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function ga({groupLabel:r,options:e,control:t,name:s,rules:a,defaultValue:n,multiple:o=!0,size:l="sm",vertical:c=!0,className:d,showVisibleLabel:u=!0}){return i.jsx(_e,{name:s,control:t,rules:a,defaultValue:n,render:({field:m,fieldState:h})=>{const{value:w,onChange:g}=m;h.error;const k=y=>o?Array.isArray(w)&&w.includes(y):w===y,_=y=>{if(o){const b=Array.isArray(w)?[...w]:[],T=b.indexOf(y);T>=0?b.splice(T,1):b.push(y),g(b)}else g(y)};return i.jsxs("div",{className:I("w-full",d),children:[i.jsx("label",{className:I("sr-only pb-2 text-[var(--color-ds-text-primary)]",ma[l]),children:r}),u&&i.jsx("label",{className:I("block pb-2 text-[var(--color-ds-text-primary)]",ma[l]),children:r}),i.jsx("div",{className:I(c?"flex flex-col gap-2":"flex flex-wrap gap-4"),children:e.map(y=>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:y.value,checked:k(y.value),onChange:()=>_(y.value),className:I(wi[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:y.label})]},y.value))})]})}})}function yi(r){function e(o){var l,c;for(const d of Object.keys(o)){if((l=o[d])!=null&&l.types||(c=o[d])!=null&&c.message)return d;if(typeof o[d]=="object"){const u=e(o[d]);if(u)return`${d}.${u}`}}return null}const t=e(r);if(!t)return;const s=`[name="${t}"]`,a=`[name^="${t}["], [name^="${t}."]`,n=document.querySelector(s)??document.querySelector(a);n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),n.focus({preventScroll:!0}))}const ki={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"},ba=({id:r,message:e,variant:t="info",duration:s=5e3,onClose:a})=>(x.useEffect(()=>{const n=setTimeout(()=>a(r),s);return()=>clearTimeout(n)},[r,s,a]),i.jsxs("div",{className:I("w-80 max-w-full border-l-4 rounded shadow-md p-4 mb-2 flex justify-between items-start",ki[t]),role:"alert","aria-live":"assertive",children:[i.jsx("span",{className:"flex-1",children:e}),i.jsx("button",{onClick:()=>a(r),className:"ml-4 text-xl font-bold leading-none focus:outline-none",children:"×"})]}));let Ut;const ji=new Uint8Array(16);function Ei(){if(!Ut&&(Ut=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ut))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ut(ji)}const xe=[];for(let r=0;r<256;++r)xe.push((r+256).toString(16).slice(1));function Ni(r,e=0){return xe[r[e+0]]+xe[r[e+1]]+xe[r[e+2]]+xe[r[e+3]]+"-"+xe[r[e+4]]+xe[r[e+5]]+"-"+xe[r[e+6]]+xe[r[e+7]]+"-"+xe[r[e+8]]+xe[r[e+9]]+"-"+xe[r[e+10]]+xe[r[e+11]]+xe[r[e+12]]+xe[r[e+13]]+xe[r[e+14]]+xe[r[e+15]]}const va={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Si(r,e,t){if(va.randomUUID&&!r)return va.randomUUID();r=r||{};const s=r.random||(r.rng||Ei)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Ni(s)}const xa=x.createContext(null),wa=()=>{const r=x.useContext(xa);if(!r)throw new Error("useToast debe usarse dentro de <ToastProvider>");return r},_i=({children:r})=>{const[e,t]=x.useState([]),s=(n,o="info",l=5e3)=>{const c=Si();t(d=>[...d,{id:c,message:n,variant:o,duration:l}])},a=n=>{t(o=>o.filter(l=>l.id!==n))};return i.jsxs(xa.Provider,{value:{show:s},children:[r,i.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col items-end",children:e.map(n=>i.jsx(ba,{id:n.id,message:n.message,variant:n.variant,duration:n.duration,onClose:a},n.id))})]})},Fi=r=>r.type==="inputGroup",Ti=r=>r.type==="button",Ci=r=>!Fi(r)&&!Ti(r);function Ai(r){const e=Array.isArray(r)?r:[];return x.useMemo(()=>{const t={};for(const s of e)Ci(s)&&s.name&&(t[s.name]=s);return t},[e])}function Oi(r=[],e=[]){if(r===e)return!0;if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++){const s=r[t],a=e[t];if(s.value!==a.value||s.label!==a.label)return!1}return!0}function Mi(r){const[e,t]=x.useState({}),[s,a]=x.useState(0),n=x.useMemo(()=>r.filter(c=>(c==null?void 0:c.type)==="select"&&(c==null?void 0:c.name)&&!Array.isArray(c==null?void 0:c.options)&&typeof(c==null?void 0:c.loadOptions)=="function").map(c=>({name:c.name,load:c.loadOptions})),[r]),o=x.useMemo(()=>n.map(c=>c.name).sort().join("|"),[n]),l=x.useRef("");return x.useEffect(()=>{if(o===l.current)return;l.current=o;let c=!1;return(async()=>{n.length&&(a(u=>u+n.length),await Promise.all(n.map(async({name:u,load:m})=>{try{const h=await m();if(c)return;t(w=>{const g=w[u]??[];return Oi(g,h)?w:{...w,[u]:h}})}catch{}finally{c||a(h=>Math.max(0,h-1))}})))})(),()=>{c=!0}},[o,n]),{optionsMap:e,loadingCount:s}}const Vi=r=>r.type==="inputGroup",$i=r=>r.type==="button",zi=r=>!Vi(r)&&!$i(r);function Di(r){return typeof r=="object"&&r!==null}const Ii=r=>{const e=r.disabledWhen;if(!Di(e))return!1;const t="watchField"in e,s="rule"in e;return t&&!s};function Li(r,e){const t=Array.isArray(r)?r:[],s=x.useMemo(()=>t.filter(zi).filter(Ii),[t]),a=x.useMemo(()=>s.map(c=>c.disabledWhen.watchField),[s]),n=sr({control:e,...a.length>0?{name:a}:{}}),o=Array.isArray(n)?n:[],l={};return s.forEach((c,d)=>{const u=o[d];l[c.name??`__unnamed_${d}`]=u===c.disabledWhen.watchValue}),l}const ya={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Pi={sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function Er({control:r,name:e,rules:t,defaultValue:s,size:a="sm",width:n="100%",label:o,labelHidden:l=!1,hasError:c=!1,errorMessage:d="",maxLength:u,showCounter:m=!1,className:h,suffixButton:w,...g}){const k=x.useId(),_=e||k,[y,b]=x.useState(s||"");if(r&&e)return i.jsx(_e,{name:e,control:r,rules:t,defaultValue:s||"",render:({field:V,fieldState:F})=>{var R;return i.jsx(Er,{...g,size:a,width:n,label:o,labelHidden:l,hasError:!!F.error,errorMessage:((R=F.error)==null?void 0:R.message)||"",maxLength:u,showCounter:m,className:h,suffixButton:w,value:V.value,onChange:V.onChange})}});x.useEffect(()=>{b(s||"")},[s]);const T=V=>{var F;u!==void 0&&V.target.value.length>u||(b(V.target.value),(F=g.onChange)==null||F.call(g,V))};return i.jsxs("div",{className:I("flex flex-col",h),style:{width:n},children:[o&&i.jsx("label",{htmlFor:_,className:I("pb-2 text-[var(--color-ds-text-primary)]",ya[a],l&&"sr-only"),children:o}),i.jsxs("div",{className:"flex items-stretch gap-2",children:[i.jsx("textarea",{id:_,className:I("box-border bg-[var(--color-ds-background-page)] w-full resize vertical rounded-lg border outline-none transition font-[var(--font-primary)]",ya[a],Pi[a],c?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",g.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:y,onChange:T,maxLength:u,...g}),w?i.jsx("div",{className:"shrink-0",children:w}):null]}),i.jsxs("div",{className:"flex justify-between pt-1 min-h-[18px]",children:[c&&d?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:d}):i.jsx("span",{"aria-hidden":"true",children:" "}),m&&u!==void 0&&i.jsxs("span",{className:"text-xs text-[var(--color-ds-text-secondary)]",children:[y.length,"/",u]})]})]})}const Ri={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function ka({control:r=null,name:e,rules:t,defaultValue:s=!1,label:a,labelHidden:n=!1,disabled:o=!1,size:l="sm",className:c,hasError:d=!1,errorMessage:u="",checked:m,onChange:h}){const w=I(Ri[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]",o&&"opacity-50 cursor-not-allowed"),g=I("text-[var(--color-ds-text-primary)] text-ds-md",o&&"text-[var(--color-ds-text-secondary)]",n&&"sr-only");return r?i.jsx("div",{className:I("flex flex-col",c),children:i.jsx(_e,{name:e||"",control:r,rules:t,defaultValue:s,render:({field:k,fieldState:_})=>{const y=_.error;return i.jsxs(i.Fragment,{children:[i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx("input",{id:e,type:"checkbox",className:w,checked:!!k.value,onChange:b=>k.onChange(b.target.checked),disabled:o}),a&&i.jsx("span",{className:g,children:a})]}),(d||y)&&((y==null?void 0:y.message)||u)&&i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:(y==null?void 0:y.message)||u})]})}})}):i.jsxs("div",{className:I("flex flex-col",c),children:[i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx("input",{id:e,type:"checkbox",className:w,checked:!!m,onChange:k=>h==null?void 0:h(k.target.checked),disabled:o}),a&&i.jsx("span",{className:g,children:a})]}),d&&!!u&&i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:u})]})}function ja({name:r,control:e,searchFn:t,resolveByValue:s,label:a,size:n="sm",width:o="100%",disabled:l=!1,searchMode:c="button",minChars:d=3,debounceMs:u=600}){const m=dt(),{watch:h,getValues:w,setValue:g}=m,k=sr({control:e,name:r}),[_,y]=x.useState([]),[b,T]=x.useState(!1),[V,F]=x.useState(!1),[R,Y]=x.useState(""),S=x.useRef(null),D=x.useRef(null),Q=x.useRef(!1),Z=x.useRef(!1),z=x.useRef(!0),H=x.useMemo(()=>{const p=new Map;for(const W of _)p.set(String(W.value).trim(),W.label??"");return p},[_]),J=async p=>{const W=(p??"").trim();if(!W){y([]),F(!1);return}T(!0);try{const E=await t(W,{watch:h,getValues:w});y(E??[]),F(!0)}finally{T(!1)}};x.useEffect(()=>{function p(W){S.current&&!S.current.contains(W.target)&&F(!1)}if(V)return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[V]),x.useEffect(()=>{if(Q.current)return;const W=(k?String(k):"").trim();if(!W){Y(""),F(!1);return}const E=H.get(W);if(E){Y(E),F(!1),z.current=!0;return}let j=!1;return(async()=>{if(s)try{const O=await s(W,{watch:h,getValues:w});j||(Y((O==null?void 0:O.label)??W),F(!1),z.current=!0)}catch{j||(Y(W),F(!1),z.current=!0)}else Y(W),F(!1),z.current=!0})(),()=>{j=!0}},[k,H,s,h,w]),x.useEffect(()=>{if(c!=="debounced"||l)return;if(z.current){z.current=!1;return}if(!Z.current)return;D.current&&(window.clearTimeout(D.current),D.current=null);const p=(R||"").trim();return p.length>=d?D.current=window.setTimeout(()=>{J(p)},u):(y([]),F(!1)),()=>{D.current&&(window.clearTimeout(D.current),D.current=null)}},[R,c,d,u,l]);const q=n==="sm"?"text-ds-sm":n==="md"?"text-ds-md":"text-ds-lg",X=n==="sm"?"h-6":n==="md"?"h-10":"h-12",A=p=>{if(l)return;const W=(R||"").trim();p.key==="Enter"&&(p.preventDefault(),c==="debounced"?W.length>=d&&J(W):J(W)),p.key==="Escape"&&F(!1)};return i.jsx(_e,{name:r,control:e,render:({field:p,fieldState:W})=>{var E;return i.jsxs("div",{ref:S,className:"relative flex flex-col",style:{width:o},children:[a&&i.jsx("label",{className:`pb-2 text-[var(--color-ds-text-primary)] ${q}`,children:a}),i.jsx(Ct,{className:c==="button"?"rounded-r-none":void 0,type:"text",size:n,width:"100%",value:R,onChange:j=>{const O=j.target.value;Q.current=!0,Z.current=!0,Y(O),(k?String(k):"").trim()&&g(r,"",{shouldDirty:!0})},onKeyDown:A,onBlur:()=>{Q.current=!1},disabled:l,hasError:W.invalid,errorMessage:(E=W.error)==null?void 0:E.message,onFocus:()=>{if(Q.current=!0,c==="button"&&Z.current){const j=(R||"").trim();j&&J(j)}},suffixButton:c==="button"?i.jsx(De,{type:"button",className:"!rounded-l-none",size:n,variant:"primary",onClick:()=>J((R||"").trim()),disabled:l,children:"Buscar"}):void 0}),b&&i.jsx("div",{className:"absolute top-14 left-0 right-0 z-10",children:i.jsx(Xe,{width:"100%",height:n==="sm"?"1.5rem":n==="md"?"2.5rem":"3rem",variant:"rect",className:"rounded-lg"})}),V&&!b&&_.length>0&&i.jsx("ul",{className:`
|
|
30
|
+
`+(l!==o?`result of cast: ${l}`:""))}return n}_cast(e,t){let s=e===void 0?e:this.transforms.reduce((a,n)=>n.call(this,a,e,this),e);return s===void 0&&(s=this.getDefault(t)),s}_validate(e,t={},s,a){let{path:n,originalValue:o=e,strict:l=this.spec.strict}=t,c=e;l||(c=this._cast(c,Object.assign({assert:!1},t)));let d=[];for(let u of Object.values(this.internalTests))u&&d.push(u);this.runTests({path:n,value:c,originalValue:o,options:t,tests:d},s,u=>{if(u.length)return a(u,c);this.runTests({path:n,value:c,originalValue:o,options:t,tests:this.tests},s,a)})}runTests(e,t,s){let a=!1,{tests:n,value:o,originalValue:l,path:c,options:d}=e,u=k=>{a||(a=!0,t(k,o))},m=k=>{a||(a=!0,s(k,o))},h=n.length,w=[];if(!h)return m([]);let g={value:o,originalValue:l,path:c,options:d,schema:this};for(let k=0;k<n.length;k++){const S=n[k];S(g,u,function(b){b&&(Array.isArray(b)?w.push(...b):w.push(b)),--h<=0&&m(w)})}}asNestedTest({key:e,index:t,parent:s,parentPath:a,originalParent:n,options:o}){const l=e??t;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof l=="number";let d=s[l];const u=Object.assign({},o,{strict:!0,parent:s,value:d,originalValue:n[l],key:void 0,[c?"index":"key"]:l,path:c||l.includes(".")?`${a||""}[${c?l:`"${l}"`}]`:(a?`${a}.`:"")+e});return(m,h,w)=>this.resolve(u)._validate(d,u,h,w)}validate(e,t){var s;let a=this.resolve(Object.assign({},t,{value:e})),n=(s=t==null?void 0:t.disableStackTrace)!=null?s:a.spec.disableStackTrace;return new Promise((o,l)=>a._validate(e,t,(c,d)=>{je.isError(c)&&(c.value=d),l(c)},(c,d)=>{c.length?l(new je(c,d,void 0,void 0,n)):o(d)}))}validateSync(e,t){var s;let a=this.resolve(Object.assign({},t,{value:e})),n,o=(s=t==null?void 0:t.disableStackTrace)!=null?s:a.spec.disableStackTrace;return a._validate(e,Object.assign({},t,{sync:!0}),(l,c)=>{throw je.isError(l)&&(l.value=c),l},(l,c)=>{if(l.length)throw new je(l,e,void 0,void 0,o);n=c}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,s=>{if(je.isError(s))return!1;throw s})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(s){if(je.isError(s))return!1;throw s}}_getDefault(e){let t=this.spec.default;return t==null?t:typeof t=="function"?t.call(this,e):at(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const s=this.clone({nullable:e});return s.internalTests.nullable=st({message:t,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),s}optionality(e,t){const s=this.clone({optional:e});return s.internalTests.optionality=st({message:t,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(e=Ve.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Ve.notNull){return this.nullability(!1,e)}required(e=Ve.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(e.length===1?typeof e[0]=="function"?t={test:e[0]}:t=e[0]:e.length===2?t={name:e[0],test:e[1]}:t={name:e[0],message:e[1],test:e[2]},t.message===void 0&&(t.message=Ve.default),typeof t.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),a=st(t),n=t.exclusive||t.name&&s.exclusiveTests[t.name]===!0;if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(s.exclusiveTests[t.name]=!!t.exclusive),s.tests=s.tests.filter(o=>!(o.OPTIONS.name===t.name&&(n||o.OPTIONS.test===a.OPTIONS.test))),s.tests.push(a),s}when(e,t){!Array.isArray(e)&&typeof e!="string"&&(t=e,e=".");let s=this.clone(),a=Us(e).map(n=>new Je(n));return a.forEach(n=>{n.isSibling&&s.deps.push(n.key)}),s.conditions.push(typeof t=="function"?new zt(a,t):zt.fromOptions(a,t)),s}typeError(e){let t=this.clone();return t.internalTests.typeError=st({message:e,name:"typeError",skipAbsent:!0,test(s){return this.schema._typeCheck(s)?!0:this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=Ve.oneOf){let s=this.clone();return e.forEach(a=>{s._whitelist.add(a),s._blacklist.delete(a)}),s.internalTests.whiteList=st({message:t,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(e,t=Ve.notOneOf){let s=this.clone();return e.forEach(a=>{s._blacklist.add(a),s._whitelist.delete(a)}),s.internalTests.blacklist=st({message:t,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(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:s,meta:a,optional:n,nullable:o}=t.spec;return{meta:a,label:s,optional:n,nullable:o,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,d,u)=>u.findIndex(m=>m.name===c.name)===d)}}}Ne.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])Ne.prototype[`${r}At`]=function(e,t,s={}){const{parent:a,parentPath:n,schema:o}=Ko(this,e,t,s.context);return o[r](a&&a[n],Object.assign({},s,{parent:a,path:e}))};for(const r of["equals","is"])Ne.prototype[r]=Ne.prototype.oneOf;for(const r of["not","nope"])Ne.prototype[r]=Ne.prototype.notOneOf;const Jo=()=>!0;function xr(r){return new Gs(r)}class Gs extends Ne{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Jo},e))}}xr.prototype=Gs.prototype;function Ys(){return new Hs}class Hs extends Ne{constructor(){super({type:"boolean",check(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(s.spec.coerce&&!s.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}isTrue(e=vr.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(t){return Ae(t)||t===!0}})}isFalse(e=vr.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(t){return Ae(t)||t===!1}})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}}Ys.prototype=Hs.prototype;const Qo=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ei(r){const e=wr(r);if(!e)return Date.parse?Date.parse(r):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let t=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(t=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(t=0-t)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+t,e.second,e.millisecond)}function wr(r){var e,t;const s=Qo.exec(r);return s?{year:Re(s[1]),month:Re(s[2],1)-1,day:Re(s[3],1),hour:Re(s[4]),minute:Re(s[5]),second:Re(s[6]),millisecond:s[7]?Re(s[7].substring(0,3)):0,precision:(e=(t=s[7])==null?void 0:t.length)!=null?e:void 0,z:s[8]||void 0,plusMinus:s[9]||void 0,hourOffset:Re(s[10]),minuteOffset:Re(s[11])}:null}function Re(r,e=0){return Number(r)||e}let ti=/^[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])?)*$/,ri=/^((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,si=/^(?:[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,ai="^\\d{4}-\\d{2}-\\d{2}",ni="\\d{2}:\\d{2}:\\d{2}",oi="(([+-]\\d{2}(:?\\d{2})?)|Z)",ii=new RegExp(`${ai}T${ni}(\\.\\d+)?${oi}$`),li=r=>Ae(r)||r===r.trim(),ci={}.toString();function nt(){return new Xs}class Xs extends Ne{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(!s.spec.coerce||s.isType(e)||Array.isArray(e))return e;const a=e!=null&&e.toString?e.toString():e;return a===ci?e:a})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||Ve.required,name:"required",skipAbsent:!0,test:s=>!!s.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(t=>t.OPTIONS.name!=="required"),e))}length(e,t=Ee.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(s){return s.length===this.resolve(e)}})}min(e,t=Ee.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s.length>=this.resolve(e)}})}max(e,t=Ee.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(s){return s.length<=this.resolve(e)}})}matches(e,t){let s=!1,a,n;return t&&(typeof t=="object"?{excludeEmptyString:s=!1,message:a,name:n}=t:a=t),this.test({name:n||"matches",message:a||Ee.matches,params:{regex:e},skipAbsent:!0,test:o=>o===""&&s||o.search(e)!==-1})}email(e=Ee.email){return this.matches(ti,{name:"email",message:e,excludeEmptyString:!0})}url(e=Ee.url){return this.matches(ri,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Ee.uuid){return this.matches(si,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t="",s,a;return e&&(typeof e=="object"?{message:t="",allowOffset:s=!1,precision:a=void 0}=e:t=e),this.matches(ii,{name:"datetime",message:t||Ee.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:t||Ee.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:n=>{if(!n||s)return!0;const o=wr(n);return o?!!o.z:!1}}).test({name:"datetime_precision",message:t||Ee.datetime_precision,params:{precision:a},skipAbsent:!0,test:n=>{if(!n||a==null)return!0;const o=wr(n);return o?o.precision===a:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Ee.trim){return this.transform(t=>t!=null?t.trim():t).test({message:e,name:"trim",test:li})}lowercase(e=Ee.lowercase){return this.transform(t=>Ae(t)?t:t.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Ae(t)||t===t.toLowerCase()})}uppercase(e=Ee.uppercase){return this.transform(t=>Ae(t)?t:t.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Ae(t)||t===t.toUpperCase()})}}nt.prototype=Xs.prototype;let di=r=>r!=+r;function Ks(){return new Js}class Js extends Ne{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!di(e)}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(!s.spec.coerce)return e;let a=e;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(e,t=We.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s>=this.resolve(e)}})}max(e,t=We.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(s){return s<=this.resolve(e)}})}lessThan(e,t=We.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(s){return s<this.resolve(e)}})}moreThan(e,t=We.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(s){return s>this.resolve(e)}})}positive(e=We.positive){return this.moreThan(0,e)}negative(e=We.negative){return this.lessThan(0,e)}integer(e=We.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:t=>Number.isInteger(t)})}truncate(){return this.transform(e=>Ae(e)?e:e|0)}round(e){var t;let s=["ceil","floor","round","trunc"];if(e=((t=e)==null?void 0:t.toLowerCase())||"round",e==="trunc")return this.truncate();if(s.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+s.join(", "));return this.transform(a=>Ae(a)?a:Math[e](a))}}Ks.prototype=Js.prototype;let Qs=new Date(""),ui=r=>Object.prototype.toString.call(r)==="[object Date]";function yr(){return new mt}class mt extends Ne{constructor(){super({type:"date",check(e){return ui(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,t,s)=>!s.spec.coerce||s.isType(e)||e===null?e:(e=ei(e),isNaN(e)?mt.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let s;if(Je.isRef(e))s=e;else{let a=this.cast(e);if(!this._typeCheck(a))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=a}return s}min(e,t=br.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(a){return a>=this.resolve(s)}})}max(e,t=br.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(a){return a<=this.resolve(s)}})}}mt.INVALID_DATE=Qs,yr.prototype=mt.prototype,yr.INVALID_DATE=Qs;function fi(r,e=[]){let t=[],s=new Set,a=new Set(e.map(([o,l])=>`${o}-${l}`));function n(o,l){let c=Ke.split(o)[0];s.add(c),a.has(`${l}-${c}`)||t.push([l,c])}for(const o of Object.keys(r)){let l=r[o];s.add(o),Je.isRef(l)&&l.isSibling?n(l.path,o):$t(l)&&"deps"in l&&l.deps.forEach(c=>n(c,o))}return Bo.array(Array.from(s),t).reverse()}function ea(r,e){let t=1/0;return r.some((s,a)=>{var n;if((n=e.path)!=null&&n.includes(s))return t=a,!0}),t}function ta(r){return(e,t)=>ea(r,e)-ea(r,t)}const ra=(r,e,t)=>{if(typeof r!="string")return r;let s=r;try{s=JSON.parse(r)}catch{}return t.isType(s)?s:r};function Lt(r){if("fields"in r){const e={};for(const[t,s]of Object.entries(r.fields))e[t]=Lt(s);return r.setFields(e)}if(r.type==="array"){const e=r.optional();return e.innerType&&(e.innerType=Lt(e.innerType)),e}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(Lt)}):"optional"in r?r.optional():r}const pi=(r,e)=>{const t=[...Ke.normalizePath(e)];if(t.length===1)return t[0]in r;let s=t.pop(),a=Ke.getter(Ke.join(t),!0)(r);return!!(a&&s in a)};let sa=r=>Object.prototype.toString.call(r)==="[object Object]";function aa(r,e){let t=Object.keys(r.fields);return Object.keys(e).filter(s=>t.indexOf(s)===-1)}const hi=ta([]);function na(r){return new oa(r)}class oa extends Ne{constructor(e){super({type:"object",check(t){return sa(t)||typeof t=="function"}}),this.fields=Object.create(null),this._sortErrors=hi,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var s;let a=super._cast(e,t);if(a===void 0)return this.getDefault(t);if(!this._typeCheck(a))return a;let n=this.fields,o=(s=t.stripUnknown)!=null?s:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(a).filter(m=>!this._nodes.includes(m))),c={},d=Object.assign({},t,{parent:c,__validating:t.__validating||!1}),u=!1;for(const m of l){let h=n[m],w=m in a;if(h){let g,k=a[m];d.path=(t.path?`${t.path}.`:"")+m,h=h.resolve({value:k,context:t.context,parent:c});let S=h instanceof Ne?h.spec:void 0,y=S==null?void 0:S.strict;if(S!=null&&S.strip){u=u||m in a;continue}g=!t.__validating||!y?h.cast(a[m],d):a[m],g!==void 0&&(c[m]=g)}else w&&!o&&(c[m]=a[m]);(w!==m in c||c[m]!==a[m])&&(u=!0)}return u?c:a}_validate(e,t={},s,a){let{from:n=[],originalValue:o=e,recursive:l=this.spec.recursive}=t;t.from=[{schema:this,value:o},...n],t.__validating=!0,t.originalValue=o,super._validate(e,t,s,(c,d)=>{if(!l||!sa(d)){a(c,d);return}o=o||d;let u=[];for(let m of this._nodes){let h=this.fields[m];!h||Je.isRef(h)||u.push(h.asNestedTest({options:t,key:m,parent:d,parentPath:t.path,originalParent:o}))}this.runTests({tests:u,value:d,originalValue:o,options:t},s,m=>{a(m.sort(this._sortErrors).concat(c),d)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),s=t.fields;for(let[a,n]of Object.entries(this.fields)){const o=s[a];s[a]=o===void 0?n:o}return t.withMutation(a=>a.setFields(s,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(s=>{var a;const n=this.fields[s];let o=e;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[s]})),t[s]=n&&"getDefault"in n?n.getDefault(o):void 0}),t}setFields(e,t){let s=this.clone();return s.fields=e,s._nodes=fi(e,t),s._sortErrors=ta(Object.keys(e)),t&&(s._excludedEdges=t),s}shape(e,t=[]){return this.clone().withMutation(s=>{let a=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),a=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),a)})}partial(){const e={};for(const[t,s]of Object.entries(this.fields))e[t]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(e)}deepPartial(){return Lt(this)}pick(e){const t={};for(const s of e)this.fields[s]&&(t[s]=this.fields[s]);return this.setFields(t,this._excludedEdges.filter(([s,a])=>e.includes(s)&&e.includes(a)))}omit(e){const t=[];for(const s of Object.keys(this.fields))e.includes(s)||t.push(s);return this.pick(t)}from(e,t,s){let a=Ke.getter(e,!0);return this.transform(n=>{if(!n)return n;let o=n;return pi(n,e)&&(o=Object.assign({},n),s||delete o[e],o[t]=a(n)),o})}json(){return this.transform(ra)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Mt.exact,test(t){if(t==null)return!0;const s=aa(this.schema,t);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Mt.noUnknown){typeof e!="boolean"&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(a){if(a==null)return!0;const n=aa(this.schema,a);return!e||n.length===0||this.createError({params:{unknown:n.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=Mt.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const s={};for(const a of Object.keys(t))s[e(a)]=t[a];return s})}camelCase(){return this.transformKeys(gr.camelCase)}snakeCase(){return this.transformKeys(gr.snakeCase)}constantCase(){return this.transformKeys(e=>gr.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[n,o]of Object.entries(t.fields)){var a;let l=e;(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[n]})),s.fields[n]=o.describe(l)}return s}}na.prototype=oa.prototype;function kr(r){return new ia(r)}class ia extends Ne{constructor(e){super({type:"array",spec:{types:e},check(t){return Array.isArray(t)}}),this.innerType=void 0,this.innerType=e}_cast(e,t){const s=super._cast(e,t);if(!this._typeCheck(s)||!this.innerType)return s;let a=!1;const n=s.map((o,l)=>{const c=this.innerType.cast(o,Object.assign({},t,{path:`${t.path||""}[${l}]`}));return c!==o&&(a=!0),c});return a?n:s}_validate(e,t={},s,a){var n;let o=this.innerType,l=(n=t.recursive)!=null?n:this.spec.recursive;t.originalValue!=null&&t.originalValue,super._validate(e,t,s,(c,d)=>{var u;if(!l||!o||!this._typeCheck(d)){a(c,d);return}let m=new Array(d.length);for(let w=0;w<d.length;w++){var h;m[w]=o.asNestedTest({options:t,index:w,parent:d,parentPath:t.path,originalParent:(h=t.originalValue)!=null?h:e})}this.runTests({value:d,tests:m,originalValue:(u=t.originalValue)!=null?u:e,options:t},s,w=>a(w.concat(c),d))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(ra)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!$t(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Pe(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=Vt.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(s){return s.length===this.resolve(e)}})}min(e,t){return t=t||Vt.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s.length>=this.resolve(e)}})}max(e,t){return t=t||Vt.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(s){return s.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:t==null?[]:[].concat(t))}compact(e){let t=e?(s,a,n)=>!e(s,a,n):s=>!!s;return this.transform(s=>s!=null?s.filter(t):s)}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);if(t.innerType){var a;let n=e;(a=n)!=null&&a.value&&(n=Object.assign({},n,{parent:n.value,value:n.value[0]})),s.innerType=t.innerType.describe(n)}return s}}kr.prototype=ia.prototype;function mi(r){return r.validation??{}}function gi(r){return!!r.multiple}function jr(r){const e=r.maxFiles;return typeof e=="number"?e:void 0}function Ue(r,e){return e.required?r.required(e.requiredMessage||"Requerido"):r}function Pt(r,e){var s,a,n;let t=r;return((s=e.minLength)==null?void 0:s.value)!=null&&(t=t.min(e.minLength.value,e.minLength.message||`Mín. ${e.minLength.value} caracteres`)),((a=e.maxLength)==null?void 0:a.value)!=null&&(t=t.max(e.maxLength.value,e.maxLength.message||`Máx. ${e.maxLength.value} caracteres`)),((n=e.pattern)==null?void 0:n.value)instanceof RegExp&&(t=t.matches(e.pattern.value,e.pattern.message||"Formato inválido")),t}function bi(r){var t;const e=mi(r);switch(r.type){case"text":case"password":{let s=nt().trim();return s=Pt(s,e),Ue(s,e)}case"email":{let s=nt().trim().email(e.emailMessage||"Email inválido");return s=Pt(s,e),Ue(s,e)}case"number":{let s=Ks().transform((a,n)=>n===""||n===null?void 0:a).typeError(e.typeError||"Debe ser un número");return((t=e.pattern)==null?void 0:t.value)instanceof RegExp&&(s=s.test("pattern-number",e.pattern.message||"Formato inválido",a=>a==null||e.pattern.value.test(String(a)))),Ue(s,e)}case"select":{if(gi(r)){const a=kr().of(nt());return Ue(a,e)}let s=nt().trim();return s=Pt(s,e),Ue(s,e)}case"checkbox":{let s=Ys();return e.required&&(s=s.oneOf([!0],e.requiredMessage||"Debes marcar esta casilla")),s}case"textarea":{let s=nt().trim();return s=Pt(s,e),Ue(s,e)}case"date":{const s=yr().typeError(e.typeError||"Fecha inválida").transform((a,n)=>n?new Date(n):void 0);return Ue(s,e)}case"file":{const s=kr().of(xr()).test("max-files",jr(r)?`Máx. ${jr(r)} fichero(s)`:"Número de ficheros inválido",a=>{const n=jr(r);return!Array.isArray(a)||!n||a.length<=n});return Ue(s,e)}default:{const s=xr();return Ue(s,e)}}}function vi(r){const e={};for(const t of r.fields){const s=t;s.name&&(e[s.name]=bi(s))}return na(e)}function la({options:r,value:e,onChange:t,children:s}){const a=x.useRef(null),[n,o]=x.useState({left:0,width:0});return x.useLayoutEffect(()=>{const l=a.current;if(!l)return;const c=()=>{const d=r.findIndex(S=>S.value===e);if(d<0)return;const u=l.children[d],m=u.querySelector("span"),h=(m==null?void 0:m.offsetWidth)??u.offsetWidth,w=u.offsetWidth,k=u.offsetLeft+(w-h)/2;o({left:k,width:h})};return c(),window.addEventListener("resize",c),l.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),l.removeEventListener("scroll",c)}},[e,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===e;return i.jsx("li",{role:"tab","aria-selected":c,onClick:()=>t(l.value),className:I("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[e]})]})}const Rt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},ca={sm:"h-6",md:"h-10",lg:"h-12"},da={sm:"px-2",md:"px-2.5",lg:"px-3"},ua={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function fa({id:r,size:e,disabled:t,error:s,reserveErrorSpace:a,className:n,suffixButton:o,children:l}){return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative flex items-center w-full",children:[i.jsx("div",{className:"relative w-full",children:l}),o&&i.jsx("div",{className:"flex items-center h-full pr-2",children:o})]}),a?i.jsx("div",{className:"min-h-[18px] w-full",children:s!=null&&s.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:s.message}):i.jsx("span",{"aria-hidden":"true",children:" "})}):s!=null&&s.message?i.jsx("div",{className:"pt-1",children:i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:s.message})}):null]})}function gt(r){const{control:e,name:t,rules:s,defaultValue:a,options:n=[],loadOptions:o,reloadDeps:l=[],value:c,onChange:d,size:u="sm",width:m="100%",label:h,labelHidden:w=!1,hasError:g=!1,errorMessage:k="",reserveErrorSpace:S,disableErrorPlaceholder:y,disabled:b=!1,className:T,suffixButton:z,loading:F=!1,coerceFirstValid:B=!0}=r,W=x.useId(),_=t||W,[M,Q]=x.useState(n),[Z,D]=x.useState(!!o);x.useEffect(()=>{o&&(D(!0),o().then(G=>Q(G)).finally(()=>D(!1)))},[o,...l]);const H=G=>G.find(X=>X.value!==""&&X.value!==void 0)??G[0],J=typeof S=="boolean"?S:!!e;if(e&&t){const{field:G,fieldState:X}=ns({name:t,control:e,rules:s,defaultValue:a});return x.useEffect(()=>{if(!Z&&M.length>0&&B){const A=G.value,p=M.some(q=>String(q.value)===String(A));(A===void 0||!p)&&G.onChange(H(M).value)}},[M,Z,G,B]),i.jsxs("div",{className:I("flex flex-col",T),style:{width:m,maxWidth:"100%"},children:[h&&i.jsx("label",{htmlFor:_,className:I("pb-2 text-[var(--color-ds-text-primary)]",Rt[u],w&&"sr-only"),children:h}),F||Z?i.jsx(Xe,{width:"100%",height:ua[u],variant:"rect",className:"rounded-lg"}):i.jsx(fa,{id:_,size:u,disabled:b,error:X.error,reserveErrorSpace:typeof y=="boolean"?!y:J,className:T,suffixButton:z,children:i.jsx("select",{id:_,value:G.value,onChange:A=>G.onChange(A.target.value),disabled:b,className:I("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",Rt[u],ca[u],da[u],X.error?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",b?"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)]"),children:M.map(A=>i.jsx("option",{value:A.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:A.label},A.value))})})]})}return x.useEffect(()=>{if(!e&&M.length>0&&B){const G=M.some(A=>String(A.value)===String(c));(c===void 0||c===""||!G)&&d&&d(H(M).value)}},[M,c,d,e,B]),i.jsxs("div",{className:I("flex flex-col",T),style:{width:m,maxWidth:"100%"},children:[h&&i.jsx("label",{htmlFor:_,className:I("pb-2 text-[var(--color-ds-text-primary)]",Rt[u],w&&"sr-only"),children:h}),F||Z?i.jsx(Xe,{width:"100%",height:ua[u],variant:"rect",className:"rounded-lg"}):i.jsx(fa,{id:_,size:u,disabled:b,error:g?{message:k}:void 0,reserveErrorSpace:typeof y=="boolean"?!y:!!(S??!1),className:T,suffixButton:z,children:i.jsx("select",{id:_,value:c,onChange:G=>d==null?void 0:d(G.target.value),disabled:b,className:I("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",Rt[u],ca[u],da[u],g?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",b?"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)]"),children:M.map(G=>i.jsx("option",{value:G.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:G.label},G.value))})})]})}const pa={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"};function xi(r){return"options"in r||"loadOptions"in r}function ha({groupLabel:r,inputs:e=[],separator:t=i.jsx("span",{className:"px-1 select-none",children:"/"}),useSeparator:s=!0,className:a,showVisibleLabel:n=!1,size:o="sm",width:l}){const c=e.length;return i.jsxs("div",{className:I("flex flex-col",a),style:l?{width:l}:void 0,children:[i.jsx("label",{className:I("sr-only pb-2",pa[o]),children:r}),n&&i.jsx("label",{className:I("pb-2",pa[o]),children:r}),i.jsx("div",{className:"flex items-center flex-nowrap",children:e.map((d,u)=>{const{width:m,className:h,control:w,name:g,...k}=d,S=xi(d);let y="rounded-lg";!s&&c>1&&(u===0?y="rounded-l-lg rounded-r-none":u===c-1?y="rounded-r-lg rounded-l-none":y="rounded-none");const b=typeof m=="string"&&m.split(/\s+/).some(W=>W.startsWith("w-")||W.includes(":w-")),T=I("inline-flex items-center flex-shrink-0",typeof m=="string"?m:"w-40"),z=typeof m=="string"&&!b?{width:m}:void 0,F=I(h,y,m?void 0:"w-full"),B=W=>w&&g?i.jsx(_e,{name:g,control:w,render:({field:_})=>{const M=_.value;return W({...k,name:g,value:S?M===null?void 0:M??void 0:M??"",onChange:_.onChange,className:F,size:o})}}):W({...k,name:g,className:F,size:o});return i.jsxs("div",{className:T,style:z,children:[B(S?W=>i.jsx(gt,{...W,options:d.options,loadOptions:d.loadOptions}):W=>i.jsx(Ct,{...W})),s&&u<c-1&&t]},u)})})]})}const ma={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},wi={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function ga({groupLabel:r,options:e,control:t,name:s,rules:a,defaultValue:n,multiple:o=!0,size:l="sm",vertical:c=!0,className:d,showVisibleLabel:u=!0}){return i.jsx(_e,{name:s,control:t,rules:a,defaultValue:n,render:({field:m,fieldState:h})=>{const{value:w,onChange:g}=m;h.error;const k=y=>o?Array.isArray(w)&&w.includes(y):w===y,S=y=>{if(o){const b=Array.isArray(w)?[...w]:[],T=b.indexOf(y);T>=0?b.splice(T,1):b.push(y),g(b)}else g(y)};return i.jsxs("div",{className:I("w-full",d),children:[i.jsx("label",{className:I("sr-only pb-2 text-[var(--color-ds-text-primary)]",ma[l]),children:r}),u&&i.jsx("label",{className:I("block pb-2 text-[var(--color-ds-text-primary)]",ma[l]),children:r}),i.jsx("div",{className:I(c?"flex flex-col gap-2":"flex flex-wrap gap-4"),children:e.map(y=>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:y.value,checked:k(y.value),onChange:()=>S(y.value),className:I(wi[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:y.label})]},y.value))})]})}})}function yi(r){function e(o){var l,c;for(const d of Object.keys(o)){if((l=o[d])!=null&&l.types||(c=o[d])!=null&&c.message)return d;if(typeof o[d]=="object"){const u=e(o[d]);if(u)return`${d}.${u}`}}return null}const t=e(r);if(!t)return;const s=`[name="${t}"]`,a=`[name^="${t}["], [name^="${t}."]`,n=document.querySelector(s)??document.querySelector(a);n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),n.focus({preventScroll:!0}))}const ki={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"},ba=({id:r,message:e,variant:t="info",duration:s=5e3,onClose:a})=>(x.useEffect(()=>{const n=setTimeout(()=>a(r),s);return()=>clearTimeout(n)},[r,s,a]),i.jsxs("div",{className:I("w-80 max-w-full border-l-4 rounded shadow-md p-4 mb-2 flex justify-between items-start",ki[t]),role:"alert","aria-live":"assertive",children:[i.jsx("span",{className:"flex-1",children:e}),i.jsx("button",{onClick:()=>a(r),className:"ml-4 text-xl font-bold leading-none focus:outline-none",children:"×"})]}));let Ut;const ji=new Uint8Array(16);function Ei(){if(!Ut&&(Ut=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ut))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ut(ji)}const xe=[];for(let r=0;r<256;++r)xe.push((r+256).toString(16).slice(1));function Ni(r,e=0){return xe[r[e+0]]+xe[r[e+1]]+xe[r[e+2]]+xe[r[e+3]]+"-"+xe[r[e+4]]+xe[r[e+5]]+"-"+xe[r[e+6]]+xe[r[e+7]]+"-"+xe[r[e+8]]+xe[r[e+9]]+"-"+xe[r[e+10]]+xe[r[e+11]]+xe[r[e+12]]+xe[r[e+13]]+xe[r[e+14]]+xe[r[e+15]]}const va={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Si(r,e,t){if(va.randomUUID&&!r)return va.randomUUID();r=r||{};const s=r.random||(r.rng||Ei)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Ni(s)}const xa=x.createContext(null),wa=()=>{const r=x.useContext(xa);if(!r)throw new Error("useToast debe usarse dentro de <ToastProvider>");return r},_i=({children:r})=>{const[e,t]=x.useState([]),s=(n,o="info",l=5e3)=>{const c=Si();t(d=>[...d,{id:c,message:n,variant:o,duration:l}])},a=n=>{t(o=>o.filter(l=>l.id!==n))};return i.jsxs(xa.Provider,{value:{show:s},children:[r,i.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col items-end",children:e.map(n=>i.jsx(ba,{id:n.id,message:n.message,variant:n.variant,duration:n.duration,onClose:a},n.id))})]})},Fi=r=>r.type==="inputGroup",Ti=r=>r.type==="button",Ci=r=>!Fi(r)&&!Ti(r);function Ai(r){const e=Array.isArray(r)?r:[];return x.useMemo(()=>{const t={};for(const s of e)Ci(s)&&s.name&&(t[s.name]=s);return t},[e])}function Oi(r=[],e=[]){if(r===e)return!0;if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++){const s=r[t],a=e[t];if(s.value!==a.value||s.label!==a.label)return!1}return!0}function Mi(r){const[e,t]=x.useState({}),[s,a]=x.useState(0),n=x.useMemo(()=>r.filter(c=>(c==null?void 0:c.type)==="select"&&(c==null?void 0:c.name)&&!Array.isArray(c==null?void 0:c.options)&&typeof(c==null?void 0:c.loadOptions)=="function").map(c=>({name:c.name,load:c.loadOptions})),[r]),o=x.useMemo(()=>n.map(c=>c.name).sort().join("|"),[n]),l=x.useRef("");return x.useEffect(()=>{if(o===l.current)return;l.current=o;let c=!1;return(async()=>{n.length&&(a(u=>u+n.length),await Promise.all(n.map(async({name:u,load:m})=>{try{const h=await m();if(c)return;t(w=>{const g=w[u]??[];return Oi(g,h)?w:{...w,[u]:h}})}catch{}finally{c||a(h=>Math.max(0,h-1))}})))})(),()=>{c=!0}},[o,n]),{optionsMap:e,loadingCount:s}}const Vi=r=>r.type==="inputGroup",$i=r=>r.type==="button",zi=r=>!Vi(r)&&!$i(r);function Di(r){return typeof r=="object"&&r!==null}const Ii=r=>{const e=r.disabledWhen;if(!Di(e))return!1;const t="watchField"in e,s="rule"in e;return t&&!s};function Li(r,e){const t=Array.isArray(r)?r:[],s=x.useMemo(()=>t.filter(zi).filter(Ii),[t]),a=x.useMemo(()=>s.map(c=>c.disabledWhen.watchField),[s]),n=sr({control:e,...a.length>0?{name:a}:{}}),o=Array.isArray(n)?n:[],l={};return s.forEach((c,d)=>{const u=o[d];l[c.name??`__unnamed_${d}`]=u===c.disabledWhen.watchValue}),l}const ya={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Pi={sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function Er({control:r,name:e,rules:t,defaultValue:s,size:a="sm",width:n="100%",label:o,labelHidden:l=!1,hasError:c=!1,errorMessage:d="",maxLength:u,showCounter:m=!1,className:h,suffixButton:w,...g}){const k=x.useId(),S=e||k,[y,b]=x.useState(s||"");if(r&&e)return i.jsx(_e,{name:e,control:r,rules:t,defaultValue:s||"",render:({field:z,fieldState:F})=>{var B;return i.jsx(Er,{...g,size:a,width:n,label:o,labelHidden:l,hasError:!!F.error,errorMessage:((B=F.error)==null?void 0:B.message)||"",maxLength:u,showCounter:m,className:h,suffixButton:w,value:z.value,onChange:z.onChange})}});x.useEffect(()=>{b(s||"")},[s]);const T=z=>{var F;u!==void 0&&z.target.value.length>u||(b(z.target.value),(F=g.onChange)==null||F.call(g,z))};return i.jsxs("div",{className:I("flex flex-col",h),style:{width:n},children:[o&&i.jsx("label",{htmlFor:S,className:I("pb-2 text-[var(--color-ds-text-primary)]",ya[a],l&&"sr-only"),children:o}),i.jsxs("div",{className:"flex items-stretch gap-2",children:[i.jsx("textarea",{id:S,className:I("box-border bg-[var(--color-ds-background-page)] w-full resize vertical rounded-lg border outline-none transition font-[var(--font-primary)]",ya[a],Pi[a],c?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",g.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:y,onChange:T,maxLength:u,...g}),w?i.jsx("div",{className:"shrink-0",children:w}):null]}),i.jsxs("div",{className:"flex justify-between pt-1 min-h-[18px]",children:[c&&d?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:d}):i.jsx("span",{"aria-hidden":"true",children:" "}),m&&u!==void 0&&i.jsxs("span",{className:"text-xs text-[var(--color-ds-text-secondary)]",children:[y.length,"/",u]})]})]})}const Ri={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function ka({control:r=null,name:e,rules:t,defaultValue:s=!1,label:a,labelHidden:n=!1,disabled:o=!1,size:l="sm",className:c,hasError:d=!1,errorMessage:u="",checked:m,onChange:h}){const w=I(Ri[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]",o&&"opacity-50 cursor-not-allowed"),g=I("text-[var(--color-ds-text-primary)] text-ds-md",o&&"text-[var(--color-ds-text-secondary)]",n&&"sr-only");return r?i.jsx("div",{className:I("flex flex-col",c),children:i.jsx(_e,{name:e||"",control:r,rules:t,defaultValue:s,render:({field:k,fieldState:S})=>{const y=S.error;return i.jsxs(i.Fragment,{children:[i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx("input",{id:e,type:"checkbox",className:w,checked:!!k.value,onChange:b=>k.onChange(b.target.checked),disabled:o}),a&&i.jsx("span",{className:g,children:a})]}),(d||y)&&((y==null?void 0:y.message)||u)&&i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:(y==null?void 0:y.message)||u})]})}})}):i.jsxs("div",{className:I("flex flex-col",c),children:[i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx("input",{id:e,type:"checkbox",className:w,checked:!!m,onChange:k=>h==null?void 0:h(k.target.checked),disabled:o}),a&&i.jsx("span",{className:g,children:a})]}),d&&!!u&&i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:u})]})}function ja({name:r,control:e,searchFn:t,resolveByValue:s,label:a,size:n="sm",width:o="100%",disabled:l=!1,searchMode:c="button",minChars:d=3,debounceMs:u=600}){const m=dt(),{watch:h,getValues:w,setValue:g}=m,k=sr({control:e,name:r}),[S,y]=x.useState([]),[b,T]=x.useState(!1),[z,F]=x.useState(!1),[B,W]=x.useState(""),_=x.useRef(null),M=x.useRef(null),Q=x.useRef(!1),Z=x.useRef(!1),D=x.useRef(!0),H=x.useMemo(()=>{const p=new Map;for(const q of S)p.set(String(q.value).trim(),q.label??"");return p},[S]),J=async p=>{const q=(p??"").trim();if(!q){y([]),F(!1);return}T(!0);try{const E=await t(q,{watch:h,getValues:w});y(E??[]),F(!0)}finally{T(!1)}};x.useEffect(()=>{function p(q){_.current&&!_.current.contains(q.target)&&F(!1)}if(z)return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[z]),x.useEffect(()=>{if(Q.current)return;const q=(k?String(k):"").trim();if(!q){W(""),F(!1);return}const E=H.get(q);if(E){W(E),F(!1),D.current=!0;return}let j=!1;return(async()=>{if(s)try{const O=await s(q,{watch:h,getValues:w});j||(W((O==null?void 0:O.label)??q),F(!1),D.current=!0)}catch{j||(W(q),F(!1),D.current=!0)}else W(q),F(!1),D.current=!0})(),()=>{j=!0}},[k,H,s,h,w]),x.useEffect(()=>{if(c!=="debounced"||l)return;if(D.current){D.current=!1;return}if(!Z.current)return;M.current&&(window.clearTimeout(M.current),M.current=null);const p=(B||"").trim();return p.length>=d?M.current=window.setTimeout(()=>{J(p)},u):(y([]),F(!1)),()=>{M.current&&(window.clearTimeout(M.current),M.current=null)}},[B,c,d,u,l]);const G=n==="sm"?"text-ds-sm":n==="md"?"text-ds-md":"text-ds-lg",X=n==="sm"?"h-6":n==="md"?"h-10":"h-12",A=p=>{if(l)return;const q=(B||"").trim();p.key==="Enter"&&(p.preventDefault(),c==="debounced"?q.length>=d&&J(q):J(q)),p.key==="Escape"&&F(!1)};return i.jsx(_e,{name:r,control:e,render:({field:p,fieldState:q})=>{var E;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)] ${G}`,children:a}),i.jsx(Ct,{className:c==="button"?"rounded-r-none":void 0,type:"text",size:n,width:"100%",value:B,onChange:j=>{const O=j.target.value;Q.current=!0,Z.current=!0,W(O),(k?String(k):"").trim()&&g(r,"",{shouldDirty:!0})},onKeyDown:A,onBlur:()=>{Q.current=!1},disabled:l,hasError:q.invalid,errorMessage:(E=q.error)==null?void 0:E.message,onFocus:()=>{if(Q.current=!0,c==="button"&&Z.current){const j=(B||"").trim();j&&J(j)}},suffixButton:c==="button"?i.jsx(De,{type:"button",className:"!rounded-l-none",size:n,variant:"primary",onClick:()=>J((B||"").trim()),disabled:l,children:"Buscar"}):void 0}),b&&i.jsx("div",{className:"absolute top-14 left-0 right-0 z-10",children:i.jsx(Xe,{width:"100%",height:n==="sm"?"1.5rem":n==="md"?"2.5rem":"3rem",variant:"rect",className:"rounded-lg"})}),z&&!b&&S.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 ${G} max-h-48 overflow-auto z-10
|
|
35
|
+
`,children:S.map(j=>i.jsx("li",{className:`px-2 ${X} flex items-center cursor-pointer
|
|
36
36
|
text-[var(--color-ds-text-primary)]
|
|
37
|
-
hover:bg-[var(--color-ds-background-surface)]`,onClick:()=>{const O=String(j.value).trim();g(r,O,{shouldDirty:!0,shouldValidate:!0}),Y(j.label??O),Q.current=!1,Z.current=!1,F(!1)},children:j.label},String(j.value)))})]})}})}const bt=(r,e)=>r[e],Ea=r=>r instanceof Date?r.getTime():r;function Ui(r,e,t){const s=Ea(r),a=Ea(e);return typeof s=="number"&&typeof a=="number"||typeof s=="string"&&typeof a=="string"?t==="gt"?s>a:t==="gte"?s>=a:t==="lt"?s<a:s<=a:!1}function Bt(r,e){if(!r)return!1;switch(r.op){case"eq":return bt(e,r.field)===r.value;case"neq":return bt(e,r.field)!==r.value;case"in":return r.values.includes(bt(e,r.field));case"notIn":return!r.values.includes(bt(e,r.field));case"gt":case"gte":case"lt":case"lte":return Ui(bt(e,r.field),r.value,r.op);case"and":return r.rules.every(t=>Bt(t,e));case"or":return r.rules.some(t=>Bt(t,e));default:return!1}}const Bi=r=>r.type!=="inputGroup"&&r.type!=="button";function Zi({schema:r,resolver:e}){const{layout:t,fields:s,onSubmit:a,successMessage:n,errorMessage:o,footerButtons:l,defaultValues:c,loadDefaultValues:d,validationSchema:u}=r,{show:m}=wa(),{t:h}=dr(),w=x.useMemo(()=>{if(e)return e;try{const A=u??vi(r);return Io(A)}catch{return}},[e,r,u]),g=fo({resolver:w,mode:"onBlur",reValidateMode:"onChange",defaultValues:c??{}}),{control:k,reset:_,handleSubmit:y,formState:{errors:b,isSubmitting:T}}=g,[V,F]=x.useState(!1);x.useEffect(()=>{d&&(F(!0),d().then(A=>_(A)).finally(()=>F(!1)))},[d,_]);const R=x.useMemo(()=>(s??[]).filter(Bi),[s]),{loadingCount:Y,optionsMap:S}=Mi(R),D=Ai(s),Q=Li(s,k),Z=x.useMemo(()=>{const A={};return t.forEach((p,W)=>{p.type==="tabs"&&(A[W]=p.tabs[0].key)}),A},[t]),[z,H]=x.useState(Z),J=x.useCallback((A,p)=>{if(!(A!=null&&A.enabled)||!A.rule)return p;try{return!!Bt(A.rule,g.getValues())}catch{return p}},[g]),q=x.useMemo(()=>s.map(A=>A).filter(A=>{var p;return((p=A.clearWhen)==null?void 0:p.enabled)&&A.clearWhen.rule}).map(A=>({name:A.name,rule:A.clearWhen.rule,clearTo:A.clearWhen.clearTo})),[s]);x.useEffect(()=>{if(!q.length)return;const A=W=>{q.forEach(({name:E,rule:j,clearTo:O})=>{try{if(!!Bt(j,W)){const ee=O??"";W[E]!==ee&&g.setValue(E,ee,{shouldDirty:!0,shouldValidate:!0})}}catch{}})};A(g.getValues());const p=g.watch(()=>A(g.getValues()));return()=>{var W;return(W=p==null?void 0:p.unsubscribe)==null?void 0:W.call(p)}},[g,q]);const X=x.useCallback(A=>{var ne,ie,me,we;let p;if(typeof A=="string"){if(p=D[A],!p)return null}else p=A;const W=p.visibleWhen;if(!J(W,!0))return null;let j=!!p.disabled;const O=p.disabledWhen,L=J(O,!1);if(O!=null&&O.enabled&&(j=L),!(O!=null&&O.enabled)&&"name"in p&&p.name&&Q[p.name]&&(j=!0),p.type==="search"){const se=$e=>p.searchFn($e,{getValues:g.getValues,watch:g.watch}),pe={};return p.searchMode&&(pe.searchMode=p.searchMode),p.minChars&&(pe.minChars=p.minChars),p.debounceMs&&(pe.debounceMs=p.debounceMs),p.resolveByValue&&(pe.resolveByValue=p.resolveByValue),i.jsx(ja,{name:p.name,control:k,searchFn:se,label:p.label,size:p.size,width:p.width,disabled:j||T,...pe},p.name)}if(p.type==="inputGroup"){const se=p,pe=se.inputs.map($e=>{var xt;const he=typeof $e=="string"?D[$e]:$e;if(!he)return null;const ze=he.disabledWhen;let vt=!!he.disabled;const Sr=J(ze,!1);ze!=null&&ze.enabled&&(vt=Sr),!(ze!=null&&ze.enabled)&&Q[he.name]&&(vt=!0);const _r={name:he.name,control:k,label:he.label,size:he.size,width:he.width,placeholder:he.placeholder,hasError:!!b[he.name],errorMessage:((xt=b[he.name])==null?void 0:xt.message)||"",loading:V,disabled:vt,suffixButton:he.suffixButton,reserveErrorSpace:!0};return he.type==="select"?{..._r,options:he.options??S[he.name]??[],loadOptions:he.options?void 0:he.loadOptions}:{..._r,type:he.type}}).filter(Boolean);return i.jsx(ha,{groupLabel:se.groupLabel,inputs:pe,separator:se.separator,useSeparator:se.useSeparator,className:se.className,showVisibleLabel:se.showVisibleLabel,size:se.size},`inputGroup_${se.groupLabel}`)}if(p.type==="button"){const se=p;return i.jsx("div",{className:"self-center",children:i.jsx(De,{type:"button",variant:se.variant,size:se.size,width:se.width,icon:se.icon,iconPosition:se.iconPosition,ariaLabel:se.ariaLabel,onClick:se.onClick,disabled:j||T,children:se.label})},se.name)}const ee=p.suffixButton,ae=typeof ee=="string"?X(ee):ee,de={name:p.name,control:k,disabled:j||T,label:p.label,size:p.size,width:p.width,placeholder:p.placeholder,info:p.info,suffixButton:ae};switch(p.type){case"select":return i.jsx(_e,{name:p.name,control:k,render:({field:se})=>{var pe;return i.jsx(gt,{...de,value:se.value,onChange:se.onChange,options:p.options??S[p.name]??[],loadOptions:p.options?void 0:p.loadOptions,hasError:!!b[p.name],errorMessage:(pe=b[p.name])==null?void 0:pe.message,suffixButton:ae})}},p.name);case"textarea":return i.jsx(_e,{name:p.name,control:k,render:({field:se,fieldState:pe})=>{var $e;return i.jsx(Er,{...de,value:se.value,onChange:se.onChange,maxLength:p.maxLength,showCounter:!!p.showCounter,hasError:!!pe.error,errorMessage:(($e=pe.error)==null?void 0:$e.message)||""})}},p.name);case"file":return i.jsx(Os,{...de,defaultValue:[],maxFiles:p.maxFiles,accept:p.accept,hasError:!!b[p.name],errorMessage:(ne=b[p.name])==null?void 0:ne.message},p.name);case"checkbox":return i.jsx(ka,{...de,defaultValue:!1,hasError:!!b[p.name],errorMessage:(ie=b[p.name])==null?void 0:ie.message,name:p.name},p.name);case"date":return i.jsx(Ss,{...de,defaultValue:"",showTime:!!p.showTime,hasError:!!b[p.name],errorMessage:(me=b[p.name])==null?void 0:me.message},p.name);case"optionGroup":return i.jsx(ga,{...de,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(pr,{...de,type:p.type,loadingDefaults:V,hasError:!!b[p.name],errorMessage:(we=b[p.name])==null?void 0:we.message,suffixButton:ae,name:p.name},p.name)}},[D,k,b,T,V,S,J,Q,g.getValues,g.watch]);return i.jsx(Xn,{...g,children:i.jsxs("form",{noValidate:!0,onSubmit:y(async A=>{await a(A),m(n??h("ds.form.saveSuccess"),"success")},A=>{console.log("❌ errores de validación:",A),yi(A),m(o??h("ds.form.saveError"),"error")}),className:"space-y-6",children:[t.map((A,p)=>A.type==="rows"?i.jsx(x.Fragment,{children:A.sections.map((W,E)=>i.jsx("div",{className:"mb-6",children:i.jsx(Gt,{title:W.sectionTitle,defaultOpen:W.defaultOpen,children:W.rows.map((j,O)=>i.jsxs("div",{children:[j.title&&i.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:j.title}),i.jsx("div",{className:"flex flex-wrap -mx-2",children:j.columns.map((L,ee)=>{var ae;return i.jsx("div",{className:`${L.width} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:L.fields?L.fields.map(de=>X(de)):(ae=L.rows)==null?void 0:ae.map((de,ne)=>i.jsx("div",{className:"mb-1",children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:de.columns.map((ie,me)=>{var we;return i.jsx("div",{className:`${ie.width} px-2`,children:(we=ie.fields)==null?void 0:we.map(se=>X(se))},me)})})},ne))})},ee)})})]},O))})},E))},p):i.jsx(la,{options:A.tabs.map(W=>({label:W.label,value:W.key})),value:z[p],onChange:W=>H(E=>({...E,[p]:W})),children:Object.fromEntries(A.tabs.map(W=>[W.key,i.jsx("div",{className:"space-y-6",children:W.sections.map((E,j)=>i.jsx("div",{className:"mb-6",children:i.jsx(Gt,{title:E.sectionTitle,defaultOpen:E.defaultOpen,children:E.rows.map((O,L)=>i.jsx("div",{children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:O.columns.map((ee,ae)=>{var de;return i.jsx("div",{className:`${ee.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(de=ee.fields)==null?void 0:de.map((ne,ie)=>i.jsx(x.Fragment,{children:X(ne)},ie))})},ae)})})},L))})},j))},W.key)]))},p)),i.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:l??i.jsx(De,{type:"submit",variant:"primary",icon:qa,size:"sm",disabled:T||V||Y>0,children:h(T?"ds.form.sending":"ds.form.submit")})})]})})}const Wi={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function Na({icon:r,size:e="md",ariaLabel:t,disabled:s=!1,onClick:a,...n}){return i.jsx("button",{type:"button","aria-label":t,disabled:s,onClick:a,className:I("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",Wi[e],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...n,children:i.jsx(r,{className:I(e==="sm"?"h-4 w-4":e==="md"?"h-5 w-5":"h-6 w-6")})})}function Sa({dark:r,onToggle:e}){return i.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:e,className:I("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:I("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(Oe,{component:fn,size:"sm",className:I("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),i.jsx(Oe,{component:dn,size:"sm",className:I("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const _a=x.createContext({theme:"light",toggle:()=>{}});function qi({children:r}){const[e,t]=x.useState(!1),[s,a]=x.useState("light");x.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"),t(!0)},[]),x.useEffect(()=>{e&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,e]);const n=()=>a(o=>o==="light"?"dark":"light");return e?i.jsx(_a.Provider,{value:{theme:s,toggle:n},children:r}):null}const Fa=()=>x.useContext(_a),Ta=({pinnedPages:r,onRemovePinned:e,onBack:t,dark:s,locale:a,languageOptions:n,onChangeLocale:o,profile:l,profileOptions:c,onChangeProfile:d})=>{const u=r.slice(0,3),{toggle:m}=Fa(),{t:h,i18n:w}=dr(),g=k=>{o(k)};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:u.map(k=>i.jsxs("div",{className:"flex items-center",children:[i.jsx("a",{href:k.href,className:I("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:k.label}),i.jsx(Na,{icon:qt,size:"sm",ariaLabel:`${h("remove")} ${k.label}`,onClick:()=>e(k.id)})]},k.id))}),i.jsx("div",{className:"flex-grow"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(gt,{size:"sm",width:"auto",options:n,value:a,onChange:g,disableErrorPlaceholder:!0}),i.jsx(gt,{size:"sm",width:"auto",options:c,value:l,onChange:d,disableErrorPlaceholder:!0}),i.jsx(Sa,{dark:s,onToggle:m})]})]})},Gi=({loading:r=!1,ariaLabel:e="Cargando..."})=>r?i.jsxs("div",{className:`\r
|
|
37
|
+
hover:bg-[var(--color-ds-background-surface)]`,onClick:()=>{const O=String(j.value).trim();g(r,O,{shouldDirty:!0,shouldValidate:!0}),W(j.label??O),Q.current=!1,Z.current=!1,F(!1)},children:j.label},String(j.value)))})]})}})}const bt=(r,e)=>r[e],Ea=r=>r instanceof Date?r.getTime():r;function Ui(r,e,t){const s=Ea(r),a=Ea(e);return typeof s=="number"&&typeof a=="number"||typeof s=="string"&&typeof a=="string"?t==="gt"?s>a:t==="gte"?s>=a:t==="lt"?s<a:s<=a:!1}function Bt(r,e){if(!r)return!1;switch(r.op){case"eq":return bt(e,r.field)===r.value;case"neq":return bt(e,r.field)!==r.value;case"in":return r.values.includes(bt(e,r.field));case"notIn":return!r.values.includes(bt(e,r.field));case"gt":case"gte":case"lt":case"lte":return Ui(bt(e,r.field),r.value,r.op);case"and":return r.rules.every(t=>Bt(t,e));case"or":return r.rules.some(t=>Bt(t,e));default:return!1}}const Bi=r=>r.type!=="inputGroup"&&r.type!=="button";function Zi({schema:r,resolver:e}){const{layout:t,fields:s,onSubmit:a,successMessage:n,errorMessage:o,footerButtons:l,defaultValues:c,loadDefaultValues:d,validationSchema:u}=r,{show:m}=wa(),{t:h}=dr(),w=x.useMemo(()=>{if(e)return e;try{const A=u??vi(r);return Io(A)}catch{return}},[e,r,u]),g=fo({resolver:w,mode:"onBlur",reValidateMode:"onChange",defaultValues:c??{}}),{control:k,reset:S,handleSubmit:y,formState:{errors:b,isSubmitting:T}}=g,[z,F]=x.useState(!1);x.useEffect(()=>{d&&(F(!0),d().then(A=>S(A)).finally(()=>F(!1)))},[d,S]);const B=x.useMemo(()=>(s??[]).filter(Bi),[s]),{loadingCount:W,optionsMap:_}=Mi(B),M=Ai(s),Q=Li(s,k),Z=x.useMemo(()=>{const A={};return t.forEach((p,q)=>{p.type==="tabs"&&(A[q]=p.tabs[0].key)}),A},[t]),[D,H]=x.useState(Z),J=x.useCallback((A,p)=>{if(!(A!=null&&A.enabled)||!A.rule)return p;try{return!!Bt(A.rule,g.getValues())}catch{return p}},[g]),G=x.useMemo(()=>s.map(A=>A).filter(A=>{var p;return((p=A.clearWhen)==null?void 0:p.enabled)&&A.clearWhen.rule}).map(A=>({name:A.name,rule:A.clearWhen.rule,clearTo:A.clearWhen.clearTo})),[s]);x.useEffect(()=>{if(!G.length)return;const A=q=>{G.forEach(({name:E,rule:j,clearTo:O})=>{try{if(!!Bt(j,q)){const ee=O??"";q[E]!==ee&&g.setValue(E,ee,{shouldDirty:!0,shouldValidate:!0})}}catch{}})};A(g.getValues());const p=g.watch(()=>A(g.getValues()));return()=>{var q;return(q=p==null?void 0:p.unsubscribe)==null?void 0:q.call(p)}},[g,G]);const X=x.useCallback(A=>{var ne,ie,me,we;let p;if(typeof A=="string"){if(p=M[A],!p)return null}else p=A;const q=p.visibleWhen;if(!J(q,!0))return null;let j=!!p.disabled;const O=p.disabledWhen,L=J(O,!1);if(O!=null&&O.enabled&&(j=L),!(O!=null&&O.enabled)&&"name"in p&&p.name&&Q[p.name]&&(j=!0),p.type==="search"){const se=$e=>p.searchFn($e,{getValues:g.getValues,watch:g.watch}),pe={};return p.searchMode&&(pe.searchMode=p.searchMode),p.minChars&&(pe.minChars=p.minChars),p.debounceMs&&(pe.debounceMs=p.debounceMs),p.resolveByValue&&(pe.resolveByValue=p.resolveByValue),i.jsx(ja,{name:p.name,control:k,searchFn:se,label:p.label,size:p.size,width:p.width,disabled:j||T,...pe},p.name)}if(p.type==="inputGroup"){const se=p,pe=se.inputs.map($e=>{var xt;const he=typeof $e=="string"?M[$e]:$e;if(!he)return null;const ze=he.disabledWhen;let vt=!!he.disabled;const Sr=J(ze,!1);ze!=null&&ze.enabled&&(vt=Sr),!(ze!=null&&ze.enabled)&&Q[he.name]&&(vt=!0);const _r={name:he.name,control:k,label:he.label,size:he.size,width:he.width,placeholder:he.placeholder,hasError:!!b[he.name],errorMessage:((xt=b[he.name])==null?void 0:xt.message)||"",loading:z,disabled:vt,suffixButton:he.suffixButton,reserveErrorSpace:!0};return he.type==="select"?{..._r,options:he.options??_[he.name]??[],loadOptions:he.options?void 0:he.loadOptions}:{..._r,type:he.type}}).filter(Boolean);return i.jsx(ha,{groupLabel:se.groupLabel,inputs:pe,separator:se.separator,useSeparator:se.useSeparator,className:se.className,showVisibleLabel:se.showVisibleLabel,size:se.size},`inputGroup_${se.groupLabel}`)}if(p.type==="button"){const se=p;return i.jsx("div",{className:"self-center",children:i.jsx(De,{type:"button",variant:se.variant,size:se.size,width:se.width,icon:se.icon,iconPosition:se.iconPosition,ariaLabel:se.ariaLabel,onClick:se.onClick,disabled:j||T,children:se.label})},se.name)}const ee=p.suffixButton,ae=typeof ee=="string"?X(ee):ee,de={name:p.name,control:k,disabled:j||T,label:p.label,size:p.size,width:p.width,placeholder:p.placeholder,info:p.info,suffixButton:ae};switch(p.type){case"select":return i.jsx(_e,{name:p.name,control:k,render:({field:se})=>{var pe;return i.jsx(gt,{...de,value:se.value,onChange:se.onChange,options:p.options??_[p.name]??[],loadOptions:p.options?void 0:p.loadOptions,hasError:!!b[p.name],errorMessage:(pe=b[p.name])==null?void 0:pe.message,suffixButton:ae})}},p.name);case"textarea":return i.jsx(_e,{name:p.name,control:k,render:({field:se,fieldState:pe})=>{var $e;return i.jsx(Er,{...de,value:se.value,onChange:se.onChange,maxLength:p.maxLength,showCounter:!!p.showCounter,hasError:!!pe.error,errorMessage:(($e=pe.error)==null?void 0:$e.message)||""})}},p.name);case"file":return i.jsx(Os,{...de,defaultValue:[],maxFiles:p.maxFiles,accept:p.accept,hasError:!!b[p.name],errorMessage:(ne=b[p.name])==null?void 0:ne.message},p.name);case"checkbox":return i.jsx(ka,{...de,defaultValue:!1,hasError:!!b[p.name],errorMessage:(ie=b[p.name])==null?void 0:ie.message,name:p.name},p.name);case"date":return i.jsx(Ss,{...de,defaultValue:"",showTime:!!p.showTime,hasError:!!b[p.name],errorMessage:(me=b[p.name])==null?void 0:me.message},p.name);case"optionGroup":return i.jsx(ga,{...de,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(pr,{...de,type:p.type,loadingDefaults:z,hasError:!!b[p.name],errorMessage:(we=b[p.name])==null?void 0:we.message,suffixButton:ae,name:p.name},p.name)}},[M,k,b,T,z,_,J,Q,g.getValues,g.watch]);return i.jsx(Xn,{...g,children:i.jsxs("form",{noValidate:!0,onSubmit:y(async A=>{await a(A),m(n??h("ds.form.saveSuccess"),"success")},A=>{console.log("❌ errores de validación:",A),yi(A),m(o??h("ds.form.saveError"),"error")}),className:"space-y-6",children:[t.map((A,p)=>A.type==="rows"?i.jsx(x.Fragment,{children:A.sections.map((q,E)=>i.jsx("div",{className:"mb-6",children:i.jsx(Gt,{title:q.sectionTitle,defaultOpen:q.defaultOpen,children:q.rows.map((j,O)=>i.jsxs("div",{children:[j.title&&i.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:j.title}),i.jsx("div",{className:"flex flex-wrap -mx-2",children:j.columns.map((L,ee)=>{var ae;return i.jsx("div",{className:`${L.width} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:L.fields?L.fields.map(de=>X(de)):(ae=L.rows)==null?void 0:ae.map((de,ne)=>i.jsx("div",{className:"mb-1",children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:de.columns.map((ie,me)=>{var we;return i.jsx("div",{className:`${ie.width} px-2`,children:(we=ie.fields)==null?void 0:we.map(se=>X(se))},me)})})},ne))})},ee)})})]},O))})},E))},p):i.jsx(la,{options:A.tabs.map(q=>({label:q.label,value:q.key})),value:D[p],onChange:q=>H(E=>({...E,[p]:q})),children:Object.fromEntries(A.tabs.map(q=>[q.key,i.jsx("div",{className:"space-y-6",children:q.sections.map((E,j)=>i.jsx("div",{className:"mb-6",children:i.jsx(Gt,{title:E.sectionTitle,defaultOpen:E.defaultOpen,children:E.rows.map((O,L)=>i.jsx("div",{children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:O.columns.map((ee,ae)=>{var de;return i.jsx("div",{className:`${ee.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(de=ee.fields)==null?void 0:de.map((ne,ie)=>i.jsx(x.Fragment,{children:X(ne)},ie))})},ae)})})},L))})},j))},q.key)]))},p)),i.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:l??i.jsx(De,{type:"submit",variant:"primary",icon:qa,size:"sm",disabled:T||z||W>0,children:h(T?"ds.form.sending":"ds.form.submit")})})]})})}const Wi={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function Na({icon:r,size:e="md",ariaLabel:t,disabled:s=!1,onClick:a,...n}){return i.jsx("button",{type:"button","aria-label":t,disabled:s,onClick:a,className:I("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",Wi[e],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...n,children:i.jsx(r,{className:I(e==="sm"?"h-4 w-4":e==="md"?"h-5 w-5":"h-6 w-6")})})}function Sa({dark:r,onToggle:e}){return i.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:e,className:I("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:I("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(Oe,{component:fn,size:"sm",className:I("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),i.jsx(Oe,{component:dn,size:"sm",className:I("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const _a=x.createContext({theme:"light",toggle:()=>{}});function qi({children:r}){const[e,t]=x.useState(!1),[s,a]=x.useState("light");x.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"),t(!0)},[]),x.useEffect(()=>{e&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,e]);const n=()=>a(o=>o==="light"?"dark":"light");return e?i.jsx(_a.Provider,{value:{theme:s,toggle:n},children:r}):null}const Fa=()=>x.useContext(_a),Ta=({pinnedPages:r,onRemovePinned:e,onBack:t,dark:s,locale:a,languageOptions:n,onChangeLocale:o,profile:l,profileOptions:c,onChangeProfile:d})=>{const u=r.slice(0,3),{toggle:m}=Fa(),{t:h,i18n:w}=dr(),g=k=>{o(k)};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:u.map(k=>i.jsxs("div",{className:"flex items-center",children:[i.jsx("a",{href:k.href,className:I("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:k.label}),i.jsx(Na,{icon:qt,size:"sm",ariaLabel:`${h("remove")} ${k.label}`,onClick:()=>e(k.id)})]},k.id))}),i.jsx("div",{className:"flex-grow"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(gt,{size:"sm",width:"auto",options:n,value:a,onChange:g,disableErrorPlaceholder:!0}),i.jsx(gt,{size:"sm",width:"auto",options:c,value:l,onChange:d,disableErrorPlaceholder:!0}),i.jsx(Sa,{dark:s,onToggle:m})]})]})},Gi=({loading:r=!1,ariaLabel:e="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(qt,{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),Nr=({items:r,selected:e,onSelect:t,level:s=0})=>{const[a,n]=x.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:I(s>0?"mt-1":"mt-0"),children:r.map(l=>{var g;const c=l.value===e,d=a.has(l.value),u=["pl-2","pl-2","pl-2"][s]||"pl-4",m=s===0?d||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)]",h=s===0&&(d||c)?"text-[var(--color-ds-text-on-accent)]":"text-[var(--color-ds-text-secondary)]",w=!!((g=l.children)!=null&&g.length);return i.jsxs("li",{children:[i.jsxs("button",{type:"button",onClick:()=>w?o(l.value):t(l.value),"aria-expanded":w?d:void 0,className:I("w-full flex items-center justify-between h-8 transition-colors",u,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})]}),w&&(d?i.jsx(Wt,{className:I("w-4 h-4",h)}):i.jsx(Ha,{className:I("w-4 h-4",h)}))]}),w&&i.jsx("div",{className:I("overflow-hidden transition-[max-height] duration-300 ease-in-out","border-l-1 border-[var(--color-ds-background-accent)] ml-6",d?"max-h-screen":"max-h-0"),children:i.jsx(Nr,{items:l.children,selected:e,onSelect:t,level:s+1})})]},l.value)})})},Hi="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",Xi="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",Ca=({appName:r,orgName:e,username:t,footerText:s,navItems:a,selectedNav:n,onSelectNav:o,width:l="200px"})=>{const{theme:c}=Fa(),d=c==="dark"?Hi:Xi;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:d,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:e}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:t}),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(Nr,{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 Ki({hideSidebar:r=!1,sidebar:e,header:t,children:s}){return i.jsxs("div",{className:"flex h-screen overflow-hidden bg-[var(--color-ds-background-page)]",children:[!r&&i.jsx(Ca,{...e}),i.jsxs("div",{className:`flex-1 flex flex-col overflow-auto [scrollbar-gutter:stable_both-edges] ${r?"px-0":"px-10"}`,children:[i.jsx(Ta,{...t}),i.jsx("main",{className:"flex-1",children:s})]})]})}function Ji({columns:r,data:e,loadData:t,loading:s,idAccessor:a,multiSelect:n=!1,onSelectionChange:o,pageSize:l=10,initialSort:c,onSort:d,className:u,onRowDoubleClick:m}){const h=e!==void 0,[w,g]=x.useState([]),[k,_]=x.useState(!1),y=x.useRef(null);x.useEffect(()=>{var O;if(!t||h)return;(O=y.current)==null||O.abort();const j=new AbortController;return y.current=j,_(!0),t().then(L=>{j.signal.aborted||g(L)}).finally(()=>{j.signal.aborted||_(!1)}),()=>j.abort()},[t,h]);const b=x.useMemo(()=>h?e:w,[e,w,h]),T=s??(t?k:!1),[V,F]=x.useState(new Set),[R,Y]=x.useState(1),[S,D]=x.useState(c==null?void 0:c.sortBy),[Q,Z]=x.useState((c==null?void 0:c.sortDir)??"asc"),z=j=>typeof a=="function"?a(j):j[a],H=x.useRef(null);x.useEffect(()=>{H.current!==b&&(F(new Set),Y(1),H.current=b)},[b]);const J=x.useMemo(()=>{if(!S)return b;const j=Q==="asc"?1:-1;return[...b].sort((O,L)=>{const ee=O[S],ae=L[S];return ee==null?-j:ae==null||ee>ae?j:ee<ae?-j:0})},[b,S,Q]),q=Math.max(1,Math.ceil(J.length/l)),X=x.useMemo(()=>{const j=(R-1)*l;return J.slice(j,j+l)},[J,R,l]),A=j=>{const O=new Set(V);O.has(j)?O.delete(j):O.add(j),F(O),o==null||o(b.filter(L=>O.has(z(L))))},p=()=>{const j=X.every(L=>V.has(z(L))),O=new Set(V);X.forEach(L=>{j?O.delete(z(L)):O.add(z(L))}),F(O),o==null||o(b.filter(L=>O.has(z(L))))},W=j=>{if(!j.sortable)return;const O=typeof j.accessor=="string"?j.accessor:j.sortKey;if(S===O){const L=Q==="asc"?"desc":"asc";Z(L),d==null||d(O,L)}else D(O),Z("asc"),d==null||d(O,"asc");Y(1)},E=()=>T?i.jsx("tbody",{children:Array.from({length:l}).map((j,O)=>i.jsxs("tr",{children:[n&&i.jsx("td",{children:i.jsx(Xe,{width:"1rem",height:"1rem",variant:"circle"})}),r.map((L,ee)=>i.jsx("td",{children:i.jsx(Xe,{width:"100%",height:"1em",variant:"rect"})},ee))]},O))}):X.length?i.jsx("tbody",{children:X.map(j=>{const O=z(j);return i.jsxs("tr",{className:I("hover:bg-gray-50",m&&"cursor-pointer select-none"),onDoubleClick:m?()=>m(j):void 0,title:m?"Doble clic para abrir":void 0,children:[n&&i.jsx("td",{children:i.jsx("input",{type:"checkbox",checked:V.has(O),onChange:()=>A(O),onDoubleClick:L=>L.stopPropagation()})}),r.map((L,ee)=>{const ae=L.render?L.render(j):typeof L.accessor=="function"?L.accessor(j):j[L.accessor];return i.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm",children:ae},ee)})]},O)})}):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:I("w-full overflow-auto",u),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:X.length>0&&X.every(j=>V.has(z(j))),onChange:p,onDoubleClick:j=>j.stopPropagation()})}),r.map(j=>{const O=typeof j.accessor=="string"?j.accessor:j.header,L=S===(typeof j.accessor=="string"?j.accessor:j.sortKey);return i.jsx("th",{className:I("px-4 py-2 text-left text-sm font-medium text-gray-700",j.width),onClick:()=>W(j),children:i.jsxs("div",{className:"inline-flex items-center space-x-1 cursor-pointer",children:[i.jsx("span",{children:j.header}),j.sortable&&i.jsx("span",{className:"text-xs",children:L?Q==="asc"?"▲":"▼":"⇵"})]})},O)})]})}),E()]}),i.jsxs("div",{className:"flex items-center justify-between py-2 px-4",children:[i.jsx("span",{className:"text-sm text-gray-700",children:T?"Cargando...":`Página ${R} de ${q}`}),i.jsxs("div",{className:"space-x-2",children:[i.jsx(De,{size:"sm",variant:"outline",disabled:T||R<=1,onClick:()=>Y(j=>Math.max(1,j-1)),children:"Prev"}),i.jsx(De,{size:"sm",variant:"outline",disabled:T||R>=q,onClick:()=>Y(j=>Math.min(q,j+1)),children:"Next"})]})]})]})}function Aa({control:r,name:e,rules:t,defaultValue:s=!1,checked:a,onChange:n,disabled:o=!1,label:l,labelPosition:c="right",errorMessage:d="",className:u}){const m=x.useId();if(r&&e)return i.jsx(_e,{name:e,control:r,rules:t,defaultValue:s,render:({field:w,fieldState:g})=>{var k;return i.jsx(Aa,{checked:w.value,onChange:w.onChange,disabled:o,label:l,labelPosition:c,errorMessage:((k=g.error)==null?void 0:k.message)||"",className:u})}});const h=!!a;return i.jsxs("div",{className:I("flex flex-col",u),children:[i.jsxs("label",{className:I("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":h,disabled:o,onClick:()=>!o&&(n==null?void 0:n(!h)),className:I("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:I("absolute h-6 w-6 bg-[var(--color-ds-background-page)] rounded-full shadow transform transition-transform duration-200",h?"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:d?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:d}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Qi({items:r,value:e,onValueChange:t,multiple:s=!0,dense:a=!1,className:n}){const o=x.useMemo(()=>r.filter(g=>g.defaultOpen&&!g.disabled).map(g=>g.id),[r]),[l,c]=x.useState(o),d=e??l,u=g=>{t?t(g):c(g)},m=(g,k)=>{k&&u(s?d.includes(g)?d.filter(_=>_!==g):[...d,g]:d.includes(g)?[]:[g])},h=(g,k,_)=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m(k,_))},w=a?"py-1":"py-2";return i.jsx("div",{className:["divide-y","divide-[var(--color-ds-border-default-50)]",n].filter(Boolean).join(" "),children:r.map(g=>{const k=d.includes(g.id),_=!g.disabled;return i.jsxs("section",{"aria-disabled":g.disabled||void 0,children:[i.jsxs("button",{type:"button",onClick:()=>m(g.id,_),onKeyDown:y=>h(y,g.id,_),"aria-expanded":k,className:["w-full flex items-center justify-between gap-2 text-left select-none",w,"text-[var(--color-ds-text-primary)]",g.disabled?"opacity-60 cursor-not-allowed":"hover:bg-[color-mix(in_srgb,var(--color-ds-background-surface)_80%,transparent)]"].join(" "),children:[i.jsxs("div",{className:"min-w-0 flex items-center gap-2",children:[g.leftAdornment&&i.jsx("span",{className:"shrink-0",children:g.leftAdornment}),i.jsx("span",{className:"font-medium truncate",children:g.title})]}),i.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[g.actions,i.jsx(Wt,{className:["h-4 w-4 transition-transform",k?"rotate-180":"",g.disabled?"opacity-40":""].join(" ")})]})]}),k&&i.jsx("div",{className:[a?"py-1":"py-2"].join(" "),children:g.content})]},g.id)})})}te.Button=De,te.Checkbox=ka,te.CollapsibleSection=Gt,te.CompactAccordion=Qi,te.DateInput=Ss,te.DropdownMenu=mo,te.FileUploader=Os,te.FormFieldInput=pr,te.FormPageLayout=$o,te.FormRenderer=Zi,te.Header=Ta,te.Icon=Oe,te.IconButton=Na,te.InfoButton=Vs,te.Input=Ct,te.InputGroup=ha,te.LoadingScreen=Gi,te.Modal=Yi,te.OptionGroup=ga,te.PageLayout=Ki,te.SearchField=ja,te.Select=gt,te.Sidebar=Ca,te.SidebarNav=Nr,te.SkeletonLoader=Xe,te.Table=Ji,te.Tabs=la,te.TextArea=Er,te.ThemeProvider=qi,te.ThemeToggle=Sa,te.Toast=ba,te.ToastProvider=_i,te.ToggleSwitch=Aa,te.useToast=wa,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|
|
62
|
+
`,children:[i.jsx(qt,{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),Nr=({items:r,selected:e,onSelect:t,level:s=0})=>{const[a,n]=x.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:I(s>0?"mt-1":"mt-0"),children:r.map(l=>{var g;const c=l.value===e,d=a.has(l.value),u=["pl-2","pl-2","pl-2"][s]||"pl-4",m=s===0?d||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)]",h=s===0&&(d||c)?"text-[var(--color-ds-text-on-accent)]":"text-[var(--color-ds-text-secondary)]",w=!!((g=l.children)!=null&&g.length);return i.jsxs("li",{children:[i.jsxs("button",{type:"button",onClick:()=>w?o(l.value):t(l.value),"aria-expanded":w?d:void 0,className:I("w-full flex items-center justify-between h-8 transition-colors",u,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})]}),w&&(d?i.jsx(Wt,{className:I("w-4 h-4",h)}):i.jsx(Ha,{className:I("w-4 h-4",h)}))]}),w&&i.jsx("div",{className:I("overflow-hidden transition-[max-height] duration-300 ease-in-out","border-l-1 border-[var(--color-ds-background-accent)] ml-6",d?"max-h-screen":"max-h-0"),children:i.jsx(Nr,{items:l.children,selected:e,onSelect:t,level:s+1})})]},l.value)})})},Hi="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",Xi="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",Ca=({appName:r,orgName:e,username:t,footerText:s,navItems:a,selectedNav:n,onSelectNav:o,width:l="200px"})=>{const{theme:c}=Fa(),d=c==="dark"?Hi:Xi;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:d,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:e}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:t}),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(Nr,{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 Ki({hideSidebar:r=!1,sidebar:e,header:t,children:s}){return i.jsxs("div",{className:"flex h-screen overflow-hidden bg-[var(--color-ds-background-page)]",children:[!r&&i.jsx(Ca,{...e}),i.jsxs("div",{className:`flex-1 flex flex-col overflow-auto [scrollbar-gutter:stable_both-edges] ${r?"px-0":"px-10"}`,children:[i.jsx(Ta,{...t}),i.jsx("main",{className:"flex-1",children:s})]})]})}function Ji({columns:r,data:e,loadData:t,loading:s,idAccessor:a,multiSelect:n=!1,onSelectionChange:o,pageSize:l=10,initialSort:c,onSort:d,className:u,onRowDoubleClick:m}){const h=e!==void 0,[w,g]=x.useState([]),[k,S]=x.useState(!1),y=x.useRef(null);x.useEffect(()=>{var O;if(!t||h)return;(O=y.current)==null||O.abort();const j=new AbortController;return y.current=j,S(!0),t().then(L=>{j.signal.aborted||g(L)}).finally(()=>{j.signal.aborted||S(!1)}),()=>j.abort()},[t,h]);const b=x.useMemo(()=>h?e:w,[e,w,h]),T=s??(t?k:!1),[z,F]=x.useState(new Set),[B,W]=x.useState(1),[_,M]=x.useState(c==null?void 0:c.sortBy),[Q,Z]=x.useState((c==null?void 0:c.sortDir)??"asc"),D=j=>typeof a=="function"?a(j):j[a],H=x.useRef(null);x.useEffect(()=>{H.current!==b&&(F(new Set),W(1),H.current=b)},[b]);const J=x.useMemo(()=>{if(!_)return b;const j=Q==="asc"?1:-1;return[...b].sort((O,L)=>{const ee=O[_],ae=L[_];return ee==null?-j:ae==null||ee>ae?j:ee<ae?-j:0})},[b,_,Q]),G=Math.max(1,Math.ceil(J.length/l)),X=x.useMemo(()=>{const j=(B-1)*l;return J.slice(j,j+l)},[J,B,l]),A=j=>{const O=new Set(z);O.has(j)?O.delete(j):O.add(j),F(O),o==null||o(b.filter(L=>O.has(D(L))))},p=()=>{const j=X.every(L=>z.has(D(L))),O=new Set(z);X.forEach(L=>{j?O.delete(D(L)):O.add(D(L))}),F(O),o==null||o(b.filter(L=>O.has(D(L))))},q=j=>{if(!j.sortable)return;const O=typeof j.accessor=="string"?j.accessor:j.sortKey;if(_===O){const L=Q==="asc"?"desc":"asc";Z(L),d==null||d(O,L)}else M(O),Z("asc"),d==null||d(O,"asc");W(1)},E=()=>T?i.jsx("tbody",{children:Array.from({length:l}).map((j,O)=>i.jsxs("tr",{children:[n&&i.jsx("td",{children:i.jsx(Xe,{width:"1rem",height:"1rem",variant:"circle"})}),r.map((L,ee)=>i.jsx("td",{children:i.jsx(Xe,{width:"100%",height:"1em",variant:"rect"})},ee))]},O))}):X.length?i.jsx("tbody",{children:X.map(j=>{const O=D(j);return i.jsxs("tr",{className:I("hover:bg-gray-50",m&&"cursor-pointer select-none"),onDoubleClick:m?()=>m(j):void 0,title:m?"Doble clic para abrir":void 0,children:[n&&i.jsx("td",{children:i.jsx("input",{type:"checkbox",checked:z.has(O),onChange:()=>A(O),onDoubleClick:L=>L.stopPropagation()})}),r.map((L,ee)=>{const ae=L.render?L.render(j):typeof L.accessor=="function"?L.accessor(j):j[L.accessor];return i.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm",children:ae},ee)})]},O)})}):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:I("w-full overflow-auto",u),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:X.length>0&&X.every(j=>z.has(D(j))),onChange:p,onDoubleClick:j=>j.stopPropagation()})}),r.map(j=>{const O=typeof j.accessor=="string"?j.accessor:j.header,L=_===(typeof j.accessor=="string"?j.accessor:j.sortKey);return i.jsx("th",{className:I("px-4 py-2 text-left text-sm font-medium text-gray-700",j.width),onClick:()=>q(j),children:i.jsxs("div",{className:"inline-flex items-center space-x-1 cursor-pointer",children:[i.jsx("span",{children:j.header}),j.sortable&&i.jsx("span",{className:"text-xs",children:L?Q==="asc"?"▲":"▼":"⇵"})]})},O)})]})}),E()]}),i.jsxs("div",{className:"flex items-center justify-between py-2 px-4",children:[i.jsx("span",{className:"text-sm text-gray-700",children:T?"Cargando...":`Página ${B} de ${G}`}),i.jsxs("div",{className:"space-x-2",children:[i.jsx(De,{size:"sm",variant:"outline",disabled:T||B<=1,onClick:()=>W(j=>Math.max(1,j-1)),children:"Prev"}),i.jsx(De,{size:"sm",variant:"outline",disabled:T||B>=G,onClick:()=>W(j=>Math.min(G,j+1)),children:"Next"})]})]})]})}function Aa({control:r,name:e,rules:t,defaultValue:s=!1,checked:a,onChange:n,disabled:o=!1,label:l,labelPosition:c="right",errorMessage:d="",className:u}){const m=x.useId();if(r&&e)return i.jsx(_e,{name:e,control:r,rules:t,defaultValue:s,render:({field:w,fieldState:g})=>{var k;return i.jsx(Aa,{checked:w.value,onChange:w.onChange,disabled:o,label:l,labelPosition:c,errorMessage:((k=g.error)==null?void 0:k.message)||"",className:u})}});const h=!!a;return i.jsxs("div",{className:I("flex flex-col",u),children:[i.jsxs("label",{className:I("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":h,disabled:o,onClick:()=>!o&&(n==null?void 0:n(!h)),className:I("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:I("absolute h-6 w-6 bg-[var(--color-ds-background-page)] rounded-full shadow transform transition-transform duration-200",h?"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:d?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:d}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Qi({items:r,value:e,onValueChange:t,multiple:s=!0,dense:a=!1,className:n}){const o=x.useMemo(()=>r.filter(g=>g.defaultOpen&&!g.disabled).map(g=>g.id),[r]),[l,c]=x.useState(o),d=e??l,u=g=>{t?t(g):c(g)},m=(g,k)=>{k&&u(s?d.includes(g)?d.filter(S=>S!==g):[...d,g]:d.includes(g)?[]:[g])},h=(g,k,S)=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m(k,S))},w=a?"py-1":"py-2";return i.jsx("div",{className:["divide-y","divide-[var(--color-ds-border-default-50)]",n].filter(Boolean).join(" "),children:r.map(g=>{const k=d.includes(g.id),S=!g.disabled;return i.jsxs("section",{"aria-disabled":g.disabled||void 0,children:[i.jsxs("button",{type:"button",onClick:()=>m(g.id,S),onKeyDown:y=>h(y,g.id,S),"aria-expanded":k,className:["w-full flex items-center justify-between gap-2 text-left select-none",w,"text-[var(--color-ds-text-primary)]",g.disabled?"opacity-60 cursor-not-allowed":"hover:bg-[color-mix(in_srgb,var(--color-ds-background-surface)_80%,transparent)]"].join(" "),children:[i.jsxs("div",{className:"min-w-0 flex items-center gap-2",children:[g.leftAdornment&&i.jsx("span",{className:"shrink-0",children:g.leftAdornment}),i.jsx("span",{className:"font-medium truncate",children:g.title})]}),i.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[g.actions,i.jsx(Wt,{className:["h-4 w-4 transition-transform",k?"rotate-180":"",g.disabled?"opacity-40":""].join(" ")})]})]}),k&&i.jsx("div",{className:[a?"py-1":"py-2"].join(" "),children:g.content})]},g.id)})})}te.Button=De,te.Checkbox=ka,te.CollapsibleSection=Gt,te.CompactAccordion=Qi,te.DateInput=Ss,te.DropdownMenu=mo,te.FileUploader=Os,te.FormFieldInput=pr,te.FormPageLayout=$o,te.FormRenderer=Zi,te.Header=Ta,te.Icon=Oe,te.IconButton=Na,te.InfoButton=Vs,te.Input=Ct,te.InputGroup=ha,te.LoadingScreen=Gi,te.Modal=Yi,te.OptionGroup=ga,te.PageLayout=Ki,te.SearchField=ja,te.Select=gt,te.Sidebar=Ca,te.SidebarNav=Nr,te.SkeletonLoader=Xe,te.Table=Ji,te.Tabs=la,te.TextArea=Er,te.ThemeProvider=qi,te.ThemeToggle=Sa,te.Toast=ba,te.ToastProvider=_i,te.ToggleSwitch=Aa,te.useToast=wa,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|