@mci-ui/mci-ui 0.0.50 → 0.0.51
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.es.js
CHANGED
|
@@ -292,8 +292,8 @@ function Yt({
|
|
|
292
292
|
),
|
|
293
293
|
children: [
|
|
294
294
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
295
|
-
n && /* @__PURE__ */ e("span", { className: "
|
|
296
|
-
/* @__PURE__ */ e("
|
|
295
|
+
n && /* @__PURE__ */ e("span", { className: "shrink-0", children: n }),
|
|
296
|
+
/* @__PURE__ */ e("div", { className: l("text-base font-medium text-black"), children: t })
|
|
297
297
|
] }),
|
|
298
298
|
/* @__PURE__ */ e(
|
|
299
299
|
ke,
|
|
@@ -301,7 +301,7 @@ function Yt({
|
|
|
301
301
|
weight: "Linear",
|
|
302
302
|
size: 20,
|
|
303
303
|
className: l(
|
|
304
|
-
"
|
|
304
|
+
"shrink-0 transition-transform duration-300 text-slate-400",
|
|
305
305
|
s && "rotate-180"
|
|
306
306
|
)
|
|
307
307
|
}
|
package/dist/index.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(L,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("@solar-icons/react"),require("clsx"),require("tailwind-merge"),require("react"),require("react-dom/client")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@solar-icons/react","clsx","tailwind-merge","react","react-dom/client"],e):(L=typeof globalThis<"u"?globalThis:L||self,e(L.MciUi={},L.jsxRuntime,L.SolarIcons,L.clsx,L.tailwindMerge,L.React,L.client))})(this,(function(L,e,D,Ae,je,l,Le){"use strict";var ve=document.createElement("style");ve.textContent=`@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-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight: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-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-50:#fef2f2;--color-red-100:#fee2e2;--color-red-500:#fb2c36;--color-red-600:#e7000b;--color-red-700:#c10007;--color-red-800:#9f0712;--color-orange-50:#fff7ed;--color-orange-600:#f54a00;--color-yellow-50:#fefce8;--color-yellow-100:#fef9c3;--color-yellow-200:#fff085;--color-yellow-300:#ffdf20;--color-yellow-500:#efb100;--color-yellow-600:#d08700;--color-yellow-700:#a65f00;--color-green-50:#effdf5;--color-green-500:#00c16a;--color-green-600:#00a155;--color-blue-50:#eff6ff;--color-blue-100:#dbeafe;--color-blue-200:#bedbff;--color-blue-500:#2b7fff;--color-blue-600:#155dfc;--color-blue-700:#1447e6;--color-blue-800:#193cb8;--color-purple-500:oklch(62.7% .265 303.9);--color-slate-50:#f8fafc;--color-slate-100:#f1f5f9;--color-slate-200:#e2e8f0;--color-slate-300:#cad5e2;--color-slate-400:#90a1b9;--color-slate-500:#64748e;--color-slate-600:#45556c;--color-slate-700:#314158;--color-slate-800:#1d293d;--color-gray-500:oklch(55.1% .027 264.364);--color-black:#1d1f23;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-base:16px;--text-base--line-height: 1.5 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--leading-tight:1.25;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin .3s linear 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);--color-slate-base:#62748e;--text-h3:32px;--text-small:14px;--text-extra-small:12px;--animate-fade-in:fadeIn .5s ease-in-out}}@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%;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}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::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}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-6{top:calc(var(--spacing)*6)}.top-\\[calc\\(100\\%\\+4px\\)\\]{top:calc(100% + 4px)}.top-full{top:100%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-6{right:calc(var(--spacing)*6)}.right-8{right:calc(var(--spacing)*8)}.right-10{right:calc(var(--spacing)*10)}.right-16{right:calc(var(--spacing)*16)}.right-full{right:100%}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-6{bottom:calc(var(--spacing)*6)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-0\\.5{left:calc(var(--spacing)*.5)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-3{left:calc(var(--spacing)*3)}.left-4{left:calc(var(--spacing)*4)}.left-6{left:calc(var(--spacing)*6)}.left-full{left:100%}.z-10{z-index:10}.z-50{z-index:50}.z-\\[99px\\]{z-index:99px}.z-\\[100\\]{z-index:100}.z-\\[9999\\]{z-index:9999}.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-6{margin:calc(var(--spacing)*6)}.mx-2{margin-inline:calc(var(--spacing)*2)}.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)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-1{height:calc(var(--spacing)*1)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-96{max-height:calc(var(--spacing)*96)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-12{width:calc(var(--spacing)*12)}.w-\\[300px\\]{width:300px}.w-full{width:100%}.max-w-\\[720px\\]{max-width:720px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-9{min-width:calc(var(--spacing)*9)}.min-w-10{min-width:calc(var(--spacing)*10)}.min-w-12{min-width:calc(var(--spacing)*12)}.min-w-48{min-width:calc(var(--spacing)*48)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.origin-top{transform-origin:top}.origin-top-left{transform-origin:0 0}.origin-top-right{transform-origin:100% 0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-5{--tw-translate-x:calc(var(--spacing)*5);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)}.scale-50{--tw-scale-x:50%;--tw-scale-y:50%;--tw-scale-z:50%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-90{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-45{rotate:45deg}.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,)}.animate-\\[fadeIn_0\\.3s_ease-out\\]{animation:.3s ease-out fadeIn}.animate-\\[slideDown_0\\.3s_ease-out\\]{animation:.3s ease-out slideDown}.animate-fade-in{animation:var(--animate-fade-in)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.\\[appearance\\:textfield\\]{appearance:textfield}.appearance-none{appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-\\[2px\\]{gap:2px}: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)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}: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)))}.gap-y-1{row-gap:calc(var(--spacing)*1)}: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-slate-200>:not(:last-child)){border-color:var(--color-slate-200)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-solid{--tw-border-style:solid;border-style:solid}.border-blue-600{border-color:var(--color-blue-600)}.border-red-600{border-color:var(--color-red-600)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-400{border-color:var(--color-slate-400)}.border-slate-600{border-color:var(--color-slate-600)}.border-transparent{border-color:#0000}.border-yellow-500{border-color:var(--color-yellow-500)}.bg-black\\/40{background-color:#1d1f2366}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-600{background-color:var(--color-green-600)}.bg-orange-50{background-color:var(--color-orange-50)}.bg-orange-600{background-color:var(--color-orange-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-600{background-color:var(--color-red-600)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-600{background-color:var(--color-slate-600)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-gradient-to-l{--tw-gradient-position:to left in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-50{--tw-gradient-to:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.stroke-\\[2\\.5px\\]{stroke-width:2.5px}.object-cover{object-fit:cover}.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-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-20{padding-block:calc(var(--spacing)*20)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-4{padding-right:calc(var(--spacing)*4)}.pr-7{padding-right:calc(var(--spacing)*7)}.pr-8{padding-right:calc(var(--spacing)*8)}.pr-9{padding-right:calc(var(--spacing)*9)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-7{padding-left:calc(var(--spacing)*7)}.pl-8{padding-left:calc(var(--spacing)*8)}.pl-9{padding-left:calc(var(--spacing)*9)}.pl-10{padding-left:calc(var(--spacing)*10)}.pl-11{padding-left:calc(var(--spacing)*11)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-extra-small{font-size:var(--text-extra-small)}.text-h3{font-size:var(--text-h3)}.text-small{font-size:var(--text-small)}.leading-9{--tw-leading:calc(var(--spacing)*9);line-height:calc(var(--spacing)*9)}.leading-10{--tw-leading:calc(var(--spacing)*10);line-height:calc(var(--spacing)*10)}.leading-12{--tw-leading:calc(var(--spacing)*12);line-height:calc(var(--spacing)*12)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.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-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#82828C\\]{color:#82828c}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-gray-500{color:var(--color-gray-500)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-orange-600{color:var(--color-orange-600)}.text-purple-500{color:var(--color-purple-500)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-base{color:var(--color-slate-base)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow-md{--tw-shadow:0 4px 8px 0 var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px 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)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur:blur(2px);-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,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-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-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.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;user-select:none}@media (hover:hover){.group-hover\\:scale-100:is(:where(.group):hover *){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\\:rotate-180:is(:where(.group):hover *){rotate:180deg}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\:delay-200:is(:where(.group):hover *){transition-delay:.2s}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:border-blue-600:hover{border-color:var(--color-blue-600)}.hover\\:border-blue-700:hover{border-color:var(--color-blue-700)}.hover\\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\\:border-slate-400:hover{border-color:var(--color-slate-400)}.hover\\:border-yellow-500:hover{border-color:var(--color-yellow-500)}.hover\\:border-yellow-600:hover{border-color:var(--color-yellow-600)}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\\:bg-blue-200:hover{background-color:var(--color-blue-200)}.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\\:bg-transparent:hover{background-color:#0000}.hover\\:bg-yellow-100:hover{background-color:var(--color-yellow-100)}.hover\\:bg-yellow-500:hover{background-color:var(--color-yellow-500)}.hover\\:bg-yellow-600:hover{background-color:var(--color-yellow-600)}.hover\\:text-black:hover{color:var(--color-black)}.hover\\:text-blue-600:hover{color:var(--color-blue-600)}.hover\\:text-blue-700:hover{color:var(--color-blue-700)}.hover\\:text-slate-400:hover{color:var(--color-slate-400)}.hover\\:text-yellow-500:hover{color:var(--color-yellow-500)}.hover\\:text-yellow-600:hover{color:var(--color-yellow-600)}}.focus\\:border-blue-600:focus{border-color:var(--color-blue-600)}.focus\\:border-red-600:focus{border-color:var(--color-red-600)}.focus\\:bg-transparent:focus{background-color:#0000}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + 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\\:ring-2:focus{--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\\:ring-\\[rgba\\(21\\,93\\,252\\,0\\.25\\)\\]:focus{--tw-ring-color:#155dfc40}.focus\\:ring-blue-200:focus{--tw-ring-color:var(--color-blue-200)}.focus\\:ring-yellow-200:focus{--tw-ring-color:var(--color-yellow-200)}.focus\\:ring-yellow-300:focus{--tw-ring-color:var(--color-yellow-300)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.active\\:rotate-180:active{rotate:180deg}.active\\:animate-spin:active{animation:var(--animate-spin)}.active\\:border:active{border-style:var(--tw-border-style);border-width:1px}.active\\:border-blue-600:active{border-color:var(--color-blue-600)}.active\\:border-blue-800:active{border-color:var(--color-blue-800)}.active\\:border-slate-200:active{border-color:var(--color-slate-200)}.active\\:border-yellow-500:active{border-color:var(--color-yellow-500)}.active\\:border-yellow-700:active{border-color:var(--color-yellow-700)}.active\\:bg-blue-200:active{background-color:var(--color-blue-200)}.active\\:bg-blue-800:active{background-color:var(--color-blue-800)}.active\\:bg-red-800:active{background-color:var(--color-red-800)}.active\\:bg-slate-200:active{background-color:var(--color-slate-200)}.active\\:bg-slate-300:active{background-color:var(--color-slate-300)}.active\\:bg-transparent:active{background-color:#0000}.active\\:bg-yellow-100:active{background-color:var(--color-yellow-100)}.active\\:bg-yellow-700:active{background-color:var(--color-yellow-700)}.active\\:text-blue-800:active{color:var(--color-blue-800)}.active\\:text-slate-400:active{color:var(--color-slate-400)}.active\\:text-yellow-700:active{color:var(--color-yellow-700)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:border-slate-200:disabled{border-color:var(--color-slate-200)}.disabled\\:bg-slate-100:disabled{background-color:var(--color-slate-100)}.disabled\\:text-slate-400:disabled{color:var(--color-slate-400)}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width:48rem){.md\\:block{display:block}.md\\:flex-row{flex-direction:row}}.\\[\\&\\:\\:-webkit-inner-spin-button\\]\\:appearance-none::-webkit-inner-spin-button{appearance:none}.\\[\\&\\:\\:-webkit-outer-spin-button\\]\\:appearance-none::-webkit-outer-spin-button{appearance:none}.shadow-red,.focus\\:shadow-red:focus{box-shadow:0 0 0 2px #e7000b40}.focus\\:shadow-blue:focus{box-shadow:0 0 0 2px #155dfc40}.focus\\:shadow-slate:focus{box-shadow:0 0 0 2px #0f172a40}}ul,ol{list-style:none}input,textarea,button,select{outline:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideDown{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes smooth-shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes float{0%,to{transform:translateY(0)}50%{transform:translateY(-6px)}}.shimmer-mask{will-change:transform;background:linear-gradient(90deg,#0000,#ffffff59,#0000);animation:1.8s ease-in-out infinite smooth-shimmer}@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-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{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-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}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(ve);function Te(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(s,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return s.default=t,Object.freeze(s)}const U=Te(l);function a(...t){return je.twMerge(Ae.clsx(t))}function fe(t){return{handleEscape:r=>{r.key==="Escape"&&t()}}}function he(t,s){return{handleClick:o=>{t.current&&!t.current.contains(o.target)&&s()}}}function Ie({items:t,variant:s="blue",className:r}){const o=s==="blue",d=o?"hover:text-blue-600":"hover:text-yellow-500",p=o?"text-blue-600":"text-yellow-500";return e.jsx("nav",{className:a("flex items-center",r),"aria-label":"Breadcrumb",children:t.map((n,i)=>{const x=i===t.length-1;return e.jsxs("div",{className:"flex items-center",children:[x?e.jsxs("span",{className:a("flex items-center gap-x-2 font-medium",p),children:[n.icon,e.jsx("span",{children:n.label})]}):e.jsxs("a",{href:n.href??"#",onClick:h=>{n.onClick&&(h.preventDefault(),n.onClick())},className:a("flex items-center gap-x-2 transition-all text-small font-normal text-slate-500",d),children:[n.icon,e.jsx("span",{children:n.label})]}),!x&&e.jsx("span",{className:"mx-2 flex items-center",children:e.jsx(D.AltArrowRight,{weight:"Linear",size:20,className:"text-slate-500"})})]},i)})})}function $e({children:t,text:s,icon:r,iconPosition:o="left",size:d="base",variant:p="primary",color:n="yellow",loading:i=!1,disabled:x=!1,onClick:h,className:k,type:S="button"}){const N=t??s,m={sm:"h-9 px-2 text-small gap-1.5 rounded-lg leading-9 min-w-9",md:"h-10 px-2 text-base gap-2 rounded-lg leading-10 min-w-10",base:"h-12 px-4 text-base gap-2 rounded-xl leading-12 min-w-12"},v=p==="primary"||p==="secondary"||p==="outline"?{blue:{primary:"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 focus:ring-2 focus:ring-[rgba(21,93,252,0.25)]",secondary:"bg-blue-100 text-blue-600 hover:bg-blue-200 active:bg-blue-200 active:border active:border-blue-600 focus:ring-2 focus:ring-[rgba(21,93,252,0.25)]",outline:"border border-blue-600 text-blue-600 hover:border-blue-700 hover:text-blue-700 active:border-blue-800 active:text-blue-800 focus:ring-2 focus:ring-blue-200"},yellow:{primary:"bg-yellow-500 text-white hover:bg-yellow-600 active:bg-yellow-700 focus:ring-2 focus:ring-yellow-300",secondary:"bg-yellow-50 text-yellow-500 hover:bg-yellow-100 active:bg-yellow-100 active:border active:border-yellow-500 focus:ring-2 focus:ring-yellow-200",outline:"border border-yellow-500 text-yellow-500 hover:border-yellow-600 hover:text-yellow-600 active:border-yellow-700 active:text-yellow-700 focus:ring-2 focus:ring-yellow-200"}}[n][p]:{danger:"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 focus:ring-2 focus:shadow-red",tertiary:"bg-slate-100 text-black hover:bg-slate-200 active:bg-slate-300 focus:ring-2 focus:shadow-slate"}[p],z=x||i,y=z?p==="outline"?"border-slate-200 bg-white text-slate-400 cursor-not-allowed hover:bg-transparent hover:border-slate-200 hover:text-slate-400 active:border-slate-200 active:text-slate-400 active:bg-transparent focus:bg-transparent focus:ring-0":"bg-slate-200 text-slate-400 cursor-not-allowed hover:bg-slate-200 active:bg-slate-200 focus:ring-0":"";return e.jsxs("button",{type:S,onClick:h,disabled:z,className:a("inline-flex items-center justify-center font-medium transition-all duration-200 cursor-pointer",m[d],v,!z&&v,y,k),children:[r&&o==="left"&&!i&&e.jsx("span",{className:"flex items-center",children:r}),N&&e.jsx("span",{children:N}),r&&o==="right"&&!i&&e.jsx("span",{className:"flex items-center",children:r}),i&&e.jsx(D.Star2,{weight:"Linear",size:20,className:"animate-spin"})]})}const Be=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:11,height:8,viewBox:"0 0 11 8",fill:"none",...t},U.createElement("path",{d:"M0.625 3.76944L3.76944 6.91389L10.0694 0.625",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),Pe={blue:{border:"border-blue-600",bg:"bg-blue-600",hover:"hover:border-blue-600 hover:bg-blue-100",focus:"focus:shadow-blue"},yellow:{border:"border-yellow-500",bg:"bg-yellow-500",hover:"hover:border-yellow-500 hover:bg-yello-100",focus:"focus:ring-2 focus:ring-yellow-300"}},me=l.memo(function({type:s="checkbox",label:r,supportText:o,checked:d,onChange:p,error:n,disabled:i=!1,required:x=!1,className:h,variant:k="yellow",name:S,value:N}){const[m,M]=l.useState(!1),c=s==="radio",v=l.useMemo(()=>d??m,[d,m]),z=l.useCallback(C=>{i||(d===void 0&&M(C.target.checked),p?.(C))},[d,p,i]),y=l.useMemo(()=>{if(i){const F="border-slate-200 bg-slate-100";return c?{container:F,dot:v?"bg-slate-300":"bg-transparent",check:"text-slate-400"}:{container:F,dot:"",check:v?"text-slate-400":"text-transparent"}}const C=Pe[k];if(c){const F=a("border transition-all duration-200",v?C.border:"border-slate-400",!v&&C.hover,C.focus,v&&""),$=a("transition-all duration-200 rounded-full",v?C.bg:"bg-transparent");return{container:F,dot:$,check:""}}return{container:a("border transition-all duration-200",v?a(C.bg,C.border):"border-slate-400",!v&&C.hover,C.focus),dot:"",check:v?"text-white":"text-transparent"}},[c,v,i,k]),g=l.useMemo(()=>!r&&!o?null:e.jsxs("div",{className:"flex flex-col",children:[r&&e.jsxs("span",{className:a("text-base font-medium text-slate-700",n&&"text-red-600",i&&"text-slate-400"),children:[r,x&&e.jsx("span",{className:"text-extra-small text-red-600 ml-1",children:"*"})]}),o&&e.jsx("span",{className:a("text-slate-500 text-base font-normal",i&&"text-slate-400"),children:o})]}),[r,o,n,i,x]);return e.jsxs("div",{className:a("flex items-start",h),children:[e.jsxs("label",{className:a("flex items-start gap-2 select-none",i?"cursor-not-allowed":"cursor-pointer"),children:[e.jsx("input",{type:s,checked:v,onChange:z,disabled:i,required:x,className:"sr-only","aria-invalid":!!n,"aria-describedby":n?`${S}-error`:void 0,name:S,value:N}),e.jsx("div",{className:a("relative flex items-center justify-center",c?"w-5 h-5 rounded-full":"w-5 h-5 rounded",y.container),children:c?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("span",{className:a("w-3 h-3 rounded-full transition-all duration-200",y.dot,v?"opacity-100 scale-100":"opacity-0 scale-50")})}):e.jsx(Be,{className:a("w-4 h-4 stroke-[2.5px] transition-opacity duration-200",y.check,v?"opacity-100":"opacity-0")})}),g]}),n&&e.jsx("p",{id:`${S}-error`,className:"mt-1 text-extra-small text-red-600",children:n})]})});me.displayName="MciCheck";function We({title:t,children:s,defaultOpen:r=!1,icon:o,className:d,contentClassName:p}){const[n,i]=l.useState(r),[x,h]=l.useState(0),k=l.useRef(null);return l.useEffect(()=>{k.current&&h(n?k.current.scrollHeight:0)},[n]),e.jsxs("div",{className:a("overflow-hidden rounded-xl border border-slate-200",d),children:[e.jsxs("button",{onClick:()=>i(!n),className:a("flex w-full items-center justify-between p-5 transition-all duration-300 hover:cursor-pointer",n?"border-b border-slate-200":"border-b border-transparent"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[o&&e.jsx("span",{className:"flex-shrink-0",children:o}),e.jsx("span",{className:a("text-base font-medium text-black"),children:t})]}),e.jsx(D.AltArrowDown,{weight:"Linear",size:20,className:a("flex-shrink-0 transition-transform duration-300 text-slate-400",n&&"rotate-180")})]}),e.jsx("div",{className:a("overflow-hidden transition-all duration-300 ease-out"),style:{height:`${x}px`},children:e.jsx("div",{ref:k,className:a("p-5",p),children:s})})]})}const se=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...t},U.createElement("path",{d:"M7.75739 7.75735L16.2427 16.2426",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),U.createElement("path",{d:"M7.75733 16.2426L16.2426 7.75735",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));function Ye({isOpen:t,onClose:s,position:r="right",children:o,footer:d,title:p,description:n,showCloseButton:i=!0,drawerClassName:x,closeOnOverlayClick:h=!0,closeOnEscape:k=!0,width:S=572}){const N=l.useRef(null),m=l.useRef(null),M=l.useCallback(()=>{s()},[s]);l.useEffect(()=>{t?(m.current=document.activeElement,N.current?.focus()):m.current?.focus()},[t]),l.useEffect(()=>(t&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="unset"}),[t]);const c=l.useMemo(()=>({width:typeof S=="number"?`${S}px`:S,transform:t?"translateX(0)":r==="right"?"translateX(calc(100% + 48px))":"translateX(calc(-100% - 48px))"}),[t,S,r]),v={left:"top-6 left-6 bottom-6",right:"top-6 right-6 bottom-6"};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:a("fixed inset-0 z-50 bg-black/40 transition-opacity duration-300",t?"opacity-100 visible cursor-pointer":"opacity-0 invisible pointer-events-none"),onClick:h?M:void 0,"aria-hidden":"true"}),e.jsxs("div",{ref:N,tabIndex:-1,style:c,className:a("fixed flex flex-col z-50 w-full rounded-2xl bg-white transition-transform duration-300 ease-in-out outline-none",v[r],x),role:"dialog","aria-modal":"true","aria-labelledby":p?"drawer-title":void 0,children:[(p||i||n)&&e.jsxs("div",{className:"flex items-start justify-between border-b border-slate-200 p-6 shrink-0",children:[p&&e.jsxs("div",{className:"block",children:[e.jsx("h2",{id:"drawer-title",className:"text-h3 font-semibold text-black",children:p}),n&&e.jsx("p",{className:"text-base text-slate-base font-normal mt-2",children:n})]}),i&&e.jsx("button",{type:"button",onClick:M,className:"bg-slate-100 rounded-xl w-12 h-12 hover:cursor-pointer text-black transition flex items-center justify-center group active:scale-95",children:e.jsx(se,{className:"h-6 w-6 transition-transform duration-300 group-hover:rotate-180"})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin scrollbar-thumb-slate-200 p-6",children:o}),d&&e.jsx("div",{className:"flex items-center justify-end border-t border-slate-200 p-6 shrink-0",children:d})]})]})}const ce=l.forwardRef(({label:t,placeholder:s,type:r="text",icon:o,rightIcon:d,iconPosition:p="left",size:n="base",error:i,disabled:x=!1,required:h=!1,value:k,onChange:S,onFocus:N,onBlur:m,className:M,name:c,maxLength:v=250,onClear:z,showClearButton:y=!1,step:g,autoComplete:C="off"},B)=>{const[F,$]=l.useState(!1),[T,P]=l.useState(""),[W,K]=l.useState(!1),q=k??T,H=r==="password",te=y&&!!q&&!x,_=o&&p==="left",X=o&&p==="right"||d||H,oe=X||te,O=()=>{$(!0),N?.()},G=()=>{$(!1),m?.()},b=J=>{k===void 0&&P(J.target.value),S?.(J)},E=()=>K(J=>!J),I=()=>{k===void 0&&P(""),z?.()},w=l.useMemo(()=>({sm:{input:"h-9 text-small",padding:_&&X?"pl-7 pr-7":_?"pl-7 pr-2":X?"pl-2 pr-7":"px-2",icon:"w-4 h-4",leftIcon:"left-2",rightIcon:"right-2",labelFont:"text-small",iconWrapper:"h-4"},md:{input:"h-10 text-small",padding:_&&X?"pl-8 pr-8":_?"pl-8 pr-2":X?"pl-2 pr-8":"px-4",icon:"w-4 h-4",leftIcon:"left-2",rightIcon:"right-2",labelFont:"text-base",iconWrapper:"h-4"},base:{input:"h-12 text-base",padding:_&&X?"pl-9 pr-9":_?"pl-9 pr-3":X?"pl-3 pr-9":"px-4",icon:"w-5 h-5",leftIcon:"left-3",rightIcon:"right-3",labelFont:"text-base",iconWrapper:"h-5"}}),[_,X]),Z=l.useMemo(()=>i?"border-red-600 focus:border-red-600 shadow-red":"border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600",[i]),Y=l.useMemo(()=>x?"text-slate-400":i?"text-red-600":F?"text-black":"text-slate-400",[i,F,x]);return e.jsxs("div",{className:a("w-full",M),children:[t&&e.jsxs("label",{htmlFor:c,className:a("mb-2 block text-base font-medium",i?"text-red-600":"text-slate-700",w[n].labelFont),children:[t,h&&e.jsx("span",{className:"text-extra-small text-red-600 ml-1",children:"*"})]}),e.jsxs("div",{className:"relative flex items-center",children:[e.jsx("input",{ref:B,name:c,type:H&&W?"text":r,value:q,onChange:b,onFocus:O,onBlur:G,disabled:x,required:h,autoComplete:C,placeholder:s,step:g,className:a("w-full border bg-white font-normal transition-all duration-300 ease-in-out outline-none",n==="base"?"rounded-xl":"rounded-lg","disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",w[n].input,w[n].padding,Z),maxLength:v}),_&&e.jsx("div",{className:a("absolute top-1/2 flex -translate-y-1/2 items-center justify-center","transition-all duration-300",w[n].leftIcon,Y),children:e.jsx("div",{className:a("flex items-center justify-center",w[n].iconWrapper),children:e.jsx("span",{className:a("flex items-center justify-center",w[n].icon),children:o})})}),oe&&e.jsxs("div",{className:a("absolute top-1/2 flex -translate-y-1/2 items-center justify-center gap-2","transition-all duration-300",w[n].rightIcon),children:[te&&e.jsx("button",{type:"button",onClick:I,className:a("flex items-center justify-center",w[n].iconWrapper,"text-slate-base hover:text-black"),style:{cursor:"pointer"},children:e.jsx("span",{className:a("flex items-center justify-center",w[n].icon),children:e.jsx(se,{className:a("h-full w-full")})})}),d&&!H&&e.jsx("div",{className:a("flex items-center justify-center",w[n].iconWrapper),children:e.jsx("span",{className:a("flex items-center justify-center",w[n].icon,Y),children:d})}),H&&e.jsxs(e.Fragment,{children:[d&&e.jsx("div",{className:a("flex items-center justify-center",w[n].iconWrapper),children:e.jsx("span",{className:a("flex items-center justify-center",w[n].icon,Y),children:d})}),e.jsx("button",{type:"button",onClick:E,className:a("flex items-center justify-center",w[n].iconWrapper,Y),children:e.jsx("span",{className:a("flex items-center justify-center cursor-pointer",w[n].icon),children:W?e.jsx(D.EyeClosed,{weight:"Linear",className:a("h-full w-full")}):e.jsx(D.Eye,{weight:"Linear",className:a("h-full w-full")})})})]}),o&&p==="right"&&!H&&e.jsx("div",{className:a("flex items-center justify-center",w[n].iconWrapper),children:e.jsx("span",{className:a("flex items-center justify-center",w[n].icon,Y),children:o})})]})]}),i&&e.jsx("p",{className:"mt-2 animate-[slideDown_0.3s_ease-out] text-small font-normal text-red-600",children:i})]})});ce.displayName="MciInput";const _e={uz:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avgust","Sentabr","Oktabr","Noyabr","Dekabr"],monthsShort:["Yan","Fev","Mar","Apr","May","Iyn","Iyl","Avg","Sen","Okt","Noy","Dek"],weekdays:["Yakshanba","Dushanba","Seshanba","Chorshanba","Payshanba","Juma","Shanba"],weekdaysShort:["Ya","Du","Se","Ch","Pa","Ju","Sh"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],weekdays:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],weekdaysShort:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"]}},xe=l.forwardRef(({type:t="date",value:s,onChange:r,placeholder:o,label:d,disabled:p=!1,required:n=!1,className:i,format:x="DD.MM.YYYY",minDate:h,maxDate:k,error:S,showClear:N=!0,allowManualInput:m=!0,locale:M="uz",startView:c="day",iconPosition:v="left",align:z="auto"},y)=>{const[g,C]=l.useState(!1),[B,F]=l.useState(t==="range"?[null,null]:null),[$,T]=l.useState([null,null]),P=l.useCallback(u=>{if(!u)return null;const f=new Date(u);return isNaN(f.getTime())?null:f},[]),[W,K]=l.useState(new Date),[q,H]=l.useState(c),[te,_]=l.useState(0),[X,oe]=l.useState(""),[O,G]=l.useState(z),b=l.useRef(null),E=l.useMemo(()=>{const u=s!==void 0?s:B;if(t==="date")return P(u);const f=u;return[P(f[0]),P(f[1])]},[s,B,t,P]),I=_e[M];l.useEffect(()=>{if(g)if(t==="range"&&T(E),t==="date"){const u=E;u&&K(u)}else{const[u,f]=E;u?K(u):f&&K(f)}},[g]),l.useEffect(()=>{if(g&&z==="auto"&&b.current){const u=b.current.getBoundingClientRect(),f=window.innerWidth-u.right,j=u.left;f<300&&j>300?G("right"):G("left")}},[g,z]);const w=l.useCallback(u=>new Date(u.getFullYear(),u.getMonth(),u.getDate()),[]),Z=l.useCallback((u,f)=>w(u).getTime()===w(f).getTime(),[w]),Y=l.useCallback(u=>{const f=w(u);return!!(h&&f<w(h)||k&&f>w(k))},[h,k,w]),J=l.useCallback(u=>{if(!u)return"";const f=u.getDate().toString().padStart(2,"0"),j=(u.getMonth()+1).toString().padStart(2,"0"),V=u.getFullYear();return x.replace("DD",f).replace("MM",j).replace("YYYY",V.toString())},[x]),pe=l.useMemo(()=>{if(t==="date")return J(E);const[u,f]=E;return!u&&!f?"":u&&f?`${J(u)} - ${J(f)}`:u?`${J(u)} - ...`:"..."},[t,E,J]);l.useEffect(()=>{oe(pe)},[pe]);const ee=l.useCallback(()=>{C(!1),H(c),_(0)},[c]),{handleClick:ne}=he(b,ee),{handleEscape:A}=fe(ee);l.useEffect(()=>{if(g)return document.addEventListener("mousedown",ne),document.addEventListener("keydown",A),()=>{document.removeEventListener("mousedown",ne),document.removeEventListener("keydown",A)}},[g,ne,A]);const ae=l.useCallback(()=>{const u=t==="range"?[null,null]:null;F(u),T([null,null]),r?.(u)},[t,r]),st=l.useCallback(u=>{if(Y(u))return;const f=w(u);if(t==="date")F(f),r?.(f),ee();else{const[j,V]=$;if(!j&&!V||j&&V)T([f,null]);else if(j&&!V){const Q=f<j?[f,j]:[j,f];T(Q),F(Q),r?.(Q),ee()}}},[t,$,Y,w,r,ee]),nt=l.useCallback(u=>{const f=new Date(W.getFullYear(),u,1);K(f),c==="month"?(F(f),r?.(f),ee()):H("day")},[W,c,r,ee]),it=l.useCallback(u=>{const f=new Date(u,W.getMonth(),1);K(f),c==="year"?(F(f),r?.(f),ee()):H("month")},[W,c,r,ee]),Ee=u=>{K(f=>new Date(f.getFullYear(),f.getMonth()+u,1))},ue=u=>{K(f=>new Date(f.getFullYear()+u,f.getMonth(),1))},ct=l.useCallback(u=>{const f=u.getFullYear(),j=u.getMonth(),V=new Date(f,j,1).getDay(),Q=new Date(f,j+1,0).getDate(),re=[];for(let R=V;R>0;R--)re.push({date:new Date(f,j,1-R),isCurrentMonth:!1});for(let R=1;R<=Q;R++)re.push({date:new Date(f,j,R),isCurrentMonth:!0});const le=42-re.length;for(let R=1;R<=le;R++)re.push({date:new Date(f,j+1,R),isCurrentMonth:!1});return re},[]),dt=u=>{const f=w(u);if(t==="date")return E&&Z(f,E);const[j]=$[0]?$:E,V=P(j);return V&&Z(f,V)},pt=u=>{if(t!=="range")return!1;const f=w(u),[,j]=$[1]?$:E,V=P(j);return V&&Z(f,V)},ut=u=>{if(t!=="range")return!1;const f=w(u),[j,V]=$[0]?$:E,Q=P(j),re=P(V);return Q&&re&&f>w(Q)&&f<w(re)},De=(u,f,j)=>{const V=ct(u);return e.jsxs("div",{className:"w-[300px] p-2 select-none",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4 py-1",children:[e.jsx("div",{className:"flex gap-2",children:f&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>ue(-1),type:"button",className:"hover:bg-slate-100 p-1 rounded transition-colors",children:e.jsx(D.DoubleAltArrowLeft,{size:18,className:"text-slate-700"})}),e.jsx("button",{onClick:()=>Ee(-1),type:"button",className:"hover:bg-slate-100 p-1 rounded transition-colors",children:e.jsx(D.AltArrowLeft,{size:18,className:"text-slate-700"})})]})}),e.jsxs("div",{className:"flex gap-1 font-semibold text-slate-700 text-small",children:[e.jsx("span",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>H("month"),children:I.months[u.getMonth()]}),e.jsx("span",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>H("year"),children:u.getFullYear()})]}),e.jsx("div",{className:"flex gap-2",children:j&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>Ee(1),type:"button",className:"hover:bg-slate-100 p-1 rounded transition-colors",children:e.jsx(D.AltArrowRight,{size:18,className:"text-slate-700"})}),e.jsx("button",{onClick:()=>ue(1),type:"button",className:"hover:bg-slate-100 p-1 rounded transition-colors",children:e.jsx(D.DoubleAltArrowRight,{size:18,className:"text-slate-700"})})]})})]}),e.jsx("div",{className:"grid grid-cols-7 mb-1 text-center text-[11px] font-bold text-blue-600 uppercase",children:I.weekdaysShort.map(Q=>e.jsx("div",{className:"py-1",children:Q},Q))}),e.jsx("div",{className:"grid grid-cols-7 gap-y-1 relative",children:V.map((Q,re)=>{const le=Q.date,R=Y(le),be=dt(le),we=pt(le),gt=ut(le);return e.jsx("div",{className:a("h-10 flex items-center justify-center relative",gt&&"bg-blue-50",be&&t==="range"&&"bg-gradient-to-r from-transparent to-blue-50",we&&"bg-gradient-to-l from-transparent to-blue-50"),children:e.jsx("button",{type:"button",onClick:()=>st(le),disabled:R,className:a("w-9 h-9 cursor-pointer rounded-full flex items-center justify-center text-small font-medium transition-all z-10",Q.isCurrentMonth?"text-slate-700":"text-slate-300",R&&"opacity-20 cursor-not-allowed",be||we?"bg-blue-600 text-white":"hover:bg-blue-50",Z(le,new Date)&&!be&&!we&&"text-blue-600 border border-blue-600"),children:le.getDate()})},re)})})]})},ft=()=>e.jsxs("div",{className:"w-[300px] p-3",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4 px-2",children:[e.jsx("button",{type:"button",onClick:()=>ue(-1),className:"p-1 hover:bg-slate-100 rounded",children:e.jsx(D.AltArrowLeft,{size:20})}),e.jsx("span",{className:"font-bold text-slate-800",children:W.getFullYear()}),e.jsx("button",{type:"button",onClick:()=>ue(1),className:"p-1 hover:bg-slate-100 rounded",children:e.jsx(D.AltArrowRight,{size:20})})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:I.monthsShort.map((u,f)=>e.jsx("button",{type:"button",onClick:()=>nt(f),className:a("hover:cursor-pointer py-3 rounded-lg text-small font-semibold transition-colors",W.getMonth()===f?"bg-blue-600 text-white":"hover:bg-blue-50 text-slate-600"),children:u},u))})]}),ht=()=>{const u=Math.floor(W.getFullYear()/12)*12+te*12,f=Array.from({length:12},(j,V)=>u+V);return e.jsxs("div",{className:"w-[300px] p-3",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4 px-2",children:[e.jsx("button",{type:"button",onClick:()=>_(j=>j-1),className:"p-1 hover:bg-slate-100 rounded",children:e.jsx(D.AltArrowLeft,{size:20})}),e.jsxs("span",{className:"font-bold text-slate-800",children:[f[0]," - ",f[11]]}),e.jsx("button",{type:"button",onClick:()=>_(j=>j+1),className:"p-1 hover:bg-slate-100 rounded",children:e.jsx(D.AltArrowRight,{size:20})})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:f.map(j=>e.jsx("button",{type:"button",onClick:()=>it(j),className:a("hover:cursor-pointer py-3 rounded-lg text-small font-semibold transition-colors",W.getFullYear()===j?"bg-blue-600 text-white":"hover:bg-blue-50 text-slate-600"),children:j},j))})]})},Fe=e.jsx(D.Calendar,{weight:"Linear",size:20,className:"text-slate-400"});return e.jsxs("div",{ref:b,className:a("relative w-full group",i),children:[e.jsx("div",{ref:y,children:e.jsx(ce,{label:d,placeholder:Array.isArray(o)?o[0]:o,value:X,icon:v==="left"?Fe:void 0,rightIcon:v==="right"?Fe:void 0,disabled:p,required:n,error:S,onFocus:()=>{p||(C(!0),H(c))},readOnly:!m,showClearButton:N,onClear:ae})}),g&&e.jsx("div",{className:a("absolute top-[calc(100%+4px)] z-[100] bg-white rounded-xl shadow-xl border border-slate-200","flex flex-col md:flex-row overflow-hidden animate-in fade-in zoom-in-95 duration-200",O==="right"&&"right-0 origin-top-right",O==="left"&&"left-0 origin-top-left",O==="center"&&"left-1/2 -translate-x-1/2 origin-top"),style:{width:"max-content"},children:q==="day"?e.jsxs(e.Fragment,{children:[De(W,!0,t!=="range"),t==="range"&&e.jsx("div",{className:"hidden md:block border-l border-slate-100",children:De(new Date(W.getFullYear(),W.getMonth()+1,1),!1,!0)})]}):q==="month"?ft():ht()})]})});xe.displayName="MciPicker";const Ve={sm:{container:"h-9 text-small",padding:"px-2",iconPaddingLeft:"pl-7",iconPaddingRight:"pr-7",iconSize:"w-4 h-4",iconWrapper:"left-2",rightIconWrapper:"right-2",label:"text-small",dropdown:"text-small"},md:{container:"h-10 text-small",padding:"px-4",iconPaddingLeft:"pl-8",iconPaddingRight:"pr-8",iconSize:"w-5 h-5",iconWrapper:"left-3",rightIconWrapper:"right-3",label:"text-small",dropdown:"text-small"},base:{container:"h-12 text-base",padding:"px-4",iconPaddingLeft:"pl-10",iconPaddingRight:"pl-3",iconSize:"w-5 h-5",iconWrapper:"left-4",rightIconWrapper:"right-16",label:"text-base",dropdown:"text-base"}},ye=l.forwardRef(({label:t,placeholder:s="Выберите...",options:r=[],icon:o,iconPosition:d="left",size:p="base",error:n,disabled:i=!1,required:x=!1,value:h,onChange:k,onFocus:S,onBlur:N,className:m,clearable:M=!1,searchable:c=!1,onSearch:v,name:z},y)=>{const[g,C]=l.useState(!1),[B,F]=l.useState(!1),[$,T]=l.useState(""),[P,W]=l.useState(""),[K,q]=l.useState(-1),H=l.useRef(null),te=l.useRef(null),_=h!==void 0?h:$,X=r.find(A=>A.value===_),oe=_!==""&&_!==void 0,O=Ve[p],G=l.useMemo(()=>{if(!c||v)return r;const A=P.toLowerCase();return r.filter(ae=>ae.label.toLowerCase().includes(A))},[r,P,c,v]),b=l.useCallback(()=>{C(!1),F(!1),W(""),q(-1),N?.()},[N]),{handleClick:E}=he(H,b),{handleEscape:I}=fe(b);l.useEffect(()=>{if(g)return document.addEventListener("mousedown",E),document.addEventListener("keydown",I),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("keydown",I)}},[g,E,I]),l.useEffect(()=>{g&&c&&te.current&&te.current.focus()},[g,c]);const w=l.useCallback(A=>{if(!i){if(!g&&(A.key==="ArrowDown"||A.key==="ArrowUp"||A.key==="Enter")){A.preventDefault(),C(!0);return}if(g)switch(A.key){case"ArrowDown":A.preventDefault(),q(ae=>ae<G.length-1?ae+1:0);break;case"ArrowUp":A.preventDefault(),q(ae=>ae>0?ae-1:G.length-1);break;case"Enter":A.preventDefault(),K>=0&&G[K]&&Y(G[K].value);break}}},[g,G,K,i]),Z=l.useCallback(()=>{i||(C(A=>!A),g?(W(""),q(-1)):(F(!0),S?.()))},[i,g,S]),Y=l.useCallback(A=>{h===void 0&&T(A),k?.(A),C(!1),F(!1),W(""),q(-1),N?.()},[h,k,N]),J=l.useCallback(A=>{A.stopPropagation(),!i&&(h===void 0&&T(""),k?.(""),W(""),q(-1))},[h,k,i]),pe=l.useCallback(A=>{W(A),v?.(A),q(0)},[v]),ee=l.useMemo(()=>i?"border-slate-200 bg-slate-100 text-slate-400 cursor-not-allowed":n?"border-red-600 focus:border-red-600 shadow-red bg-white":"border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600 bg-white",[n,i]),ne=l.useMemo(()=>i?"text-slate-400":n?"text-red-600":g||B?"text-black":"text-slate-400",[i,n,g,B]);return e.jsxs("div",{className:a("w-full",m),ref:y,children:[t&&e.jsxs("label",{htmlFor:z,className:a("mb-2 block text-base font-medium",n?"text-red-600":"text-slate-700",O.label),children:[t,x&&e.jsx("span",{className:"ml-1 text-red-600",children:"*"})]}),e.jsxs("div",{ref:H,className:"relative",onKeyDown:w,children:[e.jsxs("div",{role:"combobox","aria-expanded":g,"aria-haspopup":"listbox","aria-controls":`${z}-listbox`,"aria-disabled":i,tabIndex:i?-1:0,onClick:Z,className:a("flex w-full items-center border font-normal transition-all duration-300 ease-in-out",p==="base"?"rounded-xl":"rounded-lg",O.container,o?d==="left"?O.iconPaddingLeft:O.iconPaddingRight:O.padding,ee,!i&&B&&"shadow-blue border-blue-600"),children:[o&&e.jsx("div",{className:a("absolute top-1/2 -translate-y-1/2 pointer-events-none transition-colors duration-300",d==="left"?O.iconWrapper:O.rightIconWrapper,ne),children:o}),c&&g?e.jsx("input",{ref:te,type:"text",value:P,onChange:A=>pe(A.target.value),placeholder:s,className:"w-full bg-transparent outline-none",onClick:A=>A.stopPropagation()}):e.jsx("span",{className:a("block truncate select-none",!oe&&!i&&"text-slate-400"),children:X?.label||s}),M&&oe&&!i&&e.jsx("button",{type:"button",onClick:J,className:a("absolute top-1/2 -translate-y-1/2 text-slate-400 hover:text-black transition-colors cursor-pointer",o&&d==="left"?"right-8":"right-10"),"aria-label":"Очистить",children:e.jsx(se,{className:O.iconSize})}),e.jsx("div",{className:a("absolute top-1/2 right-3 -translate-y-1/2 pointer-events-none transition-all duration-300",g&&"rotate-180",ne),children:e.jsx(D.AltArrowDown,{className:O.iconSize})})]}),g&&!i&&e.jsx("div",{id:`${z}-listbox`,role:"listbox",className:a("absolute z-50 mt-1 max-h-60 w-full overflow-y-auto rounded-lg border border-slate-200 bg-white shadow-md p-1 text-black",O.dropdown),children:G.length===0?e.jsx("div",{className:"px-3 py-2 text-center text-base font-normal text-slate-500",children:"Ничего не найдено"}):G.map(A=>e.jsx("div",{role:"option","aria-selected":_===A.value,onClick:()=>Y(A.value),className:a("cursor-pointer px-3 py-2 font-normal transition-colors hover:bg-slate-100 rounded-sm",_===A.value?"bg-slate-100":""),children:A.label},A.value))})]}),n&&e.jsx("p",{className:"mt-2 animate-[slideDown_0.3s_ease-out] text-small font-normal text-red-600",children:n})]})});ye.displayName="MciSelect";function ke({className:t,variant:s="default",width:r="100%",height:o="1rem"}){return e.jsx("div",{className:a("relative overflow-hidden bg-slate-200","rounded-lg",s==="circle"&&"rounded-full",s==="rounded"&&"rounded-md",t),style:{width:typeof r=="number"?`${r}px`:r,height:typeof o=="number"?`${o}px`:o},children:e.jsx("div",{className:"shimmer-mask absolute inset-0"})})}function Ue({columns:t,data:s,loading:r=!1,skeletonRows:o=5,noDataText:d="",sort:p,onSortChange:n}){const[i,x]=l.useState(null),h=p??i,k=l.useMemo(()=>!h||p?s:[...s].sort((c,v)=>{const z=c[h.key],y=v[h.key];return z==null?1:y==null?-1:z<y?h.direction==="asc"?-1:1:z>y?h.direction==="asc"?1:-1:0}),[s,h,p]),S=c=>{if(!c.sortable)return;let v=null;h?.key!==c.key?v={key:c.key,direction:"asc"}:h.direction==="asc"&&(v={key:c.key,direction:"desc"}),p!==void 0?n?.(v):x(v)};l.useEffect(()=>{p!==void 0&&x(null)},[p]);const N=c=>c.sortable?!h||h.key!==c.key?e.jsx(D.SortVertical,{weight:"Linear",size:20,className:"text-slate-base"}):h.direction==="asc"?e.jsx(D.SortFromTopToBottom,{weight:"Linear",size:20,className:"text-slate-base"}):e.jsx(D.SortFromBottomToTop,{weight:"Linear",size:20,className:"text-slate-base"}):null,m=r?[]:p?s:k,M=c=>{if(c!=null&&(typeof c=="string"||typeof c=="number"))return String(c)};return e.jsx("div",{className:"w-full overflow-x-auto",children:e.jsxs("div",{className:"inline-block min-w-full align-middle",children:[e.jsx("div",{className:"overflow-hidden rounded-xl border border-slate-200 bg-slate-100",children:e.jsx("table",{className:"w-full table-fixed",children:e.jsx("thead",{children:e.jsx("tr",{children:t?.map((c,v)=>e.jsx("th",{onClick:()=>S(c),className:a("px-3 py-4 text-left text-small font-medium text-slate-700 transition-colors",c.align==="center"&&"text-center",c.align==="right"&&"text-right",c.sortable&&"cursor-pointer hover:bg-slate-200"),style:{width:c.width||"auto"},children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate",children:c.title}),N(c)]})},v))})})})}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-slate-200 bg-white",children:e.jsx("table",{className:"w-full table-fixed",children:e.jsx("tbody",{className:"divide-y divide-slate-200",children:r?Array.from({length:o}).map((c,v)=>e.jsx("tr",{children:t?.map((z,y)=>e.jsx("td",{className:"px-4 py-3",style:{width:z.width},children:e.jsx(ke,{height:30,variant:"rounded"})},y))},v)):m?.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length,className:"py-20",children:e.jsxs("div",{className:"flex flex-col items-center justify-center",children:[e.jsx("div",{className:"relative mb-4",children:e.jsx(D.ConfoundedSquare,{weight:"Bold",size:64,className:"animate-float text-slate-400"})}),e.jsx("p",{className:"text-small font-medium text-slate-400",children:d})]})})}):m?.map((c,v)=>e.jsx("tr",{className:"group transition-colors hover:bg-slate-50",children:t?.map((z,y)=>{const g=c[z.key],C=M(g);return e.jsx("td",{className:a("px-3 py-4 text-small font-normal text-black align-top",z.align==="center"&&"text-center",z.align==="right"&&"text-right"),style:{width:z.width||"auto"},children:e.jsx("div",{className:a("line-clamp-2","whitespace-normal","break-all"),title:z.render?void 0:C,children:z.render?z.render(g,c):String(g??"-")})},y)})},v))})})})]})})}const qe={uz:{dragAndDrop:"Faylni bu yerga torting",clickToUpload:"yoki bosish orqali tanlang",or:"yoki",fileRequirements:(t,s,r,o)=>`${t?`Maksimum ${s} ta fayl`:"1 ta fayl"} • Hajmi ${r}MB dan kichik • ${o!=="*/*"?`Format: ${o}`:"Barcha formatlar"}`,selectedFiles:"Tanlangan fayllar",clearAll:"Barchasini o'chirish",uploading:"Yuklanmoqda...",success:"Muvaffaqiyatli yuklandi",error:"Xatolik",maxFilesError:t=>`Maksimum ${t} ta fayl yuklash mumkin`,fileSizeError:(t,s)=>`"${t}" fayli hajmi ${s}MB dan kichik bo'lishi kerak`,fileTypeError:t=>`"${t}" fayl turi qabul qilinmaydi`,uploadFailed:"Yuklash muvaffaqiyatsiz tugadi",file:"Fayl",image:"Rasm",video:"Video",audio:"Audio",document:"Hujjat"},ru:{dragAndDrop:"Перетащите файл сюда",clickToUpload:"или выберите нажатием",or:"или",fileRequirements:(t,s,r,o)=>`${t?`Максимум ${s} файлов`:"1 файл"} • Размер до ${r}MB • ${o!=="*/*"?`Формат: ${o}`:"Все форматы"}`,selectedFiles:"Выбранные файлы",clearAll:"Очистить все",uploading:"Загружается...",success:"Успешно загружено",error:"Ошибка",maxFilesError:t=>`Можно загрузить максимум ${t} файлов`,fileSizeError:(t,s)=>`Размер файла "${t}" должен быть меньше ${s}MB`,fileTypeError:t=>`Тип файла "${t}" не поддерживается`,uploadFailed:"Не удалось загрузить файл",file:"Файл",image:"Изображение",video:"Видео",audio:"Аудио",document:"Документ"},en:{dragAndDrop:"Drag and drop file here",clickToUpload:"or click to select",or:"or",fileRequirements:(t,s,r,o)=>`${t?`Maximum ${s} files`:"1 file"} • Size up to ${r}MB • ${o!=="*/*"?`Format: ${o}`:"All formats"}`,selectedFiles:"Selected files",clearAll:"Clear all",uploading:"Uploading...",success:"Successfully uploaded",error:"Error",maxFilesError:t=>`Maximum ${t} files can be uploaded`,fileSizeError:(t,s)=>`File "${t}" size must be less than ${s}MB`,fileTypeError:t=>`File type "${t}" is not supported`,uploadFailed:"Upload failed",file:"File",image:"Image",video:"Video",audio:"Audio",document:"Document"}},Oe=({multiple:t=!1,accept:s="*/*",maxSize:r=10,maxFiles:o=5,disabled:d=!1,label:p,required:n=!1,error:i,className:x,onFilesChange:h,onUpload:k,showPreview:S=!0,locale:N="uz",showFileTypeIcon:m=!0,customValidator:M})=>{const[c,v]=l.useState([]),[z,y]=l.useState(!1),[g,C]=l.useState(!1),B=l.useRef(null),F=qe[N],$=b=>{switch(b.type.split("/")[0]){case"image":return e.jsx(D.Gallery,{className:"h-5 w-5 text-blue-500"});case"video":return e.jsx(D.VideoFramePlayHorizontal,{className:"h-5 w-5 text-purple-500"});case"audio":return e.jsx(D.MusicNote,{className:"h-5 w-5 text-green-500"});default:return b.type.includes("pdf")?e.jsx(D.FileText,{className:"h-5 w-5 text-red-500"}):b.type.includes("word")||b.type.includes("document")?e.jsx(D.FileText,{className:"h-5 w-5 text-blue-600"}):b.type.includes("excel")||b.type.includes("spreadsheet")?e.jsx(D.FileText,{className:"h-5 w-5 text-green-600"}):e.jsx(D.File,{className:"h-5 w-5 text-gray-500"})}},T=b=>{if(b===0)return"0 Bytes";const E=1024,I=["Bytes","KB","MB","GB"],w=Math.floor(Math.log(b)/Math.log(E));return parseFloat((b/Math.pow(E,w)).toFixed(2))+" "+I[w]},P=b=>{const E=r*1024*1024;return b.size<=E},W=b=>s==="*/*"?!0:s.split(",").map(I=>I.trim()).some(I=>{if(I.endsWith("/*")){const w=I.replace("/*","");return b.type.startsWith(w)}return b.type===I||b.name.toLowerCase().endsWith(I.replace("*.","."))}),K=b=>new Promise(E=>{if(b.type.startsWith("image/")){const I=new FileReader;I.onload=w=>E(w.target?.result),I.readAsDataURL(b)}else E("")}),q=l.useCallback(async b=>{const E=Array.from(b),I=[];for(const w of E){if(c.length+I.length>=o){alert(F.maxFilesError(o));break}if(!P(w)){alert(F.fileSizeError(w.name,r));continue}if(!W(w)){alert(F.fileTypeError(w.name));continue}if(M){const Y=M(w);if(Y){alert(Y);continue}}const Z=await K(w);I.push({id:Math.random().toString(36).substr(2,9),file:w,preview:Z,progress:0,status:"uploading"})}if(I.length>0){const w=t?[...c,...I]:I;if(v(w),h?.(w.map(Z=>Z.file)),k){C(!0);try{const Z=w.map((Y,J)=>({...Y,progress:Math.min(100,(J+1)/w.length*100)}));v(Z),await k(Z),v(Y=>Y.map(J=>({...J,status:"success",progress:100})))}catch(Z){v(Y=>Y.map(J=>({...J,status:"error",error:Z instanceof Error?Z.message:F.uploadFailed})))}finally{C(!1)}}}},[c,o,P,W,M,F,r,t,h,k]),H=l.useCallback(b=>{b.preventDefault(),d||y(!0)},[d]),te=l.useCallback(b=>{b.preventDefault(),y(!1)},[]),_=l.useCallback(b=>{if(b.preventDefault(),y(!1),d)return;const E=b.dataTransfer.files;E.length>0&&q(E)},[d,q]),X=l.useCallback(b=>{const E=b.target.files;E&&E.length>0&&(q(E),B.current&&(B.current.value=""))},[q]),oe=l.useCallback(b=>{v(E=>{const I=E.filter(w=>w.id!==b);return h?.(I.map(w=>w.file)),I})},[h]),O=l.useCallback(()=>{v([]),h?.([])},[h]),G=l.useCallback(()=>{B.current?.click()},[]);return e.jsxs("div",{className:a("w-full",x),children:[p&&e.jsxs("label",{className:a("mb-2 block text-base font-medium text-slate-700",i?"text-red-600":"text-slate-700"),children:[p,n&&e.jsx("span",{className:"text-extra-small text-red-600 ml-1",children:"*"})]}),e.jsxs("div",{className:a("cursor-pointer border border-dashed rounded-2xl p-6 text-center transition-all duration-300","border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600",z&&"border-solid border-slate-600 bg-slate-100","disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",i&&"border-red-600 focus:border-red-600 shadow-red"),onDragOver:H,onDragLeave:te,onDrop:_,onClick:G,children:[e.jsx("input",{ref:B,type:"file",multiple:t,accept:s,onChange:X,disabled:d,className:"hidden"}),e.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3",children:[e.jsx("div",{className:a("rounded-full p-3 transition-colors",i?"bg-red-100 text-red-600":"bg-slate-100 text-slate-400"),children:e.jsx(D.Upload,{className:"h-6 w-6"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-small font-medium text-slate-700",children:[F.dragAndDrop," ",F.or.toLowerCase()," ",F.clickToUpload]}),e.jsx("p",{className:"text-small font-normal text-slate-700",children:F.fileRequirements(t,o,r,s)})]})]})]}),c.length>0&&e.jsxs("div",{className:"mt-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-small font-medium text-slate-700",children:[F.selectedFiles," (",c.length,")"]}),c.length>1&&e.jsx("button",{type:"button",onClick:O,disabled:d||g,className:"text-small text-red-600 disabled:opacity-50",children:F.clearAll})]}),e.jsx("div",{className:"space-y-2",children:c.map(b=>e.jsxs("div",{className:a("flex items-center justify-between rounded-lg border border-slate-200 p-3 transition-all",b.status==="error"&&"border-red-600"),children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center space-x-3",children:[S&&b.preview?e.jsx("img",{src:b.preview,alt:b.file.name,className:"h-10 w-10 rounded object-cover"}):m?e.jsx("div",{className:"flex-shrink-0",children:$(b.file)}):null,e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-small font-medium text-slate-700",children:b.file.name}),e.jsxs("div",{className:"flex items-center space-x-2 text-small text-slate-400",children:[e.jsx("span",{children:T(b.file.size)}),b.status==="uploading"&&e.jsxs("span",{className:"flex items-center",children:[e.jsx(D.Star2,{className:"h-5 w-5 mr-1 animate-spin"}),F.uploading]}),b.status==="success"&&e.jsx("span",{className:"flex items-center text-small font-normal text-green-600",children:F.success})]}),b.status==="uploading"&&e.jsx("div",{className:"mt-1 h-1.5 w-full rounded-full bg-slate-200",children:e.jsx("div",{className:"h-1.5 rounded-full bg-slate-400 transition-all duration-300",style:{width:`${b.progress}%`}})}),b.status==="error"&&b.error&&e.jsx("p",{className:"mt-2 flex items-center text-small font-normal text-red-600",children:b.error})]})]}),e.jsx("div",{className:"flex flex-shrink-0 items-center space-x-2",children:e.jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),oe(b.id)},disabled:d||g,className:"text-slate-base transition-colors active:rotate-180 hover:cursor-pointer disabled:opacity-50",children:e.jsx(se,{className:"h-6 w-6"})})})]},b.id))})]}),i&&e.jsx("p",{className:"mt-2 flex items-center text-small font-normal text-red-600",children:i})]})};function Ze({show:t,setShow:s,title:r,description:o,Header:d,Body:p,footer:n,handleClickOutside:i=!1}){const x=l.useRef(null),{handleEscape:h}=fe(()=>s(!1));l.useEffect(()=>(t?(document.addEventListener("keydown",h),document.body.style.overflow="hidden"):document.body.style.overflow="unset",()=>document.removeEventListener("keydown",h)),[t,h]);const{handleClick:k}=he(x,()=>{i&&s(!1)});return l.useEffect(()=>(t&&i&&document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)),[t,k,i]),e.jsx("div",{className:a("bg-black/40 fixed inset-0 z-50 flex items-center justify-center transition-all duration-500 ease-in-out",t?"opacity-100":"pointer-events-none opacity-0"),children:e.jsxs("div",{ref:x,className:a("relative bg-white w-full max-w-[720px] rounded-2xl","transform transition-all duration-500 ease-out",t?"scale-100 opacity-100":"scale-90 opacity-0"),children:[(d||r||o)&&e.jsxs("div",{className:"border-b border-slate-200 flex items-start justify-between p-6 mb-4",children:[d||e.jsxs("div",{className:"block",children:[e.jsx("h2",{className:"text-h3 font-semibold text-black",children:r}),o&&e.jsx("p",{className:"text-base text-slate-base font-normal mt-2",children:o})]}),e.jsx("button",{onClick:()=>s(!1),className:"bg-slate-100 rounded-xl w-12 h-12 hover:cursor-pointer text-black transition flex items-center justify-center group",children:e.jsx(se,{className:"h-6 w-6 transition-transform duration-300 group-hover:rotate-180"})})]}),p&&e.jsx("div",{className:"scrollbar-thin scrollbar-thumb-slate-200 max-h-96 px-6 overflow-y-auto mb-2",children:p}),n&&e.jsx("div",{className:"flex items-center justify-end gap-3 border-t border-slate-200 p-6",children:n})]})})}function Je({totalItems:t,currentPage:s,perPage:r,onPageChange:o,onPerPageChange:d,siblingCount:p=1,perPageOptions:n=[10,30,50,100],showPerPage:i=!0,variant:x="yellow",size:h="large",paginationClassName:k}){const S=Number.isFinite(t)&&t>0?t:0,N=Number.isFinite(r)&&r>0?r:10,m=Math.max(1,Number.isFinite(s)?s:1),M=Math.ceil(S/N);if(M<=1||S===0)return null;const v=(()=>{const g=[],C=p*2+5;if(M<=C)return Array.from({length:M},($,T)=>T+1);const B=Math.max(m-p,2),F=Math.min(m+p,M-1);g.push(1),B>2&&g.push("...");for(let $=B;$<=F;$++)g.push($);return F<M-1&&g.push("..."),M>1&&g.push(M),g})(),z={medium:"h-9 text-small",large:"h-10 text-base"}[h],y={yellow:{active:"bg-yellow-500 text-white border-yellow-500",inactive:"bg-slate-100 border-slate-200 text-black hover:bg-slate-200",disabled:"text-slate-400 border-slate-200",arrow:"text-black"},blue:{active:"bg-blue-600 text-white border-blue-600",inactive:"bg-slate-100 border-slate-200 text-black hover:bg-slate-200",disabled:"text-slate-400 border-slate-300",arrow:"text-black"}}[x??"yellow"];return e.jsxs("div",{className:a("flex items-center justify-between gap-4 w-full",k),children:[i&&d&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"whitespace-nowrap text-extra-small text-slate-base font-normal",children:"Строк на странице:"}),e.jsxs("div",{className:"relative",children:[e.jsx("select",{value:N,onChange:g=>d(Number(g.target.value)),className:a("appearance-none bg-white border border-slate-200 rounded-lg pl-3 pr-8 text-base text-black font-medium focus:outline-none cursor-pointer",h==="large"?"h-10":"h-9"),"aria-label":"Количество строк на странице",children:n.map(g=>e.jsx("option",{value:g,children:g},g))}),e.jsx(D.AltArrowDown,{className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-slate-400",weight:"Linear",size:20})]})]}),e.jsxs("nav",{"aria-label":"Пагинация",className:"flex items-center gap-1 shrink-0 whitespace-nowrap",children:[e.jsx("button",{onClick:()=>o(m-1),disabled:m===1,"aria-label":"Предыдущая страница",className:a("flex items-center justify-center rounded-lg border transition-all bg-slate-100 min-w-10",z,m===1?a("cursor-not-allowed opacity-50",y.disabled):a("hover:cursor-pointer",y.arrow,"border-slate-200")),children:e.jsx(D.AltArrowLeft,{weight:"Linear",size:20})}),e.jsx("div",{className:"flex items-center gap-1",children:v.map((g,C)=>{if(g==="...")return e.jsx("span",{className:a("flex items-center justify-center text-black font-medium min-w-10",z),"aria-hidden":"true",children:e.jsx(D.MenuDots,{weight:"Bold",size:20})},C);const B=g===m;return e.jsx("button",{onClick:()=>o(g),"aria-label":`Страница ${g}${B?", текущая":""}`,"aria-current":B?"page":void 0,className:a("flex items-center justify-center rounded-lg border font-medium transition-all hover:cursor-pointer min-w-10 px-2",z,B?y.active:y.inactive),children:g},C)})}),e.jsx("button",{onClick:()=>o(m+1),disabled:m===M,"aria-label":"Следующая страница",className:a("flex items-center justify-center rounded-lg border transition-all bg-slate-100 min-w-10",z,m===M?a("cursor-not-allowed opacity-50",y.disabled):a("hover:cursor-pointer",y.arrow,"border-slate-200")),children:e.jsx(D.AltArrowRight,{size:20,weight:"Linear"})})]})]})}function He({tabs:t,defaultTab:s,position:r="top",className:o,tabListClassName:d,contentClassName:p,extra:n,onChange:i}){const[x,h]=l.useState(s||t[0]?.id),[k,S]=l.useState({}),N=l.useRef([]),m=()=>{requestAnimationFrame(()=>{const y=t.findIndex(C=>C?.id===x),g=N.current[y];if(g){const{offsetLeft:C,offsetTop:B,offsetWidth:F,offsetHeight:$}=g;S({left:`${C}px`,top:`${B}px`,width:`${F}px`,height:`${$}px`,transition:"all 0.4s cubic-bezier(0.25, 1, 0.5, 1)"})}})};l.useEffect(()=>(m(),window.addEventListener("resize",m),"fonts"in document&&document.fonts.ready.then(m),()=>window.removeEventListener("resize",m)),[x,r,t]),l.useEffect(()=>{N.current=N.current.slice(0,t.length)},[t]);const M=r==="left"||r==="right",c={top:"flex-col",bottom:"flex-col-reverse",left:"flex-row",right:"flex-row-reverse"},v={top:"flex-row",bottom:"flex-row",left:"flex-col",right:"flex-col"},z={top:"mt-4",bottom:"mb-4",left:"ml-4",right:"mr-4"};return e.jsxs("div",{className:a("flex w-full",c[r],o),children:[e.jsxs("div",{className:a("flex gap-4",M?"flex-col items-start":"flex-row items-center justify-between"),children:[e.jsxs("div",{className:a("relative flex rounded-xl bg-slate-100 p-1",v[r],M?"min-w-48":"",d),children:[e.jsx("div",{className:a("absolute bg-white rounded-lg",M?"w-full":"h-full"),style:k}),t?.map((y,g)=>{const C=x===y.id;return e.jsxs("button",{ref:B=>{N.current[g]=B},onClick:()=>{y?.disabled||(h(y?.id),i?.(y?.id))},disabled:y?.disabled,className:a("relative flex cursor-pointer text-base font-normal text-black items-center justify-center p-2 z-10 whitespace-nowrap transition-colors duration-300",y?.disabled&&"opacity-50 cursor-not-allowed",M?"w-full justify-start":"flex-1"),children:[y?.icon&&e.jsx("span",{className:a("shrink-0 transition-transform duration-200",C&&"scale-110"),children:y?.icon}),e.jsx("span",{className:"relative z-10",title:y?.label,children:y?.label})]},y?.id)})]}),n&&e.jsx("div",{className:a("shrink-0",M&&"w-full"),children:n})]}),e.jsx("div",{className:a("flex-1 w-full overflow-hidden",z[r],p),children:e.jsx("div",{className:"animate-fade-in w-full",style:{animationDuration:"0.4s"},children:t?.find(y=>y?.id===x)?.content},x)})]})}const Ke={sm:"px-2 py-0.5",md:"px-2 py-1",lg:"px-3 py-2"},Ne={sm:"w-3 h-3",md:"w-3 h-3",lg:"w-3 h-3"},Xe={success:"bg-green-50 text-green-600",warning:"bg-orange-50 text-orange-600",error:"bg-red-50 text-red-600",gray:"bg-slate-200 text-slate-700",blue:"bg-blue-50 text-blue-600"};function Ge({children:t,variant:s="success",size:r="lg",icon:o,iconPosition:d="left",className:p}){return e.jsxs("span",{className:a("inline-flex animate-[fadeIn_0.3s_ease-out] items-center rounded-lg text-extra-small font-medium",Ke[r],Xe[s],o&&"gap-[2px]",p),children:[o&&d==="left"&&e.jsx("span",{className:`flex items-center ${a(Ne[r])}`,children:o}),e.jsx("span",{children:t}),o&&d==="right"&&e.jsx("span",{className:`flex items-center ${a(Ne[r])}`,children:o})]})}const Ce=l.forwardRef(({label:t,placeholder:s,value:r="",onChange:o,required:d=!1,disabled:p=!1,error:n,className:i,rows:x=4,name:h},k)=>{const S=l.useMemo(()=>n?"border-red-600 focus:border-red-600 shadow-red":"border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600",[n]);return e.jsxs("div",{className:a("relative w-full",i),children:[t&&e.jsxs("label",{className:a("mb-2 block text-base font-medium",n?"text-red-600":"text-slate-700"),children:[t,d&&e.jsx("span",{className:"ml-1 text-red-600",children:"*"})]}),e.jsx("textarea",{ref:k,name:h,rows:x,value:r,onChange:N=>o?.(N.target.value),disabled:p,placeholder:s,className:a("w-full resize-none rounded-xl border bg-white text-base font-normal transition-all duration-300 ease-in-out outline-none","p-3 disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",S)}),n&&e.jsx("p",{className:"mt-2 animate-[slideDown_0.3s_ease-out] text-small font-normal text-red-600",children:n})]})});Ce.displayName="MciTextarea";const Qe=(()=>{let t=document.getElementById("mci-toast-container");return t||(t=document.createElement("div"),t.id="mci-toast-container",t.className="fixed top-4 right-4 z-[9999] flex flex-col gap-3 pointer-events-none",document.body.appendChild(t)),t})();let ge=null,Re=0;const de=[],Me=()=>{ge||(ge=Le.createRoot(Qe)),ge.render(e.jsx("div",{className:"flex flex-col gap-3",children:de.map(({id:t,element:s})=>e.jsx("div",{className:"pointer-events-auto",children:s},t))}))};function et({title:t,description:s,type:r="info",duration:o=3e3,action:d,onClose:p}){const[n,i]=l.useState(100);l.useEffect(()=>{if(o===1/0){i(100);return}let k=null;const S=m=>{k||(k=m);const M=m-k,c=Math.max(0,(o-M)/o*100);i(c),c>0?requestAnimationFrame(S):p?.()},N=requestAnimationFrame(S);return()=>cancelAnimationFrame(N)},[o,p]);const x={success:e.jsx(D.CheckCircle,{weight:"Bold",className:"w-5 h-5"}),error:e.jsx(D.CloseCircle,{weight:"Bold",className:"w-5 h-5"}),warning:e.jsx(D.DangerCircle,{weight:"Bold",className:"w-5 h-5"}),info:e.jsx(D.InfoCircle,{weight:"Bold",className:"w-5 h-5"}),loading:e.jsx(D.Refresh,{weight:"Bold",className:"w-5 h-5 animate-spin"})},h={bg:{success:"bg-green-50",error:"bg-red-50",warning:"bg-orange-50",info:"bg-blue-50",loading:"bg-slate-50"},line:{success:"bg-green-600",error:"bg-red-600",warning:"bg-orange-600",info:"bg-blue-600",loading:"bg-slate-600"},text:{success:"text-green-600",error:"text-red-600",warning:"text-orange-600",info:"text-blue-600",loading:"text-slate-600"},action:{success:"text-green-600",error:"text-red-600",warning:"text-orange-600",info:"text-blue-600",loading:"text-slate-600"}};return e.jsxs("div",{className:a("relative w-[300px] max-w-full overflow-hidden shadow-md rounded-lg","animate-in fade-in slide-in-from-top-2 duration-300",h.bg[r]),children:[e.jsx("div",{className:a("absolute bottom-0 left-0 h-1",h.line[r]),style:{width:`${n}%`,transition:"none"}}),e.jsx("div",{className:"p-4",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("div",{className:a("flex-shrink-0",h.text[r]),children:x[r]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h4",{className:"text-base font-medium mb-1",children:t}),s&&e.jsx("p",{className:"text-small text-[#82828C]",children:s}),d&&e.jsx("div",{className:"mt-3",children:e.jsx("div",{className:a("underline font-medium text-small",h.action[r]),children:d})})]}),e.jsx("button",{onClick:p,className:"flex-shrink-0 rounded-full transition cursor-pointer active:animate-spin",children:e.jsx(se,{className:"w-6 h-6 text-slate-base"})})]})})]})}const ie=t=>{const s=Re++,r=()=>{const d=de.findIndex(p=>p?.id===s);d!==-1&&(de.splice(d,1),Me())},o=e.jsx(et,{...t,onClose:r});return de.push({id:s,element:o}),Me(),t.duration!==1/0&&setTimeout(r,(t.duration||3e3)+300),{close:r}},tt={success:(t,s,r)=>ie(typeof t=="string"?{title:t,description:s,type:"success",action:r}:{...t,type:"success"}),error:(t,s,r)=>ie(typeof t=="string"?{title:t,description:s,type:"error",action:r}:{...t,type:"error"}),warning:(t,s,r)=>ie(typeof t=="string"?{title:t,description:s,type:"warning",action:r}:{...t,type:"warning"}),info:(t,s,r)=>ie(typeof t=="string"?{title:t,description:s,type:"info",action:r}:{...t,type:"info"}),loading:(t,s)=>ie(typeof t=="string"?{title:t,description:s,type:"loading",duration:1/0}:{...t,type:"loading",duration:1/0})};function rt({content:t,children:s,position:r="top",delay:o=200,className:d}){const p={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"},n={top:"left-1/2 -translate-x-1/2 top-full",bottom:"left-1/2 -translate-x-1/2 bottom-full",left:"top-1/2 -translate-y-1/2 left-full",right:"top-1/2 -translate-y-1/2 right-full"};return e.jsxs("div",{className:"group relative inline-block",children:[s,e.jsxs("div",{className:a("absolute z-50 rounded-md bg-slate-400 px-2 py-1 text-xs whitespace-nowrap text-white shadow-md","scale-95 opacity-0 transition-all group-hover:scale-100 group-hover:opacity-100","duration-200 ease-out group-hover:delay-200",p[r],d),style:{transitionDelay:`${o}ms`},children:[t,e.jsx("span",{className:a("absolute h-2 w-2 rotate-45 bg-slate-400",n[r])})]})]})}function at({checked:t=!1,onChange:s,disabled:r=!1,variant:o="yellow",label:d,supportText:p,className:n}){const i=()=>{r||s?.(!t)},x={blue:{active:"bg-blue-600",hover:"hover:bg-blue-600",focus:"focus:shadow-blue"},yellow:{active:"bg-yellow-500",hover:"hover:bg-yellow-500",focus:"focus:ring-2 focus:ring-yellow-200"}};return e.jsxs("div",{className:a("flex items-start gap-3 select-none",n),children:[e.jsx("button",{type:"button",disabled:r,className:a("relative h-6 w-11 rounded-xl transition-all duration-300 outline-none cursor-pointer",t?x[o].active:"bg-slate-200",!r&&x[o].hover,!r&&x[o].focus,r&&"bg-slate-100 cursor-not-allowed"),onClick:i,children:e.jsx("span",{className:a("absolute top-1/2 left-0.5 h-5 w-5 -translate-y-1/2 rounded-full transition-all duration-300 bg-white",t&&"translate-x-5")})}),(d||p)&&e.jsxs("div",{className:"flex flex-col leading-tight",children:[d&&e.jsx("span",{className:a("text-base font-medium text-black"),children:d}),p&&e.jsx("span",{className:"text-small font-normal text-slate-500",children:p})]})]})}const lt=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 177 177",fill:"none",...t},U.createElement("path",{opacity:.083334,d:"M94.5 48.5C94.5 41.8726 91.8137 36.5 88.5 36.5C85.1863 36.5 82.5 41.8726 82.5 48.5C82.5 55.1274 85.1863 60.5 88.5 60.5C91.8137 60.5 94.5 55.1274 94.5 48.5Z",fill:"currentColor"}),U.createElement("path",{opacity:.166667,d:"M113.697 56.8591C117.011 51.1196 117.371 45.1237 114.501 43.4668C111.631 41.8099 106.618 45.1196 103.305 50.8591C99.991 56.5986 99.6311 62.5946 102.501 64.2514C105.371 65.9083 110.383 62.5986 113.697 56.8591Z",fill:"currentColor"}),U.createElement("path",{opacity:.25,d:"M126.141 73.696C131.88 70.3823 135.19 65.3696 133.533 62.4999C131.876 59.6301 125.88 59.99 120.141 63.3037C114.401 66.6174 111.092 71.6301 112.749 74.4999C114.405 77.3696 120.401 77.0097 126.141 73.696Z",fill:"currentColor"}),U.createElement("path",{opacity:.333334,d:"M128.5 94.5C135.127 94.5 140.5 91.8137 140.5 88.5C140.5 85.1863 135.127 82.5 128.5 82.5C121.873 82.5 116.5 85.1863 116.5 88.5C116.5 91.8137 121.873 94.5 128.5 94.5Z",fill:"currentColor"}),U.createElement("path",{opacity:.416667,d:"M120.141 113.696C125.88 117.01 131.876 117.37 133.533 114.5C135.19 111.63 131.88 106.617 126.141 103.304C120.401 99.99 114.405 99.6301 112.749 102.5C111.092 105.37 114.401 110.382 120.141 113.696Z",fill:"currentColor"}),U.createElement("path",{opacity:.5,d:"M103.303 126.141C106.617 131.88 111.629 135.19 114.499 133.533C117.369 131.876 117.009 125.88 113.695 120.141C110.382 114.401 105.369 111.092 102.499 112.749C99.6294 114.405 99.9893 120.401 103.303 126.141Z",fill:"currentColor"}),U.createElement("path",{opacity:.583334,d:"M82.5 128.5C82.5 135.127 85.1863 140.5 88.5 140.5C91.8137 140.5 94.5 135.127 94.5 128.5C94.5 121.873 91.8137 116.5 88.5 116.5C85.1863 116.5 82.5 121.873 82.5 128.5Z",fill:"currentColor"}),U.createElement("path",{opacity:.666667,d:"M63.303 120.141C59.9893 125.88 59.6294 131.876 62.4992 133.533C65.3689 135.19 70.3816 131.88 73.6953 126.141C77.009 120.401 77.3689 114.405 74.4992 112.749C71.6294 111.092 66.6167 114.401 63.303 120.141Z",fill:"currentColor"}),U.createElement("path",{opacity:.75,d:"M50.8591 103.304C45.1196 106.618 41.8099 111.63 43.4668 114.5C45.1237 117.37 51.1196 117.01 56.8591 113.696C62.5986 110.383 65.9083 105.37 64.2514 102.5C62.5946 99.6304 56.5986 99.9903 50.8591 103.304Z",fill:"currentColor"}),U.createElement("path",{opacity:.833334,d:"M48.5 82.5C41.8726 82.5 36.5 85.1863 36.5 88.5C36.5 91.8137 41.8726 94.5 48.5 94.5C55.1274 94.5 60.5 91.8137 60.5 88.5C60.5 85.1863 55.1274 82.5 48.5 82.5Z",fill:"currentColor"}),U.createElement("path",{opacity:.916667,d:"M56.8591 63.304C51.1196 59.9903 45.1237 59.6304 43.4668 62.5001C41.8099 65.3699 45.1196 70.3826 50.8591 73.6963C56.5986 77.01 62.5946 77.3699 64.2514 74.5001C65.9083 71.6304 62.5986 66.6177 56.8591 63.304Z",fill:"currentColor"}),U.createElement("path",{d:"M73.697 50.8591C70.3833 45.1196 65.3706 41.8099 62.5008 43.4668C59.6311 45.1237 59.991 51.1196 63.3047 56.8591C66.6184 62.5986 71.6311 65.9083 74.5008 64.2514C77.3706 62.5946 77.0107 56.5986 73.697 50.8591Z",fill:"currentColor"}));function ot({className:t,size:s=150,iconClassName:r,isLoading:o=!1,isFullPage:d=!0}){return o?e.jsx("div",{className:a("z-[99px] flex flex-col items-center justify-center transition-all duration-300",d?"fixed inset-0 backdrop-blur-[2px]":"absolute inset-0 w-full h-full rounded-[inherit]",t),children:e.jsx(lt,{width:s,height:s,className:a("animate-spin",!r&&"text-yellow-500",r),style:{fill:"currentColor",stroke:"currentColor"}})}):null}const Se=l.forwardRef(({label:t,placeholder:s="+998 (__) ___ __ __",size:r="base",error:o,disabled:d=!1,required:p=!1,value:n="",onChange:i,onFocus:x,onBlur:h,className:k,name:S,showIcon:N=!1},m)=>{const[M,c]=l.useState(!1),v=l.useCallback($=>{let T=$.replace(/\D/g,"");T.startsWith("998")||(T="998"+T),T=T.substring(0,12);let P="+998";return T.length>3&&(P+=" ("+T.substring(3,5)),T.length>5&&(P+=") "+T.substring(5,8)),T.length>8&&(P+=" "+T.substring(8,10)),T.length>10&&(P+=" "+T.substring(10,12)),P},[]),z=$=>{const T=$.target.value;if(T.length<5){i?.("+998");return}const P=v(T);i?.(P)},y=()=>{c(!0),(!n||n==="")&&i?.("+998"),x?.()},g=()=>{c(!1),h?.()},C=l.useMemo(()=>({sm:{input:"h-9 text-small",padding:N?"pl-8 pr-2":"px-2",iconSize:"w-4 h-4",iconLeft:"left-2",labelFont:"text-small",iconWrapper:"h-4"},md:{input:"h-10 text-small",padding:N?"pl-10 pr-4":"px-4",iconSize:"w-4 h-4",iconLeft:"left-3",labelFont:"text-base",iconWrapper:"h-4"},base:{input:"h-12 text-base",padding:N?"pl-11 pr-4":"px-4",iconSize:"w-5 h-5",iconLeft:"left-3",labelFont:"text-base",iconWrapper:"h-5"}}),[N]),B=l.useMemo(()=>o?"border-red-600 focus:border-red-600 shadow-red":"border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600",[o]),F=l.useMemo(()=>d?"text-slate-400":o?"text-red-600":M?"text-black":"text-slate-400",[o,M,d]);return e.jsxs("div",{className:a("w-full",k),children:[t&&e.jsxs("label",{className:a("mb-2 block font-medium transition-colors duration-200",o?"text-red-600":M?"text-blue-600":"text-slate-700",C[r].labelFont),children:[t,p&&e.jsx("span",{className:"text-red-600 ml-1",children:"*"})]}),e.jsxs("div",{className:"relative flex items-center",children:[N&&e.jsx("div",{className:a("absolute top-1/2 flex -translate-y-1/2 items-center justify-center transition-all duration-300",C[r].iconLeft,F),children:e.jsx("div",{className:a("flex items-center justify-center",C[r].iconWrapper),children:e.jsx(D.Phone,{className:a(C[r].iconSize),weight:"Linear"})})}),e.jsx("input",{ref:m,name:S,type:"tel",value:n,onChange:z,onFocus:y,onBlur:g,disabled:d,placeholder:s,className:a("w-full border bg-white font-normal transition-all duration-300 outline-none",r==="base"?"rounded-xl":"rounded-lg","disabled:bg-slate-100 disabled:text-slate-400 disabled:cursor-not-allowed",C[r].input,C[r].padding,B)})]}),o&&e.jsx("p",{className:"mt-2 animate-slide-up text-small font-normal text-red-600",children:o})]})});Se.displayName="MciPhone";const ze=l.forwardRef(({mode:t,onChange:s,value:r,...o},d)=>{const[p,n]=l.useState(""),i=r!==void 0?r:p,x=S=>{const N=S.replace(/\s/g,"").toUpperCase();let m="";for(let M=0;M<N.length;M++){const c=N[M];if(m.length<2?/[A-Z]/.test(c)&&(m+=c):/[0-9]/.test(c)&&(m+=c),m.length>=9)break}return m.length>2?m.slice(0,2)+" "+m.slice(2):m},h=S=>S.replace(/\D/g,"").slice(0,14),k=l.useCallback(S=>{const N=S.target.value;let m="";t==="passport"?m=x(N):m=h(N),r===void 0&&n(m),S.target.value=m,s?.(m,S)},[t,s,r]);return e.jsx(ce,{ref:d,...o,value:i,onChange:k,maxLength:t==="passport"?10:14,placeholder:o.placeholder?o.placeholder:t==="passport"?"AA 1234567":"12345678901234"})});ze.displayName="MciIdentityInput",L.MciBreadcrumb=Ie,L.MciButton=$e,L.MciCheck=me,L.MciCollapse=We,L.MciDrawer=Ye,L.MciIdentityInput=ze,L.MciInput=ce,L.MciLoader=ot,L.MciModal=Ze,L.MciPagination=Je,L.MciPhone=Se,L.MciPicker=xe,L.MciSelect=ye,L.MciSkeleton=ke,L.MciTable=Ue,L.MciTabs=He,L.MciTag=Ge,L.MciTextarea=Ce,L.MciToast=tt,L.MciToggle=at,L.MciTooltip=rt,L.MciUpload=Oe,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(ve);function Te(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(s,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return s.default=t,Object.freeze(s)}const U=Te(l);function a(...t){return je.twMerge(Ae.clsx(t))}function fe(t){return{handleEscape:r=>{r.key==="Escape"&&t()}}}function he(t,s){return{handleClick:o=>{t.current&&!t.current.contains(o.target)&&s()}}}function Ie({items:t,variant:s="blue",className:r}){const o=s==="blue",d=o?"hover:text-blue-600":"hover:text-yellow-500",p=o?"text-blue-600":"text-yellow-500";return e.jsx("nav",{className:a("flex items-center",r),"aria-label":"Breadcrumb",children:t.map((n,i)=>{const x=i===t.length-1;return e.jsxs("div",{className:"flex items-center",children:[x?e.jsxs("span",{className:a("flex items-center gap-x-2 font-medium",p),children:[n.icon,e.jsx("span",{children:n.label})]}):e.jsxs("a",{href:n.href??"#",onClick:h=>{n.onClick&&(h.preventDefault(),n.onClick())},className:a("flex items-center gap-x-2 transition-all text-small font-normal text-slate-500",d),children:[n.icon,e.jsx("span",{children:n.label})]}),!x&&e.jsx("span",{className:"mx-2 flex items-center",children:e.jsx(D.AltArrowRight,{weight:"Linear",size:20,className:"text-slate-500"})})]},i)})})}function $e({children:t,text:s,icon:r,iconPosition:o="left",size:d="base",variant:p="primary",color:n="yellow",loading:i=!1,disabled:x=!1,onClick:h,className:k,type:S="button"}){const N=t??s,m={sm:"h-9 px-2 text-small gap-1.5 rounded-lg leading-9 min-w-9",md:"h-10 px-2 text-base gap-2 rounded-lg leading-10 min-w-10",base:"h-12 px-4 text-base gap-2 rounded-xl leading-12 min-w-12"},v=p==="primary"||p==="secondary"||p==="outline"?{blue:{primary:"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 focus:ring-2 focus:ring-[rgba(21,93,252,0.25)]",secondary:"bg-blue-100 text-blue-600 hover:bg-blue-200 active:bg-blue-200 active:border active:border-blue-600 focus:ring-2 focus:ring-[rgba(21,93,252,0.25)]",outline:"border border-blue-600 text-blue-600 hover:border-blue-700 hover:text-blue-700 active:border-blue-800 active:text-blue-800 focus:ring-2 focus:ring-blue-200"},yellow:{primary:"bg-yellow-500 text-white hover:bg-yellow-600 active:bg-yellow-700 focus:ring-2 focus:ring-yellow-300",secondary:"bg-yellow-50 text-yellow-500 hover:bg-yellow-100 active:bg-yellow-100 active:border active:border-yellow-500 focus:ring-2 focus:ring-yellow-200",outline:"border border-yellow-500 text-yellow-500 hover:border-yellow-600 hover:text-yellow-600 active:border-yellow-700 active:text-yellow-700 focus:ring-2 focus:ring-yellow-200"}}[n][p]:{danger:"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 focus:ring-2 focus:shadow-red",tertiary:"bg-slate-100 text-black hover:bg-slate-200 active:bg-slate-300 focus:ring-2 focus:shadow-slate"}[p],z=x||i,y=z?p==="outline"?"border-slate-200 bg-white text-slate-400 cursor-not-allowed hover:bg-transparent hover:border-slate-200 hover:text-slate-400 active:border-slate-200 active:text-slate-400 active:bg-transparent focus:bg-transparent focus:ring-0":"bg-slate-200 text-slate-400 cursor-not-allowed hover:bg-slate-200 active:bg-slate-200 focus:ring-0":"";return e.jsxs("button",{type:S,onClick:h,disabled:z,className:a("inline-flex items-center justify-center font-medium transition-all duration-200 cursor-pointer",m[d],v,!z&&v,y,k),children:[r&&o==="left"&&!i&&e.jsx("span",{className:"flex items-center",children:r}),N&&e.jsx("span",{children:N}),r&&o==="right"&&!i&&e.jsx("span",{className:"flex items-center",children:r}),i&&e.jsx(D.Star2,{weight:"Linear",size:20,className:"animate-spin"})]})}const Be=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:11,height:8,viewBox:"0 0 11 8",fill:"none",...t},U.createElement("path",{d:"M0.625 3.76944L3.76944 6.91389L10.0694 0.625",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),Pe={blue:{border:"border-blue-600",bg:"bg-blue-600",hover:"hover:border-blue-600 hover:bg-blue-100",focus:"focus:shadow-blue"},yellow:{border:"border-yellow-500",bg:"bg-yellow-500",hover:"hover:border-yellow-500 hover:bg-yello-100",focus:"focus:ring-2 focus:ring-yellow-300"}},me=l.memo(function({type:s="checkbox",label:r,supportText:o,checked:d,onChange:p,error:n,disabled:i=!1,required:x=!1,className:h,variant:k="yellow",name:S,value:N}){const[m,M]=l.useState(!1),c=s==="radio",v=l.useMemo(()=>d??m,[d,m]),z=l.useCallback(C=>{i||(d===void 0&&M(C.target.checked),p?.(C))},[d,p,i]),y=l.useMemo(()=>{if(i){const F="border-slate-200 bg-slate-100";return c?{container:F,dot:v?"bg-slate-300":"bg-transparent",check:"text-slate-400"}:{container:F,dot:"",check:v?"text-slate-400":"text-transparent"}}const C=Pe[k];if(c){const F=a("border transition-all duration-200",v?C.border:"border-slate-400",!v&&C.hover,C.focus,v&&""),$=a("transition-all duration-200 rounded-full",v?C.bg:"bg-transparent");return{container:F,dot:$,check:""}}return{container:a("border transition-all duration-200",v?a(C.bg,C.border):"border-slate-400",!v&&C.hover,C.focus),dot:"",check:v?"text-white":"text-transparent"}},[c,v,i,k]),g=l.useMemo(()=>!r&&!o?null:e.jsxs("div",{className:"flex flex-col",children:[r&&e.jsxs("span",{className:a("text-base font-medium text-slate-700",n&&"text-red-600",i&&"text-slate-400"),children:[r,x&&e.jsx("span",{className:"text-extra-small text-red-600 ml-1",children:"*"})]}),o&&e.jsx("span",{className:a("text-slate-500 text-base font-normal",i&&"text-slate-400"),children:o})]}),[r,o,n,i,x]);return e.jsxs("div",{className:a("flex items-start",h),children:[e.jsxs("label",{className:a("flex items-start gap-2 select-none",i?"cursor-not-allowed":"cursor-pointer"),children:[e.jsx("input",{type:s,checked:v,onChange:z,disabled:i,required:x,className:"sr-only","aria-invalid":!!n,"aria-describedby":n?`${S}-error`:void 0,name:S,value:N}),e.jsx("div",{className:a("relative flex items-center justify-center",c?"w-5 h-5 rounded-full":"w-5 h-5 rounded",y.container),children:c?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("span",{className:a("w-3 h-3 rounded-full transition-all duration-200",y.dot,v?"opacity-100 scale-100":"opacity-0 scale-50")})}):e.jsx(Be,{className:a("w-4 h-4 stroke-[2.5px] transition-opacity duration-200",y.check,v?"opacity-100":"opacity-0")})}),g]}),n&&e.jsx("p",{id:`${S}-error`,className:"mt-1 text-extra-small text-red-600",children:n})]})});me.displayName="MciCheck";function We({title:t,children:s,defaultOpen:r=!1,icon:o,className:d,contentClassName:p}){const[n,i]=l.useState(r),[x,h]=l.useState(0),k=l.useRef(null);return l.useEffect(()=>{k.current&&h(n?k.current.scrollHeight:0)},[n]),e.jsxs("div",{className:a("overflow-hidden rounded-xl border border-slate-200",d),children:[e.jsxs("button",{onClick:()=>i(!n),className:a("flex w-full items-center justify-between p-5 transition-all duration-300 hover:cursor-pointer",n?"border-b border-slate-200":"border-b border-transparent"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[o&&e.jsx("span",{className:"shrink-0",children:o}),e.jsx("div",{className:a("text-base font-medium text-black"),children:t})]}),e.jsx(D.AltArrowDown,{weight:"Linear",size:20,className:a("shrink-0 transition-transform duration-300 text-slate-400",n&&"rotate-180")})]}),e.jsx("div",{className:a("overflow-hidden transition-all duration-300 ease-out"),style:{height:`${x}px`},children:e.jsx("div",{ref:k,className:a("p-5",p),children:s})})]})}const se=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...t},U.createElement("path",{d:"M7.75739 7.75735L16.2427 16.2426",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),U.createElement("path",{d:"M7.75733 16.2426L16.2426 7.75735",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));function Ye({isOpen:t,onClose:s,position:r="right",children:o,footer:d,title:p,description:n,showCloseButton:i=!0,drawerClassName:x,closeOnOverlayClick:h=!0,closeOnEscape:k=!0,width:S=572}){const N=l.useRef(null),m=l.useRef(null),M=l.useCallback(()=>{s()},[s]);l.useEffect(()=>{t?(m.current=document.activeElement,N.current?.focus()):m.current?.focus()},[t]),l.useEffect(()=>(t&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="unset"}),[t]);const c=l.useMemo(()=>({width:typeof S=="number"?`${S}px`:S,transform:t?"translateX(0)":r==="right"?"translateX(calc(100% + 48px))":"translateX(calc(-100% - 48px))"}),[t,S,r]),v={left:"top-6 left-6 bottom-6",right:"top-6 right-6 bottom-6"};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:a("fixed inset-0 z-50 bg-black/40 transition-opacity duration-300",t?"opacity-100 visible cursor-pointer":"opacity-0 invisible pointer-events-none"),onClick:h?M:void 0,"aria-hidden":"true"}),e.jsxs("div",{ref:N,tabIndex:-1,style:c,className:a("fixed flex flex-col z-50 w-full rounded-2xl bg-white transition-transform duration-300 ease-in-out outline-none",v[r],x),role:"dialog","aria-modal":"true","aria-labelledby":p?"drawer-title":void 0,children:[(p||i||n)&&e.jsxs("div",{className:"flex items-start justify-between border-b border-slate-200 p-6 shrink-0",children:[p&&e.jsxs("div",{className:"block",children:[e.jsx("h2",{id:"drawer-title",className:"text-h3 font-semibold text-black",children:p}),n&&e.jsx("p",{className:"text-base text-slate-base font-normal mt-2",children:n})]}),i&&e.jsx("button",{type:"button",onClick:M,className:"bg-slate-100 rounded-xl w-12 h-12 hover:cursor-pointer text-black transition flex items-center justify-center group active:scale-95",children:e.jsx(se,{className:"h-6 w-6 transition-transform duration-300 group-hover:rotate-180"})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin scrollbar-thumb-slate-200 p-6",children:o}),d&&e.jsx("div",{className:"flex items-center justify-end border-t border-slate-200 p-6 shrink-0",children:d})]})]})}const ce=l.forwardRef(({label:t,placeholder:s,type:r="text",icon:o,rightIcon:d,iconPosition:p="left",size:n="base",error:i,disabled:x=!1,required:h=!1,value:k,onChange:S,onFocus:N,onBlur:m,className:M,name:c,maxLength:v=250,onClear:z,showClearButton:y=!1,step:g,autoComplete:C="off"},B)=>{const[F,$]=l.useState(!1),[T,P]=l.useState(""),[W,K]=l.useState(!1),q=k??T,H=r==="password",te=y&&!!q&&!x,_=o&&p==="left",X=o&&p==="right"||d||H,oe=X||te,O=()=>{$(!0),N?.()},G=()=>{$(!1),m?.()},b=J=>{k===void 0&&P(J.target.value),S?.(J)},E=()=>K(J=>!J),I=()=>{k===void 0&&P(""),z?.()},w=l.useMemo(()=>({sm:{input:"h-9 text-small",padding:_&&X?"pl-7 pr-7":_?"pl-7 pr-2":X?"pl-2 pr-7":"px-2",icon:"w-4 h-4",leftIcon:"left-2",rightIcon:"right-2",labelFont:"text-small",iconWrapper:"h-4"},md:{input:"h-10 text-small",padding:_&&X?"pl-8 pr-8":_?"pl-8 pr-2":X?"pl-2 pr-8":"px-4",icon:"w-4 h-4",leftIcon:"left-2",rightIcon:"right-2",labelFont:"text-base",iconWrapper:"h-4"},base:{input:"h-12 text-base",padding:_&&X?"pl-9 pr-9":_?"pl-9 pr-3":X?"pl-3 pr-9":"px-4",icon:"w-5 h-5",leftIcon:"left-3",rightIcon:"right-3",labelFont:"text-base",iconWrapper:"h-5"}}),[_,X]),Z=l.useMemo(()=>i?"border-red-600 focus:border-red-600 shadow-red":"border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600",[i]),Y=l.useMemo(()=>x?"text-slate-400":i?"text-red-600":F?"text-black":"text-slate-400",[i,F,x]);return e.jsxs("div",{className:a("w-full",M),children:[t&&e.jsxs("label",{htmlFor:c,className:a("mb-2 block text-base font-medium",i?"text-red-600":"text-slate-700",w[n].labelFont),children:[t,h&&e.jsx("span",{className:"text-extra-small text-red-600 ml-1",children:"*"})]}),e.jsxs("div",{className:"relative flex items-center",children:[e.jsx("input",{ref:B,name:c,type:H&&W?"text":r,value:q,onChange:b,onFocus:O,onBlur:G,disabled:x,required:h,autoComplete:C,placeholder:s,step:g,className:a("w-full border bg-white font-normal transition-all duration-300 ease-in-out outline-none",n==="base"?"rounded-xl":"rounded-lg","disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",w[n].input,w[n].padding,Z),maxLength:v}),_&&e.jsx("div",{className:a("absolute top-1/2 flex -translate-y-1/2 items-center justify-center","transition-all duration-300",w[n].leftIcon,Y),children:e.jsx("div",{className:a("flex items-center justify-center",w[n].iconWrapper),children:e.jsx("span",{className:a("flex items-center justify-center",w[n].icon),children:o})})}),oe&&e.jsxs("div",{className:a("absolute top-1/2 flex -translate-y-1/2 items-center justify-center gap-2","transition-all duration-300",w[n].rightIcon),children:[te&&e.jsx("button",{type:"button",onClick:I,className:a("flex items-center justify-center",w[n].iconWrapper,"text-slate-base hover:text-black"),style:{cursor:"pointer"},children:e.jsx("span",{className:a("flex items-center justify-center",w[n].icon),children:e.jsx(se,{className:a("h-full w-full")})})}),d&&!H&&e.jsx("div",{className:a("flex items-center justify-center",w[n].iconWrapper),children:e.jsx("span",{className:a("flex items-center justify-center",w[n].icon,Y),children:d})}),H&&e.jsxs(e.Fragment,{children:[d&&e.jsx("div",{className:a("flex items-center justify-center",w[n].iconWrapper),children:e.jsx("span",{className:a("flex items-center justify-center",w[n].icon,Y),children:d})}),e.jsx("button",{type:"button",onClick:E,className:a("flex items-center justify-center",w[n].iconWrapper,Y),children:e.jsx("span",{className:a("flex items-center justify-center cursor-pointer",w[n].icon),children:W?e.jsx(D.EyeClosed,{weight:"Linear",className:a("h-full w-full")}):e.jsx(D.Eye,{weight:"Linear",className:a("h-full w-full")})})})]}),o&&p==="right"&&!H&&e.jsx("div",{className:a("flex items-center justify-center",w[n].iconWrapper),children:e.jsx("span",{className:a("flex items-center justify-center",w[n].icon,Y),children:o})})]})]}),i&&e.jsx("p",{className:"mt-2 animate-[slideDown_0.3s_ease-out] text-small font-normal text-red-600",children:i})]})});ce.displayName="MciInput";const _e={uz:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avgust","Sentabr","Oktabr","Noyabr","Dekabr"],monthsShort:["Yan","Fev","Mar","Apr","May","Iyn","Iyl","Avg","Sen","Okt","Noy","Dek"],weekdays:["Yakshanba","Dushanba","Seshanba","Chorshanba","Payshanba","Juma","Shanba"],weekdaysShort:["Ya","Du","Se","Ch","Pa","Ju","Sh"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],weekdays:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],weekdaysShort:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"]}},xe=l.forwardRef(({type:t="date",value:s,onChange:r,placeholder:o,label:d,disabled:p=!1,required:n=!1,className:i,format:x="DD.MM.YYYY",minDate:h,maxDate:k,error:S,showClear:N=!0,allowManualInput:m=!0,locale:M="uz",startView:c="day",iconPosition:v="left",align:z="auto"},y)=>{const[g,C]=l.useState(!1),[B,F]=l.useState(t==="range"?[null,null]:null),[$,T]=l.useState([null,null]),P=l.useCallback(u=>{if(!u)return null;const f=new Date(u);return isNaN(f.getTime())?null:f},[]),[W,K]=l.useState(new Date),[q,H]=l.useState(c),[te,_]=l.useState(0),[X,oe]=l.useState(""),[O,G]=l.useState(z),b=l.useRef(null),E=l.useMemo(()=>{const u=s!==void 0?s:B;if(t==="date")return P(u);const f=u;return[P(f[0]),P(f[1])]},[s,B,t,P]),I=_e[M];l.useEffect(()=>{if(g)if(t==="range"&&T(E),t==="date"){const u=E;u&&K(u)}else{const[u,f]=E;u?K(u):f&&K(f)}},[g]),l.useEffect(()=>{if(g&&z==="auto"&&b.current){const u=b.current.getBoundingClientRect(),f=window.innerWidth-u.right,j=u.left;f<300&&j>300?G("right"):G("left")}},[g,z]);const w=l.useCallback(u=>new Date(u.getFullYear(),u.getMonth(),u.getDate()),[]),Z=l.useCallback((u,f)=>w(u).getTime()===w(f).getTime(),[w]),Y=l.useCallback(u=>{const f=w(u);return!!(h&&f<w(h)||k&&f>w(k))},[h,k,w]),J=l.useCallback(u=>{if(!u)return"";const f=u.getDate().toString().padStart(2,"0"),j=(u.getMonth()+1).toString().padStart(2,"0"),V=u.getFullYear();return x.replace("DD",f).replace("MM",j).replace("YYYY",V.toString())},[x]),pe=l.useMemo(()=>{if(t==="date")return J(E);const[u,f]=E;return!u&&!f?"":u&&f?`${J(u)} - ${J(f)}`:u?`${J(u)} - ...`:"..."},[t,E,J]);l.useEffect(()=>{oe(pe)},[pe]);const ee=l.useCallback(()=>{C(!1),H(c),_(0)},[c]),{handleClick:ne}=he(b,ee),{handleEscape:A}=fe(ee);l.useEffect(()=>{if(g)return document.addEventListener("mousedown",ne),document.addEventListener("keydown",A),()=>{document.removeEventListener("mousedown",ne),document.removeEventListener("keydown",A)}},[g,ne,A]);const ae=l.useCallback(()=>{const u=t==="range"?[null,null]:null;F(u),T([null,null]),r?.(u)},[t,r]),st=l.useCallback(u=>{if(Y(u))return;const f=w(u);if(t==="date")F(f),r?.(f),ee();else{const[j,V]=$;if(!j&&!V||j&&V)T([f,null]);else if(j&&!V){const Q=f<j?[f,j]:[j,f];T(Q),F(Q),r?.(Q),ee()}}},[t,$,Y,w,r,ee]),nt=l.useCallback(u=>{const f=new Date(W.getFullYear(),u,1);K(f),c==="month"?(F(f),r?.(f),ee()):H("day")},[W,c,r,ee]),it=l.useCallback(u=>{const f=new Date(u,W.getMonth(),1);K(f),c==="year"?(F(f),r?.(f),ee()):H("month")},[W,c,r,ee]),Ee=u=>{K(f=>new Date(f.getFullYear(),f.getMonth()+u,1))},ue=u=>{K(f=>new Date(f.getFullYear()+u,f.getMonth(),1))},ct=l.useCallback(u=>{const f=u.getFullYear(),j=u.getMonth(),V=new Date(f,j,1).getDay(),Q=new Date(f,j+1,0).getDate(),re=[];for(let R=V;R>0;R--)re.push({date:new Date(f,j,1-R),isCurrentMonth:!1});for(let R=1;R<=Q;R++)re.push({date:new Date(f,j,R),isCurrentMonth:!0});const le=42-re.length;for(let R=1;R<=le;R++)re.push({date:new Date(f,j+1,R),isCurrentMonth:!1});return re},[]),dt=u=>{const f=w(u);if(t==="date")return E&&Z(f,E);const[j]=$[0]?$:E,V=P(j);return V&&Z(f,V)},pt=u=>{if(t!=="range")return!1;const f=w(u),[,j]=$[1]?$:E,V=P(j);return V&&Z(f,V)},ut=u=>{if(t!=="range")return!1;const f=w(u),[j,V]=$[0]?$:E,Q=P(j),re=P(V);return Q&&re&&f>w(Q)&&f<w(re)},De=(u,f,j)=>{const V=ct(u);return e.jsxs("div",{className:"w-[300px] p-2 select-none",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4 py-1",children:[e.jsx("div",{className:"flex gap-2",children:f&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>ue(-1),type:"button",className:"hover:bg-slate-100 p-1 rounded transition-colors",children:e.jsx(D.DoubleAltArrowLeft,{size:18,className:"text-slate-700"})}),e.jsx("button",{onClick:()=>Ee(-1),type:"button",className:"hover:bg-slate-100 p-1 rounded transition-colors",children:e.jsx(D.AltArrowLeft,{size:18,className:"text-slate-700"})})]})}),e.jsxs("div",{className:"flex gap-1 font-semibold text-slate-700 text-small",children:[e.jsx("span",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>H("month"),children:I.months[u.getMonth()]}),e.jsx("span",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>H("year"),children:u.getFullYear()})]}),e.jsx("div",{className:"flex gap-2",children:j&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>Ee(1),type:"button",className:"hover:bg-slate-100 p-1 rounded transition-colors",children:e.jsx(D.AltArrowRight,{size:18,className:"text-slate-700"})}),e.jsx("button",{onClick:()=>ue(1),type:"button",className:"hover:bg-slate-100 p-1 rounded transition-colors",children:e.jsx(D.DoubleAltArrowRight,{size:18,className:"text-slate-700"})})]})})]}),e.jsx("div",{className:"grid grid-cols-7 mb-1 text-center text-[11px] font-bold text-blue-600 uppercase",children:I.weekdaysShort.map(Q=>e.jsx("div",{className:"py-1",children:Q},Q))}),e.jsx("div",{className:"grid grid-cols-7 gap-y-1 relative",children:V.map((Q,re)=>{const le=Q.date,R=Y(le),be=dt(le),we=pt(le),gt=ut(le);return e.jsx("div",{className:a("h-10 flex items-center justify-center relative",gt&&"bg-blue-50",be&&t==="range"&&"bg-gradient-to-r from-transparent to-blue-50",we&&"bg-gradient-to-l from-transparent to-blue-50"),children:e.jsx("button",{type:"button",onClick:()=>st(le),disabled:R,className:a("w-9 h-9 cursor-pointer rounded-full flex items-center justify-center text-small font-medium transition-all z-10",Q.isCurrentMonth?"text-slate-700":"text-slate-300",R&&"opacity-20 cursor-not-allowed",be||we?"bg-blue-600 text-white":"hover:bg-blue-50",Z(le,new Date)&&!be&&!we&&"text-blue-600 border border-blue-600"),children:le.getDate()})},re)})})]})},ft=()=>e.jsxs("div",{className:"w-[300px] p-3",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4 px-2",children:[e.jsx("button",{type:"button",onClick:()=>ue(-1),className:"p-1 hover:bg-slate-100 rounded",children:e.jsx(D.AltArrowLeft,{size:20})}),e.jsx("span",{className:"font-bold text-slate-800",children:W.getFullYear()}),e.jsx("button",{type:"button",onClick:()=>ue(1),className:"p-1 hover:bg-slate-100 rounded",children:e.jsx(D.AltArrowRight,{size:20})})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:I.monthsShort.map((u,f)=>e.jsx("button",{type:"button",onClick:()=>nt(f),className:a("hover:cursor-pointer py-3 rounded-lg text-small font-semibold transition-colors",W.getMonth()===f?"bg-blue-600 text-white":"hover:bg-blue-50 text-slate-600"),children:u},u))})]}),ht=()=>{const u=Math.floor(W.getFullYear()/12)*12+te*12,f=Array.from({length:12},(j,V)=>u+V);return e.jsxs("div",{className:"w-[300px] p-3",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4 px-2",children:[e.jsx("button",{type:"button",onClick:()=>_(j=>j-1),className:"p-1 hover:bg-slate-100 rounded",children:e.jsx(D.AltArrowLeft,{size:20})}),e.jsxs("span",{className:"font-bold text-slate-800",children:[f[0]," - ",f[11]]}),e.jsx("button",{type:"button",onClick:()=>_(j=>j+1),className:"p-1 hover:bg-slate-100 rounded",children:e.jsx(D.AltArrowRight,{size:20})})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:f.map(j=>e.jsx("button",{type:"button",onClick:()=>it(j),className:a("hover:cursor-pointer py-3 rounded-lg text-small font-semibold transition-colors",W.getFullYear()===j?"bg-blue-600 text-white":"hover:bg-blue-50 text-slate-600"),children:j},j))})]})},Fe=e.jsx(D.Calendar,{weight:"Linear",size:20,className:"text-slate-400"});return e.jsxs("div",{ref:b,className:a("relative w-full group",i),children:[e.jsx("div",{ref:y,children:e.jsx(ce,{label:d,placeholder:Array.isArray(o)?o[0]:o,value:X,icon:v==="left"?Fe:void 0,rightIcon:v==="right"?Fe:void 0,disabled:p,required:n,error:S,onFocus:()=>{p||(C(!0),H(c))},readOnly:!m,showClearButton:N,onClear:ae})}),g&&e.jsx("div",{className:a("absolute top-[calc(100%+4px)] z-[100] bg-white rounded-xl shadow-xl border border-slate-200","flex flex-col md:flex-row overflow-hidden animate-in fade-in zoom-in-95 duration-200",O==="right"&&"right-0 origin-top-right",O==="left"&&"left-0 origin-top-left",O==="center"&&"left-1/2 -translate-x-1/2 origin-top"),style:{width:"max-content"},children:q==="day"?e.jsxs(e.Fragment,{children:[De(W,!0,t!=="range"),t==="range"&&e.jsx("div",{className:"hidden md:block border-l border-slate-100",children:De(new Date(W.getFullYear(),W.getMonth()+1,1),!1,!0)})]}):q==="month"?ft():ht()})]})});xe.displayName="MciPicker";const Ve={sm:{container:"h-9 text-small",padding:"px-2",iconPaddingLeft:"pl-7",iconPaddingRight:"pr-7",iconSize:"w-4 h-4",iconWrapper:"left-2",rightIconWrapper:"right-2",label:"text-small",dropdown:"text-small"},md:{container:"h-10 text-small",padding:"px-4",iconPaddingLeft:"pl-8",iconPaddingRight:"pr-8",iconSize:"w-5 h-5",iconWrapper:"left-3",rightIconWrapper:"right-3",label:"text-small",dropdown:"text-small"},base:{container:"h-12 text-base",padding:"px-4",iconPaddingLeft:"pl-10",iconPaddingRight:"pl-3",iconSize:"w-5 h-5",iconWrapper:"left-4",rightIconWrapper:"right-16",label:"text-base",dropdown:"text-base"}},ye=l.forwardRef(({label:t,placeholder:s="Выберите...",options:r=[],icon:o,iconPosition:d="left",size:p="base",error:n,disabled:i=!1,required:x=!1,value:h,onChange:k,onFocus:S,onBlur:N,className:m,clearable:M=!1,searchable:c=!1,onSearch:v,name:z},y)=>{const[g,C]=l.useState(!1),[B,F]=l.useState(!1),[$,T]=l.useState(""),[P,W]=l.useState(""),[K,q]=l.useState(-1),H=l.useRef(null),te=l.useRef(null),_=h!==void 0?h:$,X=r.find(A=>A.value===_),oe=_!==""&&_!==void 0,O=Ve[p],G=l.useMemo(()=>{if(!c||v)return r;const A=P.toLowerCase();return r.filter(ae=>ae.label.toLowerCase().includes(A))},[r,P,c,v]),b=l.useCallback(()=>{C(!1),F(!1),W(""),q(-1),N?.()},[N]),{handleClick:E}=he(H,b),{handleEscape:I}=fe(b);l.useEffect(()=>{if(g)return document.addEventListener("mousedown",E),document.addEventListener("keydown",I),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("keydown",I)}},[g,E,I]),l.useEffect(()=>{g&&c&&te.current&&te.current.focus()},[g,c]);const w=l.useCallback(A=>{if(!i){if(!g&&(A.key==="ArrowDown"||A.key==="ArrowUp"||A.key==="Enter")){A.preventDefault(),C(!0);return}if(g)switch(A.key){case"ArrowDown":A.preventDefault(),q(ae=>ae<G.length-1?ae+1:0);break;case"ArrowUp":A.preventDefault(),q(ae=>ae>0?ae-1:G.length-1);break;case"Enter":A.preventDefault(),K>=0&&G[K]&&Y(G[K].value);break}}},[g,G,K,i]),Z=l.useCallback(()=>{i||(C(A=>!A),g?(W(""),q(-1)):(F(!0),S?.()))},[i,g,S]),Y=l.useCallback(A=>{h===void 0&&T(A),k?.(A),C(!1),F(!1),W(""),q(-1),N?.()},[h,k,N]),J=l.useCallback(A=>{A.stopPropagation(),!i&&(h===void 0&&T(""),k?.(""),W(""),q(-1))},[h,k,i]),pe=l.useCallback(A=>{W(A),v?.(A),q(0)},[v]),ee=l.useMemo(()=>i?"border-slate-200 bg-slate-100 text-slate-400 cursor-not-allowed":n?"border-red-600 focus:border-red-600 shadow-red bg-white":"border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600 bg-white",[n,i]),ne=l.useMemo(()=>i?"text-slate-400":n?"text-red-600":g||B?"text-black":"text-slate-400",[i,n,g,B]);return e.jsxs("div",{className:a("w-full",m),ref:y,children:[t&&e.jsxs("label",{htmlFor:z,className:a("mb-2 block text-base font-medium",n?"text-red-600":"text-slate-700",O.label),children:[t,x&&e.jsx("span",{className:"ml-1 text-red-600",children:"*"})]}),e.jsxs("div",{ref:H,className:"relative",onKeyDown:w,children:[e.jsxs("div",{role:"combobox","aria-expanded":g,"aria-haspopup":"listbox","aria-controls":`${z}-listbox`,"aria-disabled":i,tabIndex:i?-1:0,onClick:Z,className:a("flex w-full items-center border font-normal transition-all duration-300 ease-in-out",p==="base"?"rounded-xl":"rounded-lg",O.container,o?d==="left"?O.iconPaddingLeft:O.iconPaddingRight:O.padding,ee,!i&&B&&"shadow-blue border-blue-600"),children:[o&&e.jsx("div",{className:a("absolute top-1/2 -translate-y-1/2 pointer-events-none transition-colors duration-300",d==="left"?O.iconWrapper:O.rightIconWrapper,ne),children:o}),c&&g?e.jsx("input",{ref:te,type:"text",value:P,onChange:A=>pe(A.target.value),placeholder:s,className:"w-full bg-transparent outline-none",onClick:A=>A.stopPropagation()}):e.jsx("span",{className:a("block truncate select-none",!oe&&!i&&"text-slate-400"),children:X?.label||s}),M&&oe&&!i&&e.jsx("button",{type:"button",onClick:J,className:a("absolute top-1/2 -translate-y-1/2 text-slate-400 hover:text-black transition-colors cursor-pointer",o&&d==="left"?"right-8":"right-10"),"aria-label":"Очистить",children:e.jsx(se,{className:O.iconSize})}),e.jsx("div",{className:a("absolute top-1/2 right-3 -translate-y-1/2 pointer-events-none transition-all duration-300",g&&"rotate-180",ne),children:e.jsx(D.AltArrowDown,{className:O.iconSize})})]}),g&&!i&&e.jsx("div",{id:`${z}-listbox`,role:"listbox",className:a("absolute z-50 mt-1 max-h-60 w-full overflow-y-auto rounded-lg border border-slate-200 bg-white shadow-md p-1 text-black",O.dropdown),children:G.length===0?e.jsx("div",{className:"px-3 py-2 text-center text-base font-normal text-slate-500",children:"Ничего не найдено"}):G.map(A=>e.jsx("div",{role:"option","aria-selected":_===A.value,onClick:()=>Y(A.value),className:a("cursor-pointer px-3 py-2 font-normal transition-colors hover:bg-slate-100 rounded-sm",_===A.value?"bg-slate-100":""),children:A.label},A.value))})]}),n&&e.jsx("p",{className:"mt-2 animate-[slideDown_0.3s_ease-out] text-small font-normal text-red-600",children:n})]})});ye.displayName="MciSelect";function ke({className:t,variant:s="default",width:r="100%",height:o="1rem"}){return e.jsx("div",{className:a("relative overflow-hidden bg-slate-200","rounded-lg",s==="circle"&&"rounded-full",s==="rounded"&&"rounded-md",t),style:{width:typeof r=="number"?`${r}px`:r,height:typeof o=="number"?`${o}px`:o},children:e.jsx("div",{className:"shimmer-mask absolute inset-0"})})}function Ue({columns:t,data:s,loading:r=!1,skeletonRows:o=5,noDataText:d="",sort:p,onSortChange:n}){const[i,x]=l.useState(null),h=p??i,k=l.useMemo(()=>!h||p?s:[...s].sort((c,v)=>{const z=c[h.key],y=v[h.key];return z==null?1:y==null?-1:z<y?h.direction==="asc"?-1:1:z>y?h.direction==="asc"?1:-1:0}),[s,h,p]),S=c=>{if(!c.sortable)return;let v=null;h?.key!==c.key?v={key:c.key,direction:"asc"}:h.direction==="asc"&&(v={key:c.key,direction:"desc"}),p!==void 0?n?.(v):x(v)};l.useEffect(()=>{p!==void 0&&x(null)},[p]);const N=c=>c.sortable?!h||h.key!==c.key?e.jsx(D.SortVertical,{weight:"Linear",size:20,className:"text-slate-base"}):h.direction==="asc"?e.jsx(D.SortFromTopToBottom,{weight:"Linear",size:20,className:"text-slate-base"}):e.jsx(D.SortFromBottomToTop,{weight:"Linear",size:20,className:"text-slate-base"}):null,m=r?[]:p?s:k,M=c=>{if(c!=null&&(typeof c=="string"||typeof c=="number"))return String(c)};return e.jsx("div",{className:"w-full overflow-x-auto",children:e.jsxs("div",{className:"inline-block min-w-full align-middle",children:[e.jsx("div",{className:"overflow-hidden rounded-xl border border-slate-200 bg-slate-100",children:e.jsx("table",{className:"w-full table-fixed",children:e.jsx("thead",{children:e.jsx("tr",{children:t?.map((c,v)=>e.jsx("th",{onClick:()=>S(c),className:a("px-3 py-4 text-left text-small font-medium text-slate-700 transition-colors",c.align==="center"&&"text-center",c.align==="right"&&"text-right",c.sortable&&"cursor-pointer hover:bg-slate-200"),style:{width:c.width||"auto"},children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate",children:c.title}),N(c)]})},v))})})})}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-slate-200 bg-white",children:e.jsx("table",{className:"w-full table-fixed",children:e.jsx("tbody",{className:"divide-y divide-slate-200",children:r?Array.from({length:o}).map((c,v)=>e.jsx("tr",{children:t?.map((z,y)=>e.jsx("td",{className:"px-4 py-3",style:{width:z.width},children:e.jsx(ke,{height:30,variant:"rounded"})},y))},v)):m?.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length,className:"py-20",children:e.jsxs("div",{className:"flex flex-col items-center justify-center",children:[e.jsx("div",{className:"relative mb-4",children:e.jsx(D.ConfoundedSquare,{weight:"Bold",size:64,className:"animate-float text-slate-400"})}),e.jsx("p",{className:"text-small font-medium text-slate-400",children:d})]})})}):m?.map((c,v)=>e.jsx("tr",{className:"group transition-colors hover:bg-slate-50",children:t?.map((z,y)=>{const g=c[z.key],C=M(g);return e.jsx("td",{className:a("px-3 py-4 text-small font-normal text-black align-top",z.align==="center"&&"text-center",z.align==="right"&&"text-right"),style:{width:z.width||"auto"},children:e.jsx("div",{className:a("line-clamp-2","whitespace-normal","break-all"),title:z.render?void 0:C,children:z.render?z.render(g,c):String(g??"-")})},y)})},v))})})})]})})}const qe={uz:{dragAndDrop:"Faylni bu yerga torting",clickToUpload:"yoki bosish orqali tanlang",or:"yoki",fileRequirements:(t,s,r,o)=>`${t?`Maksimum ${s} ta fayl`:"1 ta fayl"} • Hajmi ${r}MB dan kichik • ${o!=="*/*"?`Format: ${o}`:"Barcha formatlar"}`,selectedFiles:"Tanlangan fayllar",clearAll:"Barchasini o'chirish",uploading:"Yuklanmoqda...",success:"Muvaffaqiyatli yuklandi",error:"Xatolik",maxFilesError:t=>`Maksimum ${t} ta fayl yuklash mumkin`,fileSizeError:(t,s)=>`"${t}" fayli hajmi ${s}MB dan kichik bo'lishi kerak`,fileTypeError:t=>`"${t}" fayl turi qabul qilinmaydi`,uploadFailed:"Yuklash muvaffaqiyatsiz tugadi",file:"Fayl",image:"Rasm",video:"Video",audio:"Audio",document:"Hujjat"},ru:{dragAndDrop:"Перетащите файл сюда",clickToUpload:"или выберите нажатием",or:"или",fileRequirements:(t,s,r,o)=>`${t?`Максимум ${s} файлов`:"1 файл"} • Размер до ${r}MB • ${o!=="*/*"?`Формат: ${o}`:"Все форматы"}`,selectedFiles:"Выбранные файлы",clearAll:"Очистить все",uploading:"Загружается...",success:"Успешно загружено",error:"Ошибка",maxFilesError:t=>`Можно загрузить максимум ${t} файлов`,fileSizeError:(t,s)=>`Размер файла "${t}" должен быть меньше ${s}MB`,fileTypeError:t=>`Тип файла "${t}" не поддерживается`,uploadFailed:"Не удалось загрузить файл",file:"Файл",image:"Изображение",video:"Видео",audio:"Аудио",document:"Документ"},en:{dragAndDrop:"Drag and drop file here",clickToUpload:"or click to select",or:"or",fileRequirements:(t,s,r,o)=>`${t?`Maximum ${s} files`:"1 file"} • Size up to ${r}MB • ${o!=="*/*"?`Format: ${o}`:"All formats"}`,selectedFiles:"Selected files",clearAll:"Clear all",uploading:"Uploading...",success:"Successfully uploaded",error:"Error",maxFilesError:t=>`Maximum ${t} files can be uploaded`,fileSizeError:(t,s)=>`File "${t}" size must be less than ${s}MB`,fileTypeError:t=>`File type "${t}" is not supported`,uploadFailed:"Upload failed",file:"File",image:"Image",video:"Video",audio:"Audio",document:"Document"}},Oe=({multiple:t=!1,accept:s="*/*",maxSize:r=10,maxFiles:o=5,disabled:d=!1,label:p,required:n=!1,error:i,className:x,onFilesChange:h,onUpload:k,showPreview:S=!0,locale:N="uz",showFileTypeIcon:m=!0,customValidator:M})=>{const[c,v]=l.useState([]),[z,y]=l.useState(!1),[g,C]=l.useState(!1),B=l.useRef(null),F=qe[N],$=b=>{switch(b.type.split("/")[0]){case"image":return e.jsx(D.Gallery,{className:"h-5 w-5 text-blue-500"});case"video":return e.jsx(D.VideoFramePlayHorizontal,{className:"h-5 w-5 text-purple-500"});case"audio":return e.jsx(D.MusicNote,{className:"h-5 w-5 text-green-500"});default:return b.type.includes("pdf")?e.jsx(D.FileText,{className:"h-5 w-5 text-red-500"}):b.type.includes("word")||b.type.includes("document")?e.jsx(D.FileText,{className:"h-5 w-5 text-blue-600"}):b.type.includes("excel")||b.type.includes("spreadsheet")?e.jsx(D.FileText,{className:"h-5 w-5 text-green-600"}):e.jsx(D.File,{className:"h-5 w-5 text-gray-500"})}},T=b=>{if(b===0)return"0 Bytes";const E=1024,I=["Bytes","KB","MB","GB"],w=Math.floor(Math.log(b)/Math.log(E));return parseFloat((b/Math.pow(E,w)).toFixed(2))+" "+I[w]},P=b=>{const E=r*1024*1024;return b.size<=E},W=b=>s==="*/*"?!0:s.split(",").map(I=>I.trim()).some(I=>{if(I.endsWith("/*")){const w=I.replace("/*","");return b.type.startsWith(w)}return b.type===I||b.name.toLowerCase().endsWith(I.replace("*.","."))}),K=b=>new Promise(E=>{if(b.type.startsWith("image/")){const I=new FileReader;I.onload=w=>E(w.target?.result),I.readAsDataURL(b)}else E("")}),q=l.useCallback(async b=>{const E=Array.from(b),I=[];for(const w of E){if(c.length+I.length>=o){alert(F.maxFilesError(o));break}if(!P(w)){alert(F.fileSizeError(w.name,r));continue}if(!W(w)){alert(F.fileTypeError(w.name));continue}if(M){const Y=M(w);if(Y){alert(Y);continue}}const Z=await K(w);I.push({id:Math.random().toString(36).substr(2,9),file:w,preview:Z,progress:0,status:"uploading"})}if(I.length>0){const w=t?[...c,...I]:I;if(v(w),h?.(w.map(Z=>Z.file)),k){C(!0);try{const Z=w.map((Y,J)=>({...Y,progress:Math.min(100,(J+1)/w.length*100)}));v(Z),await k(Z),v(Y=>Y.map(J=>({...J,status:"success",progress:100})))}catch(Z){v(Y=>Y.map(J=>({...J,status:"error",error:Z instanceof Error?Z.message:F.uploadFailed})))}finally{C(!1)}}}},[c,o,P,W,M,F,r,t,h,k]),H=l.useCallback(b=>{b.preventDefault(),d||y(!0)},[d]),te=l.useCallback(b=>{b.preventDefault(),y(!1)},[]),_=l.useCallback(b=>{if(b.preventDefault(),y(!1),d)return;const E=b.dataTransfer.files;E.length>0&&q(E)},[d,q]),X=l.useCallback(b=>{const E=b.target.files;E&&E.length>0&&(q(E),B.current&&(B.current.value=""))},[q]),oe=l.useCallback(b=>{v(E=>{const I=E.filter(w=>w.id!==b);return h?.(I.map(w=>w.file)),I})},[h]),O=l.useCallback(()=>{v([]),h?.([])},[h]),G=l.useCallback(()=>{B.current?.click()},[]);return e.jsxs("div",{className:a("w-full",x),children:[p&&e.jsxs("label",{className:a("mb-2 block text-base font-medium text-slate-700",i?"text-red-600":"text-slate-700"),children:[p,n&&e.jsx("span",{className:"text-extra-small text-red-600 ml-1",children:"*"})]}),e.jsxs("div",{className:a("cursor-pointer border border-dashed rounded-2xl p-6 text-center transition-all duration-300","border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600",z&&"border-solid border-slate-600 bg-slate-100","disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",i&&"border-red-600 focus:border-red-600 shadow-red"),onDragOver:H,onDragLeave:te,onDrop:_,onClick:G,children:[e.jsx("input",{ref:B,type:"file",multiple:t,accept:s,onChange:X,disabled:d,className:"hidden"}),e.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3",children:[e.jsx("div",{className:a("rounded-full p-3 transition-colors",i?"bg-red-100 text-red-600":"bg-slate-100 text-slate-400"),children:e.jsx(D.Upload,{className:"h-6 w-6"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-small font-medium text-slate-700",children:[F.dragAndDrop," ",F.or.toLowerCase()," ",F.clickToUpload]}),e.jsx("p",{className:"text-small font-normal text-slate-700",children:F.fileRequirements(t,o,r,s)})]})]})]}),c.length>0&&e.jsxs("div",{className:"mt-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-small font-medium text-slate-700",children:[F.selectedFiles," (",c.length,")"]}),c.length>1&&e.jsx("button",{type:"button",onClick:O,disabled:d||g,className:"text-small text-red-600 disabled:opacity-50",children:F.clearAll})]}),e.jsx("div",{className:"space-y-2",children:c.map(b=>e.jsxs("div",{className:a("flex items-center justify-between rounded-lg border border-slate-200 p-3 transition-all",b.status==="error"&&"border-red-600"),children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center space-x-3",children:[S&&b.preview?e.jsx("img",{src:b.preview,alt:b.file.name,className:"h-10 w-10 rounded object-cover"}):m?e.jsx("div",{className:"flex-shrink-0",children:$(b.file)}):null,e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-small font-medium text-slate-700",children:b.file.name}),e.jsxs("div",{className:"flex items-center space-x-2 text-small text-slate-400",children:[e.jsx("span",{children:T(b.file.size)}),b.status==="uploading"&&e.jsxs("span",{className:"flex items-center",children:[e.jsx(D.Star2,{className:"h-5 w-5 mr-1 animate-spin"}),F.uploading]}),b.status==="success"&&e.jsx("span",{className:"flex items-center text-small font-normal text-green-600",children:F.success})]}),b.status==="uploading"&&e.jsx("div",{className:"mt-1 h-1.5 w-full rounded-full bg-slate-200",children:e.jsx("div",{className:"h-1.5 rounded-full bg-slate-400 transition-all duration-300",style:{width:`${b.progress}%`}})}),b.status==="error"&&b.error&&e.jsx("p",{className:"mt-2 flex items-center text-small font-normal text-red-600",children:b.error})]})]}),e.jsx("div",{className:"flex flex-shrink-0 items-center space-x-2",children:e.jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),oe(b.id)},disabled:d||g,className:"text-slate-base transition-colors active:rotate-180 hover:cursor-pointer disabled:opacity-50",children:e.jsx(se,{className:"h-6 w-6"})})})]},b.id))})]}),i&&e.jsx("p",{className:"mt-2 flex items-center text-small font-normal text-red-600",children:i})]})};function Ze({show:t,setShow:s,title:r,description:o,Header:d,Body:p,footer:n,handleClickOutside:i=!1}){const x=l.useRef(null),{handleEscape:h}=fe(()=>s(!1));l.useEffect(()=>(t?(document.addEventListener("keydown",h),document.body.style.overflow="hidden"):document.body.style.overflow="unset",()=>document.removeEventListener("keydown",h)),[t,h]);const{handleClick:k}=he(x,()=>{i&&s(!1)});return l.useEffect(()=>(t&&i&&document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)),[t,k,i]),e.jsx("div",{className:a("bg-black/40 fixed inset-0 z-50 flex items-center justify-center transition-all duration-500 ease-in-out",t?"opacity-100":"pointer-events-none opacity-0"),children:e.jsxs("div",{ref:x,className:a("relative bg-white w-full max-w-[720px] rounded-2xl","transform transition-all duration-500 ease-out",t?"scale-100 opacity-100":"scale-90 opacity-0"),children:[(d||r||o)&&e.jsxs("div",{className:"border-b border-slate-200 flex items-start justify-between p-6 mb-4",children:[d||e.jsxs("div",{className:"block",children:[e.jsx("h2",{className:"text-h3 font-semibold text-black",children:r}),o&&e.jsx("p",{className:"text-base text-slate-base font-normal mt-2",children:o})]}),e.jsx("button",{onClick:()=>s(!1),className:"bg-slate-100 rounded-xl w-12 h-12 hover:cursor-pointer text-black transition flex items-center justify-center group",children:e.jsx(se,{className:"h-6 w-6 transition-transform duration-300 group-hover:rotate-180"})})]}),p&&e.jsx("div",{className:"scrollbar-thin scrollbar-thumb-slate-200 max-h-96 px-6 overflow-y-auto mb-2",children:p}),n&&e.jsx("div",{className:"flex items-center justify-end gap-3 border-t border-slate-200 p-6",children:n})]})})}function Je({totalItems:t,currentPage:s,perPage:r,onPageChange:o,onPerPageChange:d,siblingCount:p=1,perPageOptions:n=[10,30,50,100],showPerPage:i=!0,variant:x="yellow",size:h="large",paginationClassName:k}){const S=Number.isFinite(t)&&t>0?t:0,N=Number.isFinite(r)&&r>0?r:10,m=Math.max(1,Number.isFinite(s)?s:1),M=Math.ceil(S/N);if(M<=1||S===0)return null;const v=(()=>{const g=[],C=p*2+5;if(M<=C)return Array.from({length:M},($,T)=>T+1);const B=Math.max(m-p,2),F=Math.min(m+p,M-1);g.push(1),B>2&&g.push("...");for(let $=B;$<=F;$++)g.push($);return F<M-1&&g.push("..."),M>1&&g.push(M),g})(),z={medium:"h-9 text-small",large:"h-10 text-base"}[h],y={yellow:{active:"bg-yellow-500 text-white border-yellow-500",inactive:"bg-slate-100 border-slate-200 text-black hover:bg-slate-200",disabled:"text-slate-400 border-slate-200",arrow:"text-black"},blue:{active:"bg-blue-600 text-white border-blue-600",inactive:"bg-slate-100 border-slate-200 text-black hover:bg-slate-200",disabled:"text-slate-400 border-slate-300",arrow:"text-black"}}[x??"yellow"];return e.jsxs("div",{className:a("flex items-center justify-between gap-4 w-full",k),children:[i&&d&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"whitespace-nowrap text-extra-small text-slate-base font-normal",children:"Строк на странице:"}),e.jsxs("div",{className:"relative",children:[e.jsx("select",{value:N,onChange:g=>d(Number(g.target.value)),className:a("appearance-none bg-white border border-slate-200 rounded-lg pl-3 pr-8 text-base text-black font-medium focus:outline-none cursor-pointer",h==="large"?"h-10":"h-9"),"aria-label":"Количество строк на странице",children:n.map(g=>e.jsx("option",{value:g,children:g},g))}),e.jsx(D.AltArrowDown,{className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-slate-400",weight:"Linear",size:20})]})]}),e.jsxs("nav",{"aria-label":"Пагинация",className:"flex items-center gap-1 shrink-0 whitespace-nowrap",children:[e.jsx("button",{onClick:()=>o(m-1),disabled:m===1,"aria-label":"Предыдущая страница",className:a("flex items-center justify-center rounded-lg border transition-all bg-slate-100 min-w-10",z,m===1?a("cursor-not-allowed opacity-50",y.disabled):a("hover:cursor-pointer",y.arrow,"border-slate-200")),children:e.jsx(D.AltArrowLeft,{weight:"Linear",size:20})}),e.jsx("div",{className:"flex items-center gap-1",children:v.map((g,C)=>{if(g==="...")return e.jsx("span",{className:a("flex items-center justify-center text-black font-medium min-w-10",z),"aria-hidden":"true",children:e.jsx(D.MenuDots,{weight:"Bold",size:20})},C);const B=g===m;return e.jsx("button",{onClick:()=>o(g),"aria-label":`Страница ${g}${B?", текущая":""}`,"aria-current":B?"page":void 0,className:a("flex items-center justify-center rounded-lg border font-medium transition-all hover:cursor-pointer min-w-10 px-2",z,B?y.active:y.inactive),children:g},C)})}),e.jsx("button",{onClick:()=>o(m+1),disabled:m===M,"aria-label":"Следующая страница",className:a("flex items-center justify-center rounded-lg border transition-all bg-slate-100 min-w-10",z,m===M?a("cursor-not-allowed opacity-50",y.disabled):a("hover:cursor-pointer",y.arrow,"border-slate-200")),children:e.jsx(D.AltArrowRight,{size:20,weight:"Linear"})})]})]})}function He({tabs:t,defaultTab:s,position:r="top",className:o,tabListClassName:d,contentClassName:p,extra:n,onChange:i}){const[x,h]=l.useState(s||t[0]?.id),[k,S]=l.useState({}),N=l.useRef([]),m=()=>{requestAnimationFrame(()=>{const y=t.findIndex(C=>C?.id===x),g=N.current[y];if(g){const{offsetLeft:C,offsetTop:B,offsetWidth:F,offsetHeight:$}=g;S({left:`${C}px`,top:`${B}px`,width:`${F}px`,height:`${$}px`,transition:"all 0.4s cubic-bezier(0.25, 1, 0.5, 1)"})}})};l.useEffect(()=>(m(),window.addEventListener("resize",m),"fonts"in document&&document.fonts.ready.then(m),()=>window.removeEventListener("resize",m)),[x,r,t]),l.useEffect(()=>{N.current=N.current.slice(0,t.length)},[t]);const M=r==="left"||r==="right",c={top:"flex-col",bottom:"flex-col-reverse",left:"flex-row",right:"flex-row-reverse"},v={top:"flex-row",bottom:"flex-row",left:"flex-col",right:"flex-col"},z={top:"mt-4",bottom:"mb-4",left:"ml-4",right:"mr-4"};return e.jsxs("div",{className:a("flex w-full",c[r],o),children:[e.jsxs("div",{className:a("flex gap-4",M?"flex-col items-start":"flex-row items-center justify-between"),children:[e.jsxs("div",{className:a("relative flex rounded-xl bg-slate-100 p-1",v[r],M?"min-w-48":"",d),children:[e.jsx("div",{className:a("absolute bg-white rounded-lg",M?"w-full":"h-full"),style:k}),t?.map((y,g)=>{const C=x===y.id;return e.jsxs("button",{ref:B=>{N.current[g]=B},onClick:()=>{y?.disabled||(h(y?.id),i?.(y?.id))},disabled:y?.disabled,className:a("relative flex cursor-pointer text-base font-normal text-black items-center justify-center p-2 z-10 whitespace-nowrap transition-colors duration-300",y?.disabled&&"opacity-50 cursor-not-allowed",M?"w-full justify-start":"flex-1"),children:[y?.icon&&e.jsx("span",{className:a("shrink-0 transition-transform duration-200",C&&"scale-110"),children:y?.icon}),e.jsx("span",{className:"relative z-10",title:y?.label,children:y?.label})]},y?.id)})]}),n&&e.jsx("div",{className:a("shrink-0",M&&"w-full"),children:n})]}),e.jsx("div",{className:a("flex-1 w-full overflow-hidden",z[r],p),children:e.jsx("div",{className:"animate-fade-in w-full",style:{animationDuration:"0.4s"},children:t?.find(y=>y?.id===x)?.content},x)})]})}const Ke={sm:"px-2 py-0.5",md:"px-2 py-1",lg:"px-3 py-2"},Ne={sm:"w-3 h-3",md:"w-3 h-3",lg:"w-3 h-3"},Xe={success:"bg-green-50 text-green-600",warning:"bg-orange-50 text-orange-600",error:"bg-red-50 text-red-600",gray:"bg-slate-200 text-slate-700",blue:"bg-blue-50 text-blue-600"};function Ge({children:t,variant:s="success",size:r="lg",icon:o,iconPosition:d="left",className:p}){return e.jsxs("span",{className:a("inline-flex animate-[fadeIn_0.3s_ease-out] items-center rounded-lg text-extra-small font-medium",Ke[r],Xe[s],o&&"gap-[2px]",p),children:[o&&d==="left"&&e.jsx("span",{className:`flex items-center ${a(Ne[r])}`,children:o}),e.jsx("span",{children:t}),o&&d==="right"&&e.jsx("span",{className:`flex items-center ${a(Ne[r])}`,children:o})]})}const Ce=l.forwardRef(({label:t,placeholder:s,value:r="",onChange:o,required:d=!1,disabled:p=!1,error:n,className:i,rows:x=4,name:h},k)=>{const S=l.useMemo(()=>n?"border-red-600 focus:border-red-600 shadow-red":"border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600",[n]);return e.jsxs("div",{className:a("relative w-full",i),children:[t&&e.jsxs("label",{className:a("mb-2 block text-base font-medium",n?"text-red-600":"text-slate-700"),children:[t,d&&e.jsx("span",{className:"ml-1 text-red-600",children:"*"})]}),e.jsx("textarea",{ref:k,name:h,rows:x,value:r,onChange:N=>o?.(N.target.value),disabled:p,placeholder:s,className:a("w-full resize-none rounded-xl border bg-white text-base font-normal transition-all duration-300 ease-in-out outline-none","p-3 disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",S)}),n&&e.jsx("p",{className:"mt-2 animate-[slideDown_0.3s_ease-out] text-small font-normal text-red-600",children:n})]})});Ce.displayName="MciTextarea";const Qe=(()=>{let t=document.getElementById("mci-toast-container");return t||(t=document.createElement("div"),t.id="mci-toast-container",t.className="fixed top-4 right-4 z-[9999] flex flex-col gap-3 pointer-events-none",document.body.appendChild(t)),t})();let ge=null,Re=0;const de=[],Me=()=>{ge||(ge=Le.createRoot(Qe)),ge.render(e.jsx("div",{className:"flex flex-col gap-3",children:de.map(({id:t,element:s})=>e.jsx("div",{className:"pointer-events-auto",children:s},t))}))};function et({title:t,description:s,type:r="info",duration:o=3e3,action:d,onClose:p}){const[n,i]=l.useState(100);l.useEffect(()=>{if(o===1/0){i(100);return}let k=null;const S=m=>{k||(k=m);const M=m-k,c=Math.max(0,(o-M)/o*100);i(c),c>0?requestAnimationFrame(S):p?.()},N=requestAnimationFrame(S);return()=>cancelAnimationFrame(N)},[o,p]);const x={success:e.jsx(D.CheckCircle,{weight:"Bold",className:"w-5 h-5"}),error:e.jsx(D.CloseCircle,{weight:"Bold",className:"w-5 h-5"}),warning:e.jsx(D.DangerCircle,{weight:"Bold",className:"w-5 h-5"}),info:e.jsx(D.InfoCircle,{weight:"Bold",className:"w-5 h-5"}),loading:e.jsx(D.Refresh,{weight:"Bold",className:"w-5 h-5 animate-spin"})},h={bg:{success:"bg-green-50",error:"bg-red-50",warning:"bg-orange-50",info:"bg-blue-50",loading:"bg-slate-50"},line:{success:"bg-green-600",error:"bg-red-600",warning:"bg-orange-600",info:"bg-blue-600",loading:"bg-slate-600"},text:{success:"text-green-600",error:"text-red-600",warning:"text-orange-600",info:"text-blue-600",loading:"text-slate-600"},action:{success:"text-green-600",error:"text-red-600",warning:"text-orange-600",info:"text-blue-600",loading:"text-slate-600"}};return e.jsxs("div",{className:a("relative w-[300px] max-w-full overflow-hidden shadow-md rounded-lg","animate-in fade-in slide-in-from-top-2 duration-300",h.bg[r]),children:[e.jsx("div",{className:a("absolute bottom-0 left-0 h-1",h.line[r]),style:{width:`${n}%`,transition:"none"}}),e.jsx("div",{className:"p-4",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("div",{className:a("flex-shrink-0",h.text[r]),children:x[r]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h4",{className:"text-base font-medium mb-1",children:t}),s&&e.jsx("p",{className:"text-small text-[#82828C]",children:s}),d&&e.jsx("div",{className:"mt-3",children:e.jsx("div",{className:a("underline font-medium text-small",h.action[r]),children:d})})]}),e.jsx("button",{onClick:p,className:"flex-shrink-0 rounded-full transition cursor-pointer active:animate-spin",children:e.jsx(se,{className:"w-6 h-6 text-slate-base"})})]})})]})}const ie=t=>{const s=Re++,r=()=>{const d=de.findIndex(p=>p?.id===s);d!==-1&&(de.splice(d,1),Me())},o=e.jsx(et,{...t,onClose:r});return de.push({id:s,element:o}),Me(),t.duration!==1/0&&setTimeout(r,(t.duration||3e3)+300),{close:r}},tt={success:(t,s,r)=>ie(typeof t=="string"?{title:t,description:s,type:"success",action:r}:{...t,type:"success"}),error:(t,s,r)=>ie(typeof t=="string"?{title:t,description:s,type:"error",action:r}:{...t,type:"error"}),warning:(t,s,r)=>ie(typeof t=="string"?{title:t,description:s,type:"warning",action:r}:{...t,type:"warning"}),info:(t,s,r)=>ie(typeof t=="string"?{title:t,description:s,type:"info",action:r}:{...t,type:"info"}),loading:(t,s)=>ie(typeof t=="string"?{title:t,description:s,type:"loading",duration:1/0}:{...t,type:"loading",duration:1/0})};function rt({content:t,children:s,position:r="top",delay:o=200,className:d}){const p={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"},n={top:"left-1/2 -translate-x-1/2 top-full",bottom:"left-1/2 -translate-x-1/2 bottom-full",left:"top-1/2 -translate-y-1/2 left-full",right:"top-1/2 -translate-y-1/2 right-full"};return e.jsxs("div",{className:"group relative inline-block",children:[s,e.jsxs("div",{className:a("absolute z-50 rounded-md bg-slate-400 px-2 py-1 text-xs whitespace-nowrap text-white shadow-md","scale-95 opacity-0 transition-all group-hover:scale-100 group-hover:opacity-100","duration-200 ease-out group-hover:delay-200",p[r],d),style:{transitionDelay:`${o}ms`},children:[t,e.jsx("span",{className:a("absolute h-2 w-2 rotate-45 bg-slate-400",n[r])})]})]})}function at({checked:t=!1,onChange:s,disabled:r=!1,variant:o="yellow",label:d,supportText:p,className:n}){const i=()=>{r||s?.(!t)},x={blue:{active:"bg-blue-600",hover:"hover:bg-blue-600",focus:"focus:shadow-blue"},yellow:{active:"bg-yellow-500",hover:"hover:bg-yellow-500",focus:"focus:ring-2 focus:ring-yellow-200"}};return e.jsxs("div",{className:a("flex items-start gap-3 select-none",n),children:[e.jsx("button",{type:"button",disabled:r,className:a("relative h-6 w-11 rounded-xl transition-all duration-300 outline-none cursor-pointer",t?x[o].active:"bg-slate-200",!r&&x[o].hover,!r&&x[o].focus,r&&"bg-slate-100 cursor-not-allowed"),onClick:i,children:e.jsx("span",{className:a("absolute top-1/2 left-0.5 h-5 w-5 -translate-y-1/2 rounded-full transition-all duration-300 bg-white",t&&"translate-x-5")})}),(d||p)&&e.jsxs("div",{className:"flex flex-col leading-tight",children:[d&&e.jsx("span",{className:a("text-base font-medium text-black"),children:d}),p&&e.jsx("span",{className:"text-small font-normal text-slate-500",children:p})]})]})}const lt=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 177 177",fill:"none",...t},U.createElement("path",{opacity:.083334,d:"M94.5 48.5C94.5 41.8726 91.8137 36.5 88.5 36.5C85.1863 36.5 82.5 41.8726 82.5 48.5C82.5 55.1274 85.1863 60.5 88.5 60.5C91.8137 60.5 94.5 55.1274 94.5 48.5Z",fill:"currentColor"}),U.createElement("path",{opacity:.166667,d:"M113.697 56.8591C117.011 51.1196 117.371 45.1237 114.501 43.4668C111.631 41.8099 106.618 45.1196 103.305 50.8591C99.991 56.5986 99.6311 62.5946 102.501 64.2514C105.371 65.9083 110.383 62.5986 113.697 56.8591Z",fill:"currentColor"}),U.createElement("path",{opacity:.25,d:"M126.141 73.696C131.88 70.3823 135.19 65.3696 133.533 62.4999C131.876 59.6301 125.88 59.99 120.141 63.3037C114.401 66.6174 111.092 71.6301 112.749 74.4999C114.405 77.3696 120.401 77.0097 126.141 73.696Z",fill:"currentColor"}),U.createElement("path",{opacity:.333334,d:"M128.5 94.5C135.127 94.5 140.5 91.8137 140.5 88.5C140.5 85.1863 135.127 82.5 128.5 82.5C121.873 82.5 116.5 85.1863 116.5 88.5C116.5 91.8137 121.873 94.5 128.5 94.5Z",fill:"currentColor"}),U.createElement("path",{opacity:.416667,d:"M120.141 113.696C125.88 117.01 131.876 117.37 133.533 114.5C135.19 111.63 131.88 106.617 126.141 103.304C120.401 99.99 114.405 99.6301 112.749 102.5C111.092 105.37 114.401 110.382 120.141 113.696Z",fill:"currentColor"}),U.createElement("path",{opacity:.5,d:"M103.303 126.141C106.617 131.88 111.629 135.19 114.499 133.533C117.369 131.876 117.009 125.88 113.695 120.141C110.382 114.401 105.369 111.092 102.499 112.749C99.6294 114.405 99.9893 120.401 103.303 126.141Z",fill:"currentColor"}),U.createElement("path",{opacity:.583334,d:"M82.5 128.5C82.5 135.127 85.1863 140.5 88.5 140.5C91.8137 140.5 94.5 135.127 94.5 128.5C94.5 121.873 91.8137 116.5 88.5 116.5C85.1863 116.5 82.5 121.873 82.5 128.5Z",fill:"currentColor"}),U.createElement("path",{opacity:.666667,d:"M63.303 120.141C59.9893 125.88 59.6294 131.876 62.4992 133.533C65.3689 135.19 70.3816 131.88 73.6953 126.141C77.009 120.401 77.3689 114.405 74.4992 112.749C71.6294 111.092 66.6167 114.401 63.303 120.141Z",fill:"currentColor"}),U.createElement("path",{opacity:.75,d:"M50.8591 103.304C45.1196 106.618 41.8099 111.63 43.4668 114.5C45.1237 117.37 51.1196 117.01 56.8591 113.696C62.5986 110.383 65.9083 105.37 64.2514 102.5C62.5946 99.6304 56.5986 99.9903 50.8591 103.304Z",fill:"currentColor"}),U.createElement("path",{opacity:.833334,d:"M48.5 82.5C41.8726 82.5 36.5 85.1863 36.5 88.5C36.5 91.8137 41.8726 94.5 48.5 94.5C55.1274 94.5 60.5 91.8137 60.5 88.5C60.5 85.1863 55.1274 82.5 48.5 82.5Z",fill:"currentColor"}),U.createElement("path",{opacity:.916667,d:"M56.8591 63.304C51.1196 59.9903 45.1237 59.6304 43.4668 62.5001C41.8099 65.3699 45.1196 70.3826 50.8591 73.6963C56.5986 77.01 62.5946 77.3699 64.2514 74.5001C65.9083 71.6304 62.5986 66.6177 56.8591 63.304Z",fill:"currentColor"}),U.createElement("path",{d:"M73.697 50.8591C70.3833 45.1196 65.3706 41.8099 62.5008 43.4668C59.6311 45.1237 59.991 51.1196 63.3047 56.8591C66.6184 62.5986 71.6311 65.9083 74.5008 64.2514C77.3706 62.5946 77.0107 56.5986 73.697 50.8591Z",fill:"currentColor"}));function ot({className:t,size:s=150,iconClassName:r,isLoading:o=!1,isFullPage:d=!0}){return o?e.jsx("div",{className:a("z-[99px] flex flex-col items-center justify-center transition-all duration-300",d?"fixed inset-0 backdrop-blur-[2px]":"absolute inset-0 w-full h-full rounded-[inherit]",t),children:e.jsx(lt,{width:s,height:s,className:a("animate-spin",!r&&"text-yellow-500",r),style:{fill:"currentColor",stroke:"currentColor"}})}):null}const Se=l.forwardRef(({label:t,placeholder:s="+998 (__) ___ __ __",size:r="base",error:o,disabled:d=!1,required:p=!1,value:n="",onChange:i,onFocus:x,onBlur:h,className:k,name:S,showIcon:N=!1},m)=>{const[M,c]=l.useState(!1),v=l.useCallback($=>{let T=$.replace(/\D/g,"");T.startsWith("998")||(T="998"+T),T=T.substring(0,12);let P="+998";return T.length>3&&(P+=" ("+T.substring(3,5)),T.length>5&&(P+=") "+T.substring(5,8)),T.length>8&&(P+=" "+T.substring(8,10)),T.length>10&&(P+=" "+T.substring(10,12)),P},[]),z=$=>{const T=$.target.value;if(T.length<5){i?.("+998");return}const P=v(T);i?.(P)},y=()=>{c(!0),(!n||n==="")&&i?.("+998"),x?.()},g=()=>{c(!1),h?.()},C=l.useMemo(()=>({sm:{input:"h-9 text-small",padding:N?"pl-8 pr-2":"px-2",iconSize:"w-4 h-4",iconLeft:"left-2",labelFont:"text-small",iconWrapper:"h-4"},md:{input:"h-10 text-small",padding:N?"pl-10 pr-4":"px-4",iconSize:"w-4 h-4",iconLeft:"left-3",labelFont:"text-base",iconWrapper:"h-4"},base:{input:"h-12 text-base",padding:N?"pl-11 pr-4":"px-4",iconSize:"w-5 h-5",iconLeft:"left-3",labelFont:"text-base",iconWrapper:"h-5"}}),[N]),B=l.useMemo(()=>o?"border-red-600 focus:border-red-600 shadow-red":"border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600",[o]),F=l.useMemo(()=>d?"text-slate-400":o?"text-red-600":M?"text-black":"text-slate-400",[o,M,d]);return e.jsxs("div",{className:a("w-full",k),children:[t&&e.jsxs("label",{className:a("mb-2 block font-medium transition-colors duration-200",o?"text-red-600":M?"text-blue-600":"text-slate-700",C[r].labelFont),children:[t,p&&e.jsx("span",{className:"text-red-600 ml-1",children:"*"})]}),e.jsxs("div",{className:"relative flex items-center",children:[N&&e.jsx("div",{className:a("absolute top-1/2 flex -translate-y-1/2 items-center justify-center transition-all duration-300",C[r].iconLeft,F),children:e.jsx("div",{className:a("flex items-center justify-center",C[r].iconWrapper),children:e.jsx(D.Phone,{className:a(C[r].iconSize),weight:"Linear"})})}),e.jsx("input",{ref:m,name:S,type:"tel",value:n,onChange:z,onFocus:y,onBlur:g,disabled:d,placeholder:s,className:a("w-full border bg-white font-normal transition-all duration-300 outline-none",r==="base"?"rounded-xl":"rounded-lg","disabled:bg-slate-100 disabled:text-slate-400 disabled:cursor-not-allowed",C[r].input,C[r].padding,B)})]}),o&&e.jsx("p",{className:"mt-2 animate-slide-up text-small font-normal text-red-600",children:o})]})});Se.displayName="MciPhone";const ze=l.forwardRef(({mode:t,onChange:s,value:r,...o},d)=>{const[p,n]=l.useState(""),i=r!==void 0?r:p,x=S=>{const N=S.replace(/\s/g,"").toUpperCase();let m="";for(let M=0;M<N.length;M++){const c=N[M];if(m.length<2?/[A-Z]/.test(c)&&(m+=c):/[0-9]/.test(c)&&(m+=c),m.length>=9)break}return m.length>2?m.slice(0,2)+" "+m.slice(2):m},h=S=>S.replace(/\D/g,"").slice(0,14),k=l.useCallback(S=>{const N=S.target.value;let m="";t==="passport"?m=x(N):m=h(N),r===void 0&&n(m),S.target.value=m,s?.(m,S)},[t,s,r]);return e.jsx(ce,{ref:d,...o,value:i,onChange:k,maxLength:t==="passport"?10:14,placeholder:o.placeholder?o.placeholder:t==="passport"?"AA 1234567":"12345678901234"})});ze.displayName="MciIdentityInput",L.MciBreadcrumb=Ie,L.MciButton=$e,L.MciCheck=me,L.MciCollapse=We,L.MciDrawer=Ye,L.MciIdentityInput=ze,L.MciInput=ce,L.MciLoader=ot,L.MciModal=Ze,L.MciPagination=Je,L.MciPhone=Se,L.MciPicker=xe,L.MciSelect=ye,L.MciSkeleton=ke,L.MciTable=Ue,L.MciTabs=He,L.MciTag=Ge,L.MciTextarea=Ce,L.MciToast=tt,L.MciToggle=at,L.MciTooltip=rt,L.MciUpload=Oe,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
|