@vacano/ui 1.0.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,790 +1,1336 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./X-BRRD8eNW.cjs"),qe=require("@emotion/react"),_=require("react"),ft=require("react-dom"),Ue=require("react/jsx-runtime");function Lo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const w=Lo(_),$n=Lo(ft);function ar(){return ar=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},ar.apply(null,arguments)}const In=6,Tn="Loading";var On=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Mn=m.memoize(function(e){return On.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),An=Mn,Pn=function(t){return t!=="theme"},jr=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?An:Pn},Br=function(t,r,o){var i;if(r){var c=r.shouldForwardProp;i=t.__emotion_forwardProp&&c?function(l){return t.__emotion_forwardProp(l)&&c(l)}:c}return typeof i!="function"&&o&&(i=t.__emotion_forwardProp),i},Dn=function(t){var r=t.cache,o=t.serialized,i=t.isStringTag;return m.registerStyles(r,o,i),m.useInsertionEffectAlwaysWithSyncFallback(function(){return m.insertStyles(r,o,i)}),null},Ln=function e(t,r){var o=t.__emotion_real===t,i=o&&t.__emotion_base||t,c,l;r!==void 0&&(c=r.label,l=r.target);var s=Br(t,r,o),d=s||jr(i),a=!d("as");return function(){var u=arguments,h=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(c!==void 0&&h.push("label:"+c+";"),u[0]==null||u[0].raw===void 0)h.push.apply(h,u);else{var f=u[0];h.push(f[0]);for(var b=u.length,C=1;C<b;C++)h.push(u[C],f[C])}var g=qe.withEmotionCache(function(y,p,v){var k=a&&y.as||i,S="",T=[],M=y;if(y.theme==null){M={};for(var N in y)M[N]=y[N];M.theme=w.useContext(qe.ThemeContext)}typeof y.className=="string"?S=m.getRegisteredStyles(p.registered,T,y.className):y.className!=null&&(S=y.className+" ");var B=m.serializeStyles(h.concat(T),p.registered,M);S+=p.key+"-"+B.name,l!==void 0&&(S+=" "+l);var X=a&&s===void 0?jr(k):d,O={};for(var F in y)a&&F==="as"||X(F)&&(O[F]=y[F]);return O.className=S,v&&(O.ref=v),w.createElement(w.Fragment,null,w.createElement(Dn,{cache:p,serialized:B,isStringTag:typeof k=="string"}),w.createElement(k,O))});return g.displayName=c!==void 0?c:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=i,g.__emotion_styles=h,g.__emotion_forwardProp=s,Object.defineProperty(g,"toString",{value:function(){return"."+l}}),g.withComponent=function(y,p){var v=e(y,ar({},r,p,{shouldForwardProp:Br(g,p,!0)}));return v.apply(void 0,h)},g}},Nn=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],I=Ln.bind(null);Nn.forEach(function(e){I[e]=I(e)});const Fn=qe.keyframes`
2
- 0%, 100% {
3
- opacity: 1;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./X-CI1qRJDP.cjs"),ie=require("@emotion/react"),g=require("react"),t=require("./media-OVL6YjWb.cjs"),A=require("./tooling-Dflq0Y98.cjs"),be=require("react-dom");function Go(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const Ce=Go(g);function gt(){return gt=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},gt.apply(null,arguments)}const Wo=ie.css`
2
+ *,
3
+ *::before,
4
+ *::after {
5
+ box-sizing: border-box;
4
6
  }
5
- 50% {
6
- opacity: 0.3;
7
+
8
+ * {
9
+ margin: 0;
10
+ padding: 0;
7
11
  }
8
- `,_n=I.span`
9
- display: inline-flex;
10
- align-items: center;
11
- gap: ${({$size:e})=>Math.round(e*.6)}px;
12
- `,Xt=I.span`
13
- width: ${({$size:e})=>e}px;
14
- height: ${({$size:e})=>e}px;
15
- border-radius: 50%;
16
- background: currentColor;
17
- animation: ${Fn} 0.8s ease-in-out infinite;
18
- animation-delay: ${({$delay:e})=>e}s;
19
- `,jn=m.classNameGetter("loader"),No=({"aria-label":e=Tn,className:t,classnames:r,size:o=In,...i})=>m.jsxs(_n,{...i,className:jn("container",t,r==null?void 0:r.container),role:"status","aria-label":e,$size:o,children:[m.jsx(Xt,{$size:o,$delay:0}),m.jsx(Xt,{$size:o,$delay:.15}),m.jsx(Xt,{$size:o,$delay:.3})]}),Bn=24,zn="Loading",Wn=qe.keyframes`
20
- to {
21
- transform: rotate(1turn);
12
+
13
+ html {
14
+ -webkit-text-size-adjust: 100%;
15
+ -moz-tab-size: 4;
16
+ tab-size: 4;
22
17
  }
23
- `,zr=e=>Math.max(2,Math.round(e/10)),Vn=I.span`
24
- display: inline-block;
25
- width: ${({$size:e})=>e}px;
26
- aspect-ratio: 1;
27
- border-radius: 50%;
28
- position: relative;
29
18
 
30
- /* Track (faint background circle) */
31
- &::before {
32
- content: '';
33
- position: absolute;
34
- inset: 0;
35
- border-radius: 50%;
36
- border: ${({$size:e})=>zr(e)}px solid currentColor;
37
- opacity: 0.2;
19
+ body {
20
+ min-height: 100vh;
21
+ font-size: 14px;
22
+ line-height: 1.5;
23
+ -webkit-font-smoothing: antialiased;
24
+ -moz-osx-font-smoothing: grayscale;
25
+ text-rendering: optimizeLegibility;
38
26
  }
39
27
 
40
- /* Spinning arc */
41
- &::after {
42
- content: '';
43
- position: absolute;
44
- inset: 0;
45
- border-radius: 50%;
46
- border: ${({$size:e})=>zr(e)}px solid transparent;
47
- border-right-color: currentColor;
48
- animation: ${Wn} 0.8s linear infinite;
28
+ img,
29
+ picture,
30
+ video,
31
+ canvas,
32
+ svg {
33
+ display: block;
34
+ max-width: 100%;
49
35
  }
50
- `,Hn=m.classNameGetter("spinner"),Fo=({"aria-label":e=zn,className:t,classnames:r,size:o=Bn,...i})=>m.jsx(Vn,{...i,className:Hn("container",t,r==null?void 0:r.container),role:"status","aria-label":e,$size:o}),Un="primary",pe=(e,t)=>e.button[t],Kn=I.button`
51
- display: inline-flex;
36
+
37
+ input,
38
+ button,
39
+ textarea,
40
+ select {
41
+ font: inherit;
42
+ color: inherit;
43
+ }
44
+
45
+ p,
46
+ h1,
47
+ h2,
48
+ h3,
49
+ h4,
50
+ h5,
51
+ h6 {
52
+ overflow-wrap: break-word;
53
+ }
54
+
55
+ a {
56
+ color: inherit;
57
+ text-decoration: inherit;
58
+ }
59
+
60
+ button {
61
+ background: none;
62
+ border: none;
63
+ cursor: pointer;
64
+ }
65
+
66
+ ul,
67
+ ol {
68
+ list-style: none;
69
+ }
70
+
71
+ table {
72
+ border-collapse: collapse;
73
+ border-spacing: 0;
74
+ }
75
+
76
+ /*
77
+ * Inter Font Configuration
78
+ * Optimized for UI with modern CSS features
79
+ */
80
+
81
+ html {
82
+ font-family:
83
+ 'Inter',
84
+ -apple-system,
85
+ BlinkMacSystemFont,
86
+ 'Segoe UI',
87
+ Roboto,
88
+ 'Helvetica Neue',
89
+ Arial,
90
+ sans-serif;
91
+
92
+ /* Variable font optical sizing */
93
+ font-optical-sizing: auto;
94
+
95
+ /*
96
+ * OpenType features for Inter:
97
+ * - cv01: alternate 1 (distinguishable from l/I)
98
+ * - cv02: alternate 4 (open top)
99
+ * - cv03: alternate 6 (straight tail)
100
+ * - cv04: alternate 9 (straight tail)
101
+ * - ss01: open digits
102
+ * - ss02: disambiguation (alt a, g)
103
+ * - tnum: tabular numbers (monospaced digits for alignment)
104
+ * - zero: slashed zero
105
+ */
106
+ font-feature-settings:
107
+ 'cv01' 1,
108
+ 'cv02' 1,
109
+ 'ss01' 1,
110
+ 'tnum' 1,
111
+ 'zero' 1;
112
+
113
+ /* Improved kerning */
114
+ font-kerning: normal;
115
+
116
+ /* Slight negative tracking for Inter at UI sizes */
117
+ letter-spacing: -0.011em;
118
+ }
119
+
120
+ /* Tabular figures for numbers in data contexts */
121
+ .tabular-nums {
122
+ font-variant-numeric: tabular-nums;
123
+ }
124
+
125
+ /* Proportional figures for running text */
126
+ .proportional-nums {
127
+ font-variant-numeric: proportional-nums;
128
+ }
129
+
130
+ /* Selection styling */
131
+ ::selection {
132
+ background-color: rgba(0, 122, 255, 0.25);
133
+ }
134
+
135
+ /* Focus visible for accessibility */
136
+ :focus-visible {
137
+ outline: 2px solid rgba(0, 122, 255, 0.5);
138
+ outline-offset: 2px;
139
+ }
140
+
141
+ :focus:not(:focus-visible) {
142
+ outline: none;
143
+ }
144
+ `,Vo=()=>a.jsx(ie.Global,{styles:Wo});var Uo=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Xo=a.memoize(function(e){return Uo.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),qo=Xo,Ko=function(o){return o!=="theme"},wt=function(o){return typeof o=="string"&&o.charCodeAt(0)>96?qo:Ko},Rt=function(o,r,i){var n;if(r){var l=r.shouldForwardProp;n=o.__emotion_forwardProp&&l?function(c){return o.__emotion_forwardProp(c)&&l(c)}:l}return typeof n!="function"&&i&&(n=o.__emotion_forwardProp),n},Zo=function(o){var r=o.cache,i=o.serialized,n=o.isStringTag;return a.registerStyles(r,i,n),a.useInsertionEffectAlwaysWithSyncFallback(function(){return a.insertStyles(r,i,n)}),null},Jo=function e(o,r){var i=o.__emotion_real===o,n=i&&o.__emotion_base||o,l,c;r!==void 0&&(l=r.label,c=r.target);var d=Rt(o,r,i),p=d||wt(n),h=!p("as");return function(){var u=arguments,f=i&&o.__emotion_styles!==void 0?o.__emotion_styles.slice(0):[];if(l!==void 0&&f.push("label:"+l+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{var x=u[0];f.push(x[0]);for(var k=u.length,S=1;S<k;S++)f.push(u[S],x[S])}var $=ie.withEmotionCache(function(y,O,L){var b=h&&y.as||n,z="",j=[],N=y;if(y.theme==null){N={};for(var X in y)N[X]=y[X];N.theme=Ce.useContext(ie.ThemeContext)}typeof y.className=="string"?z=a.getRegisteredStyles(O.registered,j,y.className):y.className!=null&&(z=y.className+" ");var P=a.serializeStyles(f.concat(j),O.registered,N);z+=O.key+"-"+P.name,c!==void 0&&(z+=" "+c);var B=h&&d===void 0?wt(b):p,T={};for(var C in y)h&&C==="as"||B(C)&&(T[C]=y[C]);return T.className=z,L&&(T.ref=L),Ce.createElement(Ce.Fragment,null,Ce.createElement(Zo,{cache:O,serialized:P,isStringTag:typeof b=="string"}),Ce.createElement(b,T))});return $.displayName=l!==void 0?l:"Styled("+(typeof n=="string"?n:n.displayName||n.name||"Component")+")",$.defaultProps=o.defaultProps,$.__emotion_real=$,$.__emotion_base=n,$.__emotion_styles=f,$.__emotion_forwardProp=d,Object.defineProperty($,"toString",{value:function(){return"."+c}}),$.withComponent=function(y,O){var L=e(y,gt({},r,O,{shouldForwardProp:Rt($,O,!0)}));return L.apply(void 0,f)},$}},Qo=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],s=Jo.bind(null);Qo.forEach(function(e){s[e]=s(e)});const kt={compact:{height:"32px",padding:"0 8px",radius:"12px",iconSize:"16px"},default:{height:"40px",padding:"0 12px",radius:"16px",iconSize:"20px"}},Lt={normal:{background:{static:t.COLORS["steel-blue"],hover:t.alpha(t.COLORS["steel-blue"],90),active:t.alpha(t.COLORS["steel-blue"],80),disabled:t.alpha(t.COLORS["steel-blue"],50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},system:{background:{static:t.COLORS.black,hover:t.alpha(t.COLORS.black,90),active:t.alpha(t.COLORS.black,80),disabled:t.alpha(t.COLORS.black,50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},success:{background:{static:t.COLORS.green,hover:t.alpha(t.COLORS.green,90),active:t.alpha(t.COLORS.green,80),disabled:t.alpha(t.COLORS.green,50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},warning:{background:{static:t.COLORS.yellow,hover:t.alpha(t.COLORS.yellow,90),active:t.alpha(t.COLORS.yellow,80),disabled:t.alpha(t.COLORS.yellow,50)},color:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.COLORS.black},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},danger:{background:{static:t.COLORS.red,hover:t.alpha(t.COLORS.red,90),active:t.alpha(t.COLORS.red,80),disabled:t.alpha(t.COLORS.red,50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},transparent:{background:{static:t.alpha(t.COLORS["iron-grey"],1),hover:t.alpha(t.COLORS["iron-grey"],5),active:t.alpha(t.COLORS["iron-grey"],10),disabled:t.alpha(t.COLORS["iron-grey"],5)},color:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,30)},borderColor:{static:t.alpha(t.COLORS["iron-grey"],20),hover:t.alpha(t.COLORS["iron-grey"],20),active:t.alpha(t.COLORS["iron-grey"],20),disabled:t.alpha(t.COLORS["iron-grey"],10)}}},J=e=>{const o=Lt[e];return o||Lt.normal},oe=e=>{const o=kt[e];return o||kt.default},er=e=>e?"auto":"fit-content",tr=s.button`
145
+ display: flex;
146
+ gap: 6px;
147
+ text-decoration: none;
52
148
  align-items: center;
53
149
  justify-content: center;
54
- gap: 6px;
55
- height: 32px;
56
- padding: ${({$iconOnly:e})=>e?"0 6px":"0 12px"};
57
- border-radius: 12px;
58
- border: 1px solid;
59
- font-size: 14px;
60
- font-weight: 500;
61
- font-family: inherit;
62
- line-height: 1.5;
63
- cursor: pointer;
64
- user-select: none;
65
- transition:
66
- background-color 0.15s ease,
67
- border-color 0.15s ease;
68
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
69
- min-width: ${({$iconOnly:e})=>e?"32px":"auto"};
70
-
71
- color: ${({theme:e,$variant:t})=>pe(e,t).color};
72
- background-color: ${({theme:e,$variant:t})=>pe(e,t).backgroundColor};
73
- border-color: ${({theme:e,$variant:t})=>pe(e,t).borderColor};
150
+ width: ${e=>e.$iconOnly?oe(e.$size).height:er(!!e.$fullWidth)};
151
+ color: ${e=>J(e.$variant).color.static};
152
+ background-color: ${e=>J(e.$variant).background.static};
153
+ height: ${e=>oe(e.$size).height};
154
+ padding: ${e=>e.$iconOnly?"0":oe(e.$size).padding};
155
+ border-radius: ${e=>oe(e.$size).radius};
156
+ border: 1px solid ${e=>J(e.$variant).borderColor.static};
74
157
 
75
158
  &:hover:not(:disabled) {
76
- background-color: ${({theme:e,$variant:t})=>pe(e,t).hover.backgroundColor};
77
- border-color: ${({theme:e,$variant:t})=>pe(e,t).hover.borderColor};
159
+ color: ${e=>J(e.$variant).color.hover};
160
+ background-color: ${e=>J(e.$variant).background.hover};
161
+ border-color: ${e=>J(e.$variant).borderColor.hover};
78
162
  }
79
163
 
80
164
  &:active:not(:disabled) {
81
- background-color: ${({theme:e,$variant:t})=>pe(e,t).active.backgroundColor};
82
- border-color: ${({theme:e,$variant:t})=>pe(e,t).active.borderColor};
165
+ color: ${e=>J(e.$variant).color.active};
166
+ background-color: ${e=>J(e.$variant).background.active};
167
+ border-color: ${e=>J(e.$variant).borderColor.active};
83
168
  }
84
169
 
85
170
  &:focus-visible {
86
- outline: 2px solid
87
- ${({theme:e,$variant:t})=>pe(e,t).focus.outlineColor};
88
- outline-offset: 1px;
171
+ outline-color: ${t.alpha(t.COLORS["iron-grey"],30)};
89
172
  }
90
173
 
91
174
  &:disabled {
92
- cursor: ${({$loading:e})=>e?"wait":"not-allowed"};
93
- color: ${({theme:e,$variant:t})=>pe(e,t).disabled.color};
94
- background-color: ${({theme:e,$variant:t})=>pe(e,t).disabled.backgroundColor};
95
- border-color: ${({theme:e,$variant:t})=>pe(e,t).disabled.borderColor};
175
+ cursor: not-allowed;
176
+ color: ${e=>J(e.$variant).color.disabled};
177
+ background-color: ${e=>J(e.$variant).background.disabled};
178
+ border-color: ${e=>J(e.$variant).borderColor.disabled};
96
179
  }
97
- `,Gn=I.span`
98
- position: relative;
99
- display: inline-flex;
100
- align-items: center;
101
- gap: 6px;
102
- `,qn=I.span`
103
- display: inline-flex;
104
- align-items: center;
105
- justify-content: center;
106
- flex-shrink: 0;
107
- visibility: ${({$loading:e})=>e?"hidden":"visible"};
108
- color: ${({theme:e,$variant:t})=>pe(e,t).icon.color};
180
+ `,or=s.div`
181
+ display: grid;
182
+ place-items: center;
183
+ width: ${e=>oe(e.$size).iconSize};
184
+ height: ${e=>oe(e.$size).iconSize};
109
185
 
110
- button:disabled & {
111
- color: ${({theme:e,$variant:t})=>pe(e,t).disabled.color};
186
+ & svg {
187
+ width: ${e=>oe(e.$size).iconSize};
188
+ height: ${e=>oe(e.$size).iconSize};
112
189
  }
113
- `,Xn=I.span`
190
+ `,rr=s.span`
191
+ font-weight: 600;
114
192
  overflow: hidden;
115
193
  white-space: nowrap;
116
194
  text-overflow: ellipsis;
117
- visibility: ${({$loading:e})=>e?"hidden":"visible"};
118
- `,Yn=I.span`
119
- display: inline-flex;
120
- align-items: center;
195
+ `,ir=s(a.LoaderCircle)`
196
+ width: ${e=>oe(e.$size).iconSize};
197
+ height: ${e=>oe(e.$size).iconSize};
198
+ animation: ${t.KEYFRAMES.rotate} 0.8s linear infinite;
199
+ `,nr=s.div`
200
+ display: flex;
201
+ gap: 3px;
202
+ `,ar=s.span`
203
+ text-align: center;
204
+ display: flex;
121
205
  justify-content: center;
206
+ align-items: center;
207
+ font-size: 12px;
208
+ height: 18px;
209
+ min-width: 18px;
210
+ line-height: 1.6;
122
211
  padding: 2px 4px;
123
212
  border-radius: 4px;
124
- font-size: 12px;
125
- font-weight: 600;
126
- line-height: 1.5;
127
- visibility: ${({$loading:e})=>e?"hidden":"visible"};
128
- color: ${({theme:e,$variant:t})=>pe(e,t).char.color};
129
- background-color: ${({theme:e,$variant:t})=>pe(e,t).char.backgroundColor};
130
-
131
- button:disabled & {
132
- color: ${({theme:e,$variant:t})=>pe(e,t).disabled.color};
133
- background-color: transparent;
134
- }
135
- `,Wr=I.span`
136
- position: absolute;
137
- inset: 0;
138
- display: inline-flex;
139
- align-items: center;
140
- justify-content: center;
141
- `,Qn=(e,t,r,o,i)=>{const c=_.useMemo(()=>!!e&&!t&&!r,[e,t,r]),l=_.useMemo(()=>o&&c,[o,c]),s=_.useMemo(()=>o&&!c,[o,c]),d=_.useCallback(a=>{if(o){a.preventDefault();return}i==null||i(a)},[o,i]);return{iconOnly:c,showSpinner:l,showDots:s,handleClick:d}},Ve=m.classNameGetter("button"),Zn=18,Jn=({char:e,children:t,className:r,classnames:o,disabled:i,fullWidth:c,icon:l,loading:s,onClick:d,variant:a=Un,...u})=>{const{iconOnly:h,showSpinner:f,showDots:b,handleClick:C}=Qn(l,t,e,s,d),g=()=>l?m.jsx(qn,{className:Ve("icon",o==null?void 0:o.icon),$variant:a,$loading:s,children:l}):null,y=()=>f?m.jsx(Wr,{className:Ve("loader",o==null?void 0:o.loader),children:m.jsx(Fo,{size:Zn})}):b?m.jsx(Wr,{className:Ve("loader",o==null?void 0:o.loader),children:m.jsx(No,{size:4})}):null;return m.jsx(Kn,{...u,className:Ve("container",r,o==null?void 0:o.container),disabled:i||s,onClick:C,$variant:a,$fullWidth:c,$loading:s,$iconOnly:h,children:m.jsxs(Gn,{className:Ve("content",o==null?void 0:o.content),children:[g(),y(),t&&m.jsx(Xn,{className:Ve("text",o==null?void 0:o.text),$loading:s,children:t}),e&&m.jsx(Yn,{className:Ve("char",o==null?void 0:o.char),$variant:a,$loading:s,children:e})]})})},ei=(e,t,r,o)=>t||r?o==="warning"?e.checkbox.state.warning.box.checked.borderColor:o==="error"?e.checkbox.state.error.box.checked.borderColor:e.checkbox.box.checked.borderColor:o==="warning"?e.checkbox.state.warning.box.borderColor:o==="error"?e.checkbox.state.error.box.borderColor:e.checkbox.box.borderColor,ti=(e,t,r,o)=>t||r?o==="warning"?e.checkbox.state.warning.box.checked.backgroundColor:o==="error"?e.checkbox.state.error.box.checked.backgroundColor:e.checkbox.box.checked.backgroundColor:e.checkbox.box.backgroundColor,ri=(e,t)=>t==="warning"?e.checkbox.state.warning.box.focus.shadowColor:t==="error"?e.checkbox.state.error.box.focus.shadowColor:e.checkbox.box.focus.shadowColor,oi=(e,t)=>t==="warning"?e.checkbox.state.warning.label.color:t==="error"?e.checkbox.state.error.label.color:e.checkbox.label.color,ni=I.label`
213
+ width: fit-content;
214
+ background-color: ${e=>e.$variant==="light"?t.alpha(t.COLORS.white,25):t.alpha(t.COLORS.black,25)};
215
+ `,lr=A.newClassNameGetter("key-symbol"),co=({className:e,ref:o,symbol:r,variant:i="light",...n})=>r?a.jsx(ar,{...n,ref:o,className:lr("container",e),$variant:i,children:r}):null,zt=A.newClassNameGetter("key-bindings"),so=({className:e,classnames:o,keys:r,ref:i,variant:n,...l})=>{const c=g.useMemo(()=>t.getKeySymbols(r),[r]);return c.length===0?null:a.jsx(nr,{...l,ref:i,className:zt("container",e),children:c.map(d=>a.jsx(co,{symbol:d,className:zt("item",o==null?void 0:o.item),variant:n},d))})},Pt=A.newClassNameGetter("button"),Te=({children:e,className:o,classnames:r,disabled:i,fullWidth:n,icon:l,loading:c,onClick:d,ref:p=null,keyBindings:h=[],size:u="default",type:f="button",variant:x="normal",...k})=>{const S=g.useRef(null);g.useImperativeHandle(p,()=>S.current,[]),t.useKeyBinding(h,()=>{var y;(y=S.current)==null||y.click()});const $=g.useMemo(()=>{switch(f){case"link":return"button";default:return f}},[f]);return a.jsxs(tr,{...k,onClick:d,ref:S,type:$,disabled:i,className:Pt("container",o),$variant:x,$size:u,$fullWidth:!!n,$iconOnly:!!l&&!(e||(h==null?void 0:h.length)>0),children:[c&&a.jsx(ir,{$size:u}),l&&!c&&a.jsx(or,{$size:u,children:l}),e&&a.jsx(rr,{className:Pt("label",r==null?void 0:r.label),children:e}),a.jsx(so,{keys:h,variant:x==="system"?"light":"dark"})]})},dr=s.div`
216
+ background-color: ${t.COLORS.white};
217
+ border-radius: 16px;
218
+ border: ${e=>e.$border?`1px solid ${t.alpha(t.COLORS["iron-grey"],15)}`:"none"};
219
+ box-shadow: ${e=>e.$shadow?`0 2px 8px ${t.alpha(t.COLORS.black,10)}`:"none"};
220
+ `,cr=A.newClassNameGetter("card"),sr=({children:e,className:o,ref:r,border:i=!1,shadow:n=!1,...l})=>a.jsx(dr,{...l,ref:r,className:cr("container",o),$border:i,$shadow:n,children:e}),jt={normal:{box:{border:t.alpha(t.COLORS["iron-grey"],30),borderChecked:t.COLORS["iron-grey"],background:t.COLORS.white,backgroundChecked:t.COLORS.black,focusShadow:t.alpha(t.COLORS["iron-grey"],30)},label:t.COLORS.black,icon:t.COLORS.white},error:{box:{border:t.COLORS.red,borderChecked:t.COLORS.red,background:t.COLORS.white,backgroundChecked:t.COLORS.red,focusShadow:t.alpha(t.COLORS.red,30)},label:t.COLORS.red,icon:t.COLORS.white}},pe=e=>jt[e]??jt.normal,pr=s.label`
142
221
  display: inline-flex;
143
222
  align-items: center;
144
223
  gap: 8px;
145
- cursor: pointer;
224
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
225
+ opacity: ${e=>e.$disabled?.5:1};
146
226
 
147
227
  &:has(input:focus-visible) > span:first-of-type {
148
- box-shadow: 0 0 0 3px ${({theme:e,$state:t})=>ri(e,t)};
228
+ box-shadow: 0 0 0 2px ${e=>pe(e.$variant).box.focusShadow};
149
229
  }
150
-
151
- ${({$disabled:e})=>e&&`
152
- opacity: 0.5;
153
- cursor: not-allowed;
154
- `}
155
- `,ii=I.input`
230
+ `,ur=s.input`
156
231
  position: absolute;
157
232
  opacity: 0;
158
233
  width: 0;
159
234
  height: 0;
160
235
  pointer-events: none;
161
- `,li=I.span`
236
+ `,hr=s.span`
162
237
  display: inline-flex;
163
238
  align-items: center;
164
239
  justify-content: center;
240
+ flex-shrink: 0;
165
241
  width: 18px;
166
242
  height: 18px;
167
243
  border-radius: 6px;
168
244
  border: 1.5px solid
169
- ${({theme:e,$checked:t,$indeterminate:r,$state:o})=>ei(e,t,r,o)};
170
- background-color: ${({theme:e,$checked:t,$indeterminate:r,$state:o})=>ti(e,t,r,o)};
245
+ ${e=>e.$checked||e.$indeterminate?pe(e.$variant).box.borderChecked:pe(e.$variant).box.border};
246
+ background-color: ${e=>e.$checked||e.$indeterminate?pe(e.$variant).box.backgroundChecked:pe(e.$variant).box.background};
171
247
  transition:
172
248
  border-color 0.15s ease,
173
249
  background-color 0.15s ease,
174
250
  box-shadow 0.15s ease;
175
- `,ci=I.span`
251
+ `,br=s.span`
176
252
  display: inline-flex;
177
253
  align-items: center;
178
254
  justify-content: center;
179
- color: ${({theme:e})=>e.checkbox.icon.color};
180
- opacity: ${({$visible:e})=>e?1:0};
181
- transform: ${({$visible:e})=>e?"scale(1)":"scale(0.5)"};
255
+ color: ${e=>pe(e.$variant).icon};
256
+ opacity: ${e=>e.$visible?1:0};
257
+ transform: ${e=>e.$visible?"scale(1)":"scale(0.5)"};
182
258
  transition:
183
259
  opacity 0.15s ease,
184
260
  transform 0.15s ease;
185
- `,si=I.span`
261
+
262
+ & svg {
263
+ width: 12px;
264
+ height: 12px;
265
+ }
266
+ `,gr=s.span`
186
267
  font-size: 14px;
187
- line-height: 1.5;
188
- color: ${({theme:e,$state:t})=>oi(e,t)};
189
- user-select: none;
190
268
  font-weight: 500;
191
- `,ct=m.classNameGetter("checkbox"),mr=({checked:e,className:t,classnames:r,disabled:o,indeterminate:i,label:c,onChange:l,ref:s,state:d,...a})=>m.jsxs(ni,{className:ct("container",t,r==null?void 0:r.container),$disabled:o,$state:d,children:[m.jsx(ii,{...a,ref:s,type:"checkbox",className:ct("input",r==null?void 0:r.input),checked:e,disabled:o,onChange:l}),m.jsx(li,{className:ct("box",r==null?void 0:r.box),$checked:e,$indeterminate:i,$state:d,children:m.jsx(ci,{className:ct("icon",r==null?void 0:r.icon),$visible:i||e,children:i?m.jsx(m.Minus,{}):m.jsx(m.Check,{})})}),c&&m.jsx(si,{className:ct("label",r==null?void 0:r.label),$state:d,children:c})]}),ai=(e,t)=>{switch(t){case"neutral":return e.chip.color.neutral;case"success":return e.chip.color.success;case"warning":return e.chip.color.warning;case"error":return e.chip.color.error;default:return e.chip.color.default}},ui=(e,t)=>{switch(t){case"neutral":return e.chip.backgroundColor.neutral;case"success":return e.chip.backgroundColor.success;case"warning":return e.chip.backgroundColor.warning;case"error":return e.chip.backgroundColor.error;default:return e.chip.backgroundColor.default}},di=I.span`
192
- display: inline-flex;
193
- align-items: center;
194
- justify-content: center;
195
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
196
- height: 24px;
197
- padding: 0 12px;
269
+ line-height: 1;
270
+ color: ${e=>pe(e.$variant).label};
271
+ user-select: none;
272
+ `,we=A.newClassNameGetter("checkbox"),Ke=({checked:e,className:o,classnames:r,disabled:i,indeterminate:n=!1,label:l,onChange:c,ref:d,variant:p="normal",...h})=>a.jsxs(pr,{className:we("container",o),$disabled:!!i,$variant:p,children:[a.jsx(ur,{...h,ref:d,type:"checkbox",className:we("input",r==null?void 0:r.input),checked:e,disabled:i,onChange:c}),a.jsx(hr,{className:we("box",r==null?void 0:r.box),$checked:e,$indeterminate:n,$variant:p,children:a.jsx(br,{className:we("icon",r==null?void 0:r.icon),$visible:n||e,$variant:p,children:n?a.jsx(a.Minus,{}):a.jsx(a.Check,{})})}),l&&a.jsx(gr,{className:we("label",r==null?void 0:r.label),$variant:p,children:l})]}),Et={normal:{border:{static:t.alpha(t.COLORS.black,20),hover:t.alpha(t.COLORS.black,40),active:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,10)},borderChecked:t.COLORS.black,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.black,5)},backgroundChecked:t.alpha(t.COLORS.black,5),focusRing:t.alpha(t.COLORS.black,20),label:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,40)},description:{static:t.alpha(t.COLORS.black,60),hover:t.alpha(t.COLORS.black,60),active:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,30)}},error:{border:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,30)},borderChecked:t.COLORS.red,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.red,5)},backgroundChecked:t.alpha(t.COLORS.red,5),focusRing:t.alpha(t.COLORS.red,20),label:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,40)},description:{static:t.alpha(t.COLORS.red,70),hover:t.alpha(t.COLORS.red,70),active:t.alpha(t.COLORS.red,70),disabled:t.alpha(t.COLORS.red,40)}}},ce=e=>Et[e]??Et.normal,fr=s.label`
273
+ display: grid;
274
+ grid-template-columns: auto 1fr;
275
+ align-items: start;
276
+ gap: 8px;
277
+ padding: 12px;
278
+ background-color: ${e=>{const o=ce(e.$variant);return e.$disabled?o.background.disabled:e.$checked?o.backgroundChecked:o.background.static}};
279
+ border: 1px solid
280
+ ${e=>{const o=ce(e.$variant);return e.$disabled?o.border.disabled:e.$checked?o.borderChecked:o.border.static}};
198
281
  border-radius: 12px;
199
- font-size: 12px;
200
- font-weight: 600;
282
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
283
+ transition:
284
+ border-color 0.15s ease,
285
+ background-color 0.15s ease;
286
+ width: ${e=>e.$fullWidth?"100%":"fit-content"};
201
287
  min-width: 0;
202
- max-width: ${({$fullWidth:e})=>e?"none":"200px"};
203
- color: ${({theme:e,$status:t})=>ai(e,t)};
204
- background-color: ${({theme:e,$status:t})=>ui(e,t)};
205
- `,fi=I.span`
288
+
289
+ &:hover:not([data-disabled='true']) {
290
+ border-color: ${e=>{const o=ce(e.$variant);return e.$checked?o.borderChecked:o.border.hover}};
291
+ }
292
+
293
+ &:has(:focus-visible) {
294
+ outline: none;
295
+ box-shadow: 0 0 0 3px ${e=>ce(e.$variant).focusRing};
296
+ }
297
+
298
+ .vacano_checkbox_container {
299
+ pointer-events: none;
300
+ }
301
+ `,xr=s.input`
302
+ position: absolute;
303
+ width: 1px;
304
+ height: 1px;
305
+ margin: -1px;
306
+ padding: 0;
206
307
  overflow: hidden;
207
- text-overflow: ellipsis;
308
+ clip: rect(0, 0, 0, 0);
208
309
  white-space: nowrap;
209
- `,Vr=m.classNameGetter("chip"),gi=({children:e,className:t,classnames:r,fullWidth:o,status:i,...c})=>m.jsx(di,{...c,className:Vr("container",t,r==null?void 0:r.container),$fullWidth:o,$status:i,children:m.jsx(fi,{className:Vr("text",r==null?void 0:r.text),children:e})}),_o="bottom",jo="start",Bo=4,hi=e=>e.dropdown.content.backgroundColor,pi=e=>e.dropdown.content.borderColor,bi=e=>e.dropdown.content.shadow,xi=I.div`
210
- display: inline-block;
211
- position: relative;
212
- min-width: 0;
213
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
214
- `,mi=I.div`
215
- display: inline-flex;
216
- min-width: 0;
217
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
218
- `,Ci=I.div`
219
- z-index: 1000;
220
- width: max-content;
221
- border-radius: 12px;
222
- border: 1px solid ${({theme:e})=>pi(e)};
223
- background-color: ${({theme:e})=>hi(e)};
224
- box-shadow: ${({theme:e})=>bi(e)};
225
- visibility: ${({$isOpen:e})=>e?"visible":"hidden"};
226
- opacity: ${({$isOpen:e})=>e?1:0};
227
- pointer-events: ${({$isOpen:e})=>e?"auto":"none"};
228
- transition:
229
- opacity 0.15s ease,
230
- visibility 0.15s ease;
231
- `;function Bt(){return typeof window<"u"}function ze(e){return zo(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Me(e){var t;return(t=(zo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zo(e){return Bt()?e instanceof Node||e instanceof ye(e).Node:!1}function ie(e){return Bt()?e instanceof Element||e instanceof ye(e).Element:!1}function se(e){return Bt()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function ur(e){return!Bt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}const vi=new Set(["inline","contents"]);function gt(e){const{overflow:t,overflowX:r,overflowY:o,display:i}=Re(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!vi.has(i)}const wi=new Set(["table","td","th"]);function yi(e){return wi.has(ze(e))}const ki=[":popover-open",":modal"];function zt(e){return ki.some(t=>{try{return e.matches(t)}catch{return!1}})}const Si=["transform","translate","scale","rotate","perspective"],Ri=["transform","translate","scale","rotate","perspective","filter"],Ei=["paint","layout","strict","content"];function Cr(e){const t=Wt(),r=ie(e)?Re(e):e;return Si.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Ri.some(o=>(r.willChange||"").includes(o))||Ei.some(o=>(r.contain||"").includes(o))}function $i(e){let t=De(e);for(;se(t)&&!Pe(t);){if(Cr(t))return t;if(zt(t))return null;t=De(t)}return null}function Wt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ii=new Set(["html","body","#document"]);function Pe(e){return Ii.has(ze(e))}function Re(e){return ye(e).getComputedStyle(e)}function Vt(e){return ie(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function De(e){if(ze(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ur(e)&&e.host||Me(e);return ur(t)?t.host:t}function Wo(e){const t=De(e);return Pe(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&gt(t)?t:Wo(t)}function je(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Wo(e),c=i===((o=e.ownerDocument)==null?void 0:o.body),l=ye(i);if(c){const s=dr(l);return t.concat(l,l.visualViewport||[],gt(i)?i:[],s&&r?je(s):[])}return t.concat(i,je(i,[],r))}function dr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ot=Math.min,we=Math.max,Ot=Math.round,et=Math.floor,Oe=e=>({x:e,y:e}),Ti={left:"right",right:"left",bottom:"top",top:"bottom"},Oi={start:"end",end:"start"};function Hr(e,t,r){return we(e,ot(t,r))}function ht(e,t){return typeof e=="function"?e(t):e}function Be(e){return e.split("-")[0]}function pt(e){return e.split("-")[1]}function Vo(e){return e==="x"?"y":"x"}function Ho(e){return e==="y"?"height":"width"}const Mi=new Set(["top","bottom"]);function Ae(e){return Mi.has(Be(e))?"y":"x"}function Uo(e){return Vo(Ae(e))}function Ai(e,t,r){r===void 0&&(r=!1);const o=pt(e),i=Uo(e),c=Ho(i);let l=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(l=Mt(l)),[l,Mt(l)]}function Pi(e){const t=Mt(e);return[fr(e),t,fr(t)]}function fr(e){return e.replace(/start|end/g,t=>Oi[t])}const Ur=["left","right"],Kr=["right","left"],Di=["top","bottom"],Li=["bottom","top"];function Ni(e,t,r){switch(e){case"top":case"bottom":return r?t?Kr:Ur:t?Ur:Kr;case"left":case"right":return t?Di:Li;default:return[]}}function Fi(e,t,r,o){const i=pt(e);let c=Ni(Be(e),r==="start",o);return i&&(c=c.map(l=>l+"-"+i),t&&(c=c.concat(c.map(fr)))),c}function Mt(e){return e.replace(/left|right|bottom|top/g,t=>Ti[t])}function _i(e){return{top:0,right:0,bottom:0,left:0,...e}}function ji(e){return typeof e!="number"?_i(e):{top:e,right:e,bottom:e,left:e}}function At(e){const{x:t,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:t,right:t+o,bottom:r+i,x:t,y:r}}/*!
232
- * tabbable 6.3.0
233
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
234
- */var Bi=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Pt=Bi.join(","),Ko=typeof Element>"u",nt=Ko?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Dt=!Ko&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ut=function(t,r){var o;r===void 0&&(r=!0);var i=t==null||(o=t.getAttribute)===null||o===void 0?void 0:o.call(t,"inert"),c=i===""||i==="true",l=c||r&&t&&ut(t.parentNode);return l},zi=function(t){var r,o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return o===""||o==="true"},Go=function(t,r,o){if(ut(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Pt));return r&&nt.call(t,Pt)&&i.unshift(t),i=i.filter(o),i},Lt=function(t,r,o){for(var i=[],c=Array.from(t);c.length;){var l=c.shift();if(!ut(l,!1))if(l.tagName==="SLOT"){var s=l.assignedElements(),d=s.length?s:l.children,a=Lt(d,!0,o);o.flatten?i.push.apply(i,a):i.push({scopeParent:l,candidates:a})}else{var u=nt.call(l,Pt);u&&o.filter(l)&&(r||!t.includes(l))&&i.push(l);var h=l.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(l),f=!ut(h,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(l));if(h&&f){var b=Lt(h===!0?l.children:h.children,!0,o);o.flatten?i.push.apply(i,b):i.push({scopeParent:l,candidates:b})}else c.unshift.apply(c,l.children)}}return i},qo=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xo=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zi(t))&&!qo(t)?0:t.tabIndex},Wi=function(t,r){var o=Xo(t);return o<0&&r&&!qo(t)?0:o},Vi=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Yo=function(t){return t.tagName==="INPUT"},Hi=function(t){return Yo(t)&&t.type==="hidden"},Ui=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(o){return o.tagName==="SUMMARY"});return r},Ki=function(t,r){for(var o=0;o<t.length;o++)if(t[o].checked&&t[o].form===r)return t[o]},Gi=function(t){if(!t.name)return!0;var r=t.form||Dt(t),o=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=o(window.CSS.escape(t.name));else try{i=o(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var c=Ki(i,t.form);return!c||c===t},qi=function(t){return Yo(t)&&t.type==="radio"},Xi=function(t){return qi(t)&&!Gi(t)},Yi=function(t){var r,o=t&&Dt(t),i=(r=o)===null||r===void 0?void 0:r.host,c=!1;if(o&&o!==t){var l,s,d;for(c=!!((l=i)!==null&&l!==void 0&&(s=l.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!c&&i;){var a,u,h;o=Dt(i),i=(a=o)===null||a===void 0?void 0:a.host,c=!!((u=i)!==null&&u!==void 0&&(h=u.ownerDocument)!==null&&h!==void 0&&h.contains(i))}}return c},Gr=function(t){var r=t.getBoundingClientRect(),o=r.width,i=r.height;return o===0&&i===0},Qi=function(t,r){var o=r.displayCheck,i=r.getShadowRoot;if(o==="full-native"&&"checkVisibility"in t){var c=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!c}if(getComputedStyle(t).visibility==="hidden")return!0;var l=nt.call(t,"details>summary:first-of-type"),s=l?t.parentElement:t;if(nt.call(s,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof i=="function"){for(var d=t;t;){var a=t.parentElement,u=Dt(t);if(a&&!a.shadowRoot&&i(a)===!0)return Gr(t);t.assignedSlot?t=t.assignedSlot:!a&&u!==t.ownerDocument?t=u.host:t=a}t=d}if(Yi(t))return!t.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return Gr(t);return!1},Zi=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var o=0;o<r.children.length;o++){var i=r.children.item(o);if(i.tagName==="LEGEND")return nt.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},gr=function(t,r){return!(r.disabled||ut(r)||Hi(r)||Qi(r,t)||Ui(r)||Zi(r))},hr=function(t,r){return!(Xi(r)||Xo(r)<0||!gr(t,r))},Ji=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},Qo=function(t){var r=[],o=[];return t.forEach(function(i,c){var l=!!i.scopeParent,s=l?i.scopeParent:i,d=Wi(s,l),a=l?Qo(i.candidates):s;d===0?l?r.push.apply(r,a):r.push(s):o.push({documentOrder:c,tabIndex:d,item:i,isScope:l,content:a})}),o.sort(Vi).reduce(function(i,c){return c.isScope?i.push.apply(i,c.content):i.push(c.content),i},[]).concat(r)},vr=function(t,r){r=r||{};var o;return r.getShadowRoot?o=Lt([t],r.includeContainer,{filter:hr.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Ji}):o=Go(t,r.includeContainer,hr.bind(null,r)),Qo(o)},el=function(t,r){r=r||{};var o;return r.getShadowRoot?o=Lt([t],r.includeContainer,{filter:gr.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):o=Go(t,r.includeContainer,gr.bind(null,r)),o},Zo=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return nt.call(t,Pt)===!1?!1:hr(r,t)};function tl(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Jo(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:o}=t;return r+"/"+o}).join(" "):navigator.userAgent}function rl(){return/apple/i.test(navigator.vendor)}function pr(){const e=/android/i;return e.test(tl())||e.test(Jo())}function ol(){return Jo().includes("jsdom/")}const qr="data-floating-ui-focusable",nl="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Yt="ArrowLeft",Qt="ArrowRight",il="ArrowUp",ll="ArrowDown";function Ne(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function me(e,t){if(!e||!t)return!1;const r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&ur(r)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Fe(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Zt(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function cl(e){return e.matches("html,body")}function Se(e){return(e==null?void 0:e.ownerDocument)||document}function en(e){return se(e)&&e.matches(nl)}function br(e){return e?e.getAttribute("role")==="combobox"&&en(e):!1}function Nt(e){return e?e.hasAttribute(qr)?e:e.querySelector("["+qr+"]")||e:null}function Ke(e,t,r){return r===void 0&&(r=!0),e.filter(i=>{var c;return i.parentId===t&&(!r||((c=i.context)==null?void 0:c.open))}).flatMap(i=>[i,...Ke(e,i.id,r)])}function sl(e,t){let r,o=-1;function i(c,l){l>o&&(r=c,o=l),Ke(e,c).forEach(d=>{i(d.id,l+1)})}return i(t,0),e.find(c=>c.id===r)}function Xr(e,t){var r;let o=[],i=(r=e.find(c=>c.id===t))==null?void 0:r.parentId;for(;i;){const c=e.find(l=>l.id===i);i=c==null?void 0:c.parentId,c&&(o=o.concat(c))}return o}function fe(e){e.preventDefault(),e.stopPropagation()}function al(e){return"nativeEvent"in e}function tn(e){return e.mozInputSource===0&&e.isTrusted?!0:pr()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function rn(e){return ol()?!1:!pr()&&e.width===0&&e.height===0||pr()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Yr(e,t){return["mouse","pen"].includes(e)}var ul=typeof document<"u",dl=function(){},ae=ul?_.useLayoutEffect:dl;const fl={...w};function Te(e){const t=w.useRef(e);return ae(()=>{t.current=e}),t}const gl=fl.useInsertionEffect,hl=gl||(e=>e());function ge(e){const t=w.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return hl(()=>{t.current=e}),w.useCallback(function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return t.current==null?void 0:t.current(...o)},[])}function yt(e,t,r){return Math.floor(e/t)!==r}function at(e,t){return t<0||t>=e.current.length}function Jt(e,t){return be(e,{disabledIndices:t})}function Qr(e,t){return be(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function be(e,t){let{startingIndex:r=-1,decrement:o=!1,disabledIndices:i,amount:c=1}=t===void 0?{}:t,l=r;do l+=o?-c:c;while(l>=0&&l<=e.current.length-1&&It(e,l,i));return l}function pl(e,t){let{event:r,orientation:o,loop:i,rtl:c,cols:l,disabledIndices:s,minIndex:d,maxIndex:a,prevIndex:u,stopEvent:h=!1}=t,f=u;if(r.key===il){if(h&&fe(r),u===-1)f=a;else if(f=be(e,{startingIndex:f,amount:l,decrement:!0,disabledIndices:s}),i&&(u-l<d||f<0)){const b=u%l,C=a%l,g=a-(C-b);C===b?f=a:f=C>b?g:g-l}at(e,f)&&(f=u)}if(r.key===ll&&(h&&fe(r),u===-1?f=d:(f=be(e,{startingIndex:u,amount:l,disabledIndices:s}),i&&u+l>a&&(f=be(e,{startingIndex:u%l-l,amount:l,disabledIndices:s}))),at(e,f)&&(f=u)),o==="both"){const b=et(u/l);r.key===(c?Yt:Qt)&&(h&&fe(r),u%l!==l-1?(f=be(e,{startingIndex:u,disabledIndices:s}),i&&yt(f,l,b)&&(f=be(e,{startingIndex:u-u%l-1,disabledIndices:s}))):i&&(f=be(e,{startingIndex:u-u%l-1,disabledIndices:s})),yt(f,l,b)&&(f=u)),r.key===(c?Qt:Yt)&&(h&&fe(r),u%l!==0?(f=be(e,{startingIndex:u,decrement:!0,disabledIndices:s}),i&&yt(f,l,b)&&(f=be(e,{startingIndex:u+(l-u%l),decrement:!0,disabledIndices:s}))):i&&(f=be(e,{startingIndex:u+(l-u%l),decrement:!0,disabledIndices:s})),yt(f,l,b)&&(f=u));const C=et(a/l)===b;at(e,f)&&(i&&C?f=r.key===(c?Qt:Yt)?a:be(e,{startingIndex:u-u%l-1,disabledIndices:s}):f=u)}return f}function bl(e,t,r){const o=[];let i=0;return e.forEach((c,l)=>{let{width:s,height:d}=c;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+l+" is greater than grid columns");let a=!1;for(r&&(i=0);!a;){const u=[];for(let h=0;h<s;h++)for(let f=0;f<d;f++)u.push(i+h+f*t);i%t+s<=t&&u.every(h=>o[h]==null)?(u.forEach(h=>{o[h]=l}),a=!0):i++}}),[...o]}function xl(e,t,r,o,i){if(e===-1)return-1;const c=r.indexOf(e),l=t[e];switch(i){case"tl":return c;case"tr":return l?c+l.width-1:c;case"bl":return l?c+(l.height-1)*o:c;case"br":return r.lastIndexOf(e)}}function ml(e,t){return t.flatMap((r,o)=>e.includes(r)?[o]:[])}function It(e,t,r){if(typeof r=="function")return r(t);if(r)return r.includes(t);const o=e.current[t];return o==null||o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"}const Ht=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function on(e,t){const r=vr(e,Ht()),o=r.length;if(o===0)return;const i=Ne(Se(e)),c=r.indexOf(i),l=c===-1?t===1?0:o-1:c+t;return r[l]}function Cl(e){return on(Se(e).body,1)||e}function vl(e){return on(Se(e).body,-1)||e}function Zr(e,t){const r=t||e.currentTarget,o=e.relatedTarget;return!o||!me(r,o)}function Jr(e,t,r){let{reference:o,floating:i}=e;const c=Ae(t),l=Uo(t),s=Ho(l),d=Be(t),a=c==="y",u=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,f=o[s]/2-i[s]/2;let b;switch(d){case"top":b={x:u,y:o.y-i.height};break;case"bottom":b={x:u,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:h};break;case"left":b={x:o.x-i.width,y:h};break;default:b={x:o.x,y:o.y}}switch(pt(t)){case"start":b[l]-=f*(r&&a?-1:1);break;case"end":b[l]+=f*(r&&a?-1:1);break}return b}const wl=async(e,t,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:c=[],platform:l}=r,s=c.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let a=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=Jr(a,o,d),f=o,b={},C=0;for(let g=0;g<s.length;g++){const{name:y,fn:p}=s[g],{x:v,y:k,data:S,reset:T}=await p({x:u,y:h,initialPlacement:o,placement:f,strategy:i,middlewareData:b,rects:a,platform:l,elements:{reference:e,floating:t}});u=v??u,h=k??h,b={...b,[y]:{...b[y],...S}},T&&C<=50&&(C++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(a=T.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):T.rects),{x:u,y:h}=Jr(a,f,d)),g=-1)}return{x:u,y:h,placement:f,strategy:i,middlewareData:b}};async function wr(e,t){var r;t===void 0&&(t={});const{x:o,y:i,platform:c,rects:l,elements:s,strategy:d}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:f=!1,padding:b=0}=ht(t,e),C=ji(b),y=s[f?h==="floating"?"reference":"floating":h],p=At(await c.getClippingRect({element:(r=await(c.isElement==null?void 0:c.isElement(y)))==null||r?y:y.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(s.floating)),boundary:a,rootBoundary:u,strategy:d})),v=h==="floating"?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(s.floating)),S=await(c.isElement==null?void 0:c.isElement(k))?await(c.getScale==null?void 0:c.getScale(k))||{x:1,y:1}:{x:1,y:1},T=At(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:k,strategy:d}):v);return{top:(p.top-T.top+C.top)/S.y,bottom:(T.bottom-p.bottom+C.bottom)/S.y,left:(p.left-T.left+C.left)/S.x,right:(T.right-p.right+C.right)/S.x}}const yl=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:i,middlewareData:c,rects:l,initialPlacement:s,platform:d,elements:a}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:g=!0,...y}=ht(e,t);if((r=c.arrow)!=null&&r.alignmentOffset)return{};const p=Be(i),v=Ae(s),k=Be(s)===s,S=await(d.isRTL==null?void 0:d.isRTL(a.floating)),T=f||(k||!g?[Mt(s)]:Pi(s)),M=C!=="none";!f&&M&&T.push(...Fi(s,g,C,S));const N=[s,...T],B=await wr(t,y),X=[];let O=((o=c.flip)==null?void 0:o.overflows)||[];if(u&&X.push(B[p]),h){const R=Ai(i,l,S);X.push(B[R[0]],B[R[1]])}if(O=[...O,{placement:i,overflows:X}],!X.every(R=>R<=0)){var F,G;const R=(((F=c.flip)==null?void 0:F.index)||0)+1,$=N[R];if($&&(!(h==="alignment"?v!==Ae($):!1)||O.every(x=>Ae(x.placement)===v?x.overflows[0]>0:!0)))return{data:{index:R,overflows:O},reset:{placement:$}};let j=(G=O.filter(L=>L.overflows[0]<=0).sort((L,x)=>L.overflows[1]-x.overflows[1])[0])==null?void 0:G.placement;if(!j)switch(b){case"bestFit":{var V;const L=(V=O.filter(x=>{if(M){const E=Ae(x.placement);return E===v||E==="y"}return!0}).map(x=>[x.placement,x.overflows.filter(E=>E>0).reduce((E,A)=>E+A,0)]).sort((x,E)=>x[1]-E[1])[0])==null?void 0:V[0];L&&(j=L);break}case"initialPlacement":j=s;break}if(i!==j)return{reset:{placement:j}}}return{}}}},kl=new Set(["left","top"]);async function Sl(e,t){const{placement:r,platform:o,elements:i}=e,c=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=Be(r),s=pt(r),d=Ae(r)==="y",a=kl.has(l)?-1:1,u=c&&d?-1:1,h=ht(t,e);let{mainAxis:f,crossAxis:b,alignmentAxis:C}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return s&&typeof C=="number"&&(b=s==="end"?C*-1:C),d?{x:b*u,y:f*a}:{x:f*a,y:b*u}}const Rl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:i,y:c,placement:l,middlewareData:s}=t,d=await Sl(t,e);return l===((r=s.offset)==null?void 0:r.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:c+d.y,data:{...d,placement:l}}}}},El=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:i}=t,{mainAxis:c=!0,crossAxis:l=!1,limiter:s={fn:y=>{let{x:p,y:v}=y;return{x:p,y:v}}},...d}=ht(e,t),a={x:r,y:o},u=await wr(t,d),h=Ae(Be(i)),f=Vo(h);let b=a[f],C=a[h];if(c){const y=f==="y"?"top":"left",p=f==="y"?"bottom":"right",v=b+u[y],k=b-u[p];b=Hr(v,b,k)}if(l){const y=h==="y"?"top":"left",p=h==="y"?"bottom":"right",v=C+u[y],k=C-u[p];C=Hr(v,C,k)}const g=s.fn({...t,[f]:b,[h]:C});return{...g,data:{x:g.x-r,y:g.y-o,enabled:{[f]:c,[h]:l}}}}}},$l=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;const{placement:i,rects:c,platform:l,elements:s}=t,{apply:d=()=>{},...a}=ht(e,t),u=await wr(t,a),h=Be(i),f=pt(i),b=Ae(i)==="y",{width:C,height:g}=c.floating;let y,p;h==="top"||h==="bottom"?(y=h,p=f===(await(l.isRTL==null?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(p=h,y=f==="end"?"top":"bottom");const v=g-u.top-u.bottom,k=C-u.left-u.right,S=ot(g-u[y],v),T=ot(C-u[p],k),M=!t.middlewareData.shift;let N=S,B=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(B=k),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(N=v),M&&!f){const O=we(u.left,0),F=we(u.right,0),G=we(u.top,0),V=we(u.bottom,0);b?B=C-2*(O!==0||F!==0?O+F:we(u.left,u.right)):N=g-2*(G!==0||V!==0?G+V:we(u.top,u.bottom))}await d({...t,availableWidth:B,availableHeight:N});const X=await l.getDimensions(s.floating);return C!==X.width||g!==X.height?{reset:{rects:!0}}:{}}}};function nn(e){const t=Re(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=se(e),c=i?e.offsetWidth:r,l=i?e.offsetHeight:o,s=Ot(r)!==c||Ot(o)!==l;return s&&(r=c,o=l),{width:r,height:o,$:s}}function yr(e){return ie(e)?e:e.contextElement}function tt(e){const t=yr(e);if(!se(t))return Oe(1);const r=t.getBoundingClientRect(),{width:o,height:i,$:c}=nn(t);let l=(c?Ot(r.width):r.width)/o,s=(c?Ot(r.height):r.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const Il=Oe(0);function ln(e){const t=ye(e);return!Wt()||!t.visualViewport?Il:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Tl(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ye(e)?!1:t}function Xe(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),c=yr(e);let l=Oe(1);t&&(o?ie(o)&&(l=tt(o)):l=tt(e));const s=Tl(c,r,o)?ln(c):Oe(0);let d=(i.left+s.x)/l.x,a=(i.top+s.y)/l.y,u=i.width/l.x,h=i.height/l.y;if(c){const f=ye(c),b=o&&ie(o)?ye(o):o;let C=f,g=dr(C);for(;g&&o&&b!==C;){const y=tt(g),p=g.getBoundingClientRect(),v=Re(g),k=p.left+(g.clientLeft+parseFloat(v.paddingLeft))*y.x,S=p.top+(g.clientTop+parseFloat(v.paddingTop))*y.y;d*=y.x,a*=y.y,u*=y.x,h*=y.y,d+=k,a+=S,C=ye(g),g=dr(C)}}return At({width:u,height:h,x:d,y:a})}function Ut(e,t){const r=Vt(e).scrollLeft;return t?t.left+r:Xe(Me(e)).left+r}function cn(e,t){const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Ut(e,r),i=r.top+t.scrollTop;return{x:o,y:i}}function Ol(e){let{elements:t,rect:r,offsetParent:o,strategy:i}=e;const c=i==="fixed",l=Me(o),s=t?zt(t.floating):!1;if(o===l||s&&c)return r;let d={scrollLeft:0,scrollTop:0},a=Oe(1);const u=Oe(0),h=se(o);if((h||!h&&!c)&&((ze(o)!=="body"||gt(l))&&(d=Vt(o)),se(o))){const b=Xe(o);a=tt(o),u.x=b.x+o.clientLeft,u.y=b.y+o.clientTop}const f=l&&!h&&!c?cn(l,d):Oe(0);return{width:r.width*a.x,height:r.height*a.y,x:r.x*a.x-d.scrollLeft*a.x+u.x+f.x,y:r.y*a.y-d.scrollTop*a.y+u.y+f.y}}function Ml(e){return Array.from(e.getClientRects())}function Al(e){const t=Me(e),r=Vt(e),o=e.ownerDocument.body,i=we(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),c=we(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-r.scrollLeft+Ut(e);const s=-r.scrollTop;return Re(o).direction==="rtl"&&(l+=we(t.clientWidth,o.clientWidth)-i),{width:i,height:c,x:l,y:s}}const eo=25;function Pl(e,t){const r=ye(e),o=Me(e),i=r.visualViewport;let c=o.clientWidth,l=o.clientHeight,s=0,d=0;if(i){c=i.width,l=i.height;const u=Wt();(!u||u&&t==="fixed")&&(s=i.offsetLeft,d=i.offsetTop)}const a=Ut(o);if(a<=0){const u=o.ownerDocument,h=u.body,f=getComputedStyle(h),b=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,C=Math.abs(o.clientWidth-h.clientWidth-b);C<=eo&&(c-=C)}else a<=eo&&(c+=a);return{width:c,height:l,x:s,y:d}}const Dl=new Set(["absolute","fixed"]);function Ll(e,t){const r=Xe(e,!0,t==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,c=se(e)?tt(e):Oe(1),l=e.clientWidth*c.x,s=e.clientHeight*c.y,d=i*c.x,a=o*c.y;return{width:l,height:s,x:d,y:a}}function to(e,t,r){let o;if(t==="viewport")o=Pl(e,r);else if(t==="document")o=Al(Me(e));else if(ie(t))o=Ll(t,r);else{const i=ln(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return At(o)}function sn(e,t){const r=De(e);return r===t||!ie(r)||Pe(r)?!1:Re(r).position==="fixed"||sn(r,t)}function Nl(e,t){const r=t.get(e);if(r)return r;let o=je(e,[],!1).filter(s=>ie(s)&&ze(s)!=="body"),i=null;const c=Re(e).position==="fixed";let l=c?De(e):e;for(;ie(l)&&!Pe(l);){const s=Re(l),d=Cr(l);!d&&s.position==="fixed"&&(i=null),(c?!d&&!i:!d&&s.position==="static"&&!!i&&Dl.has(i.position)||gt(l)&&!d&&sn(e,l))?o=o.filter(u=>u!==l):i=s,l=De(l)}return t.set(e,o),o}function Fl(e){let{element:t,boundary:r,rootBoundary:o,strategy:i}=e;const l=[...r==="clippingAncestors"?zt(t)?[]:Nl(t,this._c):[].concat(r),o],s=l[0],d=l.reduce((a,u)=>{const h=to(t,u,i);return a.top=we(h.top,a.top),a.right=ot(h.right,a.right),a.bottom=ot(h.bottom,a.bottom),a.left=we(h.left,a.left),a},to(t,s,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function _l(e){const{width:t,height:r}=nn(e);return{width:t,height:r}}function jl(e,t,r){const o=se(t),i=Me(t),c=r==="fixed",l=Xe(e,!0,c,t);let s={scrollLeft:0,scrollTop:0};const d=Oe(0);function a(){d.x=Ut(i)}if(o||!o&&!c)if((ze(t)!=="body"||gt(i))&&(s=Vt(t)),o){const b=Xe(t,!0,c,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else i&&a();c&&!o&&i&&a();const u=i&&!o&&!c?cn(i,s):Oe(0),h=l.left+s.scrollLeft-d.x-u.x,f=l.top+s.scrollTop-d.y-u.y;return{x:h,y:f,width:l.width,height:l.height}}function er(e){return Re(e).position==="static"}function ro(e,t){if(!se(e)||Re(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Me(e)===r&&(r=r.ownerDocument.body),r}function an(e,t){const r=ye(e);if(zt(e))return r;if(!se(e)){let i=De(e);for(;i&&!Pe(i);){if(ie(i)&&!er(i))return i;i=De(i)}return r}let o=ro(e,t);for(;o&&yi(o)&&er(o);)o=ro(o,t);return o&&Pe(o)&&er(o)&&!Cr(o)?r:o||$i(e)||r}const Bl=async function(e){const t=this.getOffsetParent||an,r=this.getDimensions,o=await r(e.floating);return{reference:jl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function zl(e){return Re(e).direction==="rtl"}const Wl={convertOffsetParentRelativeRectToViewportRelativeRect:Ol,getDocumentElement:Me,getClippingRect:Fl,getOffsetParent:an,getElementRects:Bl,getClientRects:Ml,getDimensions:_l,getScale:tt,isElement:ie,isRTL:zl};function un(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Vl(e,t){let r=null,o;const i=Me(e);function c(){var s;clearTimeout(o),(s=r)==null||s.disconnect(),r=null}function l(s,d){s===void 0&&(s=!1),d===void 0&&(d=1),c();const a=e.getBoundingClientRect(),{left:u,top:h,width:f,height:b}=a;if(s||t(),!f||!b)return;const C=et(h),g=et(i.clientWidth-(u+f)),y=et(i.clientHeight-(h+b)),p=et(u),k={rootMargin:-C+"px "+-g+"px "+-y+"px "+-p+"px",threshold:we(0,ot(1,d))||1};let S=!0;function T(M){const N=M[0].intersectionRatio;if(N!==d){if(!S)return l();N?l(!1,N):o=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!un(a,e.getBoundingClientRect())&&l(),S=!1}try{r=new IntersectionObserver(T,{...k,root:i.ownerDocument})}catch{r=new IntersectionObserver(T,k)}r.observe(e)}return l(!0),c}function kr(e,t,r,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,a=yr(e),u=i||c?[...a?je(a):[],...je(t)]:[];u.forEach(p=>{i&&p.addEventListener("scroll",r,{passive:!0}),c&&p.addEventListener("resize",r)});const h=a&&s?Vl(a,r):null;let f=-1,b=null;l&&(b=new ResizeObserver(p=>{let[v]=p;v&&v.target===a&&b&&(b.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var k;(k=b)==null||k.observe(t)})),r()}),a&&!d&&b.observe(a),b.observe(t));let C,g=d?Xe(e):null;d&&y();function y(){const p=Xe(e);g&&!un(g,p)&&r(),g=p,C=requestAnimationFrame(y)}return r(),()=>{var p;u.forEach(v=>{i&&v.removeEventListener("scroll",r),c&&v.removeEventListener("resize",r)}),h==null||h(),(p=b)==null||p.disconnect(),b=null,d&&cancelAnimationFrame(C)}}const Hl=Rl,Ul=El,Kl=yl,Gl=$l,ql=(e,t,r)=>{const o=new Map,i={platform:Wl,...r},c={...i.platform,_c:o};return wl(e,t,{...i,platform:c})};var Xl=typeof document<"u",Yl=function(){},Tt=Xl?_.useLayoutEffect:Yl;function Ft(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!Ft(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=r;o--!==0;){const c=i[o];if(!(c==="_owner"&&e.$$typeof)&&!Ft(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function dn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oo(e,t){const r=dn(e);return Math.round(t*r)/r}function tr(e){const t=w.useRef(e);return Tt(()=>{t.current=e}),t}function Ql(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:c,floating:l}={},transform:s=!0,whileElementsMounted:d,open:a}=e,[u,h]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,b]=w.useState(o);Ft(f,o)||b(o);const[C,g]=w.useState(null),[y,p]=w.useState(null),v=w.useCallback(x=>{x!==M.current&&(M.current=x,g(x))},[]),k=w.useCallback(x=>{x!==N.current&&(N.current=x,p(x))},[]),S=c||C,T=l||y,M=w.useRef(null),N=w.useRef(null),B=w.useRef(u),X=d!=null,O=tr(d),F=tr(i),G=tr(a),V=w.useCallback(()=>{if(!M.current||!N.current)return;const x={placement:t,strategy:r,middleware:f};F.current&&(x.platform=F.current),ql(M.current,N.current,x).then(E=>{const A={...E,isPositioned:G.current!==!1};R.current&&!Ft(B.current,A)&&(B.current=A,$n.flushSync(()=>{h(A)}))})},[f,t,r,F,G]);Tt(()=>{a===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,h(x=>({...x,isPositioned:!1})))},[a]);const R=w.useRef(!1);Tt(()=>(R.current=!0,()=>{R.current=!1}),[]),Tt(()=>{if(S&&(M.current=S),T&&(N.current=T),S&&T){if(O.current)return O.current(S,T,V);V()}},[S,T,V,O,X]);const $=w.useMemo(()=>({reference:M,floating:N,setReference:v,setFloating:k}),[v,k]),j=w.useMemo(()=>({reference:S,floating:T}),[S,T]),L=w.useMemo(()=>{const x={position:r,left:0,top:0};if(!j.floating)return x;const E=oo(j.floating,u.x),A=oo(j.floating,u.y);return s?{...x,transform:"translate("+E+"px, "+A+"px)",...dn(j.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:E,top:A}},[r,s,j.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:V,refs:$,elements:j,floatingStyles:L}),[u,V,$,j,L])}const Sr=(e,t)=>({...Hl(e),options:[e,t]}),Rr=(e,t)=>({...Ul(e),options:[e,t]}),Er=(e,t)=>({...Kl(e),options:[e,t]}),fn=(e,t)=>({...Gl(e),options:[e,t]}),Zl="data-floating-ui-focusable",no="active",io="selected",bt="ArrowLeft",xt="ArrowRight",gn="ArrowUp",Kt="ArrowDown",Jl={...w};let lo=!1,ec=0;const co=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ec++;function tc(){const[e,t]=w.useState(()=>lo?co():void 0);return ae(()=>{e==null&&t(co())},[]),w.useEffect(()=>{lo=!0},[]),e}const rc=Jl.useId,hn=rc||tc;let dt;process.env.NODE_ENV!=="production"&&(dt=new Set);function rr(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];const i="Floating UI: "+r.join(" ");if(!((e=dt)!=null&&e.has(i))){var c;(c=dt)==null||c.add(i),console.warn(i)}}function oc(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];const i="Floating UI: "+r.join(" ");if(!((e=dt)!=null&&e.has(i))){var c;(c=dt)==null||c.add(i),console.error(i)}}function nc(){const e=new Map;return{emit(t,r){var o;(o=e.get(t))==null||o.forEach(i=>i(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){var o;(o=e.get(t))==null||o.delete(r)}}}const ic=w.createContext(null),lc=w.createContext(null),$r=()=>{var e;return((e=w.useContext(ic))==null?void 0:e.id)||null},Gt=()=>w.useContext(lc);function _t(e){return"data-floating-ui-"+e}function xr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}let so=0;function He(e,t){t===void 0&&(t={});const{preventScroll:r=!1,cancelPrevious:o=!0,sync:i=!1}=t;o&&cancelAnimationFrame(so);const c=()=>e==null?void 0:e.focus({preventScroll:r});i?c():so=requestAnimationFrame(c)}function cc(e){return(e==null?void 0:e.ownerDocument)||document}const rt={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function ao(e){return e==="inert"?rt.inert:e==="aria-hidden"?rt["aria-hidden"]:rt.none}let kt=new WeakSet,St={},or=0;const sc=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,pn=e=>e&&(e.host||pn(e.parentNode)),ac=(e,t)=>t.map(r=>{if(e.contains(r))return r;const o=pn(r);return e.contains(o)?o:null}).filter(r=>r!=null);function uc(e,t,r,o){const i="data-floating-ui-inert",c=o?"inert":r?"aria-hidden":null,l=ac(t,e),s=new Set,d=new Set(l),a=[];St[i]||(St[i]=new WeakMap);const u=St[i];l.forEach(h),f(t),s.clear();function h(b){!b||s.has(b)||(s.add(b),b.parentNode&&h(b.parentNode))}function f(b){!b||d.has(b)||[].forEach.call(b.children,C=>{if(ze(C)!=="script")if(s.has(C))f(C);else{const g=c?C.getAttribute(c):null,y=g!==null&&g!=="false",p=ao(c),v=(p.get(C)||0)+1,k=(u.get(C)||0)+1;p.set(C,v),u.set(C,k),a.push(C),v===1&&y&&kt.add(C),k===1&&C.setAttribute(i,""),!y&&c&&C.setAttribute(c,c==="inert"?"":"true")}})}return or++,()=>{a.forEach(b=>{const C=ao(c),y=(C.get(b)||0)-1,p=(u.get(b)||0)-1;C.set(b,y),u.set(b,p),y||(!kt.has(b)&&c&&b.removeAttribute(c),kt.delete(b)),p||b.removeAttribute(i)}),or--,or||(rt.inert=new WeakMap,rt["aria-hidden"]=new WeakMap,rt.none=new WeakMap,kt=new WeakSet,St={})}}function uo(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=cc(e[0]).body;return uc(e.concat(Array.from(o.querySelectorAll('[aria-live],[role="status"],output'))),o,t,r)}const Ir={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},fo=w.forwardRef(function(t,r){const[o,i]=w.useState();ae(()=>{rl()&&i("button")},[]);const c={ref:r,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[_t("focus-guard")]:"",style:Ir};return Ue.jsx("span",{...t,...c})}),dc=w.createContext(null),fc=()=>w.useContext(dc);function go(e){return w.useMemo(()=>t=>{e.forEach(r=>{r&&(r.current=t)})},e)}const gc=20;let _e=[];function Tr(){_e=_e.filter(e=>e.isConnected)}function hc(e){Tr(),e&&ze(e)!=="body"&&(_e.push(e),_e.length>gc&&(_e=_e.slice(-20)))}function ho(){return Tr(),_e[_e.length-1]}function pc(e){const t=Ht();return Zo(e,t)?e:vr(e,t)[0]||e}function po(e,t){var r;if(!t.current.includes("floating")&&!((r=e.getAttribute("role"))!=null&&r.includes("dialog")))return;const o=Ht(),c=el(e,o).filter(s=>{const d=s.getAttribute("data-tabindex")||"";return Zo(s,o)||s.hasAttribute("data-tabindex")&&!d.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||c.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const bc=w.forwardRef(function(t,r){return Ue.jsx("button",{...t,type:"button",ref:r,tabIndex:-1,style:Ir})});function bn(e){const{context:t,children:r,disabled:o=!1,order:i=["content"],guards:c=!0,initialFocus:l=0,returnFocus:s=!0,restoreFocus:d=!1,modal:a=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:h=!0,outsideElementsInert:f=!1,getInsideElements:b=()=>[]}=e,{open:C,onOpenChange:g,events:y,dataRef:p,elements:{domReference:v,floating:k}}=t,S=ge(()=>{var W;return(W=p.current.floatingContext)==null?void 0:W.nodeId}),T=ge(b),M=typeof l=="number"&&l<0,N=br(v)&&M,B=sc(),X=B?c:!0,O=!X||B&&f,F=Te(i),G=Te(l),V=Te(s),R=Gt(),$=fc(),j=w.useRef(null),L=w.useRef(null),x=w.useRef(!1),E=w.useRef(!1),A=w.useRef(-1),ee=w.useRef(-1),ue=$!=null,z=Nt(k),Y=ge(function(W){return W===void 0&&(W=z),W?vr(W,Ht()):[]}),H=ge(W=>{const Q=Y(W);return F.current.map(U=>v&&U==="reference"?v:z&&U==="floating"?z:Q).filter(Boolean).flat()});w.useEffect(()=>{if(o||!a)return;function W(U){if(U.key==="Tab"){me(z,Ne(Se(z)))&&Y().length===0&&!N&&fe(U);const re=H(),le=Fe(U);F.current[0]==="reference"&&le===v&&(fe(U),U.shiftKey?He(re[re.length-1]):He(re[1])),F.current[1]==="floating"&&le===z&&U.shiftKey&&(fe(U),He(re[0]))}}const Q=Se(z);return Q.addEventListener("keydown",W),()=>{Q.removeEventListener("keydown",W)}},[o,v,z,a,F,N,Y,H]),w.useEffect(()=>{if(o||!k)return;function W(Q){const U=Fe(Q),le=Y().indexOf(U);le!==-1&&(A.current=le)}return k.addEventListener("focusin",W),()=>{k.removeEventListener("focusin",W)}},[o,k,Y]),w.useEffect(()=>{if(o||!h)return;function W(){E.current=!0,setTimeout(()=>{E.current=!1})}function Q(le){const Z=le.relatedTarget,xe=le.currentTarget,de=Fe(le);queueMicrotask(()=>{const he=S(),$e=!(me(v,Z)||me(k,Z)||me(Z,k)||me($==null?void 0:$.portalNode,Z)||Z!=null&&Z.hasAttribute(_t("focus-guard"))||R&&(Ke(R.nodesRef.current,he).find(D=>{var K,P;return me((K=D.context)==null?void 0:K.elements.floating,Z)||me((P=D.context)==null?void 0:P.elements.domReference,Z)})||Xr(R.nodesRef.current,he).find(D=>{var K,P,J;return[(K=D.context)==null?void 0:K.elements.floating,Nt((P=D.context)==null?void 0:P.elements.floating)].includes(Z)||((J=D.context)==null?void 0:J.elements.domReference)===Z})));if(xe===v&&z&&po(z,F),d&&xe!==v&&!(de!=null&&de.isConnected)&&Ne(Se(z))===Se(z).body){se(z)&&z.focus();const D=A.current,K=Y(),P=K[D]||K[K.length-1]||z;se(P)&&P.focus()}if(p.current.insideReactTree){p.current.insideReactTree=!1;return}(N||!a)&&Z&&$e&&!E.current&&Z!==ho()&&(x.current=!0,g(!1,le,"focus-out"))})}const U=!!(!R&&$);function re(){xr(ee),p.current.insideReactTree=!0,ee.current=window.setTimeout(()=>{p.current.insideReactTree=!1})}if(k&&se(v))return v.addEventListener("focusout",Q),v.addEventListener("pointerdown",W),k.addEventListener("focusout",Q),U&&k.addEventListener("focusout",re,!0),()=>{v.removeEventListener("focusout",Q),v.removeEventListener("pointerdown",W),k.removeEventListener("focusout",Q),U&&k.removeEventListener("focusout",re,!0)}},[o,v,k,z,a,R,$,g,h,d,Y,N,S,F,p]);const te=w.useRef(null),q=w.useRef(null),ne=go([te,$==null?void 0:$.beforeInsideRef]),Ee=go([q,$==null?void 0:$.afterInsideRef]);w.useEffect(()=>{var W,Q;if(o||!k)return;const U=Array.from(($==null||(W=$.portalNode)==null?void 0:W.querySelectorAll("["+_t("portal")+"]"))||[]),le=(Q=(R?Xr(R.nodesRef.current,S()):[]).find(de=>{var he;return br(((he=de.context)==null?void 0:he.elements.domReference)||null)}))==null||(Q=Q.context)==null?void 0:Q.elements.domReference,Z=[k,le,...U,...T(),j.current,L.current,te.current,q.current,$==null?void 0:$.beforeOutsideRef.current,$==null?void 0:$.afterOutsideRef.current,F.current.includes("reference")||N?v:null].filter(de=>de!=null),xe=a||N?uo(Z,!O,O):uo(Z);return()=>{xe()}},[o,v,k,a,F,$,N,X,O,R,S,T]),ae(()=>{if(o||!se(z))return;const W=Se(z),Q=Ne(W);queueMicrotask(()=>{const U=H(z),re=G.current,le=(typeof re=="number"?U[re]:re.current)||z,Z=me(z,Q);!M&&!Z&&C&&He(le,{preventScroll:le===z})})},[o,C,z,M,H,G]),ae(()=>{if(o||!z)return;const W=Se(z),Q=Ne(W);hc(Q);function U(Z){let{reason:xe,event:de,nested:he}=Z;if(["hover","safe-polygon"].includes(xe)&&de.type==="mouseleave"&&(x.current=!0),xe==="outside-press")if(he)x.current=!1;else if(tn(de)||rn(de))x.current=!1;else{let $e=!1;document.createElement("div").focus({get preventScroll(){return $e=!0,!1}}),$e?x.current=!1:x.current=!0}}y.on("openchange",U);const re=W.createElement("span");re.setAttribute("tabindex","-1"),re.setAttribute("aria-hidden","true"),Object.assign(re.style,Ir),ue&&v&&v.insertAdjacentElement("afterend",re);function le(){if(typeof V.current=="boolean"){const Z=v||ho();return Z&&Z.isConnected?Z:re}return V.current.current||re}return()=>{y.off("openchange",U);const Z=Ne(W),xe=me(k,Z)||R&&Ke(R.nodesRef.current,S(),!1).some(he=>{var $e;return me(($e=he.context)==null?void 0:$e.elements.floating,Z)}),de=le();queueMicrotask(()=>{const he=pc(de);V.current&&!x.current&&se(he)&&(!(he!==Z&&Z!==W.body)||xe)&&he.focus({preventScroll:!0}),re.remove()})}},[o,k,z,V,p,y,R,ue,v,S]),w.useEffect(()=>(queueMicrotask(()=>{x.current=!1}),()=>{queueMicrotask(Tr)}),[o]),ae(()=>{if(!o&&$)return $.setFocusManagerState({modal:a,closeOnFocusOut:h,open:C,onOpenChange:g,domReference:v}),()=>{$.setFocusManagerState(null)}},[o,$,a,C,g,h,v]),ae(()=>{o||z&&po(z,F)},[o,z,F]);function Ce(W){return o||!u||!a?null:Ue.jsx(bc,{ref:W==="start"?j:L,onClick:Q=>g(!1,Q.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const Ye=!o&&X&&(a?!N:!0)&&(ue||a);return Ue.jsxs(Ue.Fragment,{children:[Ye&&Ue.jsx(fo,{"data-type":"inside",ref:ne,onFocus:W=>{if(a){const U=H();He(i[0]==="reference"?U[0]:U[U.length-1])}else if($!=null&&$.preserveTabOrder&&$.portalNode)if(x.current=!1,Zr(W,$.portalNode)){const U=Cl(v);U==null||U.focus()}else{var Q;(Q=$.beforeOutsideRef.current)==null||Q.focus()}}}),!N&&Ce("start"),r,Ce("end"),Ye&&Ue.jsx(fo,{"data-type":"inside",ref:Ee,onFocus:W=>{if(a)He(H()[0]);else if($!=null&&$.preserveTabOrder&&$.portalNode)if(h&&(x.current=!0),Zr(W,$.portalNode)){const U=vl(v);U==null||U.focus()}else{var Q;(Q=$.afterOutsideRef.current)==null||Q.focus()}}})]})}function bo(e){return se(e.target)&&e.target.tagName==="BUTTON"}function xc(e){return se(e.target)&&e.target.tagName==="A"}function xo(e){return en(e)}function Or(e,t){t===void 0&&(t={});const{open:r,onOpenChange:o,dataRef:i,elements:{domReference:c}}=e,{enabled:l=!0,event:s="click",toggle:d=!0,ignoreMouse:a=!1,keyboardHandlers:u=!0,stickIfOpen:h=!0}=t,f=w.useRef(),b=w.useRef(!1),C=w.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const y=f.current;g.button===0&&s!=="click"&&(Yr(y)&&a||(r&&d&&(!(i.current.openEvent&&h)||i.current.openEvent.type==="mousedown")?o(!1,g.nativeEvent,"click"):(g.preventDefault(),o(!0,g.nativeEvent,"click"))))},onClick(g){const y=f.current;if(s==="mousedown"&&f.current){f.current=void 0;return}Yr(y)&&a||(r&&d&&(!(i.current.openEvent&&h)||i.current.openEvent.type==="click")?o(!1,g.nativeEvent,"click"):o(!0,g.nativeEvent,"click"))},onKeyDown(g){f.current=void 0,!(g.defaultPrevented||!u||bo(g))&&(g.key===" "&&!xo(c)&&(g.preventDefault(),b.current=!0),!xc(g)&&g.key==="Enter"&&o(!(r&&d),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||bo(g)||xo(c)||g.key===" "&&b.current&&(b.current=!1,o(!(r&&d),g.nativeEvent,"click"))}}),[i,c,s,a,u,o,r,h,d]);return w.useMemo(()=>l?{reference:C}:{},[l,C])}const mc={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Cc={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},mo=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e==null?void 0:e.outsidePress)!=null?r:!0}};function Mr(e,t){t===void 0&&(t={});const{open:r,onOpenChange:o,elements:i,dataRef:c}=e,{enabled:l=!0,escapeKey:s=!0,outsidePress:d=!0,outsidePressEvent:a="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:f=!1,bubbles:b,capture:C}=t,g=Gt(),y=ge(typeof d=="function"?d:()=>!1),p=typeof d=="function"?y:d,v=w.useRef(!1),{escapeKey:k,outsidePress:S}=mo(b),{escapeKey:T,outsidePress:M}=mo(C),N=w.useRef(!1),B=ge(R=>{var $;if(!r||!l||!s||R.key!=="Escape"||N.current)return;const j=($=c.current.floatingContext)==null?void 0:$.nodeId,L=g?Ke(g.nodesRef.current,j):[];if(!k&&(R.stopPropagation(),L.length>0)){let x=!0;if(L.forEach(E=>{var A;if((A=E.context)!=null&&A.open&&!E.context.dataRef.current.__escapeKeyBubbles){x=!1;return}}),!x)return}o(!1,al(R)?R.nativeEvent:R,"escape-key")}),X=ge(R=>{var $;const j=()=>{var L;B(R),(L=Fe(R))==null||L.removeEventListener("keydown",j)};($=Fe(R))==null||$.addEventListener("keydown",j)}),O=ge(R=>{var $;const j=c.current.insideReactTree;c.current.insideReactTree=!1;const L=v.current;if(v.current=!1,a==="click"&&L||j||typeof p=="function"&&!p(R))return;const x=Fe(R),E="["+_t("inert")+"]",A=Se(i.floating).querySelectorAll(E);let ee=ie(x)?x:null;for(;ee&&!Pe(ee);){const H=De(ee);if(Pe(H)||!ie(H))break;ee=H}if(A.length&&ie(x)&&!cl(x)&&!me(x,i.floating)&&Array.from(A).every(H=>!me(ee,H)))return;if(se(x)&&V){const H=Pe(x),te=Re(x),q=/auto|scroll/,ne=H||q.test(te.overflowX),Ee=H||q.test(te.overflowY),Ce=ne&&x.clientWidth>0&&x.scrollWidth>x.clientWidth,Ye=Ee&&x.clientHeight>0&&x.scrollHeight>x.clientHeight,W=te.direction==="rtl",Q=Ye&&(W?R.offsetX<=x.offsetWidth-x.clientWidth:R.offsetX>x.clientWidth),U=Ce&&R.offsetY>x.clientHeight;if(Q||U)return}const ue=($=c.current.floatingContext)==null?void 0:$.nodeId,z=g&&Ke(g.nodesRef.current,ue).some(H=>{var te;return Zt(R,(te=H.context)==null?void 0:te.elements.floating)});if(Zt(R,i.floating)||Zt(R,i.domReference)||z)return;const Y=g?Ke(g.nodesRef.current,ue):[];if(Y.length>0){let H=!0;if(Y.forEach(te=>{var q;if((q=te.context)!=null&&q.open&&!te.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}o(!1,R,"outside-press")}),F=ge(R=>{var $;const j=()=>{var L;O(R),(L=Fe(R))==null||L.removeEventListener(a,j)};($=Fe(R))==null||$.addEventListener(a,j)});w.useEffect(()=>{if(!r||!l)return;c.current.__escapeKeyBubbles=k,c.current.__outsidePressBubbles=S;let R=-1;function $(A){o(!1,A,"ancestor-scroll")}function j(){window.clearTimeout(R),N.current=!0}function L(){R=window.setTimeout(()=>{N.current=!1},Wt()?5:0)}const x=Se(i.floating);s&&(x.addEventListener("keydown",T?X:B,T),x.addEventListener("compositionstart",j),x.addEventListener("compositionend",L)),p&&x.addEventListener(a,M?F:O,M);let E=[];return f&&(ie(i.domReference)&&(E=je(i.domReference)),ie(i.floating)&&(E=E.concat(je(i.floating))),!ie(i.reference)&&i.reference&&i.reference.contextElement&&(E=E.concat(je(i.reference.contextElement)))),E=E.filter(A=>{var ee;return A!==((ee=x.defaultView)==null?void 0:ee.visualViewport)}),E.forEach(A=>{A.addEventListener("scroll",$,{passive:!0})}),()=>{s&&(x.removeEventListener("keydown",T?X:B,T),x.removeEventListener("compositionstart",j),x.removeEventListener("compositionend",L)),p&&x.removeEventListener(a,M?F:O,M),E.forEach(A=>{A.removeEventListener("scroll",$)}),window.clearTimeout(R)}},[c,i,s,p,a,r,o,f,l,k,S,B,T,X,O,M,F]),w.useEffect(()=>{c.current.insideReactTree=!1},[c,p,a]);const G=w.useMemo(()=>({onKeyDown:B,...u&&{[mc[h]]:R=>{o(!1,R.nativeEvent,"reference-press")},...h!=="click"&&{onClick(R){o(!1,R.nativeEvent,"reference-press")}}}}),[B,o,u,h]),V=w.useMemo(()=>({onKeyDown:B,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[Cc[a]]:()=>{c.current.insideReactTree=!0}}),[B,a,c]);return w.useMemo(()=>l?{reference:G,floating:V}:{},[l,G,V])}function vc(e){const{open:t=!1,onOpenChange:r,elements:o}=e,i=hn(),c=w.useRef({}),[l]=w.useState(()=>nc()),s=$r()!=null;if(process.env.NODE_ENV!=="production"){const b=o.reference;b&&!ie(b)&&oc("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[d,a]=w.useState(o.reference),u=ge((b,C,g)=>{c.current.openEvent=b?C:void 0,l.emit("openchange",{open:b,event:C,reason:g,nested:s}),r==null||r(b,C,g)}),h=w.useMemo(()=>({setPositionReference:a}),[]),f=w.useMemo(()=>({reference:d||o.reference||null,floating:o.floating||null,domReference:o.reference}),[d,o.reference,o.floating]);return w.useMemo(()=>({dataRef:c,open:t,onOpenChange:u,elements:f,events:l,floatingId:i,refs:h}),[t,u,f,l,i,h])}function Ar(e){e===void 0&&(e={});const{nodeId:t}=e,r=vc({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||r,i=o.elements,[c,l]=w.useState(null),[s,d]=w.useState(null),u=(i==null?void 0:i.domReference)||c,h=w.useRef(null),f=Gt();ae(()=>{u&&(h.current=u)},[u]);const b=Ql({...e,elements:{...i,...s&&{reference:s}}}),C=w.useCallback(k=>{const S=ie(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),getClientRects:()=>k.getClientRects(),contextElement:k}:k;d(S),b.refs.setReference(S)},[b.refs]),g=w.useCallback(k=>{(ie(k)||k===null)&&(h.current=k,l(k)),(ie(b.refs.reference.current)||b.refs.reference.current===null||k!==null&&!ie(k))&&b.refs.setReference(k)},[b.refs]),y=w.useMemo(()=>({...b.refs,setReference:g,setPositionReference:C,domReference:h}),[b.refs,g,C]),p=w.useMemo(()=>({...b.elements,domReference:u}),[b.elements,u]),v=w.useMemo(()=>({...b,...o,refs:y,elements:p,nodeId:t}),[b,y,p,t,o]);return ae(()=>{o.dataRef.current.floatingContext=v;const k=f==null?void 0:f.nodesRef.current.find(S=>S.id===t);k&&(k.context=v)}),w.useMemo(()=>({...b,context:v,refs:y,elements:p}),[b,y,p,v])}function nr(e,t,r){const o=new Map,i=r==="item";let c=e;if(i&&e){const{[no]:l,[io]:s,...d}=e;c=d}return{...r==="floating"&&{tabIndex:-1,[Zl]:""},...c,...t.map(l=>{const s=l?l[r]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((l,s)=>(s&&Object.entries(s).forEach(d=>{let[a,u]=d;if(!(i&&[no,io].includes(a)))if(a.indexOf("on")===0){if(o.has(a)||o.set(a,[]),typeof u=="function"){var h;(h=o.get(a))==null||h.push(u),l[a]=function(){for(var f,b=arguments.length,C=new Array(b),g=0;g<b;g++)C[g]=arguments[g];return(f=o.get(a))==null?void 0:f.map(y=>y(...C)).find(y=>y!==void 0)}}}else l[a]=u}),l),{})}}function Pr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),r=e.map(s=>s==null?void 0:s.floating),o=e.map(s=>s==null?void 0:s.item),i=w.useCallback(s=>nr(s,e,"reference"),t),c=w.useCallback(s=>nr(s,e,"floating"),r),l=w.useCallback(s=>nr(s,e,"item"),o);return w.useMemo(()=>({getReferenceProps:i,getFloatingProps:c,getItemProps:l}),[i,c,l])}const wc="Escape";function qt(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function Rt(e,t){return qt(t,e===gn||e===Kt,e===bt||e===xt)}function ir(e,t,r){return qt(t,e===Kt,r?e===bt:e===xt)||e==="Enter"||e===" "||e===""}function Co(e,t,r){return qt(t,r?e===bt:e===xt,e===Kt)}function vo(e,t,r,o){const i=r?e===xt:e===bt,c=e===gn;return t==="both"||t==="horizontal"&&o&&o>1?e===wc:qt(t,i,c)}function xn(e,t){const{open:r,onOpenChange:o,elements:i,floatingId:c}=e,{listRef:l,activeIndex:s,onNavigate:d=()=>{},enabled:a=!0,selectedIndex:u=null,allowEscape:h=!1,loop:f=!1,nested:b=!1,rtl:C=!1,virtual:g=!1,focusItemOnOpen:y="auto",focusItemOnHover:p=!0,openOnArrowKeyDown:v=!0,disabledIndices:k=void 0,orientation:S="vertical",parentOrientation:T,cols:M=1,scrollItemIntoView:N=!0,virtualItemRef:B,itemSizes:X,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(h&&(f||rr("`useListNavigation` looping must be enabled to allow escaping."),g||rr("`useListNavigation` must be virtual to allow escaping.")),S==="vertical"&&M>1&&rr("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=Nt(i.floating),G=Te(F),V=$r(),R=Gt();ae(()=>{e.dataRef.current.orientation=S},[e,S]);const $=ge(()=>{d(x.current===-1?null:x.current)}),j=br(i.domReference),L=w.useRef(y),x=w.useRef(u??-1),E=w.useRef(null),A=w.useRef(!0),ee=w.useRef($),ue=w.useRef(!!i.floating),z=w.useRef(r),Y=w.useRef(!1),H=w.useRef(!1),te=Te(k),q=Te(r),ne=Te(N),Ee=Te(u),[Ce,Ye]=w.useState(),[W,Q]=w.useState(),U=ge(()=>{function D(oe){if(g){var ce;(ce=oe.id)!=null&&ce.endsWith("-fui-option")&&(oe.id=c+"-"+Math.random().toString(16).slice(2,10)),Ye(oe.id),R==null||R.events.emit("virtualfocus",oe),B&&(B.current=oe)}else He(oe,{sync:Y.current,preventScroll:!0})}const K=l.current[x.current],P=H.current;K&&D(K),(Y.current?oe=>oe():requestAnimationFrame)(()=>{const oe=l.current[x.current]||K;if(!oe)return;K||D(oe);const ce=ne.current;ce&&le&&(P||!A.current)&&(oe.scrollIntoView==null||oe.scrollIntoView(typeof ce=="boolean"?{block:"nearest",inline:"nearest"}:ce))})});ae(()=>{a&&(r&&i.floating?L.current&&u!=null&&(H.current=!0,x.current=u,$()):ue.current&&(x.current=-1,ee.current()))},[a,r,i.floating,u,$]),ae(()=>{if(a&&r&&i.floating)if(s==null){if(Y.current=!1,Ee.current!=null)return;if(ue.current&&(x.current=-1,U()),(!z.current||!ue.current)&&L.current&&(E.current!=null||L.current===!0&&E.current==null)){let D=0;const K=()=>{l.current[0]==null?(D<2&&(D?requestAnimationFrame:queueMicrotask)(K),D++):(x.current=E.current==null||ir(E.current,S,C)||b?Jt(l,te.current):Qr(l,te.current),E.current=null,$())};K()}}else at(l,s)||(x.current=s,U(),H.current=!1)},[a,r,i.floating,s,Ee,b,l,S,C,$,U,te]),ae(()=>{var D;if(!a||i.floating||!R||g||!ue.current)return;const K=R.nodesRef.current,P=(D=K.find(ce=>ce.id===V))==null||(D=D.context)==null?void 0:D.elements.floating,J=Ne(Se(i.floating)),oe=K.some(ce=>ce.context&&me(ce.context.elements.floating,J));P&&!oe&&A.current&&P.focus({preventScroll:!0})},[a,i.floating,R,V,g]),ae(()=>{if(!a||!R||!g||V)return;function D(K){Q(K.id),B&&(B.current=K)}return R.events.on("virtualfocus",D),()=>{R.events.off("virtualfocus",D)}},[a,R,g,V,B]),ae(()=>{ee.current=$,z.current=r,ue.current=!!i.floating}),ae(()=>{r||(E.current=null,L.current=y)},[r,y]);const re=s!=null,le=w.useMemo(()=>{function D(P){if(!q.current)return;const J=l.current.indexOf(P);J!==-1&&x.current!==J&&(x.current=J,$())}return{onFocus(P){let{currentTarget:J}=P;Y.current=!0,D(J)},onClick:P=>{let{currentTarget:J}=P;return J.focus({preventScroll:!0})},onMouseMove(P){let{currentTarget:J}=P;Y.current=!0,H.current=!1,p&&D(J)},onPointerLeave(P){let{pointerType:J}=P;if(!(!A.current||J==="touch")&&(Y.current=!0,!!p&&(x.current=-1,$(),!g))){var oe;(oe=G.current)==null||oe.focus({preventScroll:!0})}}}},[q,G,p,l,$,g]),Z=w.useCallback(()=>{var D;return T??(R==null||(D=R.nodesRef.current.find(K=>K.id===V))==null||(D=D.context)==null||(D=D.dataRef)==null?void 0:D.current.orientation)},[V,R,T]),xe=ge(D=>{if(A.current=!1,Y.current=!0,D.which===229||!q.current&&D.currentTarget===G.current)return;if(b&&vo(D.key,S,C,M)){Rt(D.key,Z())||fe(D),o(!1,D.nativeEvent,"list-navigation"),se(i.domReference)&&(g?R==null||R.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}const K=x.current,P=Jt(l,k),J=Qr(l,k);if(j||(D.key==="Home"&&(fe(D),x.current=P,$()),D.key==="End"&&(fe(D),x.current=J,$())),M>1){const oe=X||Array.from({length:l.current.length},()=>({width:1,height:1})),ce=bl(oe,M,O),it=ce.findIndex(ke=>ke!=null&&!It(l,ke,k)),mt=ce.reduce((ke,We,Ct)=>We!=null&&!It(l,We,k)?Ct:ke,-1),lt=ce[pl({current:ce.map(ke=>ke!=null?l.current[ke]:null)},{event:D,orientation:S,loop:f,rtl:C,cols:M,disabledIndices:ml([...(typeof k!="function"?k:null)||l.current.map((ke,We)=>It(l,We,k)?We:void 0),void 0],ce),minIndex:it,maxIndex:mt,prevIndex:xl(x.current>J?P:x.current,oe,ce,M,D.key===Kt?"bl":D.key===(C?bt:xt)?"tr":"tl"),stopEvent:!0})];if(lt!=null&&(x.current=lt,$()),S==="both")return}if(Rt(D.key,S)){if(fe(D),r&&!g&&Ne(D.currentTarget.ownerDocument)===D.currentTarget){x.current=ir(D.key,S,C)?P:J,$();return}ir(D.key,S,C)?f?x.current=K>=J?h&&K!==l.current.length?-1:P:be(l,{startingIndex:K,disabledIndices:k}):x.current=Math.min(J,be(l,{startingIndex:K,disabledIndices:k})):f?x.current=K<=P?h&&K!==-1?l.current.length:J:be(l,{startingIndex:K,decrement:!0,disabledIndices:k}):x.current=Math.max(P,be(l,{startingIndex:K,decrement:!0,disabledIndices:k})),at(l,x.current)&&(x.current=-1),$()}}),de=w.useMemo(()=>g&&r&&re&&{"aria-activedescendant":W||Ce},[g,r,re,W,Ce]),he=w.useMemo(()=>({"aria-orientation":S==="both"?void 0:S,...j?{}:de,onKeyDown:xe,onPointerMove(){A.current=!0}}),[de,xe,S,j]),$e=w.useMemo(()=>{function D(P){y==="auto"&&tn(P.nativeEvent)&&(L.current=!0)}function K(P){L.current=y,y==="auto"&&rn(P.nativeEvent)&&(L.current=!0)}return{...de,onKeyDown(P){A.current=!1;const J=P.key.startsWith("Arrow"),oe=["Home","End"].includes(P.key),ce=J||oe,it=Co(P.key,S,C),mt=vo(P.key,S,C,M),lt=Co(P.key,Z(),C),ke=Rt(P.key,S),We=(b?lt:ke)||P.key==="Enter"||P.key.trim()==="";if(g&&r){const vt=R==null?void 0:R.nodesRef.current.find(wt=>wt.parentId==null),Le=R&&vt?sl(R.nodesRef.current,vt.id):null;if(ce&&Le&&B){const wt=new KeyboardEvent("keydown",{key:P.key,bubbles:!0});if(it||mt){var Ct,Lr;const En=((Ct=Le.context)==null?void 0:Ct.elements.domReference)===P.currentTarget,Fr=mt&&!En?(Lr=Le.context)==null?void 0:Lr.elements.domReference:it?l.current.find(_r=>(_r==null?void 0:_r.id)===Ce):null;Fr&&(fe(P),Fr.dispatchEvent(wt),Q(void 0))}if((ke||oe)&&Le.context&&Le.context.open&&Le.parentId&&P.currentTarget!==Le.context.elements.domReference){var Nr;fe(P),(Nr=Le.context.elements.domReference)==null||Nr.dispatchEvent(wt);return}}return xe(P)}if(!(!r&&!v&&J)){if(We){const vt=Rt(P.key,Z());E.current=b&&vt?null:P.key}if(b){lt&&(fe(P),r?(x.current=Jt(l,te.current),$()):o(!0,P.nativeEvent,"list-navigation"));return}ke&&(u!=null&&(x.current=u),fe(P),!r&&v?o(!0,P.nativeEvent,"list-navigation"):xe(P),r&&$())}},onFocus(){r&&!g&&(x.current=-1,$())},onPointerDown:K,onPointerEnter:K,onMouseDown:D,onClick:D}},[Ce,de,M,xe,te,y,l,b,$,o,r,v,S,Z,C,u,R,g,B]);return w.useMemo(()=>a?{reference:$e,floating:he,item:le}:{},[a,$e,he,le])}const yc=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function mn(e,t){var r,o;t===void 0&&(t={});const{open:i,elements:c,floatingId:l}=e,{enabled:s=!0,role:d="dialog"}=t,a=hn(),u=((r=c.domReference)==null?void 0:r.id)||a,h=w.useMemo(()=>{var v;return((v=Nt(c.floating))==null?void 0:v.id)||l},[c.floating,l]),f=(o=yc.get(d))!=null?o:d,C=$r()!=null,g=w.useMemo(()=>f==="tooltip"||d==="label"?{["aria-"+(d==="label"?"labelledby":"describedby")]:i?h:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":i?h:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&C&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[f,h,C,i,u,d]),y=w.useMemo(()=>{const v={id:h,...f&&{role:f}};return f==="tooltip"||d==="label"?v:{...v,...f==="menu"&&{"aria-labelledby":u}}},[f,h,u,d]),p=w.useCallback(v=>{let{active:k,selected:S}=v;const T={role:"option",...k&&{id:h+"-fui-option"}};switch(d){case"select":case"combobox":return{...T,"aria-selected":S}}return{}},[h,d]);return w.useMemo(()=>s?{reference:g,floating:y,item:p}:{},[s,g,y,p])}function kc(e,t){var r;const{open:o,dataRef:i}=e,{listRef:c,activeIndex:l,onMatch:s,onTypingChange:d,enabled:a=!0,findMatch:u=null,resetMs:h=750,ignoreKeys:f=[],selectedIndex:b=null}=t,C=w.useRef(-1),g=w.useRef(""),y=w.useRef((r=b??l)!=null?r:-1),p=w.useRef(null),v=ge(s),k=ge(d),S=Te(u),T=Te(f);ae(()=>{o&&(xr(C),p.current=null,g.current="")},[o]),ae(()=>{if(o&&g.current===""){var O;y.current=(O=b??l)!=null?O:-1}},[o,b,l]);const M=ge(O=>{O?i.current.typing||(i.current.typing=O,k(O)):i.current.typing&&(i.current.typing=O,k(O))}),N=ge(O=>{function F(j,L,x){const E=S.current?S.current(L,x):L.find(A=>(A==null?void 0:A.toLocaleLowerCase().indexOf(x.toLocaleLowerCase()))===0);return E?j.indexOf(E):-1}const G=c.current;if(g.current.length>0&&g.current[0]!==" "&&(F(G,G,g.current)===-1?M(!1):O.key===" "&&fe(O)),G==null||T.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;o&&O.key!==" "&&(fe(O),M(!0)),G.every(j=>{var L,x;return j?((L=j[0])==null?void 0:L.toLocaleLowerCase())!==((x=j[1])==null?void 0:x.toLocaleLowerCase()):!0})&&g.current===O.key&&(g.current="",y.current=p.current),g.current+=O.key,xr(C),C.current=window.setTimeout(()=>{g.current="",y.current=p.current,M(!1)},h);const R=y.current,$=F(G,[...G.slice((R||0)+1),...G.slice(0,(R||0)+1)],g.current);$!==-1?(v($),p.current=$):O.key!==" "&&(g.current="",M(!1))}),B=w.useMemo(()=>({onKeyDown:N}),[N]),X=w.useMemo(()=>({onKeyDown:N,onKeyUp(O){O.key===" "&&M(!1)}}),[N,M]);return w.useMemo(()=>a?{reference:B,floating:X}:{},[a,B,X])}const Sc=(e,t)=>`${e}-${t}`,Rc=(e=_o,t=jo,r=Bo,o,i)=>{const[c,l]=_.useState(!1),s=o!==void 0,d=s?o:c,a=_.useCallback(v=>{s||l(v),i==null||i(v)},[s,i]),u=_.useMemo(()=>Sc(e,t),[e,t]),{refs:h,floatingStyles:f,context:b}=Ar({open:d,onOpenChange:a,placement:u,middleware:[Sr(r),Er(),Rr({padding:8})],whileElementsMounted:kr}),C=Or(b),g=Mr(b,{escapeKey:!0,outsidePress:!0}),{getReferenceProps:y,getFloatingProps:p}=Pr([C,g]);return{isOpen:d,setIsOpen:a,refs:{setReference:h.setReference,setFloating:h.setFloating},floatingStyles:f,getReferenceProps:y,getFloatingProps:p}},lr=m.classNameGetter("dropdown"),Ec=({trigger:e,children:t,placement:r=_o,align:o=jo,offset:i=Bo,open:c,onOpenChange:l,portalRenderNode:s,classnames:d,className:a,fullWidth:u,...h})=>{const{isOpen:f,refs:b,floatingStyles:C,getReferenceProps:g,getFloatingProps:y}=Rc(r,o,i,c,l),p=()=>{const v=m.jsx(Ci,{ref:b.setFloating,className:lr("content",d==null?void 0:d.content),style:C,$isOpen:f,...y(),children:t});return s?ft.createPortal(v,s):v};return m.jsxs(xi,{...h,className:lr("container",a,d==null?void 0:d.container),$fullWidth:u,children:[m.jsx(mi,{ref:b.setReference,className:lr("trigger",d==null?void 0:d.trigger),$fullWidth:u,...g(),children:e}),p()]})},wo={hidden:["M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7 7 0 0 0-2.79.588l.77.771A6 6 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755q-.247.248-.517.486z","M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829","M3.35 5.47q-.27.24-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12z"],visible:["M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z","M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"]},$c=(e,t,r)=>r?e.input.wrapper.disabled.backgroundColor:t==="warning"?e.input.state.warning.wrapper.backgroundColor:t==="error"?e.input.state.error.wrapper.backgroundColor:e.input.wrapper.backgroundColor,Ic=(e,t,r)=>r?e.input.wrapper.disabled.borderColor:t==="warning"?e.input.state.warning.wrapper.borderColor:t==="error"?e.input.state.error.wrapper.borderColor:e.input.wrapper.borderColor,Tc=(e,t)=>t==="warning"?e.input.state.warning.wrapper.focus.outlineColor:t==="error"?e.input.state.error.wrapper.focus.outlineColor:e.input.wrapper.focus.outlineColor,Oc=(e,t)=>t==="warning"?e.input.state.warning.label.color:t==="error"?e.input.state.error.label.color:e.input.label.color,Mc=(e,t)=>t==="warning"?e.input.state.warning.input.color:t==="error"?e.input.state.error.input.color:e.input.input.color,Ac=(e,t)=>t==="warning"?e.input.state.warning.input.placeholderColor:t==="error"?e.input.state.error.input.placeholderColor:e.input.input.placeholderColor,Pc=(e,t,r)=>r?e.input.icon.disabled.color:t==="warning"?e.input.state.warning.icon.color:t==="error"?e.input.state.error.icon.color:e.input.icon.color,Dc=(e,t)=>t==="warning"?e.input.state.warning.icon.color:t==="error"?e.input.state.error.icon.color:e.input.toggle.color,Lc=I.div`
310
+ border: 0;
311
+ `,Or=s.div`
235
312
  display: flex;
236
313
  flex-direction: column;
237
314
  gap: 2px;
238
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
239
315
  min-width: 0;
240
- max-width: ${({$fullWidth:e})=>e?"none":"320px"};
241
- `,Nc=I.label`
242
- font-size: 11px;
316
+ `,$r=s.span`
317
+ font-size: 14px;
243
318
  font-weight: 500;
244
- line-height: 1.5;
245
- color: ${({theme:e,$state:t})=>Oc(e,t)};
246
- margin-left: 2px;
247
- `,Fc=I.div`
248
- display: grid;
249
- grid-template-columns: auto 1fr auto;
250
- align-items: center;
251
- height: 32px;
252
- padding: 0 12px;
253
- background-color: ${({theme:e,$state:t,$disabled:r})=>$c(e,t,r)};
254
- border-radius: 10px;
255
- border: 1px solid
256
- ${({theme:e,$state:t,$disabled:r})=>Ic(e,t,r)};
257
- transition: border-color 0.15s ease;
319
+ line-height: 1.4;
320
+ color: ${e=>ce(e.$variant).label.static};
258
321
 
259
- &:has(:focus-visible) {
260
- outline: 2px solid ${({theme:e,$state:t})=>Tc(e,t)};
261
- outline-offset: 1px;
322
+ label[data-disabled='true'] & {
323
+ color: ${e=>ce(e.$variant).label.disabled};
262
324
  }
263
-
264
- ${({$disabled:e})=>e&&`
265
- cursor: not-allowed;
266
- `}
267
- `,_c=I.input`
268
- grid-column: 2;
269
- width: 100%;
270
- height: 100%;
271
- font-size: 14px;
325
+ `,Sr=s.span`
326
+ font-size: 12px;
272
327
  font-weight: 400;
273
- line-height: 1.5;
274
- color: ${({theme:e,$state:t})=>Mc(e,t)};
275
- background-color: transparent;
276
- border: none;
277
- outline: none;
278
-
279
- &::placeholder {
280
- color: ${({theme:e,$state:t})=>Ac(e,t)};
281
- }
282
-
283
- &:disabled {
284
- color: ${({theme:e})=>e.input.input.disabled.color};
285
- cursor: not-allowed;
286
- }
287
-
288
- &::-webkit-outer-spin-button,
289
- &::-webkit-inner-spin-button {
290
- appearance: none;
291
- margin: 0;
292
- }
328
+ line-height: 1.4;
329
+ color: ${e=>ce(e.$variant).description.static};
293
330
 
294
- &[type='number'] {
295
- appearance: textfield;
331
+ label[data-disabled='true'] & {
332
+ color: ${e=>ce(e.$variant).description.disabled};
296
333
  }
297
- `,jc=I.span`
298
- display: flex;
299
- align-items: center;
300
- justify-content: center;
301
- margin-right: 8px;
302
- color: ${({theme:e,$state:t,$disabled:r})=>Pc(e,t,r)};
303
- `,Bc=I.button`
304
- display: grid;
305
- place-items: center;
306
- margin-left: 8px;
307
- padding: 0;
308
- background: none;
309
- border: none;
310
- cursor: pointer;
311
- color: ${({theme:e,$state:t})=>Dc(e,t)};
312
-
313
- ${({$disabled:e})=>e&&`
314
- opacity: 0.5;
315
- pointer-events: none;
316
- `}
317
- `,zc=I.svg`
318
- width: 16px;
319
- height: 16px;
320
- `,Wc=({onBlur:e,onFocus:t,type:r,value:o})=>{const[i,c]=_.useState(!1),l=r==="password";return{inputType:_.useMemo(()=>l&&i?"text":r,[l,i,r]),isPassword:l,isPasswordVisible:i,handleBlur:f=>{e==null||e(f)},handleFocus:f=>{t==null||t(f)},handlePasswordMouseDown:f=>{f.preventDefault(),o&&c(!0)},handlePasswordMouseUp:()=>{c(!1)}}},Qe=m.classNameGetter("input"),Vc=({className:e,classnames:t,fullWidth:r,icon:o,label:i,onChange:c,onBlur:l,onFocus:s,ref:d,state:a,type:u,value:h,...f})=>{const{inputType:b,isPassword:C,isPasswordVisible:g,handleBlur:y,handleFocus:p,handlePasswordMouseDown:v,handlePasswordMouseUp:k}=Wc({onBlur:l,onFocus:s,type:u,value:h}),S=g?wo.visible:wo.hidden,T=()=>o||null;return m.jsxs(Lc,{className:Qe("container",e,t==null?void 0:t.container),$fullWidth:r,children:[i&&m.jsx(Nc,{className:Qe("label",t==null?void 0:t.label),$state:a,children:i}),m.jsxs(Fc,{className:Qe("wrapper",t==null?void 0:t.wrapper),$state:a,$disabled:f.disabled,children:[o&&m.jsx(jc,{className:Qe("icon",t==null?void 0:t.icon),$disabled:f.disabled,$state:a,children:T()}),m.jsx(_c,{...f,ref:d,className:Qe("input",t==null?void 0:t.input),$state:a,type:b,value:h,onChange:c,onFocus:p,onBlur:y}),C&&m.jsx(Bc,{type:"button",className:Qe("toggle",t==null?void 0:t.toggle),$state:a,$disabled:f.disabled,onMouseDown:v,onMouseUp:k,onMouseLeave:k,tabIndex:-1,children:m.jsx(zc,{viewBox:"0 0 16 16",fill:"currentColor",children:S.map(M=>m.jsx("path",{d:M},M))})})]})]})};function Ze(e,t,r){let o=r.initialDeps??[],i,c=!0;function l(){var s,d,a;let u;r.key&&((s=r.debug)!=null&&s.call(r))&&(u=Date.now());const h=e();if(!(h.length!==o.length||h.some((C,g)=>o[g]!==C)))return i;o=h;let b;if(r.key&&((d=r.debug)!=null&&d.call(r))&&(b=Date.now()),i=t(...h),r.key&&((a=r.debug)!=null&&a.call(r))){const C=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-b)*100)/100,y=g/16,p=(v,k)=>{for(v=String(v);v.length<k;)v=" "+v;return v};console.info(`%c⏱ ${p(g,5)} /${p(C,5)} ms`,`
321
- font-size: .6rem;
322
- font-weight: bold;
323
- color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,r==null?void 0:r.key)}return r!=null&&r.onChange&&!(c&&r.skipInitialOnChange)&&r.onChange(i),c=!1,i}return l.updateDeps=s=>{o=s},l}function yo(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Hc=(e,t)=>Math.abs(e-t)<1.01,Uc=(e,t,r)=>{let o;return function(...i){e.clearTimeout(o),o=e.setTimeout(()=>t.apply(this,i),r)}},ko=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},Kc=e=>e,Gc=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let i=t;i<=r;i++)o.push(i);return o},qc=(e,t)=>{const r=e.scrollElement;if(!r)return;const o=e.targetWindow;if(!o)return;const i=l=>{const{width:s,height:d}=l;t({width:Math.round(s),height:Math.round(d)})};if(i(ko(r)),!o.ResizeObserver)return()=>{};const c=new o.ResizeObserver(l=>{const s=()=>{const d=l[0];if(d!=null&&d.borderBoxSize){const a=d.borderBoxSize[0];if(a){i({width:a.inlineSize,height:a.blockSize});return}}i(ko(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return c.observe(r,{box:"border-box"}),()=>{c.unobserve(r)}},So={passive:!0},Ro=typeof window>"u"?!0:"onscrollend"in window,Xc=(e,t)=>{const r=e.scrollElement;if(!r)return;const o=e.targetWindow;if(!o)return;let i=0;const c=e.options.useScrollendEvent&&Ro?()=>{}:Uc(o,()=>{t(i,!1)},e.options.isScrollingResetDelay),l=u=>()=>{const{horizontal:h,isRtl:f}=e.options;i=h?r.scrollLeft*(f&&-1||1):r.scrollTop,c(),t(i,u)},s=l(!0),d=l(!1);d(),r.addEventListener("scroll",s,So);const a=e.options.useScrollendEvent&&Ro;return a&&r.addEventListener("scrollend",d,So),()=>{r.removeEventListener("scroll",s),a&&r.removeEventListener("scrollend",d)}},Yc=(e,t,r)=>{if(t!=null&&t.borderBoxSize){const o=t.borderBoxSize[0];if(o)return Math.round(o[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},Qc=(e,{adjustments:t=0,behavior:r},o)=>{var i,c;const l=e+t;(c=(i=o.scrollElement)==null?void 0:i.scrollTo)==null||c.call(i,{[o.options.horizontal?"left":"top"]:l,behavior:r})};class Zc{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let r=null;const o=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(i=>{i.forEach(c=>{const l=()=>{this._measureElement(c.target,c)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var i;(i=o())==null||i.disconnect(),r=null},observe:i=>{var c;return(c=o())==null?void 0:c.observe(i,{box:"border-box"})},unobserve:i=>{var c;return(c=o())==null?void 0:c.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([o,i])=>{typeof i>"u"&&delete r[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Kc,rangeExtractor:Gc,onChange:()=>{},measureElement:Yc,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var o,i;(i=(o=this.options).onChange)==null||i.call(o,this,r)},this.maybeNotify=Ze(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,c)=>{this.scrollAdjustments=0,this.scrollDirection=c?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=c,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,o)=>{const i=new Map,c=new Map;for(let l=o-1;l>=0;l--){const s=r[l];if(i.has(s.lane))continue;const d=c.get(s.lane);if(d==null||s.end>d.end?c.set(s.lane,s):s.end<d.end&&i.set(s.lane,!0),i.size===this.options.lanes)break}return c.size===this.options.lanes?Array.from(c.values()).sort((l,s)=>l.end===s.end?l.index-s.index:l.end-s.end)[0]:void 0},this.getMeasurementOptions=Ze(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,o,i,c,l,s)=>(this.prevLanes!==void 0&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:o,scrollMargin:i,getItemKey:c,enabled:l,lanes:s}),{key:!1,skipInitialOnChange:!0,onChange:()=>{this.notify(this.isScrolling)}}),this.getMeasurements=Ze(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:o,scrollMargin:i,getItemKey:c,enabled:l,lanes:s},d)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const f of this.laneAssignments.keys())f>=r&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const a=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const u=this.measurementsCache.slice(0,a),h=new Array(s).fill(void 0);for(let f=0;f<a;f++){const b=u[f];b&&(h[b.lane]=f)}for(let f=a;f<r;f++){const b=c(f),C=this.laneAssignments.get(f);let g,y;if(C!==void 0&&this.options.lanes>1){g=C;const S=h[g],T=S!==void 0?u[S]:void 0;y=T?T.end+this.options.gap:o+i}else{const S=this.options.lanes===1?u[f-1]:this.getFurthestMeasurement(u,f);y=S?S.end+this.options.gap:o+i,g=S?S.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,g)}const p=d.get(b),v=typeof p=="number"?p:this.options.estimateSize(f),k=y+v;u[f]={index:f,start:y,size:v,end:k,key:b,lane:g},h[g]=f}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Ze(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,o,i,c)=>this.range=r.length>0&&o>0?Jc({measurements:r,outerSize:o,scrollOffset:i,lanes:c}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Ze(()=>{let r=null,o=null;const i=this.calculateRange();return i&&(r=i.startIndex,o=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,o]},(r,o,i,c,l)=>c===null||l===null?[]:r({startIndex:c,endIndex:l,overscan:o,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const o=this.options.indexAttribute,i=r.getAttribute(o);return i?parseInt(i,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(r,o)=>{const i=this.indexFromElement(r),c=this.measurementsCache[i];if(!c)return;const l=c.key,s=this.elementsCache.get(l);s!==r&&(s&&this.observer.unobserve(s),this.observer.observe(r),this.elementsCache.set(l,r)),r.isConnected&&this.resizeItem(i,this.options.measureElement(r,o,this))},this.resizeItem=(r,o)=>{const i=this.measurementsCache[r];if(!i)return;const c=this.itemSizeCache.get(i.key)??i.size,l=o-c;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,l,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",l),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,o)),this.notify(!1))},this.measureElement=r=>{if(!r){this.elementsCache.forEach((o,i)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(i))});return}this._measureElement(r,void 0)},this.getVirtualItems=Ze(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,o)=>{const i=[];for(let c=0,l=r.length;c<l;c++){const s=r[c],d=o[s];i.push(d)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const o=this.getMeasurements();if(o.length!==0)return yo(o[Cn(0,o.length-1,i=>yo(o[i]).start,r)])},this.getOffsetForAlignment=(r,o,i=0)=>{const c=this.getSize(),l=this.getScrollOffset();o==="auto"&&(o=r>=l+c?"end":"start"),o==="center"?r+=(i-c)/2:o==="end"&&(r-=c);const s=this.getTotalSize()+this.options.scrollMargin-c;return Math.max(Math.min(s,r),0)},this.getOffsetForIndex=(r,o="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const i=this.measurementsCache[r];if(!i)return;const c=this.getSize(),l=this.getScrollOffset();if(o==="auto")if(i.end>=l+c-this.options.scrollPaddingEnd)o="end";else if(i.start<=l+this.options.scrollPaddingStart)o="start";else return[l,o];const s=o==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,o,i.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(r,{align:o="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,o),{adjustments:void 0,behavior:i})},this.scrollToIndex=(r,{align:o="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),r=Math.max(0,Math.min(r,this.options.count-1));let c=0;const l=10,s=a=>{if(!this.targetWindow)return;const u=this.getOffsetForIndex(r,a);if(!u){console.warn("Failed to get offset for index:",r);return}const[h,f]=u;this._scrollToOffset(h,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const b=this.getScrollOffset(),C=this.getOffsetForIndex(r,f);if(!C){console.warn("Failed to get offset for index:",r);return}Hc(C[0],b)||d(f)})},d=a=>{this.targetWindow&&(c++,c<l?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",c,l),this.targetWindow.requestAnimationFrame(()=>s(a))):console.warn(`Failed to scroll to index ${r} after ${l} attempts.`))};s(o)},this.scrollBy=(r,{behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var r;const o=this.getMeasurements();let i;if(o.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((r=o[o.length-1])==null?void 0:r.end)??0;else{const c=Array(this.options.lanes).fill(null);let l=o.length-1;for(;l>=0&&c.some(s=>s===null);){const s=o[l];c[s.lane]===null&&(c[s.lane]=s.end),l--}i=Math.max(...c.filter(s=>s!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:o,behavior:i})=>{this.options.scrollToFn(r,{behavior:i,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const Cn=(e,t,r,o)=>{for(;e<=t;){const i=(e+t)/2|0,c=r(i);if(c<o)e=i+1;else if(c>o)t=i-1;else return i}return e>0?e-1:0};function Jc({measurements:e,outerSize:t,scrollOffset:r,lanes:o}){const i=e.length-1,c=d=>e[d].start;if(e.length<=o)return{startIndex:0,endIndex:i};let l=Cn(0,i,c,r),s=l;if(o===1)for(;s<i&&e[s].end<r+t;)s++;else if(o>1){const d=Array(o).fill(0);for(;s<i&&d.some(u=>u<r+t);){const u=e[s];d[u.lane]=u.end,s++}const a=Array(o).fill(r+t);for(;l>=0&&a.some(u=>u>=r);){const u=e[l];a[u.lane]=u.start,l--}l=Math.max(0,l-l%o),s=Math.min(i,s+(o-1-s%o))}return{startIndex:l,endIndex:s}}const Eo=typeof document<"u"?w.useLayoutEffect:w.useEffect;function es(e){const t=w.useReducer(()=>({}),{})[1],r={...e,onChange:(i,c)=>{var l;c?ft.flushSync(t):t(),(l=e.onChange)==null||l.call(e,i,c)}},[o]=w.useState(()=>new Zc(r));return o.setOptions(r),Eo(()=>o._didMount(),[]),Eo(()=>o._willUpdate()),o}function vn(e){return es({observeElementRect:qc,observeElementOffset:Xc,scrollToFn:Qc,...e})}const ts="Select...",rs="Search...",os="No options",wn="bottom",ns=256,is=32,ls=4,cs=(e,t,r)=>r?e.multiSelect.trigger.disabled.backgroundColor:t==="warning"?e.multiSelect.state.warning.trigger.backgroundColor:t==="error"?e.multiSelect.state.error.trigger.backgroundColor:e.multiSelect.trigger.backgroundColor,ss=(e,t,r)=>r?e.multiSelect.trigger.disabled.borderColor:t==="warning"?e.multiSelect.state.warning.trigger.borderColor:t==="error"?e.multiSelect.state.error.trigger.borderColor:e.multiSelect.trigger.borderColor,as=(e,t)=>t==="warning"?e.multiSelect.state.warning.trigger.focus.outlineColor:t==="error"?e.multiSelect.state.error.trigger.focus.outlineColor:e.multiSelect.trigger.focus.outlineColor,us=(e,t)=>t==="warning"?e.multiSelect.state.warning.label.color:t==="error"?e.multiSelect.state.error.label.color:e.multiSelect.label.color,ds=(e,t)=>t?e.multiSelect.placeholder.disabled.color:e.multiSelect.placeholder.color,fs=(e,t,r)=>r?e.multiSelect.chip.disabled.backgroundColor:t==="warning"?e.multiSelect.state.warning.chip.backgroundColor:t==="error"?e.multiSelect.state.error.chip.backgroundColor:e.multiSelect.chip.backgroundColor,gs=(e,t,r)=>r?e.multiSelect.chip.disabled.color:t==="warning"?e.multiSelect.state.warning.chip.color:t==="error"?e.multiSelect.state.error.chip.color:e.multiSelect.chip.color,hs=(e,t,r)=>r?e.multiSelect.chip.disabled.remove.color:t==="warning"?e.multiSelect.state.warning.chip.remove.color:t==="error"?e.multiSelect.state.error.chip.remove.color:e.multiSelect.chip.remove.color,ps=(e,t,r)=>r?e.multiSelect.icon.disabled.color:t==="warning"?e.multiSelect.state.warning.icon.color:t==="error"?e.multiSelect.state.error.icon.color:e.multiSelect.icon.color,bs=(e,t,r)=>r?e.multiSelect.chevron.disabled.color:t==="warning"?e.multiSelect.state.warning.chevron.color:t==="error"?e.multiSelect.state.error.chevron.color:e.multiSelect.chevron.color,xs=I.div`
334
+ `,Me=A.newClassNameGetter("checkbox-card"),yr=({checked:e,className:o,classnames:r,description:i,disabled:n,fullWidth:l=!1,label:c,onChange:d,ref:p,variant:h="normal",...u})=>a.jsxs(fr,{className:Me("container",o),$checked:e,$disabled:!!n,$fullWidth:l,$variant:h,"data-disabled":n,children:[a.jsx(xr,{...u,ref:p,type:"checkbox",checked:e,disabled:n,onChange:d}),a.jsx(Ke,{className:r==null?void 0:r.checkbox,checked:e,disabled:n,variant:h,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),a.jsxs(Or,{className:Me("content",r==null?void 0:r.content),children:[a.jsx($r,{className:Me("label",r==null?void 0:r.label),$variant:h,children:c}),i&&a.jsx(Sr,{className:Me("description",r==null?void 0:r.description),$variant:h,children:i})]})]}),Tt={label:{color:t.COLORS.black,disabledColor:t.alpha(t.COLORS.black,40)}},vr=s.div`
324
335
  display: flex;
325
336
  flex-direction: column;
326
- gap: 2px;
327
- position: relative;
328
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
329
- min-width: 120px;
330
- max-width: ${({$fullWidth:e})=>e?"none":"320px"};
331
- `,ms=I.label`
332
- font-size: 11px;
337
+ gap: 8px;
338
+ `,mr=s.span`
339
+ font-size: 13px;
333
340
  font-weight: 500;
334
341
  line-height: 1.5;
335
- color: ${({theme:e,$state:t})=>us(e,t)};
336
- margin-left: 2px;
337
- `,Cs=I.button`
342
+ color: ${e=>e.$disabled?Tt.label.disabledColor:Tt.label.color};
343
+ margin-bottom: 4px;
344
+ `,Cr=s.div`
338
345
  display: flex;
346
+ flex-direction: column;
347
+ gap: 12px;
348
+ `,Qe=A.newClassNameGetter("checkbox-group"),wr=({className:e,classnames:o,disabled:r,label:i,onChange:n,options:l,ref:c,value:d,...p})=>{const h=(u,f)=>{n(f?[...d,u]:d.filter(x=>x!==u))};return a.jsxs(vr,{...p,ref:c,className:Qe("container",e),children:[i&&a.jsx(mr,{className:Qe("label",o==null?void 0:o.label),$disabled:r,children:i}),a.jsx(Cr,{className:Qe("options",o==null?void 0:o.options),children:l.map(u=>a.jsx(Ke,{className:o==null?void 0:o.checkbox,checked:d.includes(u.value),label:u.label,disabled:r,onChange:f=>h(u.value,f.target.checked)},u.value))})]})},Nt={gray:{background:t.alpha(t.COLORS["iron-grey"],10),color:t.COLORS["iron-grey"],deleteHover:t.alpha(t.COLORS["iron-grey"],20)},red:{background:t.alpha(t.COLORS.red,10),color:t.COLORS.red,deleteHover:t.alpha(t.COLORS.red,20)},blue:{background:t.alpha(t.COLORS["steel-blue"],10),color:t.COLORS["steel-blue"],deleteHover:t.alpha(t.COLORS["steel-blue"],20)},black:{background:t.COLORS.black,color:t.COLORS.white,deleteHover:t.alpha(t.COLORS.white,20)}},ft=e=>Nt[e]??Nt.gray,Rr=s.span`
349
+ display: inline-flex;
339
350
  align-items: center;
340
- min-height: 32px;
341
- padding: 4px 12px 4px 8px;
342
- background-color: ${({theme:e,$state:t,$disabled:r})=>cs(e,t,r)};
343
- border-radius: 10px;
344
- border: 1px solid
345
- ${({theme:e,$state:t,$disabled:r})=>ss(e,t,r)};
346
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
347
- transition: border-color 0.15s ease;
348
- font-family: inherit;
349
- text-align: left;
350
- width: 100%;
351
351
  gap: 4px;
352
-
353
- &:focus-visible {
354
- outline: 2px solid ${({theme:e,$state:t})=>as(e,t)};
355
- outline-offset: 1px;
356
- }
357
- `,vs=I.span`
358
- display: flex;
359
- align-items: center;
360
- justify-content: center;
361
- flex-shrink: 0;
362
- color: ${({theme:e,$state:t,$disabled:r})=>ps(e,t,r)};
363
- `,ws=I.div`
364
- display: flex;
365
- flex-wrap: wrap;
366
- gap: 4px;
367
- flex: 1;
368
- min-width: 0;
369
- min-height: 24px;
370
- align-items: center;
371
- `,ys=I.span`
372
- display: inline-flex;
373
- align-items: center;
352
+ padding: 0 ${e=>e.$deletable?"7px":"10px"} 0 10px;
353
+ border-radius: 12px;
374
354
  height: 24px;
375
- padding: 0 4px 0 8px;
376
- border-radius: 6px;
377
- font-size: 13px;
378
- font-weight: 400;
379
- min-width: 0;
380
- max-width: 100%;
381
- background-color: ${({theme:e,$state:t,$disabled:r})=>fs(e,t,r)};
382
- color: ${({theme:e,$state:t,$disabled:r})=>gs(e,t,r)};
383
- `,ks=I.span`
384
- flex: 1;
385
- min-width: 0;
386
- overflow: hidden;
387
- text-overflow: ellipsis;
388
- white-space: nowrap;
389
- `,Ss=I.span`
390
- display: flex;
355
+ font-size: 12px;
356
+ font-weight: 500;
357
+ line-height: 1.5;
358
+ background-color: ${e=>ft(e.$variant).background};
359
+ color: ${e=>ft(e.$variant).color};
360
+ `,kr=s.button`
361
+ display: inline-flex;
391
362
  align-items: center;
392
363
  justify-content: center;
393
- width: 16px;
394
- height: 16px;
395
- margin-left: 4px;
364
+ padding: 0;
365
+ margin: 0;
366
+ margin-left: 2px;
367
+ border: none;
368
+ background: transparent;
369
+ color: inherit;
370
+ cursor: pointer;
396
371
  border-radius: 4px;
397
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
398
- color: ${({theme:e,$state:t,$disabled:r})=>hs(e,t,r)};
399
- transition: color 0.15s ease;
372
+ transition: background-color 0.15s ease;
400
373
 
401
374
  &:hover {
402
- color: ${({theme:e,$disabled:t})=>t?e.multiSelect.chip.disabled.remove.color:e.multiSelect.chip.remove.hover.color};
375
+ background-color: ${e=>ft(e.$variant).deleteHover};
403
376
  }
404
- `,Rs=I.span`
405
- font-size: 14px;
406
- font-weight: 400;
407
- line-height: 1.5;
408
- color: ${({theme:e,$disabled:t})=>ds(e,t)};
409
- `,Es=I.span`
410
- display: flex;
411
- align-items: center;
412
- justify-content: center;
413
- flex-shrink: 0;
414
- margin-left: auto;
415
- color: ${({theme:e,$state:t,$disabled:r})=>bs(e,t,r)};
416
- transition: transform 0.15s ease;
417
- transform: ${({$isOpen:e})=>e?"rotate(180deg)":"rotate(0deg)"};
418
- `,$s=I.div`
419
- z-index: 1000;
420
- max-height: ${({$maxHeight:e})=>e}px;
421
- overflow: hidden;
422
- border-radius: 12px;
423
- border: 1px solid ${({theme:e})=>e.multiSelect.content.borderColor};
424
- background-color: ${({theme:e})=>e.multiSelect.content.backgroundColor};
425
- box-shadow: ${({theme:e})=>e.multiSelect.content.shadow};
426
- visibility: ${({$isOpen:e})=>e?"visible":"hidden"};
427
- opacity: ${({$isOpen:e})=>e?1:0};
428
- pointer-events: ${({$isOpen:e})=>e?"auto":"none"};
429
- transition:
430
- opacity 0.15s ease,
431
- visibility 0.15s ease;
432
- `,Is=I.div`
433
- border-bottom: 1px solid ${({theme:e})=>e.multiSelect.search.borderColor};
434
- `,Ts=I.input`
435
- width: 100%;
436
- height: 32px;
437
- padding: 0 12px;
438
- font-size: 14px;
439
- font-weight: 500;
440
- line-height: 1.5;
441
- font-family: inherit;
442
- color: ${({theme:e})=>e.multiSelect.search.color};
443
- background-color: transparent;
444
- outline: none;
445
- border: 0;
446
377
 
447
- &::placeholder {
448
- color: ${({theme:e})=>e.multiSelect.search.placeholderColor};
378
+ & svg {
379
+ width: 14px;
380
+ height: 14px;
449
381
  }
450
- `,$o=I.div`
451
- padding: 4px;
452
- overflow-y: auto;
453
- max-height: inherit;
454
- `,Io=I.div`
455
- display: flex;
456
- align-items: center;
457
- height: 32px;
458
- padding: 0 12px;
459
- font-size: 14px;
460
- font-weight: 400;
461
- line-height: 1.5;
462
- border-radius: 8px;
463
- cursor: pointer;
464
- transition: background-color 0.1s ease;
465
- color: ${({theme:e})=>e.multiSelect.option.color};
466
- background-color: ${({theme:e,$isHighlighted:t})=>t?e.multiSelect.option.hover.backgroundColor:e.multiSelect.option.backgroundColor};
467
-
468
- &:hover {
469
- background-color: ${({theme:e})=>e.multiSelect.option.hover.backgroundColor};
382
+ `,Lr=s.span`
383
+ flex: 1 0 auto;
384
+ text-align: center;
385
+ `,et=A.newClassNameGetter("chip"),Xe=({children:e,className:o,classnames:r,deletable:i,onDelete:n,ref:l,variant:c="gray",...d})=>a.jsxs(Rr,{...d,ref:l,className:et("container",o),$variant:c,$deletable:!!i,children:[a.jsx(Lr,{className:et("label",r==null?void 0:r.label),children:e}),i&&a.jsx(kr,{type:"button",className:et("delete",r==null?void 0:r.delete),$variant:c,onClick:n,children:a.jsx(a.X,{})})]}),zr="Confirm",Pr="Cancel",jr=ie.keyframes`
386
+ from {
387
+ opacity: 0;
388
+ transform: translateX(-50%) translateY(100%);
389
+ }
390
+ to {
391
+ opacity: 1;
392
+ transform: translateX(-50%) translateY(0);
470
393
  }
471
- `,To=I.span`
394
+ `,Er=ie.keyframes`
395
+ from {
396
+ opacity: 1;
397
+ transform: translateX(-50%) translateY(0);
398
+ }
399
+ to {
400
+ opacity: 0;
401
+ transform: translateX(-50%) translateY(100%);
402
+ }
403
+ `,Tr=s.div`
404
+ position: fixed;
405
+ bottom: 24px;
406
+ left: 50%;
407
+ transform: translateX(-50%);
472
408
  display: flex;
473
409
  align-items: center;
474
- justify-content: center;
475
- width: 16px;
476
- height: 16px;
477
- margin-right: 8px;
478
- flex-shrink: 0;
479
- color: ${({theme:e})=>e.multiSelect.option.check.color};
480
- opacity: ${({$isSelected:e})=>e?1:.15};
481
- `,Oo=I.span`
482
- flex: 1;
483
- min-width: 0;
484
- overflow: hidden;
485
- text-overflow: ellipsis;
410
+ gap: 16px;
411
+ padding: 12px 16px;
412
+ background-color: ${t.COLORS.white};
413
+ border: 1px dashed ${t.COLORS.gray};
414
+ border-radius: 12px;
415
+ box-shadow:
416
+ 0 4px 6px -1px rgba(0, 0, 0, 0.1),
417
+ 0 2px 4px -2px rgba(0, 0, 0, 0.1);
418
+ animation: ${({$open:e})=>e?jr:Er} 0.2s ease-out forwards;
419
+ z-index: 1000;
420
+ `,Nr=s.p`
421
+ margin: 0;
422
+ font-size: 14px;
423
+ color: ${t.COLORS.black};
486
424
  white-space: nowrap;
487
- `,Os=I.div`
425
+ `,Ir=s.div`
488
426
  display: flex;
489
427
  align-items: center;
490
- justify-content: center;
491
- height: 64px;
492
- font-size: 14px;
493
- font-weight: 400;
494
- color: ${({theme:e})=>e.multiSelect.empty.color};
495
- `,Ms=e=>`${e}-start`,As=({options:e,value:t,onChange:r,placement:o=wn,searchable:i=!1,disabled:c=!1})=>{const[l,s]=_.useState(!1),[d,a]=_.useState(""),[u,h]=_.useState(null),f=_.useRef([]),b=_.useRef(null),C=_.useMemo(()=>e.filter(x=>t.includes(x.value)),[e,t]),g=_.useMemo(()=>{if(!i||!d)return e;const x=d.toLowerCase();return e.filter(E=>E.label.toLowerCase().includes(x))},[e,d,i]),y=_.useCallback(x=>{c||(s(x),x||(a(""),h(null)))},[c]),p=_.useMemo(()=>Ms(o),[o]),{refs:v,floatingStyles:k,context:S}=Ar({open:l,onOpenChange:y,placement:p,middleware:[Sr(ls),Er(),Rr({padding:8}),fn({apply({rects:x,elements:E}){Object.assign(E.floating.style,{width:`${x.reference.width}px`})}})],whileElementsMounted:kr}),T=Or(S,{enabled:!c}),M=Mr(S),N=mn(S,{role:"listbox"}),B=xn(S,{listRef:f,activeIndex:u,onNavigate:h,virtual:!0,loop:!0}),X=_.useCallback(x=>t.includes(x),[t]),O=_.useCallback(x=>{const E=t.includes(x.value);r(E?t.filter(A=>A!==x.value):[...t,x.value])},[t,r]),F=_.useCallback((x,E)=>{E.stopPropagation(),r(t.filter(A=>A!==x))},[t,r]),{getReferenceProps:G,getFloatingProps:V,getItemProps:R}=Pr([T,M,N,B]),$=_.useCallback(()=>{const x=G(),E=x.onKeyDown;return{...x,onKeyDown:A=>{if(E==null||E(A),A.key==="Enter"&&l&&u!==null){A.preventDefault();const ee=g[u];ee&&O(ee)}A.key==="Backspace"&&!i&&t.length>0&&(A.preventDefault(),r(t.slice(0,-1)))}}},[G,l,u,g,O,i,t,r]),j=_.useCallback(x=>{a(x.target.value),h(0)},[]),L=_.useCallback(x=>{if(x.key==="Enter"&&u!==null){x.preventDefault();const E=g[u];E&&O(E)}x.key==="Backspace"&&d===""&&t.length>0&&(x.preventDefault(),r(t.slice(0,-1)))},[u,g,O,d,t,r]);return{isOpen:l,setIsOpen:y,selectedOptions:C,filteredOptions:g,searchQuery:d,setSearchQuery:a,highlightedIndex:u,context:S,refs:{setReference:v.setReference,setFloating:v.setFloating},floatingStyles:k,getReferenceProps:$,getFloatingProps:V,getItemProps:x=>R({onClick:()=>{const E=g[x];E&&O(E)},onKeyDown:E=>{if(E.key==="Enter"||E.key===" "){E.preventDefault();const A=g[x];A&&O(A)}}}),listRef:f,handleToggle:O,handleRemove:F,handleSearchChange:j,handleSearchKeyDown:L,searchInputRef:b,isSelected:X}},ve=m.classNameGetter("multiselect"),Ps=({options:e,value:t,onChange:r,placeholder:o=ts,searchPlaceholder:i=rs,emptyMessage:c=os,label:l,icon:s,state:d,disabled:a,fullWidth:u,placement:h=wn,maxHeight:f=ns,virtualized:b,searchable:C,portalRenderNode:g,className:y,classnames:p,...v})=>{const k=_.useRef(null),{isOpen:S,selectedOptions:T,filteredOptions:M,searchQuery:N,context:B,refs:X,floatingStyles:O,getReferenceProps:F,getFloatingProps:G,getItemProps:V,listRef:R,handleSearchChange:$,handleSearchKeyDown:j,handleRemove:L,searchInputRef:x,highlightedIndex:E,isSelected:A}=As({options:e,value:t,onChange:r,placement:h,searchable:C,disabled:a}),ue=f-(C?56:0)-8,z=vn({count:M.length,getScrollElement:()=>k.current,estimateSize:()=>is,overscan:5,enabled:b}),Y=()=>M.length===0?m.jsx(Os,{className:ve("empty",p==null?void 0:p.empty),children:c}):b?m.jsx($o,{ref:k,className:ve("list",p==null?void 0:p.list),style:{maxHeight:ue,overflow:"auto"},children:m.jsx("div",{style:{height:z.getTotalSize(),width:"100%",position:"relative"},children:z.getVirtualItems().map(q=>{const ne=M[q.index];if(!ne)return null;const Ee=A(ne.value);return m.jsxs(Io,{ref:Ce=>{R.current[q.index]=Ce},className:ve("option",p==null?void 0:p.option),$isHighlighted:E===q.index,style:{position:"absolute",top:0,left:0,width:"100%",height:q.size,transform:`translateY(${q.start}px)`},...V(q.index),children:[m.jsx(To,{$isSelected:Ee,children:m.jsx(m.Check,{size:16})}),m.jsx(Oo,{children:ne.label})]},ne.value)})})}):m.jsx($o,{ref:k,className:ve("list",p==null?void 0:p.list),style:{maxHeight:ue},children:M.map((q,ne)=>{const Ee=A(q.value);return m.jsxs(Io,{ref:Ce=>{R.current[ne]=Ce},className:ve("option",p==null?void 0:p.option),$isHighlighted:E===ne,...V(ne),children:[m.jsx(To,{$isSelected:Ee,children:m.jsx(m.Check,{size:16})}),m.jsx(Oo,{children:q.label})]},q.value)})}),H=()=>{if(!S)return null;const q=m.jsx(bn,{context:B,initialFocus:C?x:void 0,modal:!1,children:m.jsxs($s,{ref:X.setFloating,className:ve("content",p==null?void 0:p.content),style:O,$isOpen:S,$maxHeight:f,...G(),children:[C&&m.jsx(Is,{className:ve("search",p==null?void 0:p.search),children:m.jsx(Ts,{ref:x,type:"text",placeholder:i,value:N,onChange:$,onKeyDown:j,onClick:ne=>ne.stopPropagation()})}),Y()]})});return g?ft.createPortal(q,g):q},te=()=>T.length===0?m.jsx(Rs,{$disabled:a,children:o}):T.map(q=>m.jsxs(ys,{className:ve("chip",p==null?void 0:p.chip),$state:d,$disabled:a,children:[m.jsx(ks,{children:q.label}),m.jsx(Ss,{role:"button",tabIndex:a?-1:0,className:ve("chip-remove",p==null?void 0:p.chipRemove),$state:d,$disabled:a,onClick:ne=>!a&&L(q.value,ne),onKeyDown:ne=>{!a&&(ne.key==="Enter"||ne.key===" ")&&(ne.preventDefault(),L(q.value,ne))},"aria-label":`Remove ${q.label}`,children:m.jsx(m.X,{size:12})})]},q.value));return m.jsxs(xs,{...v,className:ve("container",y,p==null?void 0:p.container),$fullWidth:u,children:[l&&m.jsx(ms,{className:ve("label",p==null?void 0:p.label),$state:d,children:l}),m.jsxs(Cs,{ref:X.setReference,type:"button",className:ve("trigger",p==null?void 0:p.trigger),$state:d,$disabled:a,$isOpen:S,$hasValue:T.length>0,disabled:a,"aria-haspopup":"listbox","aria-expanded":S,...F(),children:[s&&m.jsx(vs,{$state:d,$disabled:a,children:s}),m.jsx(ws,{className:ve("chips",p==null?void 0:p.chips),children:te()}),m.jsx(Es,{$state:d,$disabled:a,$isOpen:S,children:m.jsx(m.ChevronDown,{size:16})})]}),H()]})},Ds=(e,t,r)=>t?r==="warning"?e.radio.state.warning.circle.checked.borderColor:r==="error"?e.radio.state.error.circle.checked.borderColor:e.radio.circle.checked.borderColor:r==="warning"?e.radio.state.warning.circle.borderColor:r==="error"?e.radio.state.error.circle.borderColor:e.radio.circle.borderColor,Ls=(e,t)=>t==="warning"?e.radio.state.warning.circle.focus.shadowColor:t==="error"?e.radio.state.error.circle.focus.shadowColor:e.radio.circle.focus.shadowColor,Ns=(e,t)=>t==="warning"?e.radio.state.warning.dot.color:t==="error"?e.radio.state.error.dot.color:e.radio.dot.color,Fs=(e,t)=>t==="warning"?e.radio.state.warning.label.color:t==="error"?e.radio.state.error.label.color:e.radio.label.color,_s=I.label`
496
- display: inline-flex;
497
- align-items: center;
498
428
  gap: 8px;
499
- cursor: pointer;
429
+ `,Re=A.newClassNameGetter("confirmation"),Ar=({cancelBindings:e,cancelLabel:o=Pr,className:r,classnames:i,confirmLabel:n=zr,loading:l=!1,message:c,onCancel:d,onConfirm:p,open:h=!0,ref:u,submitBindings:f,...x})=>h?a.jsxs(Tr,{...x,ref:u,className:Re("container",r),$open:h,children:[a.jsx(Nr,{className:Re("message",i==null?void 0:i.message),children:c}),a.jsxs(Ir,{className:Re("actions",i==null?void 0:i.actions),children:[a.jsx(Te,{variant:"system",size:"compact",onClick:d,keyBindings:e,className:Re("cancel-button",i==null?void 0:i.cancelButton),children:o}),a.jsx(Te,{variant:"danger",size:"compact",onClick:p,loading:l,keyBindings:f,className:Re("confirm-button",i==null?void 0:i.confirmButton),children:n})]})]}):null,ke={sm:`${t.BREAKPOINTS.sm}px`,md:`${t.BREAKPOINTS.md}px`,lg:`${t.BREAKPOINTS.lg}px`,xl:`${t.BREAKPOINTS.xl}px`,"2xl":`${t.BREAKPOINTS["2xl"]}px`},Dr=s.div`
430
+ width: 100%;
500
431
 
501
- &:has(input:focus-visible) > span:first-of-type {
502
- box-shadow: 0 0 0 3px ${({theme:e,$state:t})=>Ls(e,t)};
432
+ ${t.mediaUp("sm")} {
433
+ max-width: ${ke.sm};
503
434
  }
504
435
 
505
- ${({$disabled:e})=>e&&`
506
- opacity: 0.5;
507
- cursor: not-allowed;
508
- `}
509
- `,js=I.input`
510
- position: absolute;
511
- opacity: 0;
512
- width: 0;
513
- height: 0;
514
- pointer-events: none;
515
- `,Bs=I.span`
516
- display: inline-flex;
517
- align-items: center;
518
- justify-content: center;
519
- width: 18px;
520
- height: 18px;
521
- border-radius: 50%;
522
- border: 1.5px solid
523
- ${({theme:e,$checked:t,$state:r})=>Ds(e,t,r)};
524
- background-color: transparent;
525
- transition:
526
- border-color 0.15s ease,
527
- box-shadow 0.15s ease;
528
- `,zs=I.span`
529
- width: 10px;
530
- height: 10px;
531
- border-radius: 50%;
532
- background-color: ${({theme:e,$state:t})=>Ns(e,t)};
533
- opacity: ${({$visible:e})=>e?1:0};
534
- transform: ${({$visible:e})=>e?"scale(1)":"scale(0)"};
535
- transition:
536
- opacity 0.15s ease,
537
- transform 0.15s ease;
538
- `,Ws=I.span`
539
- font-size: 14px;
540
- line-height: 1.5;
541
- color: ${({theme:e,$state:t})=>Fs(e,t)};
542
- user-select: none;
436
+ ${t.mediaUp("md")} {
437
+ max-width: ${ke.md};
438
+ }
439
+
440
+ ${t.mediaUp("lg")} {
441
+ max-width: ${ke.lg};
442
+ }
443
+
444
+ ${t.mediaUp("xl")} {
445
+ max-width: ${ke.xl};
446
+ }
447
+
448
+ ${t.mediaUp("2xl")} {
449
+ max-width: ${ke["2xl"]};
450
+ }
451
+ `,Mr=A.newClassNameGetter("container"),_r=({children:e,className:o,ref:r,...i})=>a.jsx(Dr,{...i,ref:r,className:Mr("container",o),children:e}),Ue={compact:{height:"32px",padding:"0 10px",radius:"14px",iconSize:16},default:{height:"40px",padding:"0 14px",radius:"16px",iconSize:20}},xe={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:{static:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:{static:t.alpha(t.COLORS.red,40),disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},ne=36,Ze=2,Fr=12,po=(e,o,r="en")=>{const i=e.getFullYear(),n=e.getMonth(),l=e.getDate(),c=e.getHours(),d=e.getMinutes(),p=e.getSeconds(),h=c%12||12,u=c>=12,f=new Intl.DateTimeFormat(r,{month:"long"}).format(e),x=new Intl.DateTimeFormat(r,{month:"short"}).format(e),k=new Intl.DateTimeFormat(r,{weekday:"long"}).format(e),S=new Intl.DateTimeFormat(r,{weekday:"short"}).format(e),$=z=>z.toString().padStart(2,"0"),y=z=>z.toString().padStart(2," "),O=z=>`\0${z}\0`,L=[["2006","YEARFOUR",i.toString()],["January","MONTHLONG",f],["Monday","WEEKDAYLONG",k],["Jan","MONTHSHORT",x],["Mon","WEEKDAYSHORT",S],["06","YEARTWO",i.toString().slice(-2)],["01","MONTHPAD",$(n+1)],["_2","DAYSPACE",y(l)],["02","DAYPAD",$(l)],["15","HOURTWENTYFOUR",$(c)],["03","HOURTWELVEPAD",$(h)],["04","MINUTE",$(d)],["05","SECOND",$(p)],["PM","AMPMUP",u?"PM":"AM"],["pm","AMPMLOW",u?"pm":"am"],["1","MONTH",(n+1).toString()],["2","DAY",l.toString()],["3","HOURTWELVE",h.toString()]];let b=o;for(const[z,j]of L)b=b.split(z).join(O(j));for(const[,z,j]of L)b=b.split(O(z)).join(j);return b},Br=(e,o)=>new Date(e,o+1,0).getDate(),Yr=(e,o)=>new Date(e,o,1).getDay(),Hr=(e,o,r=1)=>{const i=Br(e,o);let l=Yr(e,o)-r;l<0&&(l+=7);const c=[];for(let d=0;d<l;d++)c.push(null);for(let d=1;d<=i;d++)c.push(d);for(;c.length<42;)c.push(null);return c},Gr=(e,o=1)=>{const r=[];for(let i=0;i<7;i++){const n=(o+i)%7,l=new Date(2024,0,7+n);r.push(new Intl.DateTimeFormat(e,{weekday:"short"}).format(l))}return r},Wr=e=>{const o=[];for(let r=0;r<12;r++){const i=new Date(2024,r,1);o.push(new Intl.DateTimeFormat(e,{month:"short"}).format(i))}return o},It=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth()&&e.getDate()===o.getDate(),At=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth(),Vr=(e,o)=>e.getFullYear()===o.getFullYear(),Dt=(e,o,r,i,n)=>{const l=new Date(e,o,r);if(i){const c=new Date(i.getFullYear(),i.getMonth(),i.getDate());if(l<c)return!0}if(n){const c=new Date(n.getFullYear(),n.getMonth(),n.getDate());if(l>c)return!0}return!1},Mt=(e,o,r,i)=>{if(r){const n=r.getFullYear(),l=r.getMonth();if(e<n||e===n&&o<l)return!0}if(i){const n=i.getFullYear(),l=i.getMonth();if(e>n||e===n&&o>l)return!0}return!1},_t=(e,o,r)=>!!(o&&e<o.getFullYear()||r&&e>r.getFullYear()),Ur=(e,o=12)=>{const r=e-Math.floor(o/2),i=[];for(let n=0;n<o;n++)i.push(r+n);return i},Xr=e=>{switch(e){case"date":return"02.01.2006";case"month":return"January 2006";case"year":return"2006"}},qr=s.span`
452
+ font-size: 12px;
543
453
  font-weight: 500;
544
- `,st=m.classNameGetter("radio"),Dr=({checked:e,className:t,classnames:r,disabled:o,label:i,onChange:c,ref:l,state:s,...d})=>m.jsxs(_s,{className:st("container",t,r==null?void 0:r.container),$disabled:o,$state:s,children:[m.jsx(js,{...d,ref:l,type:"radio",className:st("input",r==null?void 0:r.input),checked:e,disabled:o,onChange:c}),m.jsx(Bs,{className:st("circle",r==null?void 0:r.circle),$checked:e,$state:s,children:m.jsx(zs,{className:st("dot",r==null?void 0:r.dot),$visible:e,$state:s})}),i&&m.jsx(Ws,{className:st("label",r==null?void 0:r.label),$state:s,children:i})]}),Vs="Select...",Hs="Search...",Us="No options",yn="bottom",Ks=256,Gs=32,qs=4,Xs=(e,t,r)=>r?e.select.trigger.disabled.backgroundColor:t==="warning"?e.select.state.warning.trigger.backgroundColor:t==="error"?e.select.state.error.trigger.backgroundColor:e.select.trigger.backgroundColor,Ys=(e,t,r)=>r?e.select.trigger.disabled.borderColor:t==="warning"?e.select.state.warning.trigger.borderColor:t==="error"?e.select.state.error.trigger.borderColor:e.select.trigger.borderColor,Qs=(e,t)=>t==="warning"?e.select.state.warning.trigger.focus.outlineColor:t==="error"?e.select.state.error.trigger.focus.outlineColor:e.select.trigger.focus.outlineColor,Zs=(e,t)=>t==="warning"?e.select.state.warning.label.color:t==="error"?e.select.state.error.label.color:e.select.label.color,Js=(e,t,r,o)=>r?e.select.value.disabled.color:o?t==="warning"?e.select.state.warning.value.placeholderColor:t==="error"?e.select.state.error.value.placeholderColor:e.select.value.placeholderColor:t==="warning"?e.select.state.warning.value.color:t==="error"?e.select.state.error.value.color:e.select.value.color,ea=(e,t,r)=>r?e.select.icon.disabled.color:t==="warning"?e.select.state.warning.icon.color:t==="error"?e.select.state.error.icon.color:e.select.icon.color,ta=(e,t,r)=>r?e.select.chevron.disabled.color:t==="warning"?e.select.state.warning.chevron.color:t==="error"?e.select.state.error.chevron.color:e.select.chevron.color,ra=I.div`
545
- display: flex;
454
+ color: ${e=>e.$variant==="normal"?t.COLORS.black:t.COLORS.red};
455
+ `,Kr=A.newClassNameGetter("field-label"),Se=({children:e,className:o,ref:r,required:i,variant:n="normal",...l})=>e?a.jsxs(qr,{...l,ref:r,className:Kr("container",o),$variant:n,children:[e," ",i&&"*"]}):null,Zr=s.div`
456
+ position: relative;
457
+ display: inline-flex;
546
458
  flex-direction: column;
547
459
  gap: 2px;
548
- position: relative;
549
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
550
- min-width: 120px;
551
- max-width: ${({$fullWidth:e})=>e?"none":"320px"};
552
- `,oa=I.label`
553
- font-size: 11px;
554
- font-weight: 500;
555
- line-height: 1.5;
556
- color: ${({theme:e,$state:t})=>Zs(e,t)};
557
- margin-left: 2px;
558
- `,na=I.button`
460
+ min-width: 180px;
461
+ width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
462
+ `,Jr=s(Se)`
463
+ margin-left: 6px;
464
+ `,Qr=s.button`
559
465
  display: flex;
560
466
  align-items: center;
561
- height: 32px;
562
- padding: 0 12px;
563
- background-color: ${({theme:e,$state:t,$disabled:r})=>Xs(e,t,r)};
564
- border-radius: 10px;
565
- border: 1px solid
566
- ${({theme:e,$state:t,$disabled:r})=>Ys(e,t,r)};
467
+ justify-content: space-between;
468
+ gap: 8px;
469
+ width: 100%;
567
470
  cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
568
- transition: border-color 0.15s ease;
569
- font-family: inherit;
471
+ outline: none;
472
+ font-size: 14px;
473
+ font-weight: 500;
570
474
  text-align: left;
571
- width: 100%;
475
+ height: ${({$size:e})=>Ue[e].height};
476
+ padding: ${({$size:e})=>Ue[e].padding};
477
+ border-radius: ${({$size:e})=>Ue[e].radius};
478
+ color: ${({$variant:e,$disabled:o,$hasValue:r})=>r?xe[e].color[o?"disabled":"static"]:xe[e].placeholder[o?"disabled":"static"]};
479
+ border: 1px solid
480
+ ${({$variant:e,$disabled:o})=>xe[e].border[o?"disabled":"static"]};
481
+ background-color: ${({$variant:e,$disabled:o})=>xe[e].background[o?"disabled":"static"]};
572
482
 
573
483
  &:focus-visible {
574
- outline: 2px solid ${({theme:e,$state:t})=>Qs(e,t)};
575
- outline-offset: 1px;
484
+ outline: 2px solid ${({$variant:e})=>xe[e].focus};
576
485
  }
577
- `,ia=I.span`
578
- display: flex;
579
- align-items: center;
580
- justify-content: center;
581
- margin-right: 8px;
582
- color: ${({theme:e,$state:t,$disabled:r})=>ea(e,t,r)};
583
- `,la=I.span`
486
+
487
+ ${({$open:e,$variant:o})=>e&&`
488
+ outline: 2px solid ${xe[o].focus};
489
+ `}
490
+ `,ei=s.span`
584
491
  flex: 1;
585
- min-width: 0;
586
- font-size: 14px;
587
- font-weight: 400;
588
- line-height: 1.5;
589
492
  overflow: hidden;
590
- white-space: nowrap;
591
493
  text-overflow: ellipsis;
592
- color: ${({theme:e,$state:t,$disabled:r,$isPlaceholder:o})=>Js(e,t,r,o)};
593
- `,ca=I.span`
494
+ white-space: nowrap;
495
+ `,ti=s.span`
594
496
  display: flex;
595
497
  align-items: center;
596
498
  justify-content: center;
597
- margin-left: 8px;
598
- color: ${({theme:e,$state:t,$disabled:r})=>ta(e,t,r)};
499
+ flex-shrink: 0;
599
500
  transition: transform 0.15s ease;
600
- transform: ${({$isOpen:e})=>e?"rotate(180deg)":"rotate(0deg)"};
601
- `,sa=I.div`
602
- z-index: 1000;
603
- max-height: ${({$maxHeight:e})=>e}px;
604
- overflow: hidden;
501
+ transform: ${({$open:e})=>e?"rotate(180deg)":"rotate(0deg)"};
502
+ `,uo=`
503
+ z-index: 100;
504
+ background-color: ${t.COLORS.white};
505
+ border: 1px solid ${t.alpha(t.COLORS.black,15)};
605
506
  border-radius: 12px;
606
- border: 1px solid ${({theme:e})=>e.select.content.borderColor};
607
- background-color: ${({theme:e})=>e.select.content.backgroundColor};
608
- box-shadow: ${({theme:e})=>e.select.content.shadow};
609
- visibility: ${({$isOpen:e})=>e?"visible":"hidden"};
610
- opacity: ${({$isOpen:e})=>e?1:0};
611
- pointer-events: ${({$isOpen:e})=>e?"auto":"none"};
507
+ box-shadow: 0 4px 16px ${t.alpha(t.COLORS.black,12)};
508
+ padding: ${Fr}px;
509
+ `,ho=(e,o)=>e?"translateY(0)":o==="bottom"?"translateY(-8px)":"translateY(8px)",oi=s.div`
510
+ position: absolute;
511
+ ${({$position:e})=>e==="bottom"?"top: calc(100% + 4px);":"bottom: calc(100% + 4px);"}
512
+ left: 0;
513
+ ${uo}
514
+ opacity: ${({$open:e})=>e?1:0};
515
+ visibility: ${({$open:e})=>e?"visible":"hidden"};
516
+ transform: ${({$open:e,$position:o})=>ho(e,o)};
612
517
  transition:
613
518
  opacity 0.15s ease,
614
- visibility 0.15s ease;
615
- `,aa=I.div`
616
- border-bottom: 1px solid ${({theme:e})=>e.select.search.borderColor};
617
- `,ua=I.input`
618
- width: 100%;
619
- height: 32px;
620
- padding: 0 12px;
621
- font-size: 14px;
622
- font-weight: 400;
623
- line-height: 1.5;
624
- font-family: inherit;
625
- color: ${({theme:e})=>e.select.search.color};
626
- background-color: transparent;
627
- border: 0;
628
- outline: none;
629
-
630
- &::placeholder {
631
- color: ${({theme:e})=>e.select.search.placeholderColor};
632
- }
633
- `,Mo=I.div`
634
- padding: 4px;
635
- overflow-y: auto;
636
- max-height: inherit;
637
- `,Ao=I.div`
519
+ transform 0.15s ease,
520
+ visibility 0.15s;
521
+ `,ri=s.div`
522
+ position: fixed;
523
+ ${uo}
524
+ opacity: ${({$open:e})=>e?1:0};
525
+ visibility: ${({$open:e})=>e?"visible":"hidden"};
526
+ transform: ${({$open:e,$position:o})=>ho(e,o)};
527
+ transition:
528
+ opacity 0.15s ease,
529
+ transform 0.15s ease,
530
+ visibility 0.15s;
531
+ `,tt=s.div`
638
532
  display: flex;
639
533
  align-items: center;
640
534
  justify-content: space-between;
641
- height: 32px;
642
- padding: 0 12px;
535
+ margin-bottom: 8px;
536
+ `,ot=s.button`
537
+ display: flex;
538
+ align-items: center;
539
+ gap: 4px;
540
+ padding: 4px 8px;
541
+ border: none;
542
+ background: transparent;
543
+ border-radius: 6px;
643
544
  font-size: 14px;
644
- font-weight: 400;
645
- line-height: 1.5;
646
- border-radius: 8px;
545
+ font-weight: 600;
546
+ color: ${t.COLORS.black};
647
547
  cursor: pointer;
648
- transition: background-color 0.1s ease;
649
- color: ${({theme:e})=>e.select.option.color};
650
- background-color: ${({theme:e,$isHighlighted:t})=>t?e.select.option.hover.backgroundColor:e.select.option.backgroundColor};
651
548
 
652
549
  &:hover {
653
- background-color: ${({theme:e})=>e.select.option.hover.backgroundColor};
550
+ background-color: ${t.alpha(t.COLORS.black,5)};
654
551
  }
655
- `,Po=I.span`
656
- flex: 1;
657
- min-width: 0;
658
- overflow: hidden;
659
- text-overflow: ellipsis;
660
- white-space: nowrap;
661
- `,Do=I.span`
552
+
553
+ &:focus-visible {
554
+ outline: 2px solid ${t.alpha(t.COLORS.black,20)};
555
+ }
556
+ `,Oe=s.button`
662
557
  display: flex;
663
558
  align-items: center;
664
559
  justify-content: center;
665
- margin-left: 8px;
666
- flex-shrink: 0;
667
- color: ${({theme:e})=>e.select.option.check.color};
668
- opacity: ${({$isSelected:e})=>e?1:.15};
669
- `,da=I.div`
560
+ width: 28px;
561
+ height: 28px;
562
+ border: none;
563
+ background: transparent;
564
+ border-radius: 6px;
565
+ color: ${t.COLORS.black};
566
+ cursor: pointer;
567
+
568
+ &:hover {
569
+ background-color: ${t.alpha(t.COLORS.black,5)};
570
+ }
571
+
572
+ &:focus-visible {
573
+ outline: 2px solid ${t.alpha(t.COLORS.black,20)};
574
+ }
575
+
576
+ &:disabled {
577
+ opacity: 0.3;
578
+ cursor: not-allowed;
579
+
580
+ &:hover {
581
+ background: transparent;
582
+ }
583
+ }
584
+ `,rt=s.div`
585
+ display: flex;
586
+ gap: 4px;
587
+ `,ii=s.div`
588
+ display: grid;
589
+ grid-template-columns: repeat(7, ${ne}px);
590
+ gap: ${Ze}px;
591
+ margin-bottom: 4px;
592
+ `,ni=s.div`
670
593
  display: flex;
671
594
  align-items: center;
672
595
  justify-content: center;
673
- height: 64px;
674
- font-size: 14px;
675
- font-weight: 400;
676
- color: ${({theme:e})=>e.select.empty.color};
677
- `,fa=e=>`${e}-start`,ga=({options:e,value:t,onChange:r,placement:o=yn,searchable:i=!1,disabled:c=!1})=>{const[l,s]=_.useState(!1),[d,a]=_.useState(""),[u,h]=_.useState(null),f=_.useRef([]),b=_.useRef(null),C=_.useMemo(()=>e.find(x=>x.value===t),[e,t]),g=_.useMemo(()=>{if(!i||!d)return e;const x=d.toLowerCase();return e.filter(E=>E.label.toLowerCase().includes(x))},[e,d,i]),y=_.useRef(e.map(x=>x.label));y.current=g.map(x=>x.label);const p=_.useCallback(x=>{c||(s(x),x||(a(""),h(null)))},[c]),v=_.useMemo(()=>fa(o),[o]),{refs:k,floatingStyles:S,context:T}=Ar({open:l,onOpenChange:p,placement:v,middleware:[Sr(qs),Er(),Rr({padding:8}),fn({apply({rects:x,elements:E}){Object.assign(E.floating.style,{width:`${x.reference.width}px`})}})],whileElementsMounted:kr}),M=Or(T,{enabled:!c}),N=Mr(T),B=mn(T,{role:"listbox"}),X=xn(T,{listRef:f,activeIndex:u,onNavigate:h,virtual:!0,loop:!0}),O=kc(T,{listRef:y,activeIndex:u,onMatch:i?void 0:h,enabled:!i}),F=_.useCallback(x=>{r==null||r(x.value),s(!1),a(""),h(null)},[r]),{getReferenceProps:G,getFloatingProps:V,getItemProps:R}=Pr([M,N,B,X,O]),$=_.useCallback(()=>{const x=G(),E=x.onKeyDown;return{...x,onKeyDown:A=>{if(E==null||E(A),A.key==="Enter"&&l&&u!==null){A.preventDefault();const ee=g[u];ee&&F(ee)}}}},[G,l,u,g,F]),j=_.useCallback(x=>{a(x.target.value),h(0)},[]),L=_.useCallback(x=>{if(x.key==="Enter"&&u!==null){x.preventDefault();const E=g[u];E&&F(E)}},[u,g,F]);return{isOpen:l,setIsOpen:p,selectedOption:C,filteredOptions:g,searchQuery:d,setSearchQuery:a,highlightedIndex:u,context:T,refs:{setReference:k.setReference,setFloating:k.setFloating},floatingStyles:S,getReferenceProps:$,getFloatingProps:V,getItemProps:x=>R({onClick:()=>{const E=g[x];E&&F(E)},onKeyDown:E=>{if(E.key==="Enter"){E.preventDefault();const A=g[x];A&&F(A)}}}),listRef:f,handleSelect:F,handleSearchChange:j,handleSearchKeyDown:L,searchInputRef:b}},Ie=m.classNameGetter("select"),ha=({options:e,value:t,onChange:r,placeholder:o=Vs,searchPlaceholder:i=Hs,emptyMessage:c=Us,label:l,icon:s,state:d,disabled:a,fullWidth:u,placement:h=yn,maxHeight:f=Ks,virtualized:b,searchable:C,portalRenderNode:g,className:y,classnames:p,...v})=>{const k=_.useRef(null),{isOpen:S,selectedOption:T,filteredOptions:M,searchQuery:N,context:B,refs:X,floatingStyles:O,getReferenceProps:F,getFloatingProps:G,getItemProps:V,listRef:R,handleSearchChange:$,handleSearchKeyDown:j,searchInputRef:L,highlightedIndex:x}=ga({options:e,value:t,onChange:r,placement:h,searchable:C,disabled:a}),A=f-(C?56:0)-8,ee=vn({count:M.length,getScrollElement:()=>k.current,estimateSize:()=>Gs,overscan:5,enabled:b}),ue=()=>M.length===0?m.jsx(da,{className:Ie("empty",p==null?void 0:p.empty),children:c}):b?m.jsx(Mo,{ref:k,className:Ie("list",p==null?void 0:p.list),style:{maxHeight:A,overflow:"auto"},children:m.jsx("div",{style:{height:ee.getTotalSize(),width:"100%",position:"relative"},children:ee.getVirtualItems().map(Y=>{const H=M[Y.index];if(!H)return null;const te=H.value===t;return m.jsxs(Ao,{ref:q=>{R.current[Y.index]=q},className:Ie("option",p==null?void 0:p.option),$isHighlighted:x===Y.index,style:{position:"absolute",top:0,left:0,width:"100%",height:Y.size,transform:`translateY(${Y.start}px)`},...V(Y.index),children:[m.jsx(Po,{children:H.label}),m.jsx(Do,{$isSelected:te,children:m.jsx(m.Check,{size:16})})]},H.value)})})}):m.jsx(Mo,{ref:k,className:Ie("list",p==null?void 0:p.list),style:{maxHeight:A},children:M.map((Y,H)=>{const te=Y.value===t;return m.jsxs(Ao,{ref:q=>{R.current[H]=q},className:Ie("option",p==null?void 0:p.option),$isHighlighted:x===H,...V(H),children:[m.jsx(Po,{children:Y.label}),m.jsx(Do,{$isSelected:te,children:m.jsx(m.Check,{size:16})})]},Y.value)})}),z=()=>{if(!S)return null;const Y=m.jsx(bn,{context:B,initialFocus:C?L:void 0,modal:!1,children:m.jsxs(sa,{ref:X.setFloating,className:Ie("content",p==null?void 0:p.content),style:O,$isOpen:S,$maxHeight:f,...G(),children:[C&&m.jsx(aa,{className:Ie("search",p==null?void 0:p.search),children:m.jsx(ua,{ref:L,type:"text",placeholder:i,value:N,onChange:$,onKeyDown:j,onClick:H=>H.stopPropagation()})}),ue()]})});return g?ft.createPortal(Y,g):Y};return m.jsxs(ra,{...v,className:Ie("container",y,p==null?void 0:p.container),$fullWidth:u,children:[l&&m.jsx(oa,{className:Ie("label",p==null?void 0:p.label),$state:d,children:l}),m.jsxs(na,{ref:X.setReference,type:"button",className:Ie("trigger",p==null?void 0:p.trigger),$state:d,$disabled:a,$isOpen:S,disabled:a,"aria-haspopup":"listbox","aria-expanded":S,...F(),children:[s&&m.jsx(ia,{$state:d,$disabled:a,children:s}),m.jsx(la,{$isPlaceholder:!T,$state:d,$disabled:a,children:T?T.label:o}),m.jsx(ca,{$state:d,$disabled:a,$isOpen:S,children:m.jsx(m.ChevronDown,{size:16})})]}),z()]})},pa=(e,t,r)=>r?e.checkboxCard.container.disabled.backgroundColor:t?e.checkboxCard.container.checked.backgroundColor:e.checkboxCard.container.backgroundColor,ba=(e,t,r,o)=>o?e.checkboxCard.container.disabled.borderColor:t==="warning"?r?e.checkboxCard.state.warning.container.checked.borderColor:e.checkboxCard.state.warning.container.borderColor:t==="error"?r?e.checkboxCard.state.error.container.checked.borderColor:e.checkboxCard.state.error.container.borderColor:r?e.checkboxCard.container.checked.borderColor:e.checkboxCard.container.borderColor,xa=(e,t,r)=>t==="warning"?r?e.checkboxCard.state.warning.container.checked.borderColor:e.checkboxCard.state.warning.container.borderColor:t==="error"?r?e.checkboxCard.state.error.container.checked.borderColor:e.checkboxCard.state.error.container.borderColor:r?e.checkboxCard.container.checked.borderColor:e.checkboxCard.container.hover.borderColor,ma=(e,t)=>t==="warning"?e.checkboxCard.state.warning.container.borderColor:t==="error"?e.checkboxCard.state.error.container.borderColor:e.checkboxCard.container.focus.outlineColor,Ca=(e,t,r)=>t==="warning"?e.checkboxCard.state.warning.label.color:t==="error"?e.checkboxCard.state.error.label.color:e.checkboxCard.label.color,va=(e,t,r)=>t==="warning"?e.checkboxCard.state.warning.description.color:t==="error"?e.checkboxCard.state.error.description.color:e.checkboxCard.description.color,wa=I.label`
596
+ height: ${ne}px;
597
+ font-size: 12px;
598
+ font-weight: 500;
599
+ color: ${t.alpha(t.COLORS.black,50)};
600
+ text-transform: uppercase;
601
+ `,ai=s.div`
678
602
  display: grid;
679
- grid-template-columns: auto 1fr;
680
- align-items: start;
681
- gap: 12px;
682
- padding: 12px;
683
- background-color: ${({theme:e,$checked:t,$disabled:r})=>pa(e,t,r)};
684
- border: 1px solid
685
- ${({theme:e,$state:t,$checked:r,$disabled:o})=>ba(e,t,r,o)};
686
- border-radius: 12px;
603
+ grid-template-columns: repeat(7, ${ne}px);
604
+ gap: ${Ze}px;
605
+ `,li=s.button`
606
+ display: flex;
607
+ align-items: center;
608
+ justify-content: center;
609
+ width: ${ne}px;
610
+ height: ${ne}px;
611
+ border: none;
612
+ border-radius: 8px;
613
+ font-size: 13px;
614
+ font-weight: ${({$selected:e,$today:o})=>e||o?600:500};
687
615
  cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
688
- transition:
689
- border-color 0.15s ease,
690
- background-color 0.15s ease;
691
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
692
- min-width: 0;
616
+ background-color: ${({$selected:e})=>e?t.COLORS.black:"transparent"};
617
+ color: ${({$selected:e,$disabled:o})=>e?t.COLORS.white:o?t.alpha(t.COLORS.black,30):t.COLORS.black};
693
618
 
694
- &:hover:not([data-disabled='true']) {
695
- border-color: ${({theme:e,$state:t,$checked:r})=>xa(e,t,r)};
619
+ ${({$today:e,$selected:o})=>e&&!o&&`
620
+ box-shadow: inset 0 0 0 1px ${t.COLORS.black};
621
+ `}
622
+
623
+ &:hover:not(:disabled) {
624
+ background-color: ${({$selected:e})=>e?t.COLORS.black:t.alpha(t.COLORS.black,8)};
696
625
  }
697
626
 
698
- &:has(:focus-visible) {
699
- outline: 2px solid ${({theme:e,$state:t})=>ma(e,t)};
627
+ &:focus-visible {
628
+ outline: 2px solid ${t.alpha(t.COLORS.black,30)};
700
629
  outline-offset: 1px;
701
630
  }
702
631
 
703
- .vacano_checkbox_container {
704
- pointer-events: none;
632
+ &:disabled {
633
+ cursor: not-allowed;
705
634
  }
706
- `,ya=I.input`
707
- position: absolute;
708
- width: 1px;
709
- height: 1px;
710
- margin: -1px;
711
- padding: 0;
712
- overflow: hidden;
713
- clip: rect(0, 0, 0, 0);
714
- white-space: nowrap;
715
- border: 0;
716
- `,ka=I.div`
635
+ `,di=s.div`
636
+ display: grid;
637
+ grid-template-columns: repeat(3, 1fr);
638
+ gap: 8px;
639
+ width: ${7*ne+6*Ze}px;
640
+ `,ci=s.button`
717
641
  display: flex;
718
- flex-direction: column;
719
- gap: 2px;
720
- min-width: 0;
721
- `,Sa=I.span`
642
+ align-items: center;
643
+ justify-content: center;
644
+ padding: 12px 8px;
645
+ border: none;
646
+ border-radius: 8px;
722
647
  font-size: 14px;
723
- font-weight: 500;
724
- line-height: 1.4;
725
- color: ${({theme:e,$state:t})=>Ca(e,t)};
648
+ font-weight: ${({$selected:e,$current:o})=>e||o?600:400};
649
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
650
+ background-color: ${({$selected:e})=>e?t.COLORS.black:"transparent"};
651
+ color: ${({$selected:e,$disabled:o})=>e?t.COLORS.white:o?t.alpha(t.COLORS.black,30):t.COLORS.black};
726
652
 
727
- label[data-disabled='true'] & {
728
- color: ${({theme:e})=>e.checkboxCard.label.disabled.color};
653
+ ${({$current:e,$selected:o})=>e&&!o&&`
654
+ box-shadow: inset 0 0 0 1px ${t.COLORS.black};
655
+ `}
656
+
657
+ &:hover:not(:disabled) {
658
+ background-color: ${({$selected:e})=>e?t.COLORS.black:t.alpha(t.COLORS.black,8)};
659
+ }
660
+
661
+ &:focus-visible {
662
+ outline: 2px solid ${t.alpha(t.COLORS.black,30)};
663
+ outline-offset: 1px;
664
+ }
665
+ `,si=s.div`
666
+ display: grid;
667
+ grid-template-columns: repeat(3, 1fr);
668
+ gap: 8px;
669
+ width: ${7*ne+6*Ze}px;
670
+ `,pi=s.button`
671
+ display: flex;
672
+ align-items: center;
673
+ justify-content: center;
674
+ padding: 12px 8px;
675
+ border: none;
676
+ border-radius: 8px;
677
+ font-size: 14px;
678
+ font-weight: ${({$selected:e,$current:o})=>e||o?600:400};
679
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
680
+ background-color: ${({$selected:e})=>e?t.COLORS.black:"transparent"};
681
+ color: ${({$selected:e,$disabled:o})=>e?t.COLORS.white:o?t.alpha(t.COLORS.black,30):t.COLORS.black};
682
+
683
+ ${({$current:e,$selected:o})=>e&&!o&&`
684
+ box-shadow: inset 0 0 0 1px ${t.COLORS.black};
685
+ `}
686
+
687
+ &:hover:not(:disabled) {
688
+ background-color: ${({$selected:e})=>e?t.COLORS.black:t.alpha(t.COLORS.black,8)};
689
+ }
690
+
691
+ &:focus-visible {
692
+ outline: 2px solid ${t.alpha(t.COLORS.black,30)};
693
+ outline-offset: 1px;
694
+ }
695
+ `,ui=s.div`
696
+ width: ${ne}px;
697
+ height: ${ne}px;
698
+ `,K=A.newClassNameGetter("date-picker"),_e=4,hi=300,bi=({value:e,onChange:o,mode:r="date",displayFormat:i,placeholder:n,locale:l="en",weekStartsOn:c=1,minDate:d,maxDate:p,size:h="default",variant:u="normal",disabled:f=!1,fullWidth:x=!1,label:k,portalRenderNode:S,open:$,onOpen:y,onClose:O,className:L,classnames:b,ref:z,...j})=>{const N=g.useMemo(()=>new Date,[]),[X,P]=g.useState(!1),[B,T]=g.useState({top:0,left:0}),[C,_]=g.useState("bottom"),[v,E]=g.useState(()=>r==="year"?"years":r==="month"?"months":"days"),[w,D]=g.useState(()=>e??N),[Y,M]=g.useState(()=>((e==null?void 0:e.getFullYear())??N.getFullYear())-6),H=g.useRef(null),R=g.useRef(null),I=g.useRef(null),U=$!==void 0,q=U?$:X,ge=i??Xr(r),Ne=g.useMemo(()=>Gr(l,c),[l,c]),Je=g.useMemo(()=>Wr(l),[l]),Ro=g.useMemo(()=>Hr(w.getFullYear(),w.getMonth(),c),[w,c]),Ie=g.useMemo(()=>Ur(Y+6,12),[Y]),yt=g.useMemo(()=>e?po(e,ge,l):null,[e,ge,l]),ko=n??ge.replace(/2006|06|January|Jan|01|02/g,"__"),ye=g.useCallback(()=>{var me;if(!R.current)return;const m=R.current.getBoundingClientRect(),F=((me=I.current)==null?void 0:me.offsetHeight)??hi,ve=window.innerHeight-m.bottom-_e,Ae=m.top-_e,fe=ve<F&&Ae>ve?"top":"bottom";if(_(fe),S){const De=fe==="bottom"?m.bottom+_e:m.top-F-_e;T({top:De,left:m.left})}},[S]),vt=g.useCallback(()=>{if(f)return;U||P(!0),y==null||y(),E(r==="year"?"years":r==="month"?"months":"days");const m=e??N;D(m),M(m.getFullYear()-6)},[f,U,y,r,e,N]),Z=g.useCallback(()=>{U||P(!1),O==null||O()},[U,O]),Lo=g.useCallback(()=>{q?Z():vt()},[q,Z,vt]),zo=g.useCallback(m=>{const F=new Date(w.getFullYear(),w.getMonth(),m);o==null||o(F),Z()},[w,o,Z]),Po=g.useCallback(m=>{if(r==="month"){const F=new Date(w.getFullYear(),m,1);o==null||o(F),Z()}else D(new Date(w.getFullYear(),m,1)),E("days")},[r,w,o,Z]),jo=g.useCallback(m=>{if(r==="year"){const F=new Date(m,0,1);o==null||o(F),Z()}else r==="month"?(D(new Date(m,w.getMonth(),1)),E("months")):(D(new Date(m,w.getMonth(),1)),E("months"))},[r,w,o,Z]),Eo=g.useCallback(()=>{D(m=>new Date(m.getFullYear(),m.getMonth()-1,1))},[]),To=g.useCallback(()=>{D(m=>new Date(m.getFullYear(),m.getMonth()+1,1))},[]),No=g.useCallback(()=>{D(m=>new Date(m.getFullYear()-1,m.getMonth(),1))},[]),Io=g.useCallback(()=>{D(m=>new Date(m.getFullYear()+1,m.getMonth(),1))},[]),Ao=g.useCallback(()=>{M(m=>m-12)},[]),Do=g.useCallback(()=>{M(m=>m+12)},[]),mt=g.useCallback(()=>{v==="days"?E("months"):v==="months"&&E("years")},[v]);g.useLayoutEffect(()=>{q&&ye()},[q,ye]),g.useEffect(()=>{const m=fe=>{const me=fe.target,De=H.current&&!H.current.contains(me),Ho=I.current&&!I.current.contains(me);S?De&&Ho&&Z():De&&Z()},F=fe=>{fe.key==="Escape"&&Z()},ve=()=>{q&&S&&ye()},Ae=()=>{q&&S&&ye()};return q&&(document.addEventListener("mousedown",m),document.addEventListener("keydown",F),S&&(window.addEventListener("scroll",ve,!0),window.addEventListener("resize",Ae))),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",F),window.removeEventListener("scroll",ve,!0),window.removeEventListener("resize",Ae)}},[q,Z,S,ye]);const Mo=Ue[h].iconSize,_o=()=>a.jsxs(a.Fragment,{children:[a.jsxs(tt,{className:K("header",b==null?void 0:b.header),children:[a.jsx(ot,{onClick:mt,type:"button",children:new Intl.DateTimeFormat(l,{month:"long",year:"numeric"}).format(w)}),a.jsxs(rt,{children:[a.jsx(Oe,{onClick:Eo,type:"button","aria-label":"Previous month",children:a.jsx(a.ChevronLeft,{size:16})}),a.jsx(Oe,{onClick:To,type:"button","aria-label":"Next month",children:a.jsx(a.ChevronRight,{size:16})})]})]}),a.jsx(ii,{children:Ne.map((m,F)=>a.jsx(ni,{children:m},F))}),a.jsx(ai,{className:K("grid",b==null?void 0:b.grid),children:Ro.map((m,F)=>m===null?a.jsx(ui,{},F):a.jsx(li,{type:"button",className:K("cell",b==null?void 0:b.cell),$selected:e?It(e,new Date(w.getFullYear(),w.getMonth(),m)):!1,$today:It(N,new Date(w.getFullYear(),w.getMonth(),m)),$disabled:Dt(w.getFullYear(),w.getMonth(),m,d,p),disabled:Dt(w.getFullYear(),w.getMonth(),m,d,p),onClick:()=>zo(m),children:m},F))})]}),Fo=()=>a.jsxs(a.Fragment,{children:[a.jsxs(tt,{className:K("header",b==null?void 0:b.header),children:[a.jsx(ot,{onClick:mt,type:"button",children:w.getFullYear()}),a.jsxs(rt,{children:[a.jsx(Oe,{onClick:No,type:"button","aria-label":"Previous year",children:a.jsx(a.ChevronLeft,{size:16})}),a.jsx(Oe,{onClick:Io,type:"button","aria-label":"Next year",children:a.jsx(a.ChevronRight,{size:16})})]})]}),a.jsx(di,{className:K("grid",b==null?void 0:b.grid),children:Je.map((m,F)=>a.jsx(ci,{type:"button",className:K("cell",b==null?void 0:b.cell),$selected:e?At(e,new Date(w.getFullYear(),F,1)):!1,$current:At(N,new Date(w.getFullYear(),F,1)),$disabled:Mt(w.getFullYear(),F,d,p),disabled:Mt(w.getFullYear(),F,d,p),onClick:()=>Po(F),children:m},F))})]}),Bo=()=>a.jsxs(a.Fragment,{children:[a.jsxs(tt,{className:K("header",b==null?void 0:b.header),children:[a.jsxs(ot,{type:"button",style:{cursor:"default"},children:[Ie[0]," - ",Ie[Ie.length-1]]}),a.jsxs(rt,{children:[a.jsx(Oe,{onClick:Ao,type:"button","aria-label":"Previous years",children:a.jsx(a.ChevronLeft,{size:16})}),a.jsx(Oe,{onClick:Do,type:"button","aria-label":"Next years",children:a.jsx(a.ChevronRight,{size:16})})]})]}),a.jsx(si,{className:K("grid",b==null?void 0:b.grid),children:Ie.map(m=>a.jsx(pi,{type:"button",className:K("cell",b==null?void 0:b.cell),$selected:e?Vr(e,new Date(m,0,1)):!1,$current:N.getFullYear()===m,$disabled:_t(m,d,p),disabled:_t(m,d,p),onClick:()=>jo(m),children:m},m))})]}),Ct=()=>{switch(v){case"days":return _o();case"months":return Fo();case"years":return Bo()}},Yo=S?be.createPortal(a.jsx(ri,{ref:I,$open:q,$position:C,className:K("calendar",b==null?void 0:b.calendar),style:{top:B.top,left:B.left},children:Ct()}),S):a.jsx(oi,{ref:I,$open:q,$position:C,className:K("calendar",b==null?void 0:b.calendar),children:Ct()});return a.jsxs(Zr,{...j,ref:z??H,$fullWidth:x,className:K("container",L),children:[k&&a.jsx(Jr,{children:k}),a.jsxs(Qr,{ref:R,type:"button",onClick:Lo,disabled:f,$size:h,$variant:u,$disabled:f,$open:q,$hasValue:!!yt,className:K("trigger",b==null?void 0:b.trigger),children:[a.jsx(ei,{children:yt??ko}),a.jsx(ti,{$open:q,children:a.jsx(a.ChevronDown,{size:Mo})})]}),Yo]})},gi={left:t.KEYFRAMES.slideInLeft,right:t.KEYFRAMES.slideInRight,top:t.KEYFRAMES.slideInTop,bottom:t.KEYFRAMES.slideInBottom},fi=(e,o)=>{switch(e){case"left":return`
699
+ top: 0;
700
+ left: 0;
701
+ height: 100%;
702
+ width: ${o};
703
+ `;case"right":return`
704
+ top: 0;
705
+ right: 0;
706
+ height: 100%;
707
+ width: ${o};
708
+ `;case"top":return`
709
+ top: 0;
710
+ left: 0;
711
+ width: 100%;
712
+ height: ${o};
713
+ `;case"bottom":return`
714
+ bottom: 0;
715
+ left: 0;
716
+ width: 100%;
717
+ height: ${o};
718
+ `}},xi=s.div`
719
+ position: fixed;
720
+ z-index: 1001;
721
+ background-color: ${t.COLORS.white};
722
+ box-shadow: 0 4px 24px ${t.alpha(t.COLORS.black,20)};
723
+ ${e=>fi(e.$position,e.$size)}
724
+ animation: ${e=>gi[e.$position]} ${e=>e.$animated?"0.05s":"0s"} ease-out forwards;
725
+ `,Oi=A.newClassNameGetter("drawer"),$i=({animated:e,children:o,className:r,open:i,position:n="right",ref:l,size:c="400px",...d})=>i?be.createPortal(a.jsx(xi,{...d,ref:l,className:Oi("container",r),$animated:!!e,$position:n,$size:c,children:o}),document.body):null,Si=s.div`
726
+ position: relative;
727
+ display: inline-block;
728
+ `,yi=s.div`
729
+ cursor: pointer;
730
+ `,bo=`
731
+ z-index: 100;
732
+ min-width: 160px;
733
+ padding: 8px;
734
+ background-color: ${t.COLORS.white};
735
+ border: 1px solid ${t.COLORS.gray};
736
+ border-radius: 8px;
737
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
738
+ `,go=(e,o)=>e?"translateY(0)":o==="bottom"?"translateY(-8px)":"translateY(8px)",vi=s.div`
739
+ position: absolute;
740
+ ${({$position:e})=>e==="bottom"?"top: calc(100% + 4px);":"bottom: calc(100% + 4px);"}
741
+ ${({$align:e})=>e==="left"?"left: 0;":"right: 0;"}
742
+ ${bo}
743
+ opacity: ${({$open:e})=>e?1:0};
744
+ visibility: ${({$open:e})=>e?"visible":"hidden"};
745
+ transform: ${({$open:e,$position:o})=>go(e,o)};
746
+ transition:
747
+ opacity 0.15s ease,
748
+ transform 0.15s ease,
749
+ visibility 0.15s;
750
+ `,mi=s.div`
751
+ position: fixed;
752
+ ${bo}
753
+ opacity: ${({$open:e})=>e?1:0};
754
+ visibility: ${({$open:e})=>e?"visible":"hidden"};
755
+ transform: ${({$open:e,$position:o})=>go(e,o)};
756
+ transition:
757
+ opacity 0.15s ease,
758
+ transform 0.15s ease,
759
+ visibility 0.15s;
760
+ `,Fe=A.newClassNameGetter("dropdown"),Be=4,Ci=100,wi=({align:e="left",children:o,className:r,classnames:i,onClose:n,onOpen:l,open:c,portalRenderNode:d,ref:p,trigger:h,...u})=>{const[f,x]=g.useState(!1),[k,S]=g.useState({top:0,left:0}),[$,y]=g.useState("bottom"),O=g.useRef(null),L=g.useRef(null),b=g.useRef(null),z=c!==void 0,j=z?c:f,N=g.useCallback(()=>{var D,Y;if(!L.current)return;const T=L.current.getBoundingClientRect(),C=((D=b.current)==null?void 0:D.offsetHeight)??Ci,_=((Y=b.current)==null?void 0:Y.offsetWidth)??160,v=window.innerHeight-T.bottom-Be,E=T.top-Be,w=v<C&&E>v?"top":"bottom";if(y(w),d){let M;e==="left"?M=T.left:M=T.right-_;const H=w==="bottom"?T.bottom+Be:T.top-C-Be;S({top:H,left:M})}},[e,d]),X=g.useCallback(()=>{z?j?n==null||n():l==null||l():x(T=>{const C=!T;return C?l==null||l():n==null||n(),C})},[z,j,n,l]),P=g.useCallback(()=>{z||x(!1),n==null||n()},[z,n]);g.useLayoutEffect(()=>{j&&N()},[j,N]),g.useEffect(()=>{const T=E=>{const w=E.target,D=O.current&&!O.current.contains(w),Y=b.current&&!b.current.contains(w);d?D&&Y&&P():D&&P()},C=E=>{E.key==="Escape"&&P()},_=()=>{j&&d&&N()},v=()=>{j&&d&&N()};return j&&(document.addEventListener("mousedown",T),document.addEventListener("keydown",C),d&&(window.addEventListener("scroll",_,!0),window.addEventListener("resize",v))),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("keydown",C),window.removeEventListener("scroll",_,!0),window.removeEventListener("resize",v)}},[j,P,d,N]);const B=d?be.createPortal(a.jsx(mi,{ref:b,$open:j,$position:$,className:Fe("content",i==null?void 0:i.content),style:{top:k.top,left:k.left},children:o}),d):a.jsx(vi,{ref:b,$align:e,$open:j,$position:$,className:Fe("content",i==null?void 0:i.content),children:o});return a.jsxs(Si,{...u,ref:p??O,className:Fe("container",r),children:[a.jsx(yi,{ref:L,onClick:X,className:Fe("trigger",i==null?void 0:i.trigger),children:g.cloneElement(h)}),B]})},Ri=s.div`
761
+ display: flex;
762
+ flex-direction: column;
763
+ gap: 12px;
764
+ `,ki=s.div`
765
+ width: ${({$size:e})=>e}px;
766
+ height: ${({$size:e})=>e}px;
767
+ border-radius: 8px;
768
+ border: 1px dashed ${t.COLORS.gray};
769
+ overflow: hidden;
770
+ display: flex;
771
+ align-items: center;
772
+ justify-content: center;
773
+ background-color: ${t.COLORS.white};
774
+
775
+ img {
776
+ width: 100%;
777
+ height: 100%;
778
+ object-fit: cover;
729
779
  }
730
- `,Ra=I.span`
780
+ `,Li=s.span`
731
781
  font-size: 12px;
732
- font-weight: 400;
733
- line-height: 1.4;
734
- color: ${({theme:e,$state:t})=>va(e,t)};
782
+ color: ${t.COLORS["iron-grey"]};
783
+ `,zi=e=>`
784
+ .${e} {
785
+ padding: 7px 16px;
786
+ font-size: 14px;
787
+ outline: 0;
788
+ border: 0;
789
+ background-color: #2F7FEF;
790
+ color: #FFFFFF;
791
+ border-radius: 20px;
792
+ user-select: none;
793
+ cursor: pointer;
794
+ -moz-user-select: none;
795
+ -webkit-user-select: none;
796
+ }
735
797
 
736
- label[data-disabled='true'] & {
737
- color: ${({theme:e})=>e.checkboxCard.description.disabled.color};
798
+ .${e}:active {
799
+ transform: translate(0, 1px);
800
+ }
801
+ `,Pi=e=>`
802
+ .${e} {
803
+ display: flex;
804
+ flex: 1 1 auto;
805
+ background: #33393F;
806
+ overflow: hidden;
807
+ align-items: center;
808
+ justify-content: center;
809
+ position: relative;
810
+ width: 500px;
811
+ height: 500px;
812
+ max-width: 100%;
813
+ max-height: 60vh;
814
+ min-height: 250px;
815
+ }
816
+
817
+ @media (max-width: 540px) {
818
+ .${e} {
819
+ width: 100%;
820
+ height: auto;
821
+ aspect-ratio: 1;
822
+ max-height: 70vh;
823
+ }
824
+ }
825
+ `,ji=e=>`
826
+ .${e} {
827
+ padding: 7px 16px;
828
+ font-size: 14px;
829
+ outline: 0;
830
+ border: 0;
831
+ background-color: #E8EFF7;
832
+ color: #768BA7;
833
+ border-radius: 20px;
834
+ cursor: pointer;
835
+ user-select: none;
836
+ -moz-user-select: none;
837
+ -webkit-user-select: none;
838
+ }
839
+
840
+ .${e}:active {
841
+ transform: translate(0, 1px);
842
+ }
843
+ `,Ei=e=>`
844
+ .${e} {
845
+ display: flex;
846
+ flex-direction: column;
847
+ background-color: #FFFFFF;
848
+ border-radius: 6px;
849
+ box-shadow: 0 4px 16px rgba(77, 96, 124, 0.2);
850
+ max-width: 100%;
851
+ max-height: 100%;
852
+ overflow: hidden;
853
+ }
854
+
855
+ @media (max-width: 540px) {
856
+ .${e} {
857
+ width: 100%;
858
+ border-radius: 8px;
859
+ }
860
+ }
861
+ `,Ti=e=>`
862
+ .${e} {
863
+ display: flex;
864
+ justify-content: flex-end;
865
+ gap: 10px;
866
+ align-items: center;
867
+ height: 60px;
868
+ flex: 0 0 auto;
869
+ padding: 0 20px;
870
+ border-top: 1px solid #EEE;
871
+ }
872
+
873
+ @media (max-width: 540px) {
874
+ .${e} {
875
+ height: 56px;
876
+ padding: 0 12px;
877
+ gap: 8px;
878
+ }
879
+ }
880
+ `,Ni=e=>`
881
+ .${e} {
882
+ display: flex;
883
+ justify-content: flex-start;
884
+ gap: 10px;
885
+ align-items: center;
886
+ height: 60px;
887
+ flex: 0 0 auto;
888
+ padding: 0 20px;
889
+ border-top-left-radius: 6px;
890
+ border-top-right-radius: 6px;
891
+ border-bottom: 1px solid #EEE;
892
+ overflow: hidden;
893
+ }
894
+
895
+ @media (max-width: 540px) {
896
+ .${e} {
897
+ height: 48px;
898
+ padding: 0 12px;
899
+ font-size: 14px;
900
+ }
901
+ }
902
+ `,Ii=e=>`
903
+ .${e} {
904
+ display: block;
905
+ z-index: 101;
906
+ outline: 1px dashed #aaa;
907
+ background-color: transparent;
908
+ cursor: move;
909
+ -webkit-user-select: none;
910
+ -moz-user-select: none;
911
+ -ms-user-select: none;
912
+ user-select: none;
913
+ left: 0;
914
+ top: 0;
915
+ bottom: 0;
916
+ right: 0;
917
+ position: absolute;
918
+ touch-action: none;
919
+ }
920
+ `,Ai=e=>`
921
+ .${e} {
922
+ position: absolute;
923
+ z-index: 2;
924
+ background-color: rgba(0, 0, 0, 0.6);
925
+ touch-action: none;
926
+ }
927
+ `,Di=e=>`
928
+ .${e} {
929
+ position: absolute;
930
+ z-index: 3;
931
+ touch-action: none;
932
+ }
933
+ `,Mi=e=>`
934
+ .${e} {
935
+ backface-visibility: hidden;
936
+ perspective: 1000px;
937
+ max-inline-size: unset !important;
938
+ max-block-size: unset !important;
939
+ }
940
+ `,_i=e=>`
941
+ .${e} {
942
+ position: absolute;
943
+ z-index: 100;
944
+ left: 0;
945
+ top: 0;
946
+ right: 0;
947
+ bottom: 0;
948
+ overflow: hidden;
949
+ border-radius: 50%;
950
+ }
951
+ `,Fi={tl:"nw-resize",tr:"ne-resize",bl:"sw-resize",br:"se-resize"},Bi={tl:{h:"left",v:"top"},tr:{h:"right",v:"top"},bl:{h:"left",v:"bottom"},br:{h:"right",v:"bottom"}},Ye=(e,o)=>{const r=Fi[o],{h:i,v:n}=Bi[o];return`
952
+ .${e} {
953
+ display: block;
954
+ z-index: 102;
955
+ background-color: rgba(255, 255, 255, .6);
956
+ cursor: ${r};
957
+ -webkit-user-select: none;
958
+ -moz-user-select: none;
959
+ -ms-user-select: none;
960
+ user-select: none;
961
+ ${i}: -3px;
962
+ ${n}: -3px;
963
+ position: absolute;
964
+ width: 5px;
965
+ height: 5px;
966
+ touch-action: none;
967
+ }
968
+
969
+ @media (max-width: 540px), (pointer: coarse) {
970
+ .${e} {
971
+ width: 24px;
972
+ height: 24px;
973
+ ${i}: -12px;
974
+ ${n}: -12px;
975
+ }
976
+ }
977
+ `},Yi=e=>`
978
+ .${e} {
979
+ display: flex;
980
+ align-items: center;
981
+ justify-content: center;
982
+ background-color: rgba(0, 0, 0, .4);
983
+ width: 100vw;
984
+ height: 100vh;
985
+ height: 100dvh;
986
+ position: fixed;
987
+ left: 0;
988
+ top: 0;
989
+ z-index: 1000;
990
+ overflow-y: auto;
991
+ box-sizing: border-box;
992
+ padding: 16px;
993
+ }
994
+
995
+ @media (max-width: 540px) {
996
+ .${e} {
997
+ padding: 8px;
998
+ align-items: flex-start;
999
+ padding-top: env(safe-area-inset-top, 8px);
1000
+ padding-bottom: env(safe-area-inset-bottom, 8px);
1001
+ }
1002
+ }
1003
+ `,Hi=e=>`
1004
+ .${e} {
1005
+ backface-visibility: hidden;
1006
+ user-select: none;
1007
+ perspective: 1000px;
1008
+ overflow: hidden;
1009
+ display: block;
1010
+ transform: translateZ(0);
1011
+ width: auto;
1012
+ -webkit-user-drag: none;
1013
+ position: absolute;
1014
+ z-index: 1;
1015
+ }
1016
+ `,Gi=e=>{let o=5381;for(let r=0;r<e.length;r++)o=(o<<5)+o^e.charCodeAt(r);return Math.abs(o).toString(36)},G=e=>`hq-cropper__${Gi(e)}`,W=e=>e||[],V=(e,o)=>{if(o)for(const r of o)e.classList.add(r)},Wi=e=>{const o={applyButton:[G("applyButton"),...W(e.applyButton)],cancelButton:[G("cancelButton"),...W(e.cancelButton)],container:[G("container"),...W(e.container)],handlerMove:[G("handlerMove"),...W(e.handlerMove)],handlerResizeTopLeft:[G("handlerResizeTopLeft"),...W(e.handlerResizeTopLeft)],handlerResizeTopRight:[G("handlerResizeTopRight"),...W(e.handlerResizeTopRight)],handlerResizeBottomLeft:[G("handlerResizeBottomLeft"),...W(e.handlerResizeBottomLeft)],handlerResizeBottomRight:[G("handlerResizeBottomRight"),...W(e.handlerResizeBottomRight)],sourceImage:[G("sourceImage"),...W(e.sourceImage)],portalArea:[G("portalArea"),...W(e.portalArea)],previewImage:[G("previewImage"),...W(e.previewImage)],body:[G("body"),...W(e.body)],header:[G("header"),...W(e.header)],footer:[G("footer"),...W(e.footer)],portal:[G("portal"),...W(e.portal)],preview:[G("preview"),...W(e.preview)],root:[G("root"),...W(e.root)]},r=`
1017
+ ${zi(o.applyButton[0])}
1018
+ ${Pi(o.body[0])}
1019
+ ${ji(o.cancelButton[0])}
1020
+ ${Ei(o.container[0])}
1021
+ ${Ti(o.footer[0])}
1022
+ ${Ni(o.header[0])}
1023
+ ${Ii(o.handlerMove[0])}
1024
+ ${Ai(o.portalArea[0])}
1025
+ ${Di(o.portal[0])}
1026
+ ${Mi(o.previewImage[0])}
1027
+ ${_i(o.preview[0])}
1028
+ ${Ye(o.handlerResizeBottomLeft[0],"bl")}
1029
+ ${Ye(o.handlerResizeBottomRight[0],"br")}
1030
+ ${Ye(o.handlerResizeTopLeft[0],"tl")}
1031
+ ${Ye(o.handlerResizeTopRight[0],"tr")}
1032
+ ${Yi(o.root[0])}
1033
+ ${Hi(o.sourceImage[0])}
1034
+ `,i=document.createElement("style");return i.innerHTML=r,document.getElementsByTagName("head")[0].prepend(i),o};let Vi=0;const Ui=e=>{const o=new Map,r=new Proxy({...e},{set(i,n,l){return Reflect.set(i,n,l),(o.get(n)||[]).forEach(c=>c.action(l,i,n)),!0}});return{getState:()=>({...r}),setState:i=>{for(const n of Object.keys(i)){const l=i[n];l!==void 0&&(r[n]=l)}},subscribe:(i,n)=>{const l=String(++Vi),c=o.get(i)||[];return o.set(i,[...c,{action:n,id:l}]),l},unsubscribe:i=>{for(const[n,l]of o.entries()){const c=l.filter(d=>d.id!==i);if(c.length!==l.length){o.set(n,c);return}}},unsubscribeAll:()=>{o.clear()}}},xt={action:null,sourceBase64:"",fileName:"",sourceHeight:0,sourceWidth:0,frame:{left:0,top:0,width:0,height:0},portal:{left:0,top:0,size:0},emitted:{X:0,Y:0,left:0,top:0,size:0},config:{applyButtonLabel:"Apply",cancelButtonLabel:"Cancel",compression:1,framePadding:3,minPortalSize:50,portalPosition:"center",portalSize:150,outputSize:0,type:"jpeg",maxFileSize:0,allowedTypes:["image/jpeg","image/png","image/gif","image/webp"]}},Xi=(e={},o={})=>Ui({...xt,config:{...xt.config,...e},css:Wi(o)}),qi=(e,o)=>{var x;const r=e(),i=document.querySelector(`.${(x=r.css)==null?void 0:x.body[0]}`);if(!i)return r.frame;const{width:n,height:l}=i.getBoundingClientRect(),c=n/l,d=o.width/o.height;let p,h,u=0,f=0;return c>d?(p=l*d,h=l,f=(n-p)/2):(p=n,h=n*(o.height/o.width),u=(l-h)/2),{width:p,height:h,left:f,top:u}},Ki=(e,o,r)=>{const[i,n]=o,l=i+e>r.width?(r.width-e)/2:i,c=n+e>r.height?(r.height-e)/2:n;return[l,c]},Zi=(e,o)=>{const{config:r}=e(),i=Math.min(o.width,o.height)-r.framePadding*2,n=r.portalSize>i?i:r.portalSize;if(Array.isArray(r.portalPosition)&&r.portalPosition.length===2){const[l,c]=Ki(n,r.portalPosition,o);return{left:l,top:c,size:n}}return r.portalPosition==="center"?{size:n,left:(o.width-n)/2,top:(o.height-n)/2}:{left:0,top:0,size:n}};var te=(e=>(e.MOVE="MOVE",e.RESIZE_TL="RESIZE_TL",e.RESIZE_TR="RESIZE_TR",e.RESIZE_BR="RESIZE_BR",e.RESIZE_BL="RESIZE_BL",e))(te||{});const Ji=e=>{var i;const o=e(),r=document.createElement("span");return V(r,(i=o.css)==null?void 0:i.handlerMove),r.setAttribute("data-action",te.MOVE),r},Qi=e=>{var i;const o=e(),r=document.createElement("span");return V(r,(i=o.css)==null?void 0:i.handlerResizeBottomLeft),r.setAttribute("data-action",te.RESIZE_BL),r},en=e=>{var i;const o=e(),r=document.createElement("span");return V(r,(i=o.css)==null?void 0:i.handlerResizeBottomRight),r.setAttribute("data-action",te.RESIZE_BR),r},tn=e=>{var i;const o=e(),r=document.createElement("span");return V(r,(i=o.css)==null?void 0:i.handlerResizeTopLeft),r.setAttribute("data-action",te.RESIZE_TL),r},on=e=>{var i;const o=e(),r=document.createElement("span");return V(r,(i=o.css)==null?void 0:i.handlerResizeTopRight),r.setAttribute("data-action",te.RESIZE_TR),r},rn=e=>{var i;const o=e(),r=document.createElement("img");return V(r,(i=o.css)==null?void 0:i.previewImage),r},nn=e=>{var i;const o=e(),r=document.createElement("div");return V(r,(i=o.css)==null?void 0:i.preview),r.appendChild(rn(e)),r},an=e=>{var i;const o=e(),r=document.createElement("div");return V(r,(i=o.css)==null?void 0:i.portal),r.appendChild(nn(e)),r.appendChild(Ji(e)),r.appendChild(tn(e)),r.appendChild(on(e)),r.appendChild(Qi(e)),r.appendChild(en(e)),r},ln=e=>{var i;const o=e(),r=document.createElement("div");return V(r,(i=o.css)==null?void 0:i.portalArea),r.appendChild(an(e)),r},dn=e=>{var i;const o=e(),r=document.createElement("img");return V(r,(i=o.css)==null?void 0:i.sourceImage),r.setAttribute("alt","source"),r.setAttribute("crossOrigin","anonymous"),r.setAttribute("draggable","false"),r.setAttribute("src",o.sourceBase64),r},cn=e=>{var i;const o=e(),r=document.createElement("div");return V(r,(i=o.css)==null?void 0:i.body),r.appendChild(dn(e)),r.appendChild(ln(e)),r},sn=(e,o)=>{var n;const r=e(),i=document.createElement("div");return V(i,(n=r.css)==null?void 0:n.applyButton),i.setAttribute("role","button"),i.innerText=r.config.applyButtonLabel,i.addEventListener("click",o),i},pn=(e,o)=>{var n;const r=e(),i=document.createElement("div");return V(i,(n=r.css)==null?void 0:n.cancelButton),i.setAttribute("role","button"),i.innerText=r.config.cancelButtonLabel,i.addEventListener("click",o),i},un=(e,o,r)=>{var l;const i=e(),n=document.createElement("div");return V(n,(l=i.css)==null?void 0:l.footer),n.appendChild(pn(e,r)),n.appendChild(sn(e,o)),n},hn=e=>{var i;const o=e(),r=document.createElement("div");return V(r,(i=o.css)==null?void 0:i.header),r},bn=(e,o,r)=>{var l;const i=e(),n=document.createElement("div");return V(n,(l=i.css)==null?void 0:l.container),n.appendChild(hn(e)),n.appendChild(cn(e)),n.appendChild(un(e,o,r)),n},gn=(e,o,r)=>{var l;const i=e(),n=document.createElement("div");V(n,(l=i.css)==null?void 0:l.root),n.appendChild(bn(e,o,r)),document.body.appendChild(n)},fn=e=>{const o=document.createElement("input");return o.style.display="none",o.setAttribute("type","file"),o.setAttribute("accept","image/x-png,image/jpeg"),o.addEventListener("change",e,!1),document.body.appendChild(o),o},je=new Map,xn={header:"header",sourceImage:"sourceImage",portalArea:"portalArea",portal:"portal",previewImage:"previewImage"},ue=(e,o)=>{if(je.has(e))return je.get(e);if(!o)return null;const r=o[xn[e]],i=document.querySelector(`.${r[0]}`);return je.set(e,i),i},On=()=>{je.clear()},$n=()=>{je.clear()},Sn=(e,o)=>{const r=ue("header",o.css);r&&(r.innerText=e)},yn=(e,o)=>{const r=ue("sourceImage",o.css);r&&(r.setAttribute("src",e),r.style.height=`${o.frame.height}px`,r.style.width=`${o.frame.width}px`,r.style.left=`${o.frame.left}px`,r.style.top=`${o.frame.top}px`);const i=ue("portalArea",o.css);i&&(i.style.height=`${o.frame.height}px`,i.style.width=`${o.frame.width}px`,i.style.left=`${o.frame.left}px`,i.style.top=`${o.frame.top}px`);const n=ue("portal",o.css);n&&(n.style.width=`${o.portal.size}px`,n.style.height=`${o.portal.size}px`,n.style.left=`${o.portal.left}px`,n.style.top=`${o.portal.top}px`);const l=ue("previewImage",o.css);l&&(l.setAttribute("src",e),l.style.height=`${o.frame.height}px`,l.style.width=`${o.frame.width}px`,l.style.marginLeft=`-${o.portal.left}px`,l.style.marginTop=`-${o.portal.top}px`)},vn=(e,o)=>{const r=ue("portal",o.css);r&&(r.style.left=`${e.left}px`,r.style.top=`${e.top}px`,r.style.width=`${e.size}px`,r.style.height=`${e.size}px`);const i=ue("previewImage",o.css);i&&(i.style.marginLeft=`-${e.left}px`,i.style.marginTop=`-${e.top}px`)},it=1,mn=e=>{var k,S;const o=e(),r=document.createElement("canvas"),i=o.frame.width||it,n=o.frame.height||it,l=o.sourceWidth/i,c=o.sourceHeight/n,d=o.portal.left*l,p=o.portal.top*c,h=Math.max(o.portal.size*Math.min(l,c),it),u=o.config.outputSize>0?o.config.outputSize:h;r.width=u,r.height=u;const f=document.querySelector(`.${(k=o.css)==null?void 0:k.sourceImage[0]}`);f&&((S=r.getContext("2d"))==null||S.drawImage(f,d,p,h,h,0,0,u,u));const x=r.toDataURL(`image/${o.config.type}`,o.config.compression);return new Promise(($,y)=>{try{r.toBlob(O=>{if(r.remove(),!O){y(new Error(`Failed to create blob for type: image/${o.config.type}`));return}$([x,O])},`image/${o.config.type}`,o.config.compression)}catch(O){r.remove(),y(O)}})},Cn=(e,o,r)=>{const{emitted:i,portal:n,frame:l,config:c}=o();let d=i.left-i.X+e.clientX,p=i.top-i.Y+e.clientY;const h=c.framePadding,u=l.width-c.framePadding-n.size,f=c.framePadding,x=l.height-c.framePadding-n.size;d<h&&(d=h),d>u&&(d=u),p<f&&(p=f),p>x&&(p=x),r({portal:{...n,left:d,top:p}})},wn=(e,o,r)=>{const{action:i,emitted:n,portal:l,frame:c,config:d}=o(),p=e.pageX-n.X,h=e.pageY-n.Y;switch(i){case te.RESIZE_BR:{let u=n.size+Math.max(p,h);return u<d.minPortalSize&&(u=d.minPortalSize),n.top+u>c.height-d.framePadding&&(u=c.height-n.top-d.framePadding),n.left+u>c.width-d.framePadding&&(u=c.width-n.left-d.framePadding),r({portal:{...l,size:u}})}case te.RESIZE_TR:{let u=p+h>0?n.size+p:n.size-h,f=p+h>0?n.top-p:n.top+h;return u<d.minPortalSize&&(f=n.top+n.size-d.minPortalSize,u=d.minPortalSize),n.left+u>c.width-d.framePadding&&(u=c.width-n.left-d.framePadding,f=n.top-c.width+n.left+n.size),f<d.framePadding&&(u=n.top+n.size,f=d.framePadding),r({portal:{...l,top:f,size:u}})}case te.RESIZE_TL:{const u=Math.min(p,h);let f=n.size-u,x=n.left+u,k=n.top+u;if(f<d.minPortalSize){const S=n.size-d.minPortalSize;f=d.minPortalSize,x=n.left+S,k=n.top+S}if(k<d.framePadding){const S=d.framePadding-k;k=d.framePadding,x=x+S,f=f-S}if(x<d.framePadding){const S=d.framePadding-x;x=d.framePadding,k=k+S,f=f-S}return r({portal:{...l,top:k,left:x,size:f}})}case te.RESIZE_BL:{let u=p+h>0?n.size+h:n.size-p,f=p+h>0?n.left-h:n.left+p;return u<d.minPortalSize&&(f=n.left+n.size-d.minPortalSize,u=d.minPortalSize),u+n.top>c.height-d.framePadding&&(f=n.left-c.height+n.top+n.size,u=c.height-n.top-d.framePadding),f<d.framePadding&&(f=d.framePadding,u=n.left+n.size-d.framePadding),r({portal:{...l,left:f,size:u}})}default:return}},Ft=e=>{if("touches"in e&&e.touches.length>0){const r=e.touches[0];return{clientX:r.clientX,clientY:r.clientY,pageX:r.pageX,pageY:r.pageY}}if("changedTouches"in e&&e.changedTouches.length>0){const r=e.changedTouches[0];return{clientX:r.clientX,clientY:r.clientY,pageX:r.pageX,pageY:r.pageY}}const o=e;return{clientX:o.clientX,clientY:o.clientY,pageX:o.pageX,pageY:o.pageY}},Rn=(e,o)=>{var x,k,S;const r=e(),i=document.querySelector(`.${(x=r.css)==null?void 0:x.portal[0]}`),n=document.querySelector(`.${(k=r.css)==null?void 0:k.portalArea[0]}`),l=document.querySelector(`.${(S=r.css)==null?void 0:S.root[0]}`);let c=null,d=null;const p=$=>{$.preventDefault();const{portal:y}=e(),O=Ft($);if($.target){const L=$.target.getAttribute("data-action"),b={X:O.pageX,Y:O.pageY,left:y.left,top:y.top,size:y.size};o({action:L,emitted:b})}},h=()=>{const{action:$}=e();c!==null&&(cancelAnimationFrame(c),c=null),d=null,$&&o({action:null})},u=()=>{if(c=null,!d)return;const $=d;d=null;const{action:y}=e();if(y)switch(y){case te.MOVE:Cn($,e,o);break;default:wn($,e,o)}},f=$=>{const{action:y}=e();y&&($.preventDefault(),d=Ft($),c===null&&(c=requestAnimationFrame(u)))};return l&&(l.addEventListener("mouseup",h),l.addEventListener("touchend",h),l.addEventListener("touchcancel",h)),i&&(i.addEventListener("mousedown",p),i.addEventListener("touchstart",p,{passive:!1})),n&&(n.addEventListener("mousemove",f),n.addEventListener("touchmove",f,{passive:!1})),()=>{c!==null&&cancelAnimationFrame(c),l&&(l.removeEventListener("mouseup",h),l.removeEventListener("touchend",h),l.removeEventListener("touchcancel",h)),i&&(i.removeEventListener("mousedown",p),i.removeEventListener("touchstart",p)),n&&(n.removeEventListener("mousemove",f),n.removeEventListener("touchmove",f))}},Bt=1024*1024,kn=(e,o)=>{if(!o.allowedTypes.includes(e.type))return`Invalid file type "${e.type}". Allowed types: ${o.allowedTypes.join(", ")}`;if(o.maxFileSize>0&&e.size>o.maxFileSize){const r=(o.maxFileSize/Bt).toFixed(2);return`File size (${(e.size/Bt).toFixed(2)}MB) exceeds maximum allowed size (${r}MB)`}return null},Ln=(e,o,r,i,n,l,c)=>{const d=O=>{c?c(O):console.error(`HqCropper: ${O}`)};if(!e.target.files||e.target.files.length===0){d("Can't read file input");return}const p=e.target.files[0],{config:h}=o(),u=kn(p,h);if(u){d(u),e.target.value="";return}const f=new FileReader;let x=null;const k=()=>{var b;const O=o(),L=document.querySelector(`.${(b=O.css)==null?void 0:b.root[0]}`);L&&(L.remove(),document.removeEventListener("keydown",S),x==null||x(),$n(),l(),r(xt))},S=O=>{O.key==="Escape"&&o().sourceBase64&&$(O)},$=O=>{O.preventDefault(),k()},y=O=>{O.preventDefault();const L=o();mn(o).then(([b,z])=>{i(b,z,L),$(O)}).catch(b=>{d(b instanceof Error?b.message:"Failed to crop image")})};f.onload=O=>{const L=new Image;if(!O.target||typeof O.target.result!="string"){d("Can't load result image");return}L.src=O.target.result,L.onerror=()=>{d("Failed to load image")},L.onload=()=>{var j;gn(o,y,$),On(),n("fileName",Sn),n("sourceBase64",yn),n("portal",vn);const b=qi(o,L),z=Zi(o,b);r({frame:b,portal:z,fileName:p.name,sourceBase64:(j=O.target)==null?void 0:j.result,sourceHeight:L.height,sourceWidth:L.width}),x=Rn(o,r),document.addEventListener("keydown",S)}},f.onerror=()=>{d("Failed to read file")},f.readAsDataURL(p),e.target.value=""},zn=(e,o,r,i)=>{const{getState:n,setState:l,subscribe:c,unsubscribeAll:d}=Xi(o,r),p=fn(h=>Ln(h,n,l,e,c,d,i));return{open:()=>p.click()}},ae={portalSize:200,outputSize:400,compression:.9,type:"jpeg",maxFileSize:10*1024*1024,allowedTypes:["image/jpeg","image/png","image/webp"],applyLabel:"Apply",cancelLabel:"Cancel"},Yt="vacano-image-cropper-styles",Pn=`
1035
+ .vacano-cropper-root {
1036
+ background-color: rgba(0, 0, 0, 0.5);
1037
+ backdrop-filter: blur(4px);
738
1038
  }
739
- `,Et=m.classNameGetter("checkboxCard"),Ea=({checked:e,className:t,classnames:r,description:o,disabled:i,fullWidth:c,label:l,onChange:s,ref:d,state:a,...u})=>m.jsxs(wa,{className:Et("container",t,r==null?void 0:r.container),$checked:e,$disabled:i,$fullWidth:c,$state:a,"data-disabled":i,children:[m.jsx(ya,{...u,ref:d,type:"checkbox",checked:e,disabled:i,onChange:s}),m.jsx(mr,{className:r==null?void 0:r.checkbox,checked:e,disabled:i,state:a,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),m.jsxs(ka,{className:Et("content",r==null?void 0:r.content),children:[m.jsx(Sa,{className:Et("label",r==null?void 0:r.label),$state:a,children:l}),o&&m.jsx(Ra,{className:Et("description",r==null?void 0:r.description),$state:a,children:o})]})]}),$a=I.div`
1039
+
1040
+ .vacano-cropper-header {
1041
+ border-bottom: 1px solid ${t.COLORS.gray};
1042
+ padding: 16px 20px;
1043
+ }
1044
+
1045
+ .vacano-cropper-footer {
1046
+ border-top: 1px solid ${t.COLORS.gray};
1047
+ padding: 16px 20px;
1048
+ gap: 12px;
1049
+ }
1050
+
1051
+ .vacano-cropper-cancel-button {
1052
+ padding: 8px 16px;
1053
+ border-radius: 16px;
1054
+ border: 1px solid ${t.COLORS.gray};
1055
+ background-color: ${t.COLORS.white};
1056
+ color: ${t.COLORS.black};
1057
+ font-size: 14px;
1058
+ font-weight: 500;
1059
+ cursor: pointer;
1060
+ transition: background-color 0.2s;
1061
+ }
1062
+
1063
+ .vacano-cropper-cancel-button:hover {
1064
+ background-color: ${t.COLORS.gray};
1065
+ }
1066
+
1067
+ .vacano-cropper-apply-button {
1068
+ padding: 8px 16px;
1069
+ border-radius: 16px;
1070
+ border: none;
1071
+ background-color: ${t.COLORS.black};
1072
+ color: ${t.COLORS.white};
1073
+ font-size: 14px;
1074
+ font-weight: 500;
1075
+ cursor: pointer;
1076
+ transition: background-color 0.2s;
1077
+ }
1078
+
1079
+ .vacano-cropper-apply-button:hover {
1080
+ background-color: ${t.COLORS["iron-grey"]};
1081
+ }
1082
+ `,jn=()=>{if(typeof document>"u"||document.getElementById(Yt))return;const e=document.createElement("style");e.id=Yt,e.textContent=Pn,document.head.appendChild(e)},En={root:["vacano-cropper-root"],container:["vacano-cropper-container"],header:["vacano-cropper-header"],body:["vacano-cropper-body"],footer:["vacano-cropper-footer"],cancelButton:["vacano-cropper-cancel-button"],applyButton:["vacano-cropper-apply-button"],portal:["vacano-cropper-portal"]},fo=(e={})=>{const{allowedTypes:o=ae.allowedTypes,applyLabel:r=ae.applyLabel,cancelLabel:i=ae.cancelLabel,compression:n=ae.compression,maxFileSize:l=ae.maxFileSize,onCrop:c,onError:d,outputSize:p=ae.outputSize,portalSize:h=ae.portalSize,type:u=ae.type}=e,f=g.useRef(null);return{open:g.useCallback(()=>{f.current||(jn(),f.current=zn((k,S,$)=>{S&&(c==null||c({base64:k,blob:S,state:$}))},{portalSize:h,outputSize:p,compression:n,type:u,maxFileSize:l,allowedTypes:o,applyButtonLabel:r,cancelButtonLabel:i},En,k=>{d==null||d({code:"CROPPER_ERROR",message:k})})),f.current.open()},[o,r,i,n,l,c,d,p,h,u])}},nt=A.newClassNameGetter("image-cropper"),Tn=({allowedTypes:e,applyLabel:o,buttonLabel:r="Select Image",cancelLabel:i,className:n,classnames:l,compression:c,maxFileSize:d,onCrop:p,onError:h,outputSize:u,portalSize:f,previewSize:x=120,ref:k,type:S,value:$,...y})=>{const[O,L]=g.useState($??null),{open:b}=fo({allowedTypes:e,applyLabel:o,cancelLabel:i,compression:c,maxFileSize:d,onCrop:z=>{L(z.base64),p==null||p(z)},onError:h,outputSize:u,portalSize:f,type:S});return a.jsxs(Ri,{...y,ref:k,className:nt("container",n),children:[a.jsx(ki,{$size:x,className:nt("preview",l==null?void 0:l.preview),children:O?a.jsx("img",{src:O,alt:"Preview"}):a.jsx(Li,{children:"No image"})}),a.jsx(Te,{variant:"system",onClick:b,className:nt("button",l==null?void 0:l.button),style:{width:x},children:r})]})},Ht={compact:{height:"32px",padding:"0 10px",radius:"14px",prefixSize:"16px"},default:{height:"40px",padding:"0 14px",radius:"16px",prefixSize:"20px"}},Gt={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:{static:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:{static:t.alpha(t.COLORS.red,40),disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},re=e=>Gt[e]??Gt.normal,at=e=>Ht[e]??Ht.default,Nn=s.div`
1083
+ display: grid;
1084
+ flex-direction: column;
1085
+ gap: 2px;
1086
+ width: ${e=>e.$fullWidth?"100%":"fit-content"};
1087
+ `,In=s(Se)`
1088
+ margin-left: 6px;
1089
+ `,An=s.input`
1090
+ flex: 1;
1091
+ min-width: 0;
1092
+ outline: none;
1093
+ font-size: 14px;
1094
+ font-weight: 500;
1095
+ height: ${e=>at(e.$size).height};
1096
+ padding: ${e=>at(e.$size).padding};
1097
+ border-radius: ${e=>at(e.$size).radius};
1098
+
1099
+ color: ${e=>re(e.$variant).color.static};
1100
+ border: 1px solid ${e=>re(e.$variant).border.static};
1101
+ background-color: ${e=>re(e.$variant).background.static};
1102
+
1103
+ &::placeholder {
1104
+ color: ${e=>re(e.$variant).placeholder.static};
1105
+ }
1106
+
1107
+ &:disabled {
1108
+ cursor: not-allowed;
1109
+ color: ${e=>re(e.$variant).color.disabled};
1110
+ background-color: ${e=>re(e.$variant).background.disabled};
1111
+ border-color: ${e=>re(e.$variant).border.disabled};
1112
+
1113
+ &::placeholder {
1114
+ color: ${e=>re(e.$variant).placeholder.disabled};
1115
+ }
1116
+ }
1117
+
1118
+ &:focus-visible {
1119
+ outline: 2px solid ${e=>re(e.$variant).focus};
1120
+ }
1121
+ `,lt=A.newClassNameGetter("input"),xo=({className:e,classnames:o,disabled:r,fullWidth:i,label:n,ref:l,size:c="default",variant:d="normal",...p})=>a.jsxs(Nn,{className:lt("container",e),$fullWidth:!!i,children:[a.jsx(In,{variant:d,className:lt("label",o==null?void 0:o.label),children:n}),a.jsx(An,{...p,ref:l,disabled:r,$size:c,$variant:d,className:lt("input",o==null?void 0:o.input)})]}),Dn=s.div`
1122
+ position: fixed;
1123
+ inset: 0;
1124
+ z-index: 1000;
1125
+ display: flex;
1126
+ align-items: center;
1127
+ justify-content: center;
1128
+ background-color: ${t.alpha(t.COLORS.black,50)};
1129
+ animation: ${t.KEYFRAMES.fadeIn} ${e=>e.$animated?"0.15s":"0s"} ease-out forwards;
1130
+ `,Mn=s.div`
1131
+ position: relative;
1132
+ z-index: 1001;
1133
+ width: ${e=>e.$width};
1134
+ max-width: calc(100vw - 32px);
1135
+ max-height: calc(100vh - 32px);
1136
+ overflow: auto;
1137
+ background-color: ${t.COLORS.white};
1138
+ border-radius: 16px;
1139
+ box-shadow: 0 8px 32px ${t.alpha(t.COLORS.black,20)};
1140
+ animation: ${t.KEYFRAMES.scaleIn} ${e=>e.$animated?"0.15s":"0s"} ease-out forwards;
1141
+ `,Wt=A.newClassNameGetter("modal"),Oo=({animated:e,children:o,className:r,classnames:i,open:n,ref:l,width:c="500px",...d})=>n?be.createPortal(a.jsx(Dn,{className:Wt("overlay",i==null?void 0:i.overlay),$animated:!!e,children:a.jsx(Mn,{...d,ref:l,className:Wt("content",r,i==null?void 0:i.content),$animated:!!e,$width:c,children:o})}),document.body):null,$o={normal:{border:t.COLORS["iron-grey"],label:t.COLORS.black},error:{border:t.COLORS.red,label:t.COLORS.red}},_n=s.div`
740
1142
  display: flex;
741
1143
  flex-direction: column;
742
- gap: 8px;
743
- border: none;
1144
+ gap: 4px;
1145
+ `,Fn=s(Se)`
1146
+ margin-left: 6px;
1147
+ color: ${e=>$o[e.$variant].label};
1148
+ `,Bn=s.button`
1149
+ display: flex;
1150
+ flex-wrap: wrap;
1151
+ align-items: center;
1152
+ gap: 6px;
1153
+ min-height: 44px;
1154
+ padding: 8px 12px;
1155
+ border: 1px dashed ${e=>$o[e.$variant].border};
1156
+ border-radius: 8px;
1157
+ background: ${t.COLORS.white};
1158
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1159
+ opacity: ${e=>e.$disabled?.5:1};
1160
+ transition: border-color 0.15s ease;
1161
+ text-align: left;
1162
+
1163
+ &:hover:not(:disabled) {
1164
+ border-color: ${e=>e.$variant==="error"?t.COLORS.red:t.COLORS.black};
1165
+ }
1166
+
1167
+ &:focus-visible {
1168
+ outline: 2px solid
1169
+ ${e=>e.$variant==="error"?t.COLORS.red:t.COLORS["steel-blue"]};
1170
+ outline-offset: 2px;
1171
+ }
1172
+ `,Yn=s.span`
1173
+ color: ${t.COLORS["iron-grey"]};
1174
+ font-size: 14px;
1175
+ `,Hn=s.div`
1176
+ display: flex;
1177
+ flex-direction: column;
1178
+ padding: 20px;
1179
+ gap: 16px;
1180
+ `,Gn=s.div`
1181
+ display: flex;
1182
+ align-items: center;
1183
+ justify-content: space-between;
1184
+ `,Wn=s.h3`
744
1185
  margin: 0;
745
- padding: 0;
746
- `,Ia=I.span`
747
- font-size: 13px;
748
- font-weight: 500;
749
- line-height: 1.5;
750
- line-height: 1.5;
751
- color: ${({theme:e})=>e.checkboxGroup.label.color};
752
- margin-bottom: 4px;
753
- padding: 0;
754
- `,Ta=I.div`
1186
+ font-size: 18px;
1187
+ font-weight: 600;
1188
+ color: ${t.COLORS.black};
1189
+ `,Vn=s.div`
755
1190
  display: flex;
756
1191
  flex-direction: column;
757
- gap: 12px;
758
- `,cr=m.classNameGetter("checkboxGroup"),Oa=({className:e,classnames:t,disabled:r,label:o,onChange:i,options:c,value:l,...s})=>{const d=(a,u)=>{i(u?[...l,a]:l.filter(h=>h!==a))};return m.jsxs($a,{...s,className:cr("container",e,t==null?void 0:t.container),children:[o&&m.jsx(Ia,{className:cr("label",t==null?void 0:t.label),children:o}),m.jsx(Ta,{className:cr("options",t==null?void 0:t.options),children:c.map(a=>m.jsx(mr,{className:t==null?void 0:t.checkbox,checked:l.includes(a.value),label:a.label,disabled:r,onChange:u=>d(a.value,u.target.checked)},a.value))})]})},Ma=(e,t,r)=>r?e.radioCard.container.disabled.backgroundColor:t?e.radioCard.container.checked.backgroundColor:e.radioCard.container.backgroundColor,Aa=(e,t,r,o)=>o?e.radioCard.container.disabled.borderColor:t==="warning"?r?e.radioCard.state.warning.container.checked.borderColor:e.radioCard.state.warning.container.borderColor:t==="error"?r?e.radioCard.state.error.container.checked.borderColor:e.radioCard.state.error.container.borderColor:r?e.radioCard.container.checked.borderColor:e.radioCard.container.borderColor,Pa=(e,t,r)=>t==="warning"?r?e.radioCard.state.warning.container.checked.borderColor:e.radioCard.state.warning.container.borderColor:t==="error"?r?e.radioCard.state.error.container.checked.borderColor:e.radioCard.state.error.container.borderColor:r?e.radioCard.container.checked.borderColor:e.radioCard.container.hover.borderColor,Da=(e,t)=>t==="warning"?e.radioCard.state.warning.container.borderColor:t==="error"?e.radioCard.state.error.container.borderColor:e.radioCard.container.focus.outlineColor,La=(e,t,r)=>t==="warning"?e.radioCard.state.warning.label.color:t==="error"?e.radioCard.state.error.label.color:e.radioCard.label.color,Na=(e,t,r)=>t==="warning"?e.radioCard.state.warning.description.color:t==="error"?e.radioCard.state.error.description.color:e.radioCard.description.color,Fa=I.label`
1192
+ gap: 4px;
1193
+ min-height: 200px;
1194
+ max-height: 300px;
1195
+ overflow-y: auto;
1196
+ `,Un=s.label`
1197
+ display: flex;
1198
+ align-items: center;
1199
+ gap: 10px;
1200
+ padding: 10px 12px;
1201
+ border-radius: 8px;
1202
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1203
+ opacity: ${e=>e.$disabled?.5:1};
1204
+ transition: background-color 0.15s ease;
1205
+
1206
+ &:hover {
1207
+ background-color: ${e=>e.$disabled?"transparent":t.COLORS.gray};
1208
+ }
1209
+ `,Xn=s.span`
1210
+ font-size: 14px;
1211
+ color: ${t.COLORS.black};
1212
+ `,qn=s.div`
1213
+ display: flex;
1214
+ align-items: center;
1215
+ justify-content: center;
1216
+ padding: 32px 16px;
1217
+ color: ${t.COLORS["iron-grey"]};
1218
+ font-size: 14px;
1219
+ text-align: center;
1220
+ `,Q=A.newClassNameGetter("multi-select"),Kn=({className:e,classnames:o,disabled:r=!1,emptyMessage:i="No options found",label:n,maxVisible:l=1/0,modalTitle:c="Select options",onChange:d,options:p,placeholder:h="Select...",ref:u,searchPlaceholder:f="Search...",value:x,variant:k="normal",...S})=>{const[$,y]=g.useState(!1),[O,L]=g.useState(""),b=g.useMemo(()=>p.filter(C=>x.includes(C.value)),[p,x]),z=g.useMemo(()=>{if(!O.trim())return p;const C=O.toLowerCase().trim();return p.filter(_=>_.label.toLowerCase().includes(C))},[p,O]),j=l===1/0?b:b.slice(0,l),N=b.length-j.length,X=()=>{r||(y(!0),L(""))},P=()=>{y(!1),L("")},B=C=>{x.includes(C)?d(x.filter(_=>_!==C)):d([...x,C])},T=C=>{d(x.filter(_=>_!==C))};return a.jsxs(_n,{...S,ref:u,className:Q("container",e),children:[n&&a.jsx(Fn,{$variant:k,className:Q("label",o==null?void 0:o.trigger),children:n}),a.jsx(Bn,{type:"button",$variant:k,$disabled:r,disabled:r,onClick:X,className:Q("trigger",o==null?void 0:o.trigger),children:b.length===0?a.jsx(Yn,{className:Q("placeholder",o==null?void 0:o.placeholder),children:h}):a.jsxs(a.Fragment,{children:[j.map(C=>a.jsx(Xe,{deletable:!0,onDelete:()=>T(C.value),onClick:_=>_.stopPropagation(),className:Q("chip",o==null?void 0:o.chip),children:C.label},C.value)),N>0&&a.jsxs(Xe,{variant:"gray",onClick:C=>C.stopPropagation(),className:Q("chip",o==null?void 0:o.chip),children:["+",N]})]})}),a.jsx(Oo,{open:$,width:"400px",animated:!0,className:Q("modal",o==null?void 0:o.modal),children:a.jsxs(Hn,{children:[a.jsxs(Gn,{children:[a.jsx(Wn,{children:c}),a.jsx(Te,{variant:"transparent",size:"compact",icon:a.jsx(a.X,{}),onClick:P})]}),a.jsx(xo,{type:"text",value:O,onChange:C=>L(C.target.value),placeholder:f,autoFocus:!0,fullWidth:!0,className:Q("search",o==null?void 0:o.search)}),a.jsx(Vn,{className:Q("options",o==null?void 0:o.options),children:z.length===0?a.jsx(qn,{className:Q("empty",o==null?void 0:o.empty),children:i}):z.map(C=>a.jsxs(Un,{$disabled:!!C.disabled,className:Q("option",o==null?void 0:o.option),children:[a.jsx(Ke,{checked:x.includes(C.value),disabled:C.disabled,onChange:()=>B(C.value)}),a.jsx(Xn,{children:C.label})]},C.value))})]})})]})},Vt={light:{background:t.COLORS.white,border:t.alpha(t.COLORS.black,30),title:t.COLORS.black,description:t.COLORS["iron-grey"]},dark:{background:t.alpha(t.COLORS.white,5),border:t.alpha(t.COLORS.white,30),title:t.COLORS.white,description:"#9ca3af"}},qe=e=>Vt[e]??Vt.light,Zn=s.div`
1221
+ display: flex;
1222
+ flex-direction: column;
1223
+ gap: 16px;
1224
+ padding: 12px;
1225
+ border: 1px dashed ${({$variant:e})=>qe(e).border};
1226
+ border-radius: 16px;
1227
+ background-color: ${({$variant:e})=>qe(e).background};
1228
+ `,Jn=s.div`
1229
+ display: flex;
1230
+ flex-direction: column;
1231
+ gap: 4px;
1232
+ `,Qn=s.div`
1233
+ font-size: 18px;
1234
+ font-weight: 600;
1235
+ line-height: 1.4;
1236
+ color: ${({$variant:e})=>qe(e).title};
1237
+ `,ea=s.div`
1238
+ font-size: 14px;
1239
+ line-height: 1.5;
1240
+ color: ${({$variant:e})=>qe(e).description};
1241
+ `,ta=s.div`
1242
+ display: flex;
1243
+ flex-wrap: wrap;
1244
+ gap: 8px;
1245
+ `,He=A.newClassNameGetter("panel"),oa=({children:e,className:o,classnames:r,description:i,ref:n,title:l,variant:c="light",...d})=>{const p=l||i;return a.jsxs(Zn,{...d,ref:n,className:He("container",o),$variant:c,children:[p&&a.jsxs(Jn,{children:[l&&a.jsx(Qn,{className:He("title",r==null?void 0:r.title),$variant:c,children:l}),i&&a.jsx(ea,{className:He("description",r==null?void 0:r.description),$variant:c,children:i})]}),a.jsx(ta,{className:He("content",r==null?void 0:r.content),children:e})]})},Ot={compact:{height:4,radius:2},default:{height:8,radius:4}},ra=s.div`
1246
+ width: 100%;
1247
+ height: ${({$size:e})=>Ot[e].height}px;
1248
+ border-radius: ${({$size:e})=>Ot[e].radius}px;
1249
+ background-color: ${t.COLORS.gray};
1250
+ overflow: hidden;
1251
+ `,ia=s.div`
1252
+ height: 100%;
1253
+ width: ${({$value:e})=>Math.min(100,Math.max(0,e))}%;
1254
+ border-radius: ${({$size:e})=>Ot[e].radius}px;
1255
+ background-color: ${t.COLORS.black};
1256
+ transition: width 0.2s ease;
1257
+ `,Ut=A.newClassNameGetter("progress"),na=({value:e,size:o="default",className:r,classnames:i,ref:n,...l})=>a.jsx(ra,{...l,ref:n,$size:o,className:Ut("track",r,i==null?void 0:i.track),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,children:a.jsx(ia,{$size:o,$value:e,className:Ut("bar",i==null?void 0:i.bar)})}),Xt={normal:{box:{border:t.alpha(t.COLORS["iron-grey"],30),borderChecked:t.COLORS["iron-grey"],background:t.COLORS.white,backgroundChecked:t.COLORS.white,focusShadow:t.alpha(t.COLORS["iron-grey"],30)},dot:t.COLORS.black,label:t.COLORS.black},error:{box:{border:t.COLORS.red,borderChecked:t.COLORS.red,background:t.COLORS.white,backgroundChecked:t.COLORS.white,focusShadow:t.alpha(t.COLORS.red,30)},dot:t.COLORS.red,label:t.COLORS.red}},he=e=>Xt[e]??Xt.normal,aa=s.label`
1258
+ display: inline-flex;
1259
+ align-items: center;
1260
+ gap: 8px;
1261
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1262
+ opacity: ${e=>e.$disabled?.5:1};
1263
+
1264
+ &:has(input:focus-visible) > span:first-of-type {
1265
+ box-shadow: 0 0 0 2px ${e=>he(e.$variant).box.focusShadow};
1266
+ }
1267
+ `,la=s.input`
1268
+ position: absolute;
1269
+ opacity: 0;
1270
+ width: 0;
1271
+ height: 0;
1272
+ pointer-events: none;
1273
+ `,da=s.span`
1274
+ display: inline-flex;
1275
+ align-items: center;
1276
+ justify-content: center;
1277
+ flex-shrink: 0;
1278
+ width: 18px;
1279
+ height: 18px;
1280
+ border-radius: 50%;
1281
+ border: 1.5px solid
1282
+ ${e=>e.$checked?he(e.$variant).box.borderChecked:he(e.$variant).box.border};
1283
+ background-color: ${e=>e.$checked?he(e.$variant).box.backgroundChecked:he(e.$variant).box.background};
1284
+ transition:
1285
+ border-color 0.15s ease,
1286
+ background-color 0.15s ease,
1287
+ box-shadow 0.15s ease;
1288
+ `,ca=s.span`
1289
+ width: 8px;
1290
+ height: 8px;
1291
+ border-radius: 50%;
1292
+ background-color: ${e=>he(e.$variant).dot};
1293
+ opacity: ${e=>e.$visible?1:0};
1294
+ transform: ${e=>e.$visible?"scale(1)":"scale(0.5)"};
1295
+ transition:
1296
+ opacity 0.15s ease,
1297
+ transform 0.15s ease;
1298
+ `,sa=s.span`
1299
+ font-size: 14px;
1300
+ font-weight: 500;
1301
+ line-height: 1.5;
1302
+ color: ${e=>he(e.$variant).label};
1303
+ user-select: none;
1304
+ `,Le=A.newClassNameGetter("radio"),St=({checked:e,className:o,classnames:r,disabled:i,label:n,onChange:l,ref:c,variant:d="normal",...p})=>a.jsxs(aa,{className:Le("container",o),$disabled:!!i,$variant:d,children:[a.jsx(la,{...p,ref:c,type:"radio",className:Le("input",r==null?void 0:r.input),checked:e,disabled:i,onChange:l}),a.jsx(da,{className:Le("box",r==null?void 0:r.box),$checked:e,$variant:d,children:a.jsx(ca,{className:Le("dot",r==null?void 0:r.dot),$visible:e,$variant:d})}),n&&a.jsx(sa,{className:Le("label",r==null?void 0:r.label),$variant:d,children:n})]}),qt={normal:{border:{static:t.alpha(t.COLORS.black,20),hover:t.alpha(t.COLORS.black,40),active:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,10)},borderChecked:t.COLORS.black,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.black,5)},backgroundChecked:t.alpha(t.COLORS.black,5),focusRing:t.alpha(t.COLORS.black,20),label:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,40)},description:{static:t.alpha(t.COLORS.black,60),hover:t.alpha(t.COLORS.black,60),active:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,30)}},error:{border:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,30)},borderChecked:t.COLORS.red,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.red,5)},backgroundChecked:t.alpha(t.COLORS.red,5),focusRing:t.alpha(t.COLORS.red,20),label:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,40)},description:{static:t.alpha(t.COLORS.red,70),hover:t.alpha(t.COLORS.red,70),active:t.alpha(t.COLORS.red,70),disabled:t.alpha(t.COLORS.red,40)}}},se=e=>qt[e]??qt.normal,pa=s.label`
759
1305
  display: grid;
760
1306
  grid-template-columns: auto 1fr;
761
1307
  align-items: start;
762
- gap: 12px;
1308
+ gap: 8px;
763
1309
  padding: 12px;
764
- background-color: ${({theme:e,$checked:t,$disabled:r})=>Ma(e,t,r)};
1310
+ background-color: ${e=>{const o=se(e.$variant);return e.$disabled?o.background.disabled:e.$checked?o.backgroundChecked:o.background.static}};
765
1311
  border: 1px solid
766
- ${({theme:e,$state:t,$checked:r,$disabled:o})=>Aa(e,t,r,o)};
1312
+ ${e=>{const o=se(e.$variant);return e.$disabled?o.border.disabled:e.$checked?o.borderChecked:o.border.static}};
767
1313
  border-radius: 12px;
768
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1314
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
769
1315
  transition:
770
1316
  border-color 0.15s ease,
771
1317
  background-color 0.15s ease;
772
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
1318
+ width: ${e=>e.$fullWidth?"100%":"fit-content"};
773
1319
  min-width: 0;
774
1320
 
775
1321
  &:hover:not([data-disabled='true']) {
776
- border-color: ${({theme:e,$state:t,$checked:r})=>Pa(e,t,r)};
1322
+ border-color: ${e=>{const o=se(e.$variant);return e.$checked?o.borderChecked:o.border.hover}};
777
1323
  }
778
1324
 
779
1325
  &:has(:focus-visible) {
780
- outline: 2px solid ${({theme:e,$state:t})=>Da(e,t)};
781
- outline-offset: 1px;
1326
+ outline: none;
1327
+ box-shadow: 0 0 0 3px ${e=>se(e.$variant).focusRing};
782
1328
  }
783
1329
 
784
1330
  .vacano_radio_container {
785
1331
  pointer-events: none;
786
1332
  }
787
- `,_a=I.input`
1333
+ `,ua=s.input`
788
1334
  position: absolute;
789
1335
  width: 1px;
790
1336
  height: 1px;
@@ -794,129 +1340,608 @@
794
1340
  clip: rect(0, 0, 0, 0);
795
1341
  white-space: nowrap;
796
1342
  border: 0;
797
- `,ja=I.div`
1343
+ `,ha=s.div`
798
1344
  display: flex;
799
1345
  flex-direction: column;
800
1346
  gap: 2px;
801
1347
  min-width: 0;
802
- `,Ba=I.span`
1348
+ `,ba=s.span`
803
1349
  font-size: 14px;
804
1350
  font-weight: 500;
805
1351
  line-height: 1.4;
806
- color: ${({theme:e,$state:t})=>La(e,t)};
1352
+ color: ${e=>se(e.$variant).label.static};
807
1353
 
808
1354
  label[data-disabled='true'] & {
809
- color: ${({theme:e})=>e.radioCard.label.disabled.color};
1355
+ color: ${e=>se(e.$variant).label.disabled};
810
1356
  }
811
- `,za=I.span`
1357
+ `,ga=s.span`
812
1358
  font-size: 12px;
813
1359
  font-weight: 400;
814
1360
  line-height: 1.4;
815
- color: ${({theme:e,$state:t})=>Na(e,t)};
1361
+ color: ${e=>se(e.$variant).description.static};
816
1362
 
817
1363
  label[data-disabled='true'] & {
818
- color: ${({theme:e})=>e.radioCard.description.disabled.color};
1364
+ color: ${e=>se(e.$variant).description.disabled};
819
1365
  }
820
- `,$t=m.classNameGetter("radioCard"),Wa=({checked:e,className:t,classnames:r,description:o,disabled:i,fullWidth:c,label:l,onChange:s,ref:d,state:a,...u})=>m.jsxs(Fa,{className:$t("container",t,r==null?void 0:r.container),$checked:e,$disabled:i,$fullWidth:c,$state:a,"data-disabled":i,children:[m.jsx(_a,{...u,ref:d,type:"radio",checked:e,disabled:i,onChange:s}),m.jsx(Dr,{className:r==null?void 0:r.radio,checked:e,disabled:i,state:a,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),m.jsxs(ja,{className:$t("content",r==null?void 0:r.content),children:[m.jsx(Ba,{className:$t("label",r==null?void 0:r.label),$state:a,children:l}),o&&m.jsx(za,{className:$t("description",r==null?void 0:r.description),$state:a,children:o})]})]}),Va=I.div`
1366
+ `,Ge=A.newClassNameGetter("radio-card"),fa=({checked:e,className:o,classnames:r,description:i,disabled:n,fullWidth:l=!1,label:c,onChange:d,ref:p,variant:h="normal",...u})=>a.jsxs(pa,{className:Ge("container",o),$checked:e,$disabled:!!n,$fullWidth:l,$variant:h,"data-disabled":n,children:[a.jsx(ua,{...u,ref:p,type:"radio",checked:e,disabled:n,onChange:d}),a.jsx(St,{className:r==null?void 0:r.radio,checked:e,disabled:n,variant:h,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),a.jsxs(ha,{className:Ge("content",r==null?void 0:r.content),children:[a.jsx(ba,{className:Ge("label",r==null?void 0:r.label),$variant:h,children:c}),i&&a.jsx(ga,{className:Ge("description",r==null?void 0:r.description),$variant:h,children:i})]})]}),Kt={label:{color:t.COLORS.black,disabledColor:t.alpha(t.COLORS.black,40)}},xa=s.div`
821
1367
  display: flex;
822
1368
  flex-direction: column;
823
1369
  gap: 8px;
824
- border: none;
825
- margin: 0;
826
- padding: 0;
827
- `,Ha=I.span`
1370
+ `,Oa=s.span`
828
1371
  font-size: 13px;
829
1372
  font-weight: 500;
830
1373
  line-height: 1.5;
831
- color: ${({theme:e})=>e.radioGroup.label.color};
1374
+ color: ${e=>e.$disabled?Kt.label.disabledColor:Kt.label.color};
832
1375
  margin-bottom: 4px;
833
- padding: 0;
834
- `,Ua=I.div`
1376
+ `,$a=s.div`
835
1377
  display: flex;
836
1378
  flex-direction: column;
837
1379
  gap: 12px;
838
- `,sr=m.classNameGetter("radioGroup"),Ka=({className:e,classnames:t,disabled:r,label:o,name:i,onChange:c,options:l,value:s,...d})=>m.jsxs(Va,{...d,className:sr("container",e,t==null?void 0:t.container),children:[o&&m.jsx(Ha,{className:sr("label",t==null?void 0:t.label),children:o}),m.jsx(Ua,{className:sr("options",t==null?void 0:t.options),children:l.map(a=>m.jsx(Dr,{className:t==null?void 0:t.radio,name:i,checked:s===a.value,label:a.label,disabled:r,onChange:()=>c(a.value)},a.value))})]}),n={black:"#000000",white:"#ffffff",onyx:"#111111",carbonBlack:"#232323",graphite:"#343434",slate:"#484848",ash:"#6b6b6b",silver:"#8c8c8c",mist:"#b0b0b0",cloud:"#d4d4d4",snow:"#ebebeb",icyBlue:"#bde0fe",blue:"#0050c8",green:"#009650",amber:"#b48200",red:"#c83232",grey:"#646464",blueBg:"#0064ff1a",greenBg:"#00c8641a",amberBg:"#ffb4001a",redBg:"#ff50501a",greyBg:"#0000000d",hoverLight:"#00000008",activeLight:"#00000012",hoverDark:"#ffffff12",activeDark:"#ffffff20",redLight:"#c8323214",redMedium:"#c8323228",focusRingDark:"#00000080",focusRingDarkSubtle:"#00000040",focusRingLight:"#ffffff80",focusRingLightSubtle:"#ffffff40",focusRingDanger:"#c8323280",focusRingWarning:"#b4820040",focusRingError:"#c8323240",inputBgLight:"#00000008",inputBgDark:"#ffffff0d",inputBgWarning:"#ffb4001a",inputBgError:"#ff50501a"},Ge={none:"none",sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",lg:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",xl:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl2:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",xl3:"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},Je={sm:640,md:768,lg:1024,xl:1280,xl2:1536},Ga={sm:`@media (min-width: ${Je.sm}px)`,md:`@media (min-width: ${Je.md}px)`,lg:`@media (min-width: ${Je.lg}px)`,xl:`@media (min-width: ${Je.xl}px)`,xl2:`@media (min-width: ${Je.xl2}px)`},jt={chip:{color:{default:n.grey,neutral:n.blue,success:n.green,warning:n.amber,error:n.red},backgroundColor:{default:n.greyBg,neutral:n.blueBg,success:n.greenBg,warning:n.amberBg,error:n.redBg}},button:{primary:{color:n.white,backgroundColor:n.onyx,borderColor:n.onyx,hover:{backgroundColor:n.carbonBlack,borderColor:n.carbonBlack},active:{backgroundColor:n.graphite,borderColor:n.graphite},focus:{outlineColor:n.focusRingDark},disabled:{color:n.silver,backgroundColor:n.snow,borderColor:n.snow},char:{color:n.snow,backgroundColor:n.slate},icon:{color:n.white}},secondary:{color:n.onyx,backgroundColor:n.snow,borderColor:n.cloud,hover:{backgroundColor:n.cloud,borderColor:n.mist},active:{backgroundColor:n.cloud,borderColor:n.silver},focus:{outlineColor:n.focusRingDarkSubtle},disabled:{color:n.silver,backgroundColor:n.snow,borderColor:n.snow},char:{color:n.slate,backgroundColor:n.mist},icon:{color:n.slate}},ghost:{color:n.onyx,backgroundColor:"transparent",borderColor:"transparent",hover:{backgroundColor:n.hoverLight,borderColor:"transparent"},active:{backgroundColor:n.activeLight,borderColor:"transparent"},focus:{outlineColor:n.focusRingDarkSubtle},disabled:{color:n.silver,backgroundColor:"transparent",borderColor:"transparent"},char:{color:n.ash,backgroundColor:n.snow},icon:{color:n.slate}},danger:{color:n.red,backgroundColor:"transparent",borderColor:n.redLight,hover:{backgroundColor:n.redLight,borderColor:n.redLight},active:{backgroundColor:n.redMedium,borderColor:n.redMedium},focus:{outlineColor:n.focusRingDanger},disabled:{color:n.mist,backgroundColor:n.snow,borderColor:n.snow},char:{color:n.red,backgroundColor:n.redLight},icon:{color:n.red}}},checkbox:{box:{backgroundColor:"transparent",borderColor:n.mist,checked:{backgroundColor:n.onyx,borderColor:n.onyx},focus:{shadowColor:n.focusRingDarkSubtle}},icon:{color:n.white},label:{color:n.onyx},state:{warning:{box:{borderColor:n.amber,checked:{backgroundColor:n.amber,borderColor:n.amber},focus:{shadowColor:n.focusRingWarning}},label:{color:n.amber}},error:{box:{borderColor:n.red,checked:{backgroundColor:n.red,borderColor:n.red},focus:{shadowColor:n.focusRingError}},label:{color:n.red}}}},checkboxCard:{container:{backgroundColor:n.white,borderColor:n.mist,hover:{borderColor:n.silver},checked:{backgroundColor:n.white,borderColor:n.onyx},focus:{outlineColor:n.focusRingDarkSubtle},disabled:{backgroundColor:n.snow,borderColor:n.cloud}},label:{color:n.onyx,disabled:{color:n.silver}},description:{color:n.slate,disabled:{color:n.silver}},state:{warning:{container:{borderColor:n.amber,checked:{borderColor:n.amber}},label:{color:n.amber},description:{color:n.amber}},error:{container:{borderColor:n.red,checked:{borderColor:n.red}},label:{color:n.red},description:{color:n.red}}}},checkboxGroup:{label:{color:n.onyx}},input:{wrapper:{backgroundColor:n.inputBgLight,borderColor:n.mist,focus:{outlineColor:n.focusRingDarkSubtle},disabled:{backgroundColor:n.snow,borderColor:n.cloud}},label:{color:n.slate},input:{color:n.onyx,placeholderColor:n.silver,disabled:{color:n.silver}},icon:{color:n.slate,disabled:{color:n.silver}},toggle:{color:n.slate},state:{warning:{wrapper:{backgroundColor:n.inputBgWarning,borderColor:n.amber,focus:{outlineColor:n.focusRingWarning}},label:{color:n.amber},input:{color:n.onyx,placeholderColor:n.amber},icon:{color:n.amber}},error:{wrapper:{backgroundColor:n.inputBgError,borderColor:n.red,focus:{outlineColor:n.focusRingError}},label:{color:n.red},input:{color:n.onyx,placeholderColor:n.red},icon:{color:n.red}}}},radio:{circle:{borderColor:n.mist,checked:{borderColor:n.onyx},focus:{shadowColor:n.focusRingDarkSubtle}},dot:{color:n.onyx},label:{color:n.onyx},state:{warning:{circle:{borderColor:n.amber,checked:{borderColor:n.amber},focus:{shadowColor:n.focusRingWarning}},dot:{color:n.amber},label:{color:n.amber}},error:{circle:{borderColor:n.red,checked:{borderColor:n.red},focus:{shadowColor:n.focusRingError}},dot:{color:n.red},label:{color:n.red}}}},radioCard:{container:{backgroundColor:n.white,borderColor:n.mist,hover:{borderColor:n.silver},checked:{backgroundColor:n.white,borderColor:n.onyx},focus:{outlineColor:n.focusRingDarkSubtle},disabled:{backgroundColor:n.snow,borderColor:n.cloud}},label:{color:n.onyx,disabled:{color:n.silver}},description:{color:n.slate,disabled:{color:n.silver}},state:{warning:{container:{borderColor:n.amber,checked:{borderColor:n.amber}},label:{color:n.amber},description:{color:n.amber}},error:{container:{borderColor:n.red,checked:{borderColor:n.red}},label:{color:n.red},description:{color:n.red}}}},radioGroup:{label:{color:n.onyx}},dropdown:{content:{backgroundColor:n.white,borderColor:n.cloud,shadow:Ge.xl}},select:{trigger:{backgroundColor:n.inputBgLight,borderColor:n.mist,focus:{outlineColor:n.focusRingDarkSubtle},disabled:{backgroundColor:n.snow,borderColor:n.cloud}},label:{color:n.slate},value:{color:n.onyx,placeholderColor:n.silver,disabled:{color:n.silver}},icon:{color:n.slate,disabled:{color:n.silver}},chevron:{color:n.slate,disabled:{color:n.silver}},content:{backgroundColor:n.white,borderColor:n.cloud,shadow:Ge.xl},option:{color:n.onyx,backgroundColor:"transparent",hover:{backgroundColor:n.hoverLight},selected:{backgroundColor:n.blueBg,color:n.blue},check:{color:n.blue}},search:{backgroundColor:n.snow,borderColor:n.cloud,color:n.onyx,placeholderColor:n.silver},empty:{color:n.silver},state:{warning:{trigger:{backgroundColor:n.inputBgWarning,borderColor:n.amber,focus:{outlineColor:n.focusRingWarning}},label:{color:n.amber},value:{color:n.onyx,placeholderColor:n.amber},icon:{color:n.amber},chevron:{color:n.amber}},error:{trigger:{backgroundColor:n.inputBgError,borderColor:n.red,focus:{outlineColor:n.focusRingError}},label:{color:n.red},value:{color:n.onyx,placeholderColor:n.red},icon:{color:n.red},chevron:{color:n.red}}}},multiSelect:{trigger:{backgroundColor:n.inputBgLight,borderColor:n.mist,focus:{outlineColor:n.focusRingDarkSubtle},disabled:{backgroundColor:n.snow,borderColor:n.cloud}},label:{color:n.slate},placeholder:{color:n.silver,disabled:{color:n.silver}},chip:{backgroundColor:n.snow,color:n.onyx,remove:{color:n.slate,hover:{color:n.onyx}},disabled:{backgroundColor:n.cloud,color:n.silver,remove:{color:n.silver}}},icon:{color:n.slate,disabled:{color:n.silver}},chevron:{color:n.slate,disabled:{color:n.silver}},content:{backgroundColor:n.white,borderColor:n.cloud,shadow:Ge.xl},option:{color:n.onyx,backgroundColor:"transparent",hover:{backgroundColor:n.hoverLight},selected:{backgroundColor:n.blueBg,color:n.blue},check:{color:n.blue}},search:{backgroundColor:n.snow,borderColor:n.cloud,color:n.onyx,placeholderColor:n.silver},empty:{color:n.silver},state:{warning:{trigger:{backgroundColor:n.inputBgWarning,borderColor:n.amber,focus:{outlineColor:n.focusRingWarning}},label:{color:n.amber},chip:{backgroundColor:n.amberBg,color:n.amber,remove:{color:n.amber}},icon:{color:n.amber},chevron:{color:n.amber}},error:{trigger:{backgroundColor:n.inputBgError,borderColor:n.red,focus:{outlineColor:n.focusRingError}},label:{color:n.red},chip:{backgroundColor:n.redBg,color:n.red,remove:{color:n.red}},icon:{color:n.red},chevron:{color:n.red}}}}},kn={chip:{color:{default:n.icyBlue,neutral:n.icyBlue,success:n.green,warning:n.amber,error:n.red},backgroundColor:{default:n.graphite,neutral:n.graphite,success:n.greenBg,warning:n.amberBg,error:n.redBg}},button:{primary:{color:n.black,backgroundColor:n.white,borderColor:n.white,hover:{backgroundColor:n.cloud,borderColor:n.cloud},active:{backgroundColor:n.mist,borderColor:n.mist},focus:{outlineColor:n.focusRingLight},disabled:{color:n.ash,backgroundColor:n.graphite,borderColor:n.graphite},char:{color:n.slate,backgroundColor:n.cloud},icon:{color:n.black}},secondary:{color:n.white,backgroundColor:n.graphite,borderColor:n.slate,hover:{backgroundColor:n.slate,borderColor:n.ash},active:{backgroundColor:n.ash,borderColor:n.silver},focus:{outlineColor:n.focusRingLightSubtle},disabled:{color:n.ash,backgroundColor:n.carbonBlack,borderColor:n.carbonBlack},char:{color:n.mist,backgroundColor:n.slate},icon:{color:n.cloud}},ghost:{color:n.white,backgroundColor:"transparent",borderColor:"transparent",hover:{backgroundColor:n.hoverDark,borderColor:"transparent"},active:{backgroundColor:n.activeDark,borderColor:"transparent"},focus:{outlineColor:n.focusRingLightSubtle},disabled:{color:n.ash,backgroundColor:"transparent",borderColor:"transparent"},char:{color:n.mist,backgroundColor:n.graphite},icon:{color:n.cloud}},danger:{color:n.red,backgroundColor:"transparent",borderColor:n.redLight,hover:{backgroundColor:n.redLight,borderColor:n.redLight},active:{backgroundColor:n.redMedium,borderColor:n.redMedium},focus:{outlineColor:n.focusRingDanger},disabled:{color:n.ash,backgroundColor:n.carbonBlack,borderColor:n.carbonBlack},char:{color:n.red,backgroundColor:n.redLight},icon:{color:n.red}}},checkbox:{box:{backgroundColor:"transparent",borderColor:n.ash,checked:{backgroundColor:n.white,borderColor:n.white},focus:{shadowColor:n.focusRingLightSubtle}},icon:{color:n.black},label:{color:n.white},state:{warning:{box:{borderColor:n.amber,checked:{backgroundColor:n.amber,borderColor:n.amber},focus:{shadowColor:n.focusRingWarning}},label:{color:n.amber}},error:{box:{borderColor:n.red,checked:{backgroundColor:n.red,borderColor:n.red},focus:{shadowColor:n.focusRingError}},label:{color:n.red}}}},checkboxCard:{container:{backgroundColor:n.graphite,borderColor:n.slate,hover:{borderColor:n.ash},checked:{backgroundColor:n.graphite,borderColor:n.white},focus:{outlineColor:n.focusRingLightSubtle},disabled:{backgroundColor:n.carbonBlack,borderColor:n.slate}},label:{color:n.white,disabled:{color:n.ash}},description:{color:n.cloud,disabled:{color:n.ash}},state:{warning:{container:{borderColor:n.amber,checked:{borderColor:n.amber}},label:{color:n.amber},description:{color:n.amber}},error:{container:{borderColor:n.red,checked:{borderColor:n.red}},label:{color:n.red},description:{color:n.red}}}},checkboxGroup:{label:{color:n.white}},input:{wrapper:{backgroundColor:n.inputBgDark,borderColor:n.slate,focus:{outlineColor:n.focusRingLightSubtle},disabled:{backgroundColor:n.graphite,borderColor:n.slate}},label:{color:n.cloud},input:{color:n.white,placeholderColor:n.ash,disabled:{color:n.ash}},icon:{color:n.cloud,disabled:{color:n.ash}},toggle:{color:n.cloud},state:{warning:{wrapper:{backgroundColor:n.inputBgWarning,borderColor:n.amber,focus:{outlineColor:n.focusRingWarning}},label:{color:n.amber},input:{color:n.white,placeholderColor:n.amber},icon:{color:n.amber}},error:{wrapper:{backgroundColor:n.inputBgError,borderColor:n.red,focus:{outlineColor:n.focusRingError}},label:{color:n.red},input:{color:n.white,placeholderColor:n.red},icon:{color:n.red}}}},radio:{circle:{borderColor:n.ash,checked:{borderColor:n.white},focus:{shadowColor:n.focusRingLightSubtle}},dot:{color:n.white},label:{color:n.white},state:{warning:{circle:{borderColor:n.amber,checked:{borderColor:n.amber},focus:{shadowColor:n.focusRingWarning}},dot:{color:n.amber},label:{color:n.amber}},error:{circle:{borderColor:n.red,checked:{borderColor:n.red},focus:{shadowColor:n.focusRingError}},dot:{color:n.red},label:{color:n.red}}}},radioCard:{container:{backgroundColor:n.graphite,borderColor:n.slate,hover:{borderColor:n.ash},checked:{backgroundColor:n.graphite,borderColor:n.white},focus:{outlineColor:n.focusRingLightSubtle},disabled:{backgroundColor:n.carbonBlack,borderColor:n.slate}},label:{color:n.white,disabled:{color:n.ash}},description:{color:n.cloud,disabled:{color:n.ash}},state:{warning:{container:{borderColor:n.amber,checked:{borderColor:n.amber}},label:{color:n.amber},description:{color:n.amber}},error:{container:{borderColor:n.red,checked:{borderColor:n.red}},label:{color:n.red},description:{color:n.red}}}},radioGroup:{label:{color:n.white}},dropdown:{content:{backgroundColor:n.graphite,borderColor:n.slate,shadow:Ge.xl}},select:{trigger:{backgroundColor:n.inputBgDark,borderColor:n.slate,focus:{outlineColor:n.focusRingLightSubtle},disabled:{backgroundColor:n.graphite,borderColor:n.slate}},label:{color:n.cloud},value:{color:n.white,placeholderColor:n.ash,disabled:{color:n.ash}},icon:{color:n.cloud,disabled:{color:n.ash}},chevron:{color:n.cloud,disabled:{color:n.ash}},content:{backgroundColor:n.graphite,borderColor:n.slate,shadow:Ge.xl},option:{color:n.white,backgroundColor:"transparent",hover:{backgroundColor:n.hoverDark},selected:{backgroundColor:n.blueBg,color:n.blue},check:{color:n.blue}},search:{backgroundColor:n.carbonBlack,borderColor:n.slate,color:n.white,placeholderColor:n.ash},empty:{color:n.ash},state:{warning:{trigger:{backgroundColor:n.inputBgWarning,borderColor:n.amber,focus:{outlineColor:n.focusRingWarning}},label:{color:n.amber},value:{color:n.white,placeholderColor:n.amber},icon:{color:n.amber},chevron:{color:n.amber}},error:{trigger:{backgroundColor:n.inputBgError,borderColor:n.red,focus:{outlineColor:n.focusRingError}},label:{color:n.red},value:{color:n.white,placeholderColor:n.red},icon:{color:n.red},chevron:{color:n.red}}}},multiSelect:{trigger:{backgroundColor:n.inputBgDark,borderColor:n.slate,focus:{outlineColor:n.focusRingLightSubtle},disabled:{backgroundColor:n.graphite,borderColor:n.slate}},label:{color:n.cloud},placeholder:{color:n.ash,disabled:{color:n.ash}},chip:{backgroundColor:n.slate,color:n.white,remove:{color:n.cloud,hover:{color:n.white}},disabled:{backgroundColor:n.graphite,color:n.ash,remove:{color:n.ash}}},icon:{color:n.cloud,disabled:{color:n.ash}},chevron:{color:n.cloud,disabled:{color:n.ash}},content:{backgroundColor:n.graphite,borderColor:n.slate,shadow:Ge.xl},option:{color:n.white,backgroundColor:"transparent",hover:{backgroundColor:n.hoverDark},selected:{backgroundColor:n.blueBg,color:n.blue},check:{color:n.blue}},search:{backgroundColor:n.carbonBlack,borderColor:n.slate,color:n.white,placeholderColor:n.ash},empty:{color:n.ash},state:{warning:{trigger:{backgroundColor:n.inputBgWarning,borderColor:n.amber,focus:{outlineColor:n.focusRingWarning}},label:{color:n.amber},chip:{backgroundColor:n.amberBg,color:n.amber,remove:{color:n.amber}},icon:{color:n.amber},chevron:{color:n.amber}},error:{trigger:{backgroundColor:n.inputBgError,borderColor:n.red,focus:{outlineColor:n.focusRingError}},label:{color:n.red},chip:{backgroundColor:n.redBg,color:n.red,remove:{color:n.red}},icon:{color:n.red},chevron:{color:n.red}}}}},Sn=_.createContext({mode:"light",theme:jt,setMode:()=>{}}),qa=()=>{const e=_.useContext(Sn);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},Xa=qe.css`
839
- *,
840
- *::before,
841
- *::after {
842
- box-sizing: border-box;
1380
+ `,dt=A.newClassNameGetter("radio-group"),Sa=({className:e,classnames:o,disabled:r,label:i,name:n,onChange:l,options:c,ref:d,value:p,...h})=>a.jsxs(xa,{...h,ref:d,className:dt("container",e),children:[i&&a.jsx(Oa,{className:dt("label",o==null?void 0:o.label),$disabled:r,children:i}),a.jsx($a,{className:dt("options",o==null?void 0:o.options),children:c.map(u=>a.jsx(St,{className:o==null?void 0:o.radio,name:n,checked:p===u.value,label:u.label,disabled:r,onChange:()=>l(u.value)},u.value))})]}),ct=40,ze=4,Zt={compact:{height:"32px",padding:"0 10px",radius:"14px"},default:{height:"40px",padding:"0 14px",radius:"16px"}},Jt={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:t.alpha(t.COLORS.black,40),focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:t.alpha(t.COLORS.red,40),focus:t.alpha(t.COLORS.red,30)}},st=e=>Zt[e]??Zt.default,le=e=>Jt[e]??Jt.normal,ya=s.div`
1381
+ position: relative;
1382
+ display: grid;
1383
+ gap: 2px;
1384
+ min-width: 180px;
1385
+ width: ${e=>e.$fullWidth?"100%":"fit-content"};
1386
+ `,va=s(Se)`
1387
+ margin-left: 6px;
1388
+ `,ma=s.button`
1389
+ display: flex;
1390
+ align-items: center;
1391
+ justify-content: space-between;
1392
+ gap: 8px;
1393
+ width: 100%;
1394
+ outline: none;
1395
+ font-size: 14px;
1396
+ font-weight: 500;
1397
+ text-align: left;
1398
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1399
+ height: ${e=>st(e.$size).height};
1400
+ padding: ${e=>st(e.$size).padding};
1401
+ border-radius: ${e=>st(e.$size).radius};
1402
+
1403
+ color: ${e=>e.$hasValue?e.$disabled?le(e.$variant).color.disabled:le(e.$variant).color.static:le(e.$variant).placeholder};
1404
+ border: 1px solid
1405
+ ${e=>e.$disabled?le(e.$variant).border.disabled:le(e.$variant).border.static};
1406
+ background-color: ${e=>e.$disabled?le(e.$variant).background.disabled:le(e.$variant).background.static};
1407
+
1408
+ &:focus-visible {
1409
+ outline: 2px solid ${e=>le(e.$variant).focus};
843
1410
  }
1411
+ `,Ca=s.span`
1412
+ flex: 1;
1413
+ min-width: 0;
1414
+ overflow: hidden;
1415
+ text-overflow: ellipsis;
1416
+ white-space: nowrap;
1417
+ `,wa=s.span`
1418
+ display: flex;
1419
+ align-items: center;
1420
+ justify-content: center;
1421
+ flex-shrink: 0;
1422
+ transition: transform 0.2s ease;
1423
+ transform: rotate(${e=>e.$open?"180deg":"0deg"});
1424
+ `,So=`
1425
+ padding: 4px;
1426
+ background: ${t.COLORS.white};
1427
+ border: 1px solid ${t.alpha(t.COLORS.black,10)};
1428
+ border-radius: 16px;
1429
+ box-shadow: 0 4px 20px ${t.alpha(t.COLORS.black,15)};
1430
+ z-index: 1000;
1431
+ `,Ra=s.div`
1432
+ position: absolute;
1433
+ left: -4px;
1434
+ width: calc(100% + 8px);
1435
+ ${So}
1436
+ `,ka=s.div`
1437
+ position: fixed;
1438
+ ${So}
1439
+ `,La=s.button`
1440
+ display: flex;
1441
+ align-items: center;
1442
+ justify-content: space-between;
1443
+ gap: 8px;
1444
+ width: 100%;
1445
+ height: 40px;
1446
+ padding: 0 14px;
1447
+ border: none;
1448
+ background: ${e=>e.$selected?t.alpha(t.COLORS.black,6):"transparent"};
1449
+ border-radius: 12px;
1450
+ font-size: 14px;
1451
+ font-weight: 500;
1452
+ text-align: left;
1453
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1454
+ color: ${e=>e.$disabled?t.alpha(t.COLORS.black,40):t.COLORS.black};
1455
+ transition: background-color 0.15s ease;
844
1456
 
845
- * {
846
- margin: 0;
847
- padding: 0;
1457
+ &:hover:not(:disabled) {
1458
+ background: ${t.alpha(t.COLORS.black,8)};
848
1459
  }
849
1460
 
850
- html {
851
- font-size: 16px;
852
- -webkit-text-size-adjust: 100%;
853
- text-size-adjust: 100%;
1461
+ &:focus-visible {
1462
+ outline: none;
1463
+ background: ${t.alpha(t.COLORS.black,8)};
1464
+ }
1465
+ `,za=s.span`
1466
+ display: flex;
1467
+ align-items: center;
1468
+ justify-content: center;
1469
+ flex-shrink: 0;
1470
+ color: ${t.COLORS.black};
1471
+ `,$e=A.newClassNameGetter("select"),Pa=({className:e,classnames:o,disabled:r=!1,fullWidth:i=!1,label:n,onChange:l,options:c,placeholder:d="Select...",portalRenderNode:p,ref:h,size:u="default",value:f,variant:x="normal",...k})=>{const[S,$]=g.useState(!1),[y,O]=g.useState({top:0,left:0,width:0}),L=g.useRef(null),b=g.useRef(null),z=g.useRef(null),j=c.find(v=>v.value===f),N=Math.max(0,c.findIndex(v=>v.value===f)),X=-(N*ct+ze),P=()=>{if(!b.current||!p)return;const v=b.current.getBoundingClientRect(),E=N*ct+ze;let w=v.top-E;const D=c.length*ct+ze*2,Y=8,M=window.innerHeight-D-8;w<Y&&(w=Y),w>M&&(w=M),O({top:w,left:v.left-ze,width:v.width+ze*2})},B=v=>{var E;l==null||l(v),$(!1),(E=b.current)==null||E.focus()},T=v=>{r||(v.key==="Enter"||v.key===" "?(v.preventDefault(),$(E=>!E)):v.key==="Escape"&&S?(v.preventDefault(),$(!1)):v.key==="ArrowDown"&&!S&&(v.preventDefault(),$(!0)))};g.useLayoutEffect(()=>{S&&p&&P()},[S,p,N,c.length]),g.useEffect(()=>{if(!S)return;const v=D=>{const Y=D.target,M=L.current&&!L.current.contains(Y),H=z.current&&!z.current.contains(Y);p?M&&H&&$(!1):M&&$(!1)},E=()=>{p&&P()},w=()=>{p&&P()};return document.addEventListener("mousedown",v),p&&(window.addEventListener("scroll",E,!0),window.addEventListener("resize",w)),()=>{document.removeEventListener("mousedown",v),window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",w)}},[S,p]);const C=()=>c.map(v=>a.jsxs(La,{type:"button",role:"option",$selected:v.value===f,$disabled:v.disabled??!1,disabled:v.disabled,"aria-selected":v.value===f,onClick:()=>B(v.value),className:$e("option",o==null?void 0:o.option),children:[a.jsx("span",{children:v.label}),v.value===f&&a.jsx(za,{children:a.jsx(a.Check,{size:16})})]},v.value)),_=p?be.createPortal(a.jsx(ka,{ref:z,role:"listbox",style:{top:y.top,left:y.left,width:y.width},className:$e("dropdown",o==null?void 0:o.dropdown),children:C()}),p):a.jsx(Ra,{ref:z,role:"listbox",style:{top:X},className:$e("dropdown",o==null?void 0:o.dropdown),children:C()});return a.jsxs(ya,{...k,ref:v=>{L.current=v,typeof h=="function"?h(v):h&&(h.current=v)},$fullWidth:i,className:$e("container",e),children:[n&&a.jsx(va,{className:$e("label",o==null?void 0:o.label),children:n}),a.jsxs(ma,{ref:b,type:"button",$size:u,$variant:x,$disabled:r,$hasValue:!!j,disabled:r,onClick:()=>!r&&$(v=>!v),onKeyDown:T,"aria-haspopup":"listbox","aria-expanded":S,className:$e("trigger",o==null?void 0:o.trigger),children:[a.jsx(Ca,{children:(j==null?void 0:j.label)??d}),a.jsx(wa,{$open:S,children:a.jsx(a.ChevronDown,{size:16})})]}),S&&_]})},Qt={xs:{size:"16px",borderWidth:"2px"},sm:{size:"20px",borderWidth:"2px"},md:{size:"32px",borderWidth:"3px"},lg:{size:"48px",borderWidth:"4px"}},eo={track:t.alpha(t.COLORS.black,15),indicator:t.COLORS.black},pt=e=>Qt[e]??Qt.md,ja=ie.keyframes`
1472
+ 0% {
1473
+ transform: rotate(0deg);
1474
+ }
1475
+ 100% {
1476
+ transform: rotate(360deg);
854
1477
  }
1478
+ `,Ea=s.div`
1479
+ display: inline-block;
1480
+ width: ${e=>pt(e.$size).size};
1481
+ height: ${e=>pt(e.$size).size};
1482
+ border: ${e=>pt(e.$size).borderWidth} solid ${eo.track};
1483
+ border-top-color: ${eo.indicator};
1484
+ border-radius: 50%;
1485
+ animation: ${ja} 0.8s linear infinite;
1486
+ `,Ta=A.newClassNameGetter("spinner"),Na=({"aria-label":e="Loading",className:o,ref:r,size:i="md",...n})=>a.jsx(Ea,{...n,ref:r,className:Ta("container",o),role:"status","aria-label":e,$size:i}),to={positive:t.COLORS.green,negative:t.COLORS.red,neutral:t.COLORS["iron-grey"]},Ia=e=>to[e]??to.neutral,Aa=s.div`
1487
+ display: flex;
1488
+ flex-direction: column;
1489
+ gap: 4px;
1490
+ padding: 20px;
1491
+ background-color: ${t.COLORS.white};
1492
+ border-radius: 16px;
1493
+ border: ${({$border:e})=>e?"1px solid #e5e7eb":"none"};
1494
+ box-shadow: ${({$shadow:e})=>e?"0 4px 6px -1px rgba(0, 0, 0, 0.1)":"none"};
1495
+ `,Da=s.div`
1496
+ display: flex;
1497
+ align-items: center;
1498
+ justify-content: space-between;
1499
+ gap: 8px;
1500
+ `,Ma=s.p`
1501
+ margin: 0;
1502
+ font-size: 13px;
1503
+ color: ${t.COLORS["iron-grey"]};
1504
+ `,_a=s.div`
1505
+ display: flex;
1506
+ align-items: center;
1507
+ justify-content: center;
1508
+ width: 32px;
1509
+ height: 32px;
1510
+ border-radius: 8px;
1511
+ background-color: #f5f5f5;
1512
+ color: ${t.COLORS["iron-grey"]};
855
1513
 
856
- body {
857
- min-height: 100vh;
858
- font-family: 'Inter', sans-serif;
859
- font-size: 1rem;
860
- font-weight: 400;
861
- line-height: 1.5;
862
- letter-spacing: -0.011em;
863
- font-feature-settings:
864
- 'kern' 1,
865
- 'liga' 1,
866
- 'calt' 1;
867
- font-kerning: normal;
868
- text-rendering: optimizeLegibility;
869
- -webkit-font-smoothing: antialiased;
870
- -moz-osx-font-smoothing: grayscale;
871
- font-optical-sizing: auto;
872
- font-variant-numeric: tabular-nums;
1514
+ & svg {
1515
+ width: 18px;
1516
+ height: 18px;
873
1517
  }
1518
+ `,Fa=s.h3`
1519
+ margin: 0;
1520
+ font-size: 28px;
1521
+ font-weight: 600;
1522
+ line-height: 1.2;
1523
+ color: ${t.COLORS.black};
1524
+ `,Ba=s.p`
1525
+ margin: 0;
1526
+ font-size: 12px;
1527
+ color: ${({$variant:e})=>Ia(e)};
1528
+ `,We=A.newClassNameGetter("status-card"),Ya=({border:e=!1,className:o,classnames:r,icon:i,label:n,ref:l,shadow:c=!1,trend:d,trendVariant:p="neutral",value:h,...u})=>a.jsxs(Aa,{...u,ref:l,className:We("container",o),$border:e,$shadow:c,children:[a.jsxs(Da,{children:[a.jsx(Ma,{className:We("label",r==null?void 0:r.label),children:n}),i&&a.jsx(_a,{children:i})]}),a.jsx(Fa,{className:We("value",r==null?void 0:r.value),children:h}),d&&a.jsx(Ba,{className:We("trend",r==null?void 0:r.trend),$variant:p,children:d})]}),Ha=s.div`
1529
+ display: flex;
1530
+ align-items: ${e=>e.$orientation==="vertical"?"flex-start":"center"};
1531
+ flex-direction: ${e=>e.$orientation==="vertical"?"column":"row"};
1532
+ `,Ga=s.div`
1533
+ display: flex;
1534
+ align-items: ${e=>e.$orientation==="vertical"?"flex-start":"center"};
1535
+ flex-direction: ${e=>e.$orientation==="vertical"?"column":"row"};
1536
+ ${e=>e.$orientation==="horizontal"&&"flex: 1; min-width: 0;"}
874
1537
 
875
- img,
876
- picture,
877
- video,
878
- canvas,
879
- svg {
880
- display: block;
881
- max-width: 100%;
1538
+ &:last-child {
1539
+ flex: 0;
882
1540
  }
1541
+ `,Wa=s.button`
1542
+ display: flex;
1543
+ align-items: center;
1544
+ gap: 10px;
1545
+ padding: 0;
1546
+ border: none;
1547
+ background: transparent;
1548
+ cursor: ${e=>e.$clickable?"pointer":"default"};
1549
+ flex-shrink: 0;
883
1550
 
884
- input,
885
- button,
886
- textarea,
887
- select {
888
- font: inherit;
1551
+ &:focus-visible {
1552
+ outline: none;
1553
+
1554
+ & > div:first-of-type {
1555
+ outline: 2px solid ${t.COLORS["steel-blue"]};
1556
+ outline-offset: 2px;
1557
+ }
889
1558
  }
1559
+ `,Va=s.div`
1560
+ display: flex;
1561
+ align-items: center;
1562
+ justify-content: center;
1563
+ width: 32px;
1564
+ height: 32px;
1565
+ border-radius: 50%;
1566
+ font-size: 14px;
1567
+ font-weight: 600;
1568
+ flex-shrink: 0;
1569
+ transition:
1570
+ background-color 0.2s ease,
1571
+ border-color 0.2s ease,
1572
+ color 0.2s ease;
890
1573
 
891
- p,
892
- h1,
893
- h2,
894
- h3,
895
- h4,
896
- h5,
897
- h6 {
898
- overflow-wrap: break-word;
1574
+ ${e=>e.$active||e.$completed?`
1575
+ background-color: ${t.COLORS.black};
1576
+ border: 2px solid ${t.COLORS.black};
1577
+ color: ${t.COLORS.white};
1578
+ `:`
1579
+ background-color: transparent;
1580
+ border: 2px solid ${t.COLORS.gray};
1581
+ color: ${t.COLORS["iron-grey"]};
1582
+ `}
1583
+ `,Ua=s.span`
1584
+ font-size: 14px;
1585
+ font-weight: 500;
1586
+ white-space: nowrap;
1587
+ color: ${e=>e.$active||e.$completed?t.COLORS.black:t.COLORS["iron-grey"]};
1588
+ transition: color 0.2s ease;
1589
+ `,Xa=s.div`
1590
+ background-color: ${e=>e.$completed?t.COLORS.black:t.COLORS.gray};
1591
+ transition: background-color 0.2s ease;
1592
+
1593
+ ${e=>e.$orientation==="vertical"?`
1594
+ width: 2px;
1595
+ height: 24px;
1596
+ margin: 8px 0 8px 15px;
1597
+ `:`
1598
+ flex: 1;
1599
+ height: 2px;
1600
+ min-width: 16px;
1601
+ margin: 0 12px;
1602
+ `}
1603
+ `,Pe=A.newClassNameGetter("stepper"),qa=({className:e,classnames:o,onChange:r,orientation:i="horizontal",ref:n,steps:l,value:c,...d})=>{const p=g.useMemo(()=>l.findIndex(h=>h.value===c),[l,c]);return a.jsx(Ha,{...d,ref:n,$orientation:i,className:Pe("container",e),children:l.map((h,u)=>{const f=h.value===c,x=u<p,k=u===l.length-1;return a.jsxs(Ga,{$orientation:i,children:[a.jsxs(Wa,{type:"button",$active:f,$completed:x,$clickable:!!r,onClick:()=>r==null?void 0:r(h.value),className:Pe("step",o==null?void 0:o.step),children:[a.jsx(Va,{$active:f,$completed:x,className:Pe("circle",o==null?void 0:o.circle),children:u+1}),a.jsx(Ua,{$active:f,$completed:x,className:Pe("label",o==null?void 0:o.label),children:h.label})]}),!k&&a.jsx(Xa,{$completed:x,$orientation:i,className:Pe("line",o==null?void 0:o.line)})]},h.value)})})},$t={normal:{border:t.COLORS["iron-grey"],label:t.COLORS.black},error:{border:t.COLORS.red,label:t.COLORS.red}},Ka=s.div`
1604
+ position: relative;
1605
+ display: flex;
1606
+ flex-direction: column;
1607
+ gap: 4px;
1608
+ `,Za=s(Se)`
1609
+ margin-left: 6px;
1610
+ color: ${e=>$t[e.$variant].label};
1611
+ `,Ja=s.div`
1612
+ display: flex;
1613
+ flex-wrap: wrap;
1614
+ align-items: center;
1615
+ gap: 6px;
1616
+ min-height: 44px;
1617
+ padding: 8px 12px;
1618
+ border: 1px dashed ${e=>$t[e.$variant].border};
1619
+ border-radius: 8px;
1620
+ background: ${t.COLORS.white};
1621
+ cursor: ${e=>e.$disabled?"not-allowed":"text"};
1622
+ opacity: ${e=>e.$disabled?.5:1};
1623
+ transition: border-color 0.15s ease;
1624
+
1625
+ &:hover {
1626
+ border-color: ${e=>e.$disabled?$t[e.$variant].border:e.$variant==="error"?t.COLORS.red:t.COLORS.black};
899
1627
  }
900
1628
 
901
- a {
902
- color: inherit;
903
- text-decoration: none;
1629
+ ${e=>e.$focused&&`
1630
+ outline: 2px solid ${e.$variant==="error"?t.COLORS.red:t.COLORS["steel-blue"]};
1631
+ outline-offset: 2px;
1632
+ `}
1633
+ `,Qa=s.input`
1634
+ flex: 1;
1635
+ min-width: 80px;
1636
+ border: none;
1637
+ outline: none;
1638
+ background: transparent;
1639
+ font-size: 14px;
1640
+ color: ${t.COLORS.black};
1641
+ cursor: ${e=>e.$disabled?"not-allowed":"text"};
1642
+
1643
+ &::placeholder {
1644
+ color: ${t.COLORS["iron-grey"]};
904
1645
  }
905
1646
 
906
- button {
907
- background: none;
908
- border: none;
909
- cursor: pointer;
1647
+ &:disabled {
1648
+ cursor: not-allowed;
910
1649
  }
1650
+ `,yo=`
1651
+ z-index: 100;
1652
+ background-color: ${t.COLORS.white};
1653
+ border: 1px solid ${t.alpha(t.COLORS.black,15)};
1654
+ border-radius: 8px;
1655
+ box-shadow: 0 4px 16px ${t.alpha(t.COLORS.black,12)};
1656
+ max-height: 200px;
1657
+ overflow-y: auto;
1658
+ `,vo=(e,o)=>e?"translateY(0)":o==="bottom"?"translateY(-8px)":"translateY(8px)",mo=`
1659
+ opacity 0.15s ease,
1660
+ transform 0.15s ease,
1661
+ visibility 0.15s;
1662
+ `,el=s.div`
1663
+ position: absolute;
1664
+ left: 0;
1665
+ right: 0;
1666
+ ${e=>e.$position==="bottom"?"top: calc(100% + 4px);":"bottom: calc(100% + 4px);"}
1667
+ ${yo}
1668
+ opacity: ${e=>e.$open?1:0};
1669
+ visibility: ${e=>e.$open?"visible":"hidden"};
1670
+ transform: ${e=>vo(e.$open,e.$position)};
1671
+ transition: ${mo};
1672
+ `,tl=s.div`
1673
+ position: fixed;
1674
+ ${yo}
1675
+ opacity: ${e=>e.$open?1:0};
1676
+ visibility: ${e=>e.$open?"visible":"hidden"};
1677
+ transform: ${e=>vo(e.$open,e.$position)};
1678
+ transition: ${mo};
1679
+ `,oo=s.button`
1680
+ display: flex;
1681
+ align-items: center;
1682
+ width: 100%;
1683
+ padding: 10px 12px;
1684
+ border: none;
1685
+ background: transparent;
1686
+ font-size: 14px;
1687
+ color: ${t.COLORS.black};
1688
+ text-align: left;
1689
+ cursor: pointer;
1690
+ transition: background-color 0.15s ease;
911
1691
 
912
- ul,
913
- ol {
914
- list-style: none;
1692
+ &:hover {
1693
+ background-color: ${t.COLORS.gray};
915
1694
  }
916
1695
 
917
- table {
918
- border-collapse: collapse;
919
- border-spacing: 0;
1696
+ &:first-of-type {
1697
+ border-radius: 7px 7px 0 0;
1698
+ }
1699
+
1700
+ &:last-of-type {
1701
+ border-radius: 0 0 7px 7px;
1702
+ }
1703
+
1704
+ &:only-child {
1705
+ border-radius: 7px;
1706
+ }
1707
+ `,ro=s.div`
1708
+ display: flex;
1709
+ align-items: center;
1710
+ justify-content: center;
1711
+ padding: 16px;
1712
+ color: ${t.COLORS["iron-grey"]};
1713
+ font-size: 14px;
1714
+ text-align: center;
1715
+ `,ee=A.newClassNameGetter("tags"),Ve=4,ol=({className:e,classnames:o,createKey:r="Tab",disabled:i=!1,emptyMessage:n="No options",freeSolo:l=!0,label:c,onChange:d,options:p=[],placeholder:h="Add tag...",portalRenderNode:u,ref:f,value:x,variant:k="normal",...S})=>{const $=g.useRef(null),y=g.useRef(null),O=g.useRef(null),L=g.useRef(null),[b,z]=g.useState(""),[j,N]=g.useState(!1),[X,P]=g.useState("bottom"),[B,T]=g.useState({top:0,left:0,width:0}),C=g.useMemo(()=>{const R=p.filter(U=>!x.includes(U.value));if(!b.trim())return R;const I=b.toLowerCase().trim();return R.filter(U=>U.label.toLowerCase().includes(I))},[p,x,b]),_=j&&p.length>0,v=g.useCallback(()=>{var Ne;if(!y.current)return;const R=y.current.getBoundingClientRect(),I=((Ne=O.current)==null?void 0:Ne.offsetHeight)??200,U=window.innerHeight-R.bottom-Ve,q=R.top-Ve,ge=U<I&&q>U?"top":"bottom";if(P(ge),u){const Je=ge==="bottom"?R.bottom+Ve:R.top-I-Ve;T({top:Je,left:R.left,width:R.width})}},[u]);g.useEffect(()=>{if(j)return v(),window.addEventListener("scroll",v,!0),window.addEventListener("resize",v),()=>{window.removeEventListener("scroll",v,!0),window.removeEventListener("resize",v)}},[j,v]);const E=g.useCallback(R=>{const I=R.trim();return!I||x.includes(I)?!1:(d([...x,I]),z(""),!0)},[x,d]),w=R=>{if(R.key===r&&b.trim())if(R.preventDefault(),l)E(b);else{const I=C.find(U=>U.label.toLowerCase()===b.toLowerCase().trim());I&&E(I.value)}else R.key==="Backspace"&&!b&&x.length>0&&d(x.slice(0,-1))},D=R=>{var I;E(R),(I=L.current)==null||I.focus()},Y=R=>{d(x.filter(I=>I!==R))},M=()=>{var R;i||(R=L.current)==null||R.focus()},H=R=>{const I=p.find(U=>U.value===R);return(I==null?void 0:I.label)??R};return a.jsxs(Ka,{...S,ref:f,className:ee("container",e),children:[c&&a.jsx(Za,{$variant:k,className:ee("label"),children:c}),a.jsxs("div",{ref:$,style:{position:"relative"},children:[a.jsxs(Ja,{ref:y,$variant:k,$disabled:i,$focused:j,onClick:M,className:ee("trigger",o==null?void 0:o.trigger),children:[x.map(R=>a.jsx(Xe,{deletable:!i,onDelete:()=>Y(R),className:ee("chip",o==null?void 0:o.chip),children:H(R)},R)),a.jsx(Qa,{ref:L,type:"text",value:b,onChange:R=>z(R.target.value),onFocus:()=>N(!0),onBlur:()=>setTimeout(()=>N(!1),150),onKeyDown:w,placeholder:x.length===0?h:"",disabled:i,$disabled:i,className:ee("input",o==null?void 0:o.input)})]}),p.length>0&&(u?be.createPortal(a.jsx(tl,{ref:O,$open:_,$position:X,style:{top:B.top,left:B.left,width:B.width},className:ee("dropdown",o==null?void 0:o.dropdown),children:C.length===0?a.jsx(ro,{className:ee("empty",o==null?void 0:o.empty),children:n}):C.map(R=>a.jsx(oo,{type:"button",onMouseDown:I=>I.preventDefault(),onClick:()=>D(R.value),className:ee("option",o==null?void 0:o.option),children:R.label},R.value))}),u):a.jsx(el,{ref:O,$open:_,$position:X,className:ee("dropdown",o==null?void 0:o.dropdown),children:C.length===0?a.jsx(ro,{className:ee("empty",o==null?void 0:o.empty),children:n}):C.map(R=>a.jsx(oo,{type:"button",onMouseDown:I=>I.preventDefault(),onClick:()=>D(R.value),className:ee("option",o==null?void 0:o.option),children:R.label},R.value))}))]})]})},rl=s.div`
1716
+ display: flex;
1717
+ align-items: center;
1718
+ gap: 6px;
1719
+ `,il=s.button`
1720
+ padding: 6px 16px;
1721
+ border: none;
1722
+ border-radius: 12px;
1723
+ background-color: ${e=>e.$active?t.COLORS.gray:"transparent"};
1724
+ color: ${t.COLORS.black};
1725
+ font-size: 14px;
1726
+ font-weight: 500;
1727
+ line-height: 1.4;
1728
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1729
+ opacity: ${e=>e.$disabled?.5:1};
1730
+ transition:
1731
+ background-color 0.15s ease,
1732
+ opacity 0.15s ease;
1733
+
1734
+ &:hover:not(:disabled) {
1735
+ background-color: ${e=>e.$active?t.COLORS.gray:"rgba(0, 0, 0, 0.05)"};
1736
+ }
1737
+
1738
+ &:focus-visible {
1739
+ outline: 2px solid ${t.COLORS["steel-blue"]};
1740
+ outline-offset: 2px;
1741
+ }
1742
+ `,io=A.newClassNameGetter("tabs"),nl=({className:e,classnames:o,onChange:r,ref:i,tabs:n,value:l,...c})=>a.jsx(rl,{...c,ref:i,className:io("container",e),role:"tablist",children:n.map(d=>a.jsx(il,{type:"button",role:"tab","aria-selected":l===d.value,$active:l===d.value,$disabled:!!d.disabled,disabled:d.disabled,onClick:()=>r(d.value),className:io("tab",o==null?void 0:o.tab),children:d.label},d.value))}),Co=g.createContext(null),ut=3,no={default:{background:"#374151",text:t.COLORS.white,border:"#374151"},success:{background:t.COLORS.green,text:t.COLORS.white,border:t.COLORS.green},warning:{background:t.COLORS.yellow,text:t.COLORS.white,border:t.COLORS.yellow},danger:{background:t.COLORS.red,text:t.COLORS.white,border:t.COLORS.red}},al=(e,o)=>{switch(o.type){case"ADD_TOAST":{const r=o.payload;return e.toasts.length<ut?{...e,toasts:[...e.toasts,r]}:{...e,queue:[...e.queue,r]}}case"REMOVE_TOAST":{const r=o.payload,i=e.toasts.filter(l=>l.id!==r),n=e.queue[0];return n&&i.length<ut?{toasts:[...i,n],queue:e.queue.slice(1)}:{...e,toasts:i}}case"SHOW_NEXT_FROM_QUEUE":{const r=e.queue[0];return!r||e.toasts.length>=ut?e:{toasts:[...e.toasts,r],queue:e.queue.slice(1)}}default:return e}},ll={toasts:[],queue:[]},ht=e=>no[e]??no.default,dl=ie.keyframes`
1743
+ from {
1744
+ transform: translateY(100%);
1745
+ opacity: 0;
1746
+ }
1747
+ to {
1748
+ transform: translateY(0);
1749
+ opacity: 1;
1750
+ }
1751
+ `,cl=ie.keyframes`
1752
+ from {
1753
+ transform: translateY(0);
1754
+ opacity: 1;
1755
+ }
1756
+ to {
1757
+ transform: translateY(100%);
1758
+ opacity: 0;
920
1759
  }
921
- `,Rn=()=>m.jsx(qe.Global,{styles:Xa});function Ya({children:e,defaultMode:t="light"}){const[r,o]=_.useState(t),i=_.useMemo(()=>{switch(r){case"light":return jt;case"dark":return kn;default:return jt}},[r]),c=_.useMemo(()=>({theme:i,mode:r,setMode:o}),[i,r]);return m.jsx(Sn,{value:c,children:m.jsxs(qe.ThemeProvider,{theme:i,children:[m.jsx(Rn,{}),e]})})}exports.Button=Jn;exports.Checkbox=mr;exports.CheckboxCard=Ea;exports.CheckboxGroup=Oa;exports.Chip=gi;exports.Dropdown=Ec;exports.GlobalStyle=Rn;exports.Input=Vc;exports.Loader=No;exports.MultiSelect=Ps;exports.Radio=Dr;exports.RadioCard=Wa;exports.RadioGroup=Ka;exports.Select=ha;exports.Spinner=Fo;exports.ThemeProvider=Ya;exports.breakpoints=Je;exports.colors=n;exports.media=Ga;exports.shadows=Ge;exports.themeDark=kn;exports.themeLight=jt;exports.useTheme=qa;
1760
+ `,sl=s.div`
1761
+ position: fixed;
1762
+ bottom: 24px;
1763
+ left: 24px;
1764
+ z-index: 9999;
1765
+ display: flex;
1766
+ flex-direction: column;
1767
+ gap: 12px;
1768
+ pointer-events: none;
1769
+ width: auto;
1770
+ max-width: 90vw;
1771
+ `,pl=s.div`
1772
+ display: flex;
1773
+ align-items: center;
1774
+ justify-content: space-between;
1775
+ gap: 12px;
1776
+ min-height: 32px;
1777
+ padding: 8px 8px 8px 16px;
1778
+ background-color: ${({$variant:e})=>ht(e).background};
1779
+ color: ${({$variant:e})=>ht(e).text};
1780
+ border: 1px solid ${({$variant:e})=>ht(e).border};
1781
+ border-radius: 96px;
1782
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1783
+ animation: ${({$isExiting:e})=>e?cl:dl} 0.3s ease-out;
1784
+ pointer-events: auto;
1785
+ max-width: 500px;
1786
+ `,ul=s.span`
1787
+ font-size: 14px;
1788
+ font-weight: 500;
1789
+ line-height: 1.4;
1790
+ white-space: nowrap;
1791
+ overflow: hidden;
1792
+ text-overflow: ellipsis;
1793
+ `,hl=s.button`
1794
+ display: flex;
1795
+ align-items: center;
1796
+ justify-content: center;
1797
+ width: 20px;
1798
+ height: 20px;
1799
+ padding: 0;
1800
+ background: transparent;
1801
+ border: none;
1802
+ color: inherit;
1803
+ cursor: pointer;
1804
+ opacity: 0.7;
1805
+ transition: opacity 0.2s ease-in-out;
1806
+ flex-shrink: 0;
1807
+
1808
+ &:hover {
1809
+ opacity: 1;
1810
+ }
1811
+ `,bl=s.div`
1812
+ display: flex;
1813
+ align-items: center;
1814
+ justify-content: space-between;
1815
+ gap: 12px;
1816
+ width: 100%;
1817
+ `,gl=s.div`
1818
+ display: flex;
1819
+ align-items: center;
1820
+ justify-content: center;
1821
+ min-height: 32px;
1822
+ padding: 8px 16px;
1823
+ background-color: #374151;
1824
+ color: ${t.COLORS.white};
1825
+ border-radius: 96px;
1826
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1827
+ pointer-events: auto;
1828
+ font-size: 14px;
1829
+ font-weight: 500;
1830
+ white-space: nowrap;
1831
+ margin-left: auto;
1832
+ `,ao=({toast:e,onRemove:o})=>{const[r,i]=g.useState(!1),n=()=>{i(!0),setTimeout(()=>{o(e.id)},300)};return g.useEffect(()=>{if(e.duration){const l=setTimeout(()=>{n()},e.duration);return()=>clearTimeout(l)}},[e.duration,e.id]),a.jsxs(pl,{$variant:e.variant,$isExiting:r,children:[a.jsx(ul,{children:e.message}),a.jsx(hl,{onClick:n,children:a.jsx(a.X,{style:{width:16,height:16}})})]})},fl=({toasts:e,queueCount:o,removeToast:r})=>{if(e.length===0)return null;const i=e.length-1;return a.jsx(sl,{children:e.map((n,l)=>l===i&&o>0?a.jsxs(bl,{children:[a.jsx(ao,{toast:n,onRemove:r}),a.jsxs(gl,{children:["+",o]})]},n.id):a.jsx(ao,{toast:n,onRemove:r},n.id))})},xl=({children:e})=>{const[o,r]=g.useReducer(al,ll),i=g.useCallback((l,c="default",d)=>{const p=`toast-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;r({type:"ADD_TOAST",payload:{id:p,message:l,variant:c,duration:d}})},[]),n=g.useCallback(l=>{r({type:"REMOVE_TOAST",payload:l})},[]);return a.jsxs(Co.Provider,{value:{addToast:i,removeToast:n},children:[e,a.jsx(fl,{toasts:o.toasts,queueCount:o.queue.length,removeToast:n})]})},Ol=()=>{const e=g.useContext(Co);if(!e)throw new Error("useToast must be used within ToastProvider");return e},lo={dark:{background:t.COLORS.black,text:t.COLORS.white},light:{background:t.COLORS.white,text:t.COLORS.black,border:t.COLORS.gray},success:{background:t.COLORS.green,text:t.COLORS.white},warning:{background:t.COLORS.yellow,text:t.COLORS.white},danger:{background:t.COLORS.red,text:t.COLORS.white}},Ee=e=>lo[e]??lo.dark,$l=(e,o)=>{const r=Ee(o).background;switch(e){case"top":return`
1833
+ bottom: -12px;
1834
+ left: 50%;
1835
+ margin-left: -6px;
1836
+ border-top-color: ${r};
1837
+ `;case"bottom":return`
1838
+ top: -12px;
1839
+ left: 50%;
1840
+ margin-left: -6px;
1841
+ border-bottom-color: ${r};
1842
+ `;case"left":return`
1843
+ right: -12px;
1844
+ top: 50%;
1845
+ margin-top: -6px;
1846
+ border-left-color: ${r};
1847
+ `;case"right":return`
1848
+ left: -12px;
1849
+ top: 50%;
1850
+ margin-top: -6px;
1851
+ border-right-color: ${r};
1852
+ `;default:return""}},Sl=(e,o)=>{if(o!=="light")return"";const r=Ee(o).border;switch(e){case"top":return`
1853
+ &::after {
1854
+ bottom: -14px;
1855
+ left: 50%;
1856
+ margin-left: -7px;
1857
+ border-top-color: ${r};
1858
+ }
1859
+ `;case"bottom":return`
1860
+ &::after {
1861
+ top: -14px;
1862
+ left: 50%;
1863
+ margin-left: -7px;
1864
+ border-bottom-color: ${r};
1865
+ }
1866
+ `;case"left":return`
1867
+ &::after {
1868
+ right: -14px;
1869
+ top: 50%;
1870
+ margin-top: -7px;
1871
+ border-left-color: ${r};
1872
+ }
1873
+ `;case"right":return`
1874
+ &::after {
1875
+ left: -14px;
1876
+ top: 50%;
1877
+ margin-top: -7px;
1878
+ border-right-color: ${r};
1879
+ }
1880
+ `;default:return""}},wo=e=>`
1881
+ z-index: 1000;
1882
+ padding: 6px 12px;
1883
+ background-color: ${Ee(e.$variant).background};
1884
+ color: ${Ee(e.$variant).text};
1885
+ font-size: 13px;
1886
+ line-height: 1.4;
1887
+ border-radius: 6px;
1888
+ width: max-content;
1889
+ max-width: 300px;
1890
+ white-space: normal;
1891
+ word-wrap: break-word;
1892
+ pointer-events: none;
1893
+ opacity: ${e.$visible?1:0};
1894
+ visibility: ${e.$visible?"visible":"hidden"};
1895
+ transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
1896
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
1897
+
1898
+ ${e.$variant==="light"?`border: 1px solid ${Ee(e.$variant).border};`:""}
1899
+
1900
+ &::before {
1901
+ content: '';
1902
+ position: absolute;
1903
+ width: 0;
1904
+ height: 0;
1905
+ border: 6px solid transparent;
1906
+ ${$l(e.$placement,e.$variant)}
1907
+ }
1908
+
1909
+ ${e.$variant==="light"?`
1910
+ &::after {
1911
+ content: '';
1912
+ position: absolute;
1913
+ width: 0;
1914
+ height: 0;
1915
+ border: 7px solid transparent;
1916
+ }
1917
+ `:""}
1918
+
1919
+ ${Sl(e.$placement,e.$variant)}
1920
+ `,yl=s.div`
1921
+ position: relative;
1922
+ display: inline-block;
1923
+ `,vl=e=>{switch(e){case"top":return`
1924
+ bottom: calc(100% + 8px);
1925
+ left: 50%;
1926
+ transform: translateX(-50%);
1927
+ `;case"bottom":return`
1928
+ top: calc(100% + 8px);
1929
+ left: 50%;
1930
+ transform: translateX(-50%);
1931
+ `;case"left":return`
1932
+ right: calc(100% + 8px);
1933
+ top: 50%;
1934
+ transform: translateY(-50%);
1935
+ `;case"right":return`
1936
+ left: calc(100% + 8px);
1937
+ top: 50%;
1938
+ transform: translateY(-50%);
1939
+ `;default:return""}},ml=s.div`
1940
+ position: absolute;
1941
+ ${e=>wo(e)}
1942
+ ${({$placement:e})=>vl(e)}
1943
+ `,Cl=s.div`
1944
+ position: fixed;
1945
+ ${e=>wo(e)}
1946
+ `,bt=A.newClassNameGetter("tooltip"),de=8,wl=({children:e,className:o,classnames:r,content:i,delay:n=200,placement:l="top",portalRenderNode:c,ref:d,variant:p="dark",...h})=>{const[u,f]=g.useState(!1),[x,k]=g.useState(null),[S,$]=g.useState(l),[y,O]=g.useState({top:0,left:0}),L=g.useRef(null),b=g.useRef(null),z=g.useCallback(()=>{var D,Y;if(!L.current)return;const P=L.current.getBoundingClientRect(),B=((D=b.current)==null?void 0:D.offsetWidth)??100,T=((Y=b.current)==null?void 0:Y.offsetHeight)??30,C=P.top-de,_=window.innerHeight-P.bottom-de,v=P.left-de,E=window.innerWidth-P.right-de;let w=l;if(l==="top"&&C<T&&_>C?w="bottom":l==="bottom"&&_<T&&C>_?w="top":l==="left"&&v<B&&E>v?w="right":l==="right"&&E<B&&v>E&&(w="left"),$(w),c){let M,H;switch(w){case"top":M=P.top-T-de,H=P.left+P.width/2-B/2;break;case"bottom":M=P.bottom+de,H=P.left+P.width/2-B/2;break;case"left":M=P.top+P.height/2-T/2,H=P.left-B-de;break;case"right":M=P.top+P.height/2-T/2,H=P.right+de;break;default:M=0,H=0}const R=8;H=Math.max(R,Math.min(H,window.innerWidth-B-R)),M=Math.max(R,Math.min(M,window.innerHeight-T-R)),O({top:M,left:H})}},[l,c]);g.useLayoutEffect(()=>{u&&z()},[u,z]);const j=()=>{const P=setTimeout(()=>{f(!0)},n);k(P)},N=()=>{x&&(clearTimeout(x),k(null)),f(!1)},X=c?be.createPortal(a.jsx(Cl,{ref:b,className:bt("content",r==null?void 0:r.content),$placement:S,$variant:p,$visible:u,style:{top:y.top,left:y.left},children:i}),c):a.jsx(ml,{ref:b,className:bt("content",r==null?void 0:r.content),$placement:S,$variant:p,$visible:u,children:i});return a.jsxs(yl,{...h,ref:P=>{L.current=P,typeof d=="function"?d(P):d&&(d.current=P)},className:bt("wrapper",o),onMouseEnter:j,onMouseLeave:N,children:[e,X]})};exports.Button=Te;exports.Card=sr;exports.Checkbox=Ke;exports.CheckboxCard=yr;exports.CheckboxGroup=wr;exports.Chip=Xe;exports.Confirmation=Ar;exports.Container=_r;exports.DatePicker=bi;exports.Drawer=$i;exports.Dropdown=wi;exports.FieldLabel=Se;exports.GlobalStyle=Vo;exports.ImageCropper=Tn;exports.Input=xo;exports.KeySymbol=co;exports.KeysBindings=so;exports.Modal=Oo;exports.MultiSelect=Kn;exports.Panel=oa;exports.Progress=na;exports.Radio=St;exports.RadioCard=fa;exports.RadioGroup=Sa;exports.Select=Pa;exports.Spinner=Na;exports.StatusCard=Ya;exports.Stepper=qa;exports.Tabs=nl;exports.Tags=ol;exports.ToastProvider=xl;exports.Tooltip=wl;exports.formatDateGo=po;exports.useImageCropper=fo;exports.useToast=Ol;
922
1947
  //# sourceMappingURL=index.cjs.map