@vacano/ui 1.13.0 → 1.15.0

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,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./keyboard-D8zOi0jU.cjs"),_=require("./index-GSZAZ6Cz.cjs"),d=require("./X-CI1qRJDP.cjs"),V=require("@emotion/react"),c=require("./ToggleGroup-DCWH4ngK.cjs"),A=require("./tooling-Dflq0Y98.cjs"),u=require("react"),he=require("react-dom"),Be=V.css`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./keyboard-D8zOi0jU.cjs"),H=require("./index-GSZAZ6Cz.cjs"),l=require("./X-CI1qRJDP.cjs"),B=require("@emotion/react"),u=require("react"),d=require("./ToggleGroup-COFNoVg9.cjs"),C=require("./tooling-Dflq0Y98.cjs"),De=require("react-dom"),Le=require("./CircleX-BzaN6v37.cjs"),jt=B.css`
2
2
  *,
3
3
  *::before,
4
4
  *::after {
@@ -100,12 +100,347 @@
100
100
  :focus:not(:focus-visible) {
101
101
  outline: none;
102
102
  }
103
- `,Fe=()=>d.jsx(V.Global,{styles:Be}),Me=c.styled.div`
104
- background-color: ${a.COLORS.white};
105
- border-radius: 16px;
106
- border: ${e=>e.$border?`1px solid ${a.alpha(a.COLORS["iron-grey"],15)}`:"none"};
107
- box-shadow: ${e=>e.$shadow?`0 2px 8px ${a.alpha(a.COLORS.black,10)}`:"none"};
108
- `,_e=A.newClassNameGetter("card"),De=({children:e,className:t,ref:o,border:i=!1,shadow:n=!1,...r})=>d.jsx(Me,{...r,ref:o,className:_e("container",t),$border:i,$shadow:n,children:e}),Ye="Confirm",Xe="Cancel",qe=V.keyframes`
103
+ `,Et=()=>l.jsx(B.Global,{styles:jt}),zt=d.styled.div`
104
+ display: flex;
105
+ flex-direction: column;
106
+ gap: ${({$variant:e})=>e==="splitted"?"8px":"0"};
107
+ `,Nt=d.styled.div`
108
+ border-bottom: ${({$variant:e})=>e==="outlined"?`1px solid ${n.COLORS.gray}`:"none"};
109
+ border-radius: ${({$variant:e})=>e==="splitted"?"8px":"0"};
110
+ background-color: ${({$variant:e})=>e==="splitted"?"#f9fafb":"transparent"};
111
+ opacity: ${({$disabled:e})=>e?.5:1};
112
+ pointer-events: ${({$disabled:e})=>e?"none":"auto"};
113
+
114
+ &:first-of-type {
115
+ border-top: ${({$variant:e})=>e==="outlined"?`1px solid ${n.COLORS.gray}`:"none"};
116
+ }
117
+ `,Tt=d.styled.button`
118
+ display: flex;
119
+ align-items: center;
120
+ justify-content: space-between;
121
+ width: 100%;
122
+ padding: 14px 16px;
123
+ background: none;
124
+ border: none;
125
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
126
+ font-size: 14px;
127
+ font-weight: 600;
128
+ color: ${n.COLORS.black};
129
+ text-align: left;
130
+ outline: none;
131
+ transition: color 0.2s ease;
132
+
133
+ &:hover {
134
+ color: ${n.COLORS["steel-blue"]};
135
+ }
136
+ `,It=d.styled.span`
137
+ display: flex;
138
+ align-items: center;
139
+ justify-content: center;
140
+ width: 20px;
141
+ height: 20px;
142
+ flex-shrink: 0;
143
+ color: ${n.COLORS["iron-grey"]};
144
+ transition: transform 0.2s ease;
145
+ transform: rotate(${({$expanded:e})=>e?"180deg":"0deg"});
146
+ `,At=d.styled.div`
147
+ display: grid;
148
+ grid-template-rows: ${({$expanded:e})=>e?"1fr":"0fr"};
149
+ transition: grid-template-rows 0.2s ease;
150
+ `,Pt=d.styled.div`
151
+ overflow: hidden;
152
+ `,Bt=d.styled.div`
153
+ padding: 0 16px 14px;
154
+ font-size: 14px;
155
+ line-height: 1.5;
156
+ color: ${n.COLORS["iron-grey"]};
157
+ `,ne=C.newClassNameGetter("accordion"),Mt=()=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"6 9 12 15 18 9"})}),Ft=({className:e,classnames:t,defaultValue:o=[],items:r,multiple:i=!1,onChange:a,ref:c,value:s,variant:p="outlined",...x})=>{const[g,h]=u.useState(o),y=s!==void 0,f=y?s:g,S=u.useCallback(b=>{const $=f.includes(b);let m;i?m=$?f.filter(O=>O!==b):[...f,b]:m=$?[]:[b],y||h(m),a==null||a(m)},[f,y,i,a]);return l.jsx(zt,{...x,ref:c,$variant:p,className:ne("container",e),role:"region",children:r.map(b=>{const $=f.includes(b.value);return l.jsxs(Nt,{$variant:p,$disabled:!!b.disabled,className:ne("item",t==null?void 0:t.item),children:[l.jsxs(Tt,{type:"button","aria-expanded":$,$disabled:!!b.disabled,disabled:b.disabled,onClick:()=>S(b.value),className:ne("trigger",t==null?void 0:t.trigger),children:[b.title,l.jsx(It,{$expanded:$,className:ne("icon",t==null?void 0:t.icon),children:l.jsx(Mt,{})})]}),l.jsx(At,{$expanded:$,children:l.jsx(Pt,{children:l.jsx(Bt,{className:ne("content",t==null?void 0:t.content),children:b.content})})})]},b.value)})})},_t={none:"0",sm:"8px",md:"12px",lg:"16px",full:"9999px"},Dt={normal:n.COLORS.black,success:n.COLORS.green,warning:n.COLORS.yellow,danger:n.COLORS.red},Gt=d.styled.div`
158
+ display: flex;
159
+ align-items: ${({$center:e})=>e?"center":"flex-start"};
160
+ gap: 12px;
161
+ padding: 16px;
162
+ border-radius: ${({$radius:e})=>_t[e]};
163
+ background-color: ${n.COLORS.gray};
164
+ `,Yt=d.styled.div`
165
+ flex-shrink: 0;
166
+ display: flex;
167
+ align-items: center;
168
+ justify-content: center;
169
+ width: 40px;
170
+ height: 40px;
171
+ border-radius: 50%;
172
+ background-color: ${n.COLORS.white};
173
+ box-shadow:
174
+ 0 0 0 4px ${n.COLORS.gray},
175
+ 0 0 0 5px rgba(0, 0, 0, 0.06);
176
+
177
+ &::after {
178
+ content: '';
179
+ }
180
+
181
+ > span {
182
+ display: flex;
183
+ align-items: center;
184
+ justify-content: center;
185
+ width: 28px;
186
+ height: 28px;
187
+ border-radius: 50%;
188
+ background-color: ${({$variant:e})=>Dt[e]};
189
+ color: ${n.COLORS.white};
190
+ }
191
+
192
+ > span svg {
193
+ width: 16px;
194
+ height: 16px;
195
+ }
196
+ `,Ht=d.styled.div`
197
+ display: flex;
198
+ flex-direction: column;
199
+ gap: 2px;
200
+ flex: 1;
201
+ min-width: 0;
202
+ `,Xt=d.styled.div`
203
+ font-size: 14px;
204
+ font-weight: 600;
205
+ color: ${n.COLORS.black};
206
+ line-height: 1.4;
207
+ `,Ut=d.styled.div`
208
+ font-size: 14px;
209
+ color: ${n.COLORS["iron-grey"]};
210
+ line-height: 1.5;
211
+ `,xe=C.newClassNameGetter("alert"),Wt=({className:e,classnames:t,description:o,icon:r,radius:i="lg",ref:a,title:c,variant:s="normal",...p})=>l.jsxs(Gt,{...p,ref:a,role:"alert",className:xe("container",e),$radius:i,$center:!o,children:[r&&l.jsx(Yt,{$variant:s,className:xe("icon",t==null?void 0:t.icon),children:l.jsx("span",{children:r})}),l.jsxs(Ht,{children:[c&&l.jsx(Xt,{className:xe("title",t==null?void 0:t.title),children:c}),o&&l.jsx(Ut,{className:xe("description",t==null?void 0:t.description),children:o})]})]}),qt=e=>{var o,r;const t=e.trim().split(/\s+/);if(t.length>=2){const i=((o=t[0])==null?void 0:o[0])??"",a=((r=t[t.length-1])==null?void 0:r[0])??"";return(i+a).toUpperCase()}return e.slice(0,2).toUpperCase()},ge={sm:32,md:40,lg:56},gt={sm:12,md:14,lg:20},Ge={sm:18,md:22,lg:30},Kt={sm:"6px",md:"10px",lg:"14px",full:"50%"},ke={default:{background:n.COLORS.gray,color:n.COLORS.black,border:n.COLORS.gray},primary:{background:n.COLORS["baltic-blue"],color:n.COLORS.white,border:n.COLORS["baltic-blue"]},success:{background:n.COLORS.green,color:n.COLORS.white,border:n.COLORS.green},warning:{background:n.COLORS.yellow,color:n.COLORS.black,border:n.COLORS.yellow},danger:{background:n.COLORS.red,color:n.COLORS.white,border:n.COLORS.red}},Vt=d.styled.div`
212
+ position: relative;
213
+ display: inline-flex;
214
+ align-items: center;
215
+ justify-content: center;
216
+ overflow: hidden;
217
+ width: ${({$size:e})=>ge[e]}px;
218
+ height: ${({$size:e})=>ge[e]}px;
219
+ border-radius: ${({$radius:e})=>Kt[e]};
220
+ background-color: ${({$color:e})=>ke[e].background};
221
+ color: ${({$color:e})=>ke[e].color};
222
+ font-size: ${({$size:e})=>gt[e]}px;
223
+ font-weight: 600;
224
+ line-height: 1;
225
+ flex-shrink: 0;
226
+ user-select: none;
227
+ box-sizing: border-box;
228
+ ${({$bordered:e,$color:t})=>e&&`box-shadow: 0 0 0 2px #fff, 0 0 0 4px ${ke[t].border};`}
229
+ ${({$disabled:e})=>e&&"opacity: 0.5; pointer-events: none;"}
230
+ `,Zt=d.styled.img`
231
+ width: 100%;
232
+ height: 100%;
233
+ object-fit: cover;
234
+ `,Ye=d.styled.span`
235
+ display: inline-flex;
236
+ align-items: center;
237
+ justify-content: center;
238
+
239
+ & svg {
240
+ width: ${({$size:e})=>Ge[e]}px;
241
+ height: ${({$size:e})=>Ge[e]}px;
242
+ }
243
+ `,Jt=d.styled.span`
244
+ letter-spacing: 0.5px;
245
+ `,ie=C.newClassNameGetter("avatar"),xt=({bordered:e=!1,className:t,classnames:o,color:r="default",disabled:i=!1,icon:a,name:c,radius:s="full",ref:p,size:x="md",src:g,...h})=>{const[y,f]=u.useState(!1),S=g&&!y;return l.jsx(Vt,{...h,ref:p,className:ie("container",t),$size:x,$radius:s,$color:r,$bordered:e,$disabled:i,children:S?l.jsx(Zt,{className:ie("image",o==null?void 0:o.image),src:g,alt:c||"",onError:()=>f(!0)}):a?l.jsx(Ye,{className:ie("fallback",o==null?void 0:o.fallback),$size:x,children:a}):c?l.jsx(Jt,{className:ie("initials",o==null?void 0:o.initials),children:qt(c)}):l.jsx(Ye,{className:ie("fallback",o==null?void 0:o.fallback),$size:x,children:l.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})})})})},Qt=d.styled.div`
246
+ display: inline-flex;
247
+ align-items: center;
248
+
249
+ & > * + * {
250
+ margin-left: -${({$size:e})=>Math.round(ge[e]*.25)}px;
251
+ }
252
+ `,eo=d.styled.div`
253
+ display: inline-flex;
254
+ align-items: center;
255
+ justify-content: center;
256
+ width: ${({$size:e})=>ge[e]}px;
257
+ height: ${({$size:e})=>ge[e]}px;
258
+ border-radius: 50%;
259
+ background-color: #e4e4e7;
260
+ color: #71717a;
261
+ font-size: ${({$size:e})=>gt[e]}px;
262
+ font-weight: 600;
263
+ line-height: 1;
264
+ flex-shrink: 0;
265
+ `,He=C.newClassNameGetter("avatar-group"),to=({children:e,className:t,classnames:o,max:r=5,ref:i,size:a="md",...c})=>{const s=u.Children.toArray(e).filter(u.isValidElement),p=s.slice(0,r),x=s.length-r;return l.jsxs(Qt,{...c,ref:i,className:He("container",t),$size:a,children:[p.map(g=>u.isValidElement(g)?u.cloneElement(g,{size:a}):g),x>0&&l.jsxs(eo,{className:He("count",o==null?void 0:o.count),$size:a,children:["+",x]})]})},oo={default:{bg:n.COLORS.black,text:n.COLORS.white,border:n.COLORS.black,flatBg:n.COLORS.gray},success:{bg:n.COLORS.green,text:n.COLORS.white,border:n.COLORS.green,flatBg:"#dcfce7"},warning:{bg:n.COLORS.yellow,text:n.COLORS.black,border:n.COLORS.yellow,flatBg:"#fef9c3"},danger:{bg:n.COLORS.red,text:n.COLORS.white,border:n.COLORS.red,flatBg:"#fee2e2"}},te={sm:{minWidth:16,height:16,fontSize:10,padding:"0 4px",dotSize:8},md:{minWidth:20,height:20,fontSize:11,padding:"0 5px",dotSize:10},lg:{minWidth:24,height:24,fontSize:12,padding:"0 6px",dotSize:12}},ro=(e,t)=>{const o=t==="circle"?"10%":"0%";switch(e){case"top-right":return`top: 0; right: 0; transform: translate(50%, -50%) translate(-${o}, ${o});`;case"top-left":return`top: 0; left: 0; transform: translate(-50%, -50%) translate(${o}, ${o});`;case"bottom-right":return`bottom: 0; right: 0; transform: translate(50%, 50%) translate(-${o}, -${o});`;case"bottom-left":return`bottom: 0; left: 0; transform: translate(-50%, 50%) translate(${o}, -${o});`}},no=(e,t)=>{const o=oo[t];switch(e){case"solid":return`background-color: ${o.bg}; color: ${o.text};`;case"flat":return`background-color: ${o.flatBg}; color: ${t==="default"?n.COLORS.black:o.bg};`;case"bordered":return`background-color: transparent; color: ${o.border}; border: 1.5px solid ${o.border};`}},io=d.styled.div`
266
+ position: relative;
267
+ display: inline-flex;
268
+ `,lo=d.styled.span`
269
+ position: absolute;
270
+ display: inline-flex;
271
+ align-items: center;
272
+ justify-content: center;
273
+ box-sizing: border-box;
274
+ white-space: nowrap;
275
+ font-weight: 600;
276
+ border-radius: 999px;
277
+ z-index: 1;
278
+ transition:
279
+ transform 0.15s ease,
280
+ opacity 0.15s ease;
281
+
282
+ ${({$dot:e,$size:t})=>e?`
283
+ width: ${te[t].dotSize}px;
284
+ height: ${te[t].dotSize}px;
285
+ min-width: auto;
286
+ padding: 0;
287
+ `:`
288
+ min-width: ${te[t].minWidth}px;
289
+ height: ${te[t].height}px;
290
+ font-size: ${te[t].fontSize}px;
291
+ padding: ${te[t].padding};
292
+ `}
293
+
294
+ ${({$variant:e,$color:t})=>no(e,t)}
295
+
296
+ ${({$placement:e,$shape:t})=>ro(e,t)}
297
+
298
+ ${({$showOutline:e})=>e&&`
299
+ box-shadow: 0 0 0 2px ${n.COLORS.white};
300
+ `}
301
+
302
+ ${({$invisible:e})=>e&&`
303
+ opacity: 0;
304
+ transform: scale(0);
305
+ `}
306
+ `,Xe=C.newClassNameGetter("badge"),ao=({children:e,className:t,classnames:o,color:r="default",content:i,dot:a=!1,invisible:c=!1,placement:s="top-right",ref:p,shape:x="rectangle",showOutline:g=!0,size:h="md",variant:y="solid",...f})=>l.jsxs(io,{...f,ref:p,className:Xe("container",t),children:[e,l.jsx(lo,{className:Xe("badge",o==null?void 0:o.badge),$color:r,$dot:a,$invisible:c,$placement:s,$shape:x,$showOutline:g,$size:h,$variant:y,children:!a&&i})]}),so=({children:e,...t})=>l.jsx("li",{...t,children:e}),ee={sm:{fontSize:12,gap:4,padding:"4px 8px"},md:{fontSize:14,gap:6,padding:"6px 12px"},lg:{fontSize:16,gap:8,padding:"8px 16px"}},co=d.styled.nav`
307
+ display: inline-flex;
308
+ align-items: center;
309
+ ${({$variant:e,$size:t})=>{const{padding:o}=ee[t];switch(e){case"solid":return`
310
+ background-color: ${n.COLORS.gray};
311
+ border-radius: 10px;
312
+ padding: ${o};
313
+ `;case"bordered":return`
314
+ border: 1px solid ${n.COLORS.gray};
315
+ border-radius: 10px;
316
+ padding: ${o};
317
+ `;default:return""}}}
318
+ `,po=d.styled.ol`
319
+ display: flex;
320
+ align-items: center;
321
+ gap: ${({$size:e})=>ee[e].gap}px;
322
+ list-style: none;
323
+ margin: 0;
324
+ padding: 0;
325
+ flex-wrap: wrap;
326
+ `,Ue=d.styled.li`
327
+ display: inline-flex;
328
+ align-items: center;
329
+ gap: ${({$size:e})=>ee[e].gap}px;
330
+ font-size: ${({$size:e})=>ee[e].fontSize}px;
331
+ line-height: 1.5;
332
+ color: ${({$current:e})=>e?n.COLORS.black:n.COLORS["iron-grey"]};
333
+ font-weight: ${({$current:e})=>e?600:400};
334
+ ${({$disabled:e,$current:t})=>e&&!t&&"opacity: 0.5; pointer-events: none;"}
335
+ `,uo=d.styled.a`
336
+ display: inline-flex;
337
+ align-items: center;
338
+ gap: 4px;
339
+ text-decoration: none;
340
+ color: inherit;
341
+ cursor: ${({$current:e,$disabled:t})=>e||t?"default":"pointer"};
342
+ transition: color 0.15s ease;
343
+
344
+ & svg {
345
+ width: 1em;
346
+ height: 1em;
347
+ }
348
+
349
+ ${({$current:e,$disabled:t})=>!e&&!t&&`
350
+ &:hover {
351
+ color: ${n.COLORS.black};
352
+ }
353
+ `}
354
+ `,go=d.styled.span`
355
+ display: inline-flex;
356
+ align-items: center;
357
+ color: ${n.COLORS["iron-grey"]};
358
+ font-size: ${({$size:e})=>ee[e].fontSize}px;
359
+ user-select: none;
360
+
361
+ & svg {
362
+ width: ${({$size:e})=>ee[e].fontSize-2}px;
363
+ height: ${({$size:e})=>ee[e].fontSize-2}px;
364
+ }
365
+ `,xo=d.styled.button`
366
+ display: inline-flex;
367
+ align-items: center;
368
+ justify-content: center;
369
+ padding: 0 4px;
370
+ border: none;
371
+ background: transparent;
372
+ color: ${n.COLORS["iron-grey"]};
373
+ font-size: inherit;
374
+ cursor: pointer;
375
+ border-radius: 4px;
376
+ transition: background-color 0.15s ease;
377
+
378
+ &:hover {
379
+ background-color: ${n.COLORS.gray};
380
+ color: ${n.COLORS.black};
381
+ }
382
+ `,he=C.newClassNameGetter("breadcrumbs"),ho=()=>l.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"m9 18 6-6-6-6"})}),fo=({children:e,className:t,classnames:o,disabled:r=!1,itemsAfterCollapse:i=1,itemsBeforeCollapse:a=1,maxItems:c,ref:s,separator:p,size:x="md",variant:g="light",...h})=>{const y=u.Children.toArray(e).filter(O=>u.isValidElement(O)),f=y.length,S=c!==void 0&&f>c,b=O=>l.jsx(go,{className:he("separator",o==null?void 0:o.separator),$size:x,children:p||l.jsx(ho,{})},O),$=(O,v,k)=>{const{current:z,disabled:j,href:L,startContent:R,endContent:E}=O.props,w=z||k,T=r||j&&!w;return l.jsxs(Ue,{$size:x,$current:w,$disabled:!!T,children:[l.jsxs(uo,{as:L&&!w?"a":"span",href:L&&!w?L:void 0,$current:w,$disabled:!!T,children:[R,O.props.children,E]}),!k&&b(`sep-${v}`)]},v)},m=()=>{if(S){const O=y.slice(0,a),v=y.slice(f-i);return l.jsxs(l.Fragment,{children:[O.map((k,z)=>$(k,z,!1)),l.jsxs(Ue,{$size:x,$current:!1,$disabled:!1,children:[l.jsx(xo,{className:he("ellipsis",o==null?void 0:o.ellipsis),"aria-label":"Show more",children:"..."}),b("sep-ellipsis")]}),v.map((k,z)=>{const j=f-i+z;return $(k,j,j===f-1)})]})}return y.map((O,v)=>$(O,v,v===f-1))};return l.jsx(co,{...h,ref:s,className:he("container",t),$variant:g,$size:x,"aria-label":"Breadcrumbs",children:l.jsx(po,{className:he("list",o==null?void 0:o.list),$size:x,children:m()})})},We={none:"none",sm:`0 1px 2px ${n.alpha(n.COLORS.black,5)}`,md:`0 4px 14px ${n.alpha(n.COLORS.black,10)}`,lg:`0 10px 30px ${n.alpha(n.COLORS.black,15)}`},yo={none:"0",sm:"8px",md:"12px",lg:"16px"},bo=d.styled.div`
383
+ position: relative;
384
+ display: flex;
385
+ flex-direction: column;
386
+ overflow: hidden;
387
+ background-color: ${({$blurred:e})=>e?n.alpha(n.COLORS.white,70):n.COLORS.white};
388
+ border-radius: ${({$radius:e})=>yo[e]};
389
+ border: ${({$border:e})=>e?`1px solid ${n.alpha(n.COLORS["iron-grey"],15)}`:"none"};
390
+ box-shadow: ${({$shadow:e})=>We[e]};
391
+ width: ${({$fullWidth:e})=>e?"100%":"auto"};
392
+ opacity: ${({$disabled:e})=>e?.5:1};
393
+ pointer-events: ${({$disabled:e})=>e?"none":"auto"};
394
+ cursor: ${({$pressable:e})=>e?"pointer":"default"};
395
+ transition:
396
+ box-shadow 0.2s ease,
397
+ transform 0.2s ease;
398
+
399
+ ${({$blurred:e})=>e&&`
400
+ backdrop-filter: blur(10px);
401
+ -webkit-backdrop-filter: blur(10px);
402
+ `}
403
+
404
+ ${({$hoverable:e,$pressable:t})=>(e||t)&&`
405
+ &:hover {
406
+ box-shadow: ${We.lg};
407
+ }
408
+ `}
409
+
410
+ ${({$pressable:e})=>e&&`
411
+ user-select: none;
412
+
413
+ &:active {
414
+ transform: scale(0.98);
415
+ }
416
+ `}
417
+ `,$o=d.styled.div`
418
+ display: flex;
419
+ align-items: center;
420
+ gap: 12px;
421
+ padding: 16px 16px 0;
422
+ z-index: 1;
423
+ `,So=d.styled.div`
424
+ display: flex;
425
+ flex-direction: column;
426
+ flex: 1;
427
+ padding: 12px 16px;
428
+ z-index: 1;
429
+ `,mo=d.styled.div`
430
+ display: flex;
431
+ align-items: center;
432
+ gap: 8px;
433
+ padding: 0 16px 16px;
434
+ z-index: 1;
435
+
436
+ ${({$blurred:e})=>e&&`
437
+ padding: 12px 16px;
438
+ background-color: ${n.alpha(n.COLORS.white,60)};
439
+ backdrop-filter: blur(10px);
440
+ -webkit-backdrop-filter: blur(10px);
441
+ border-top: 1px solid ${n.alpha(n.COLORS["iron-grey"],15)};
442
+ `}
443
+ `,Oo=C.newClassNameGetter("card"),vo=({blurred:e=!1,border:t=!1,children:o,className:r,disabled:i=!1,footerBlurred:a=!1,fullWidth:c=!1,hoverable:s=!1,pressable:p=!1,radius:x="lg",ref:g,shadow:h="md",...y})=>{const f=typeof h=="boolean"?h?"md":"none":h;return l.jsx(bo,{...y,ref:g,className:Oo("container",r),$blurred:e,$border:t,$disabled:i,$footerBlurred:a,$fullWidth:c,$hoverable:s,$pressable:p,$radius:x,$shadow:f,tabIndex:p&&!i?0:void 0,role:p?"button":void 0,children:o})},wo=C.newClassNameGetter("card"),Co=({children:e,className:t,ref:o,...r})=>l.jsx(So,{...r,ref:o,className:wo("body",t),children:e}),Ro=C.newClassNameGetter("card"),Lo=({blurred:e=!1,children:t,className:o,ref:r,...i})=>l.jsx(mo,{...i,ref:r,className:Ro("footer",o),$blurred:e,children:t}),ko=C.newClassNameGetter("card"),jo=({children:e,className:t,ref:o,...r})=>l.jsx($o,{...r,ref:o,className:ko("header",t),children:e}),Eo="Confirm",zo="Cancel",No=B.keyframes`
109
444
  from {
110
445
  opacity: 0;
111
446
  transform: translateX(-50%) translateY(100%);
@@ -114,7 +449,7 @@
114
449
  opacity: 1;
115
450
  transform: translateX(-50%) translateY(0);
116
451
  }
117
- `,Ge=V.keyframes`
452
+ `,To=B.keyframes`
118
453
  from {
119
454
  opacity: 1;
120
455
  transform: translateX(-50%) translateY(0);
@@ -123,7 +458,7 @@
123
458
  opacity: 0;
124
459
  transform: translateX(-50%) translateY(100%);
125
460
  }
126
- `,Ke=c.styled.div`
461
+ `,Io=d.styled.div`
127
462
  position: fixed;
128
463
  bottom: 24px;
129
464
  left: 50%;
@@ -131,61 +466,70 @@
131
466
  align-items: center;
132
467
  gap: 16px;
133
468
  padding: 12px 16px;
134
- background-color: ${a.COLORS.white};
135
- border: 1px dashed ${a.COLORS.gray};
469
+ background-color: ${n.COLORS.white};
470
+ border: 1px dashed ${n.COLORS.gray};
136
471
  border-radius: 12px;
137
472
  box-shadow:
138
473
  0 4px 6px -1px rgba(0, 0, 0, 0.1),
139
474
  0 2px 4px -2px rgba(0, 0, 0, 0.1);
140
- animation: ${({$isExiting:e})=>e?Ge:qe} 0.2s ease-out forwards;
475
+ animation: ${({$isExiting:e})=>e?To:No} 0.2s ease-out forwards;
141
476
  z-index: 1000;
142
- `,Ue=c.styled.p`
477
+ `,Ao=d.styled.p`
143
478
  margin: 0;
144
479
  font-size: 14px;
145
- color: ${a.COLORS.black};
480
+ color: ${n.COLORS.black};
146
481
  white-space: nowrap;
147
- `,He=c.styled.div`
482
+ `,Po=d.styled.div`
148
483
  display: flex;
149
484
  align-items: center;
150
485
  gap: 8px;
151
- `,Ve=({confirmation:e,onDone:t})=>{const[o,i]=u.useState(!1),[n,r]=u.useState(!1),{message:l,onConfirm:s,onCancel:p,options:h}=e,g=h.confirmLabel||Ye,f=h.cancelLabel||Xe,x=u.useCallback(m=>{i(!0),setTimeout(()=>{m==null||m(),t()},200)},[t]),b=u.useCallback(async()=>{const m=s();if(m instanceof Promise){r(!0);try{await m}finally{r(!1)}}x()},[x,s]),y=u.useCallback(()=>{n||x(p)},[x,n,p]);return u.useEffect(()=>{const m=$=>{$.key==="Escape"&&!n&&y()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[y,n]),d.jsxs(Ke,{$isExiting:o,children:[d.jsx(Ue,{children:l}),d.jsxs(He,{children:[d.jsx(c.Button,{variant:"system",size:"compact",onClick:y,disabled:n,children:f}),d.jsx(c.Button,{variant:"danger",size:"compact",onClick:b,loading:n,children:g})]})]})},Ee=u.createContext(null),We=()=>{},Ze=({children:e})=>{const[t,o]=u.useState(null),i=u.useCallback((r,l,s,p)=>{o({open:!0,message:r,onConfirm:l,onCancel:s||We,options:p||{}})},[]),n=u.useCallback(()=>{o(null)},[]);return d.jsxs(Ee.Provider,{value:{show:i,hide:n},children:[e,t&&d.jsx(Ve,{confirmation:t,onDone:n})]})},Qe=()=>{const e=u.useContext(Ee);if(!e)throw new Error("useConfirmation must be used within ConfirmationProvider");return e},Z={sm:`${a.BREAKPOINTS.sm}px`,md:`${a.BREAKPOINTS.md}px`,lg:`${a.BREAKPOINTS.lg}px`,xl:`${a.BREAKPOINTS.xl}px`,"2xl":`${a.BREAKPOINTS["2xl"]}px`},Je=c.styled.div`
486
+ `,Bo=({confirmation:e,onDone:t})=>{const[o,r]=u.useState(!1),[i,a]=u.useState(!1),{message:c,onConfirm:s,onCancel:p,options:x}=e,g=x.confirmLabel||Eo,h=x.cancelLabel||zo,y=u.useCallback(b=>{r(!0),setTimeout(()=>{b==null||b(),t()},200)},[t]),f=u.useCallback(async()=>{const b=s();if(b instanceof Promise){a(!0);try{await b}finally{a(!1)}}y()},[y,s]),S=u.useCallback(()=>{i||y(p)},[y,i,p]);return u.useEffect(()=>{const b=$=>{$.key==="Escape"&&!i&&S()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[S,i]),l.jsxs(Io,{$isExiting:o,children:[l.jsx(Ao,{children:c}),l.jsxs(Po,{children:[l.jsx(d.Button,{variant:"system",size:"compact",onClick:S,disabled:i,children:h}),l.jsx(d.Button,{variant:"danger",size:"compact",onClick:f,loading:i,children:g})]})]})},ht=u.createContext(null),Mo=()=>{},Fo=({children:e})=>{const[t,o]=u.useState(null),r=u.useCallback((a,c,s,p)=>{o({open:!0,message:a,onConfirm:c,onCancel:s||Mo,options:p||{}})},[]),i=u.useCallback(()=>{o(null)},[]);return l.jsxs(ht.Provider,{value:{show:r,hide:i},children:[e,t&&l.jsx(Bo,{confirmation:t,onDone:i})]})},_o=()=>{const e=u.useContext(ht);if(!e)throw new Error("useConfirmation must be used within ConfirmationProvider");return e},le={sm:`${n.BREAKPOINTS.sm}px`,md:`${n.BREAKPOINTS.md}px`,lg:`${n.BREAKPOINTS.lg}px`,xl:`${n.BREAKPOINTS.xl}px`,"2xl":`${n.BREAKPOINTS["2xl"]}px`},Do=d.styled.div`
152
487
  width: 100%;
153
488
 
154
- ${_.mediaUp("sm")} {
155
- max-width: ${Z.sm};
489
+ ${H.mediaUp("sm")} {
490
+ max-width: ${le.sm};
156
491
  }
157
492
 
158
- ${_.mediaUp("md")} {
159
- max-width: ${Z.md};
493
+ ${H.mediaUp("md")} {
494
+ max-width: ${le.md};
160
495
  }
161
496
 
162
- ${_.mediaUp("lg")} {
163
- max-width: ${Z.lg};
497
+ ${H.mediaUp("lg")} {
498
+ max-width: ${le.lg};
164
499
  }
165
500
 
166
- ${_.mediaUp("xl")} {
167
- max-width: ${Z.xl};
501
+ ${H.mediaUp("xl")} {
502
+ max-width: ${le.xl};
168
503
  }
169
504
 
170
- ${_.mediaUp("2xl")} {
171
- max-width: ${Z["2xl"]};
505
+ ${H.mediaUp("2xl")} {
506
+ max-width: ${le["2xl"]};
172
507
  }
173
- `,et=A.newClassNameGetter("container"),tt=({children:e,className:t,ref:o,...i})=>d.jsx(Je,{...i,ref:o,className:et("container",t),children:e}),ot=c.styled.div`
508
+ `,Go=C.newClassNameGetter("container"),Yo=({children:e,className:t,ref:o,...r})=>l.jsx(Do,{...r,ref:o,className:Go("container",t),children:e}),Ho=["January","February","March","April","May","June","July","August","September","October","November","December"],qe=e=>{const t=e.getFullYear(),o=Ho[e.getMonth()];return`${t}, ${o}`},Xo=d.styled.span`
509
+ display: inline-flex;
510
+ align-items: baseline;
511
+ gap: 6px;
512
+ font-size: 14px;
513
+ font-weight: 400;
514
+ color: #666;
515
+ `,Uo=d.styled.span`
516
+ font-weight: 500;
517
+ `,Wo=d.styled.span``,ae=C.newClassNameGetter("date-range"),qo=({className:e,classnames:t,from:o,presentLabel:r="Present Time",ref:i,to:a,...c})=>l.jsxs(Xo,{...c,ref:i,className:ae("container",e),children:[l.jsx(Uo,{className:ae("hash",t==null?void 0:t.hash),children:"#"}),l.jsx("span",{className:ae("from",t==null?void 0:t.from),children:qe(o)}),l.jsx(Wo,{className:ae("separator",t==null?void 0:t.separator),children:"—"}),l.jsx("span",{className:ae("to",t==null?void 0:t.to),children:a?qe(a):r})]}),Ko=d.styled.div`
174
518
  display: flex;
175
519
  flex-direction: row;
176
520
  align-items: center;
177
521
  gap: 8px;
178
522
  margin-top: ${e=>e.$spacing}px;
179
523
  margin-bottom: ${e=>e.$spacing}px;
180
- `,fe=c.styled.div`
524
+ `,Ke=d.styled.div`
181
525
  flex: 1;
182
526
  height: 1px;
183
- background-color: ${a.COLORS.gray};
184
- `,nt=c.styled.span`
527
+ background-color: ${n.COLORS.gray};
528
+ `,Vo=d.styled.span`
185
529
  font-size: 12px;
186
- color: ${a.COLORS["iron-grey"]};
530
+ color: ${n.COLORS["iron-grey"]};
187
531
  white-space: nowrap;
188
- `,te=A.newClassNameGetter("divider"),it=({children:e,className:t,classnames:o,ref:i,spacing:n=8,...r})=>d.jsxs(ot,{...r,ref:i,className:te("container",t),$spacing:n,children:[d.jsx(fe,{className:te("line",o==null?void 0:o.line)}),e&&d.jsxs(d.Fragment,{children:[d.jsx(nt,{className:te("label",o==null?void 0:o.label),children:e}),d.jsx(fe,{className:te("line",o==null?void 0:o.line)})]})]}),rt={left:a.KEYFRAMES.slideInLeft,right:a.KEYFRAMES.slideInRight,top:a.KEYFRAMES.slideInTop,bottom:a.KEYFRAMES.slideInBottom},at=(e,t)=>{switch(e){case"left":return`
532
+ `,fe=C.newClassNameGetter("divider"),Zo=({children:e,className:t,classnames:o,ref:r,spacing:i=8,...a})=>l.jsxs(Ko,{...a,ref:r,className:fe("container",t),$spacing:i,children:[l.jsx(Ke,{className:fe("line",o==null?void 0:o.line)}),e&&l.jsxs(l.Fragment,{children:[l.jsx(Vo,{className:fe("label",o==null?void 0:o.label),children:e}),l.jsx(Ke,{className:fe("line",o==null?void 0:o.line)})]})]}),Jo={left:n.KEYFRAMES.slideInLeft,right:n.KEYFRAMES.slideInRight,top:n.KEYFRAMES.slideInTop,bottom:n.KEYFRAMES.slideInBottom},Qo=(e,t)=>{switch(e){case"left":return`
189
533
  top: 0;
190
534
  left: 0;
191
535
  height: 100%;
@@ -205,49 +549,136 @@
205
549
  left: 0;
206
550
  width: 100%;
207
551
  height: ${t};
208
- `}},st=c.styled.div`
552
+ `}},er=d.styled.div`
209
553
  position: fixed;
210
554
  z-index: 1001;
211
- background-color: ${a.COLORS.white};
212
- box-shadow: 0 4px 24px ${a.alpha(a.COLORS.black,20)};
213
- ${e=>at(e.$position,e.$size)}
214
- animation: ${e=>rt[e.$position]} ${e=>e.$animated?"0.05s":"0s"} ease-out forwards;
215
- `,lt=A.newClassNameGetter("drawer"),ct=({animated:e,children:t,className:o,open:i,position:n="right",ref:r,size:l="400px",...s})=>i?he.createPortal(d.jsx(st,{...s,ref:r,className:lt("container",o),$animated:!!e,$position:n,$size:l,children:t}),document.body):null,dt=c.styled.div`
555
+ background-color: ${n.COLORS.white};
556
+ box-shadow: 0 4px 24px ${n.alpha(n.COLORS.black,20)};
557
+ ${e=>Qo(e.$position,e.$size)}
558
+ animation: ${e=>Jo[e.$position]} ${e=>e.$animated?"0.05s":"0s"} ease-out forwards;
559
+ `,tr=C.newClassNameGetter("drawer"),or=({animated:e,children:t,className:o,open:r,position:i="right",ref:a,size:c="400px",...s})=>r?De.createPortal(l.jsx(er,{...s,ref:a,className:tr("container",o),$animated:!!e,$position:i,$size:c,children:t}),document.body):null,rr=d.styled.div`
216
560
  position: relative;
217
561
  display: inline-block;
218
- `,pt=c.styled.div`
562
+ `,nr=d.styled.div`
219
563
  cursor: pointer;
220
- `,Le=`
564
+ `,ft=`
221
565
  z-index: 100;
222
566
  min-width: 160px;
223
567
  padding: 8px;
224
- background-color: ${a.COLORS.white};
225
- border: 1px solid ${a.COLORS.gray};
568
+ background-color: ${n.COLORS.white};
569
+ border: 1px solid ${n.COLORS.gray};
226
570
  border-radius: 8px;
227
571
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
228
- `,ke=(e,t)=>e?"translateY(0)":t==="bottom"?"translateY(-8px)":"translateY(8px)",ut=c.styled.div`
572
+ `,yt=(e,t)=>e?"translateY(0)":t==="bottom"?"translateY(-8px)":"translateY(8px)",ir=d.styled.div`
229
573
  position: absolute;
230
574
  ${({$position:e})=>e==="bottom"?"top: calc(100% + 4px);":"bottom: calc(100% + 4px);"}
231
575
  ${({$align:e})=>e==="left"?"left: 0;":"right: 0;"}
232
- ${Le}
576
+ ${ft}
233
577
  opacity: ${({$open:e})=>e?1:0};
234
578
  visibility: ${({$open:e})=>e?"visible":"hidden"};
235
- transform: ${({$open:e,$position:t})=>ke(e,t)};
579
+ transform: ${({$open:e,$position:t})=>yt(e,t)};
236
580
  transition:
237
581
  opacity 0.15s ease,
238
582
  transform 0.15s ease,
239
583
  visibility 0.15s;
240
- `,gt=c.styled.div`
584
+ `,lr=d.styled.div`
241
585
  position: fixed;
242
- ${Le}
586
+ ${ft}
243
587
  opacity: ${({$open:e})=>e?1:0};
244
588
  visibility: ${({$open:e})=>e?"visible":"hidden"};
245
- transform: ${({$open:e,$position:t})=>ke(e,t)};
589
+ transform: ${({$open:e,$position:t})=>yt(e,t)};
246
590
  transition:
247
591
  opacity 0.15s ease,
248
592
  transform 0.15s ease,
249
593
  visibility 0.15s;
250
- `,oe=A.newClassNameGetter("dropdown"),ne=4,ht=100,ft=({align:e="left",autoClose:t=!0,children:o,className:i,classnames:n,onClose:r,onOpen:l,open:s,portalRenderNode:p,ref:h,trigger:g,...f})=>{const[x,b]=u.useState(!1),[y,m]=u.useState({top:0,left:0}),[$,w]=u.useState("bottom"),v=u.useRef(null),C=u.useRef(null),L=u.useRef(null),F=s!==void 0,I=F?s:x,U=u.useCallback(()=>{var z,P;if(!C.current)return;const k=C.current.getBoundingClientRect(),N=((z=L.current)==null?void 0:z.offsetHeight)??ht,D=((P=L.current)==null?void 0:P.offsetWidth)??160,j=window.innerHeight-k.bottom-ne,Y=k.top-ne,X=j<N&&Y>j?"top":"bottom";if(w(X),p){let q;e==="left"?q=k.left:q=k.right-D;const je=X==="bottom"?k.bottom+ne:k.top-N-ne;m({top:je,left:q})}},[e,p]),S=u.useCallback(()=>{F?I?r==null||r():l==null||l():b(k=>{const N=!k;return N?l==null||l():r==null||r(),N})},[F,I,r,l]),T=u.useCallback(()=>{F||b(!1),r==null||r()},[F,r]),M=u.useCallback(()=>{t&&T()},[t,T]);u.useLayoutEffect(()=>{I&&U()},[I,U]),u.useEffect(()=>{const k=Y=>{const X=Y.target,z=v.current&&!v.current.contains(X),P=L.current&&!L.current.contains(X);p?z&&P&&T():z&&T()},N=Y=>{Y.key==="Escape"&&T()},D=()=>{I&&p&&U()},j=()=>{I&&p&&U()};return I&&(document.addEventListener("mousedown",k),document.addEventListener("keydown",N),p&&(window.addEventListener("scroll",D,!0),window.addEventListener("resize",j))),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",N),window.removeEventListener("scroll",D,!0),window.removeEventListener("resize",j)}},[I,T,p,U]);const W=p?he.createPortal(d.jsx(gt,{ref:L,$open:I,$position:$,className:oe("content",n==null?void 0:n.content),style:{top:y.top,left:y.left},onClick:M,children:o}),p):d.jsx(ut,{ref:L,$align:e,$open:I,$position:$,className:oe("content",n==null?void 0:n.content),onClick:M,children:o});return d.jsxs(dt,{...f,ref:h??v,className:oe("container",i),children:[d.jsx(pt,{ref:C,onClick:S,className:oe("trigger",n==null?void 0:n.trigger),children:u.cloneElement(g)}),W]})},xt=c.styled.div`
594
+ `,ye=C.newClassNameGetter("dropdown"),be=4,ar=100,dr=({align:e="left",autoClose:t=!0,children:o,className:r,classnames:i,onClose:a,onOpen:c,open:s,portalRenderNode:p,ref:x,trigger:g,...h})=>{const[y,f]=u.useState(!1),[S,b]=u.useState({top:0,left:0}),[$,m]=u.useState("bottom"),O=u.useRef(null),v=u.useRef(null),k=u.useRef(null),z=s!==void 0,j=z?s:y,L=u.useCallback(()=>{var _,D;if(!v.current)return;const N=v.current.getBoundingClientRect(),M=((_=k.current)==null?void 0:_.offsetHeight)??ar,Y=((D=k.current)==null?void 0:D.offsetWidth)??160,F=window.innerHeight-N.bottom-be,X=N.top-be,U=F<M&&X>F?"top":"bottom";if(m(U),p){let W;e==="left"?W=N.left:W=N.right-Y;const kt=U==="bottom"?N.bottom+be:N.top-M-be;b({top:kt,left:W})}},[e,p]),R=u.useCallback(()=>{z?j?a==null||a():c==null||c():f(N=>{const M=!N;return M?c==null||c():a==null||a(),M})},[z,j,a,c]),E=u.useCallback(()=>{z||f(!1),a==null||a()},[z,a]),w=u.useCallback(()=>{t&&E()},[t,E]);u.useLayoutEffect(()=>{j&&L()},[j,L]),u.useEffect(()=>{const N=X=>{const U=X.target,_=O.current&&!O.current.contains(U),D=k.current&&!k.current.contains(U);p?_&&D&&E():_&&E()},M=X=>{X.key==="Escape"&&E()},Y=()=>{j&&p&&L()},F=()=>{j&&p&&L()};return j&&(document.addEventListener("mousedown",N),document.addEventListener("keydown",M),p&&(window.addEventListener("scroll",Y,!0),window.addEventListener("resize",F))),()=>{document.removeEventListener("mousedown",N),document.removeEventListener("keydown",M),window.removeEventListener("scroll",Y,!0),window.removeEventListener("resize",F)}},[j,E,p,L]);const T=p?De.createPortal(l.jsx(lr,{ref:k,$open:j,$position:$,className:ye("content",i==null?void 0:i.content),style:{top:S.top,left:S.left},onClick:w,children:o}),p):l.jsx(ir,{ref:k,$align:e,$open:j,$position:$,className:ye("content",i==null?void 0:i.content),onClick:w,children:o});return l.jsxs(rr,{...h,ref:x??O,className:ye("container",r),children:[l.jsx(nr,{ref:v,onClick:R,className:ye("trigger",i==null?void 0:i.trigger),children:u.cloneElement(g)}),T]})},sr=d.styled.div`
595
+ display: flex;
596
+ flex-direction: column;
597
+ align-items: center;
598
+ text-align: center;
599
+ padding: 40px 24px;
600
+ `,cr=d.styled.div`
601
+ position: relative;
602
+ display: flex;
603
+ align-items: center;
604
+ justify-content: center;
605
+ width: 200px;
606
+ height: 200px;
607
+ margin-bottom: 16px;
608
+ `,pr=d.styled.div`
609
+ position: absolute;
610
+ inset: 0;
611
+
612
+ &::before,
613
+ &::after {
614
+ content: '';
615
+ position: absolute;
616
+ border-radius: 50%;
617
+ border: 1px solid ${n.COLORS.gray};
618
+ }
619
+
620
+ &::before {
621
+ inset: 30px;
622
+ opacity: 0.8;
623
+ }
624
+
625
+ &::after {
626
+ inset: 8px;
627
+ opacity: 0.5;
628
+ }
629
+ `,ur=d.styled.div`
630
+ position: absolute;
631
+ inset: 0;
632
+
633
+ &::before,
634
+ &::after {
635
+ content: '';
636
+ position: absolute;
637
+ border-radius: 50%;
638
+ border: 1px solid ${n.COLORS.gray};
639
+ }
640
+
641
+ &::before {
642
+ inset: -14px;
643
+ opacity: 0.3;
644
+ }
645
+
646
+ &::after {
647
+ inset: 52px;
648
+ }
649
+ `,gr=d.styled.div`
650
+ position: relative;
651
+ z-index: 1;
652
+ display: flex;
653
+ align-items: center;
654
+ justify-content: center;
655
+ width: 48px;
656
+ height: 48px;
657
+ border-radius: 10px;
658
+ border: 1px solid ${n.COLORS.gray};
659
+ background-color: ${n.COLORS.white};
660
+ color: ${n.COLORS["iron-grey"]};
661
+ box-shadow:
662
+ 0 1px 2px rgba(0, 0, 0, 0.05),
663
+ 0 1px 3px rgba(0, 0, 0, 0.1);
664
+ `,xr=d.styled.h3`
665
+ margin: 0 0 4px;
666
+ font-size: 16px;
667
+ font-weight: 600;
668
+ color: ${n.COLORS.black};
669
+ line-height: 1.4;
670
+ `,hr=d.styled.p`
671
+ margin: 0;
672
+ font-size: 14px;
673
+ color: ${n.COLORS["iron-grey"]};
674
+ line-height: 1.5;
675
+ max-width: 360px;
676
+ `,fr=d.styled.div`
677
+ display: flex;
678
+ align-items: center;
679
+ gap: 12px;
680
+ margin-top: 20px;
681
+ `,de=C.newClassNameGetter("empty-state"),yr=({actions:e,className:t,classnames:o,description:r,icon:i,ref:a,title:c,...s})=>l.jsxs(sr,{...s,ref:a,className:de("container",t),children:[i&&l.jsxs(cr,{className:de("icon",o==null?void 0:o.icon),children:[l.jsx(ur,{}),l.jsx(pr,{}),l.jsx(gr,{children:i})]}),l.jsx(xr,{className:de("title",o==null?void 0:o.title),children:c}),r&&l.jsx(hr,{className:de("description",o==null?void 0:o.description),children:r}),e&&l.jsx(fr,{className:de("actions",o==null?void 0:o.actions),children:e})]}),br=d.styled.div`
251
682
  display: grid;
252
683
  grid-template-rows: auto 1fr auto;
253
684
  grid-auto-flow: column;
@@ -272,30 +703,235 @@
272
703
  > * > :not([class*='field-label']):not([class*='field-message']) {
273
704
  grid-row: 2;
274
705
  }
275
- `,mt=A.newClassNameGetter("field-row"),bt=({className:e,gap:t=16,ref:o,...i})=>d.jsx(xt,{...i,ref:o,$gap:t,className:mt("container",e)}),yt=c.styled.div`
706
+ `,$r=C.newClassNameGetter("field-row"),Sr=({className:e,gap:t=16,ref:o,...r})=>l.jsx(br,{...r,ref:o,$gap:t,className:$r("container",e)}),bt=e=>{if(e===0)return"0 B";const t=["B","KB","MB","GB"],o=Math.floor(Math.log(e)/Math.log(1024)),r=e/Math.pow(1024,o);return`${r%1===0?r:r.toFixed(1)} ${t[o]}`},Ve=(e,t)=>t.split(",").map(r=>r.trim()).some(r=>r.startsWith(".")?e.name.toLowerCase().endsWith(r.toLowerCase()):r.endsWith("/*")?e.type.startsWith(r.replace("/*","/")):e.type===r),mr=d.styled.div`
707
+ display: flex;
708
+ flex-direction: column;
709
+ align-items: center;
710
+ justify-content: center;
711
+ gap: 8px;
712
+ padding: 24px;
713
+ border: 1.5px dashed ${({$dragOver:e})=>e?n.COLORS.black:n.COLORS.gray};
714
+ border-radius: 12px;
715
+ background-color: ${({$dragOver:e})=>e?"#f9fafb":"transparent"};
716
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
717
+ transition:
718
+ border-color 0.15s ease,
719
+ background-color 0.15s ease;
720
+ opacity: ${({$disabled:e})=>e?.5:1};
721
+
722
+ ${({$disabled:e,$dragOver:t})=>!e&&!t&&`
723
+ &:hover {
724
+ border-color: ${n.COLORS["iron-grey"]};
725
+ background-color: #f9fafb;
726
+ }
727
+ `}
728
+ `,Or=d.styled.div`
729
+ display: flex;
730
+ align-items: center;
731
+ justify-content: center;
732
+ width: 40px;
733
+ height: 40px;
734
+ border-radius: 8px;
735
+ border: 1px solid ${n.COLORS.gray};
736
+ color: ${n.COLORS["iron-grey"]};
737
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
738
+
739
+ & svg {
740
+ width: 20px;
741
+ height: 20px;
742
+ }
743
+ `,vr=d.styled.div`
276
744
  display: flex;
277
745
  flex-direction: column;
746
+ align-items: center;
747
+ gap: 4px;
748
+ font-size: 14px;
749
+ color: ${n.COLORS["iron-grey"]};
750
+ text-align: center;
751
+ `,wr=d.styled.span`
752
+ color: ${n.COLORS.black};
753
+ font-weight: 600;
754
+ cursor: pointer;
755
+ `,Cr=d.styled.div`
756
+ font-size: 12px;
757
+ color: ${n.COLORS["iron-grey"]};
758
+ text-align: center;
759
+ `,Rr=d.styled.input`
760
+ display: none;
761
+ `;d.styled.div`
762
+ display: flex;
763
+ flex-direction: column;
764
+ gap: 12px;
765
+ margin-top: 16px;
766
+ `;const Lr={uploading:n.COLORS.gray,complete:n.COLORS.gray,failed:n.COLORS.red},kr=d.styled.div`
767
+ display: flex;
768
+ align-items: flex-start;
278
769
  gap: 12px;
279
- `,wt=c.styled.div`
770
+ padding: 14px;
771
+ border: 1px solid ${({$status:e})=>Lr[e]};
772
+ border-radius: 12px;
773
+ transition: border-color 0.15s ease;
774
+ `,jr=d.styled.div`
775
+ display: flex;
776
+ align-items: center;
777
+ justify-content: center;
778
+ flex-shrink: 0;
779
+ width: 36px;
780
+ height: 36px;
781
+ border-radius: 8px;
782
+ background-color: ${({$status:e})=>e==="failed"?"#fef2f2":"#f9fafb"};
783
+ color: ${({$status:e})=>e==="failed"?n.COLORS.red:n.COLORS["iron-grey"]};
784
+
785
+ & svg {
786
+ width: 20px;
787
+ height: 20px;
788
+ }
789
+ `,Er=d.styled.div`
790
+ flex: 1;
791
+ min-width: 0;
792
+ display: flex;
793
+ flex-direction: column;
794
+ gap: 4px;
795
+ `,zr=d.styled.div`
796
+ display: flex;
797
+ align-items: flex-start;
798
+ justify-content: space-between;
799
+ gap: 8px;
800
+ `,Nr=d.styled.div`
801
+ min-width: 0;
802
+ `,Tr=d.styled.div`
803
+ font-size: 14px;
804
+ font-weight: 500;
805
+ color: ${n.COLORS.black};
806
+ white-space: nowrap;
807
+ overflow: hidden;
808
+ text-overflow: ellipsis;
809
+ `,Ir=d.styled.div`
810
+ font-size: 14px;
811
+ color: ${n.COLORS["iron-grey"]};
812
+ `,Ar=d.styled.div`
813
+ display: flex;
814
+ align-items: center;
815
+ gap: 12px;
816
+ margin-top: 2px;
817
+ `,Pr=d.styled.div`
818
+ flex: 1;
819
+ height: 8px;
820
+ border-radius: 4px;
821
+ background-color: ${n.COLORS.gray};
822
+ overflow: hidden;
823
+ `,Br=d.styled.div`
824
+ height: 100%;
825
+ width: ${({$value:e})=>Math.min(100,Math.max(0,e))}%;
826
+ border-radius: 4px;
827
+ background-color: ${({$status:e})=>e==="failed"?n.COLORS.red:n.COLORS.black};
828
+ transition: width 0.2s ease;
829
+ `,Mr=d.styled.span`
830
+ flex-shrink: 0;
831
+ font-size: 14px;
832
+ color: ${n.COLORS.black};
833
+ font-weight: 500;
834
+ min-width: 36px;
835
+ text-align: right;
836
+ `,Fr=d.styled.button`
837
+ display: flex;
838
+ align-items: center;
839
+ justify-content: center;
840
+ flex-shrink: 0;
841
+ width: 20px;
842
+ height: 20px;
843
+ padding: 0;
844
+ border: none;
845
+ background: transparent;
846
+ color: ${n.COLORS["iron-grey"]};
847
+ cursor: pointer;
848
+ border-radius: 4px;
849
+ transition: color 0.15s ease;
850
+
851
+ & svg {
852
+ width: 16px;
853
+ height: 16px;
854
+ }
855
+
856
+ &:hover {
857
+ color: ${n.COLORS.black};
858
+ }
859
+ `,_r=d.styled.button`
860
+ display: inline;
861
+ padding: 0;
862
+ border: none;
863
+ background: transparent;
864
+ color: ${n.COLORS.red};
865
+ font-size: 14px;
866
+ font-weight: 500;
867
+ cursor: pointer;
868
+ text-decoration: none;
869
+
870
+ &:hover {
871
+ text-decoration: underline;
872
+ }
873
+ `,Ze=d.styled.div`
874
+ display: flex;
875
+ align-items: center;
876
+ gap: 4px;
877
+ font-size: 14px;
878
+ color: ${n.COLORS["iron-grey"]};
879
+ `,Dr=d.styled.span`
880
+ display: inline-flex;
881
+ color: ${n.COLORS.green};
882
+
883
+ & svg {
884
+ width: 16px;
885
+ height: 16px;
886
+ }
887
+ `,$e=C.newClassNameGetter("file-upload"),Gr=()=>l.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),l.jsx("polyline",{points:"17 8 12 3 7 8"}),l.jsx("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]}),Yr=({accept:e,children:t,className:o,classnames:r,description:i,disabled:a=!1,hint:c,icon:s,maxSize:p,multiple:x=!1,onChange:g,onReject:h,ref:y,...f})=>{const S=u.useRef(null),[b,$]=u.useState(!1),m=u.useCallback(L=>{if(!L||L.length===0)return;const R=Array.from(L);if(e){const E=R.filter(w=>!Ve(w,e));if(E.length>0){h==null||h(E,"type");const w=R.filter(T=>Ve(T,e));if(w.length===0)return;g==null||g(w);return}}if(p){const E=R.filter(w=>w.size>p);if(E.length>0){h==null||h(E,"size");const w=R.filter(T=>T.size<=p);if(w.length===0)return;g==null||g(w);return}}g==null||g(R)},[e,p,g,h]),O=()=>{var L;a||(L=S.current)==null||L.click()},v=L=>{m(L.target.files),S.current&&(S.current.value="")},k=L=>{L.preventDefault(),L.stopPropagation(),a||$(!0)},z=L=>{L.preventDefault(),L.stopPropagation(),$(!1)},j=L=>{L.preventDefault(),L.stopPropagation(),$(!1),a||m(L.dataTransfer.files)};return l.jsxs("div",{ref:y,className:o,...f,children:[l.jsxs(mr,{className:$e("dropzone",r==null?void 0:r.dropzone),$disabled:a,$dragOver:b,onClick:O,onDragOver:k,onDragLeave:z,onDrop:j,role:"button",tabIndex:a?-1:0,"aria-disabled":a,children:[l.jsx(Or,{className:$e("icon",r==null?void 0:r.icon),children:s||l.jsx(Gr,{})}),l.jsx(vr,{className:$e("text",r==null?void 0:r.text),children:i||l.jsxs("span",{children:[l.jsx(wr,{children:"Click to upload"})," or drag and drop"]})}),c&&l.jsx(Cr,{className:$e("hint",r==null?void 0:r.hint),children:c})]}),l.jsx(Rr,{ref:S,type:"file",accept:e,multiple:x,onChange:v,tabIndex:-1}),t]})},J=C.newClassNameGetter("file-upload-item"),Hr=()=>l.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),l.jsx("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})]}),Xr=()=>l.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M18 6 6 18"}),l.jsx("path",{d:"m6 6 12 12"})]}),Ur=()=>l.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M20 6 9 17l-5-5"})}),Wr=({name:e,size:t,status:o="uploading",progress:r=0,icon:i,onRemove:a,onRetry:c,className:s,classnames:p,ref:x})=>l.jsxs(kr,{ref:x,className:J("item",s),$status:o,children:[l.jsx(jr,{className:J("icon",p==null?void 0:p.icon),$status:o,children:i||l.jsx(Hr,{})}),l.jsxs(Er,{children:[l.jsxs(zr,{children:[l.jsxs(Nr,{className:J("info",p==null?void 0:p.info),children:[l.jsx(Tr,{className:J("name",p==null?void 0:p.name),children:e}),l.jsx(Ir,{className:J("size",p==null?void 0:p.size),children:bt(t)})]}),a&&l.jsx(Fr,{className:J("action",p==null?void 0:p.action),onClick:a,"aria-label":"Remove file",type:"button",children:l.jsx(Xr,{})})]}),o==="uploading"&&l.jsxs(Ar,{className:J("progress",p==null?void 0:p.progress),children:[l.jsx(Pr,{children:l.jsx(Br,{$value:r,$status:o})}),l.jsxs(Mr,{children:[r,"%"]})]}),o==="complete"&&l.jsxs(Ze,{children:[l.jsx(Dr,{children:l.jsx(Ur,{})}),"Complete"]}),o==="failed"&&l.jsxs(Ze,{children:["Upload failed."," ",c&&l.jsx(_r,{onClick:c,type:"button",children:"Try again"})]})]})]}),$t=`
888
+ display: inline-flex;
889
+ font-size: 14px;
890
+ color: #666;
891
+ transition: color 0.15s ease;
892
+ text-decoration: none;
893
+ `,St=`
894
+ cursor: pointer;
895
+ &:hover {
896
+ color: ${n.COLORS["steel-blue"]};
897
+ }
898
+ `,qr=d.styled.span`
899
+ ${$t}
900
+ cursor: ${({$clickable:e})=>e?"pointer":"default"};
901
+ ${({$clickable:e})=>e&&St}
902
+ `,Kr=d.styled.a`
903
+ ${$t}
904
+ ${St}
905
+ `,Vr=d.styled.span``,Zr=d.styled.span``,Se=C.newClassNameGetter("hashtag"),Jr=({children:e,className:t,classnames:o,href:r,onClick:i,ref:a,...c})=>{const s=l.jsxs(l.Fragment,{children:[l.jsx(Vr,{className:Se("hash",o==null?void 0:o.hash),children:"#"}),l.jsx(Zr,{className:Se("label",o==null?void 0:o.label),children:e})]});if(r)return l.jsx(Kr,{ref:a,href:r,className:Se("container",t),onClick:i,children:s});const p=!!i;return l.jsx(qr,{...c,ref:a,className:Se("container",t),$clickable:p,onClick:i,role:p?"button":void 0,tabIndex:p?0:void 0,children:s})},Je={1:{fontSize:32,lineHeight:1.2},2:{fontSize:24,lineHeight:1.25},3:{fontSize:18,lineHeight:1.3},4:{fontSize:16,lineHeight:1.4},5:{fontSize:14,lineHeight:1.4},6:{fontSize:12,lineHeight:1.5}},Qr=d.styled.h1`
906
+ margin: 0;
907
+ font-weight: 700;
908
+ color: ${n.COLORS.black};
909
+ font-size: ${({$level:e})=>Je[e].fontSize}px;
910
+ line-height: ${({$level:e})=>Je[e].lineHeight};
911
+ `,en=C.newClassNameGetter("heading"),tn=({as:e,children:t,className:o,level:r=3,ref:i,...a})=>l.jsx(Qr,{...a,as:`h${e??r}`,ref:i,className:en("container",o),$level:r,children:t}),on=d.styled.div`
912
+ display: flex;
913
+ flex-direction: column;
914
+ gap: 12px;
915
+ `,rn=d.styled.div`
280
916
  width: ${({$size:e})=>e}px;
281
917
  height: ${({$size:e})=>e}px;
282
918
  border-radius: 8px;
283
- border: 1px dashed ${a.COLORS.gray};
919
+ border: 1px dashed ${n.COLORS.gray};
284
920
  overflow: hidden;
285
921
  display: flex;
286
922
  align-items: center;
287
923
  justify-content: center;
288
- background-color: ${a.COLORS.white};
924
+ background-color: ${n.COLORS.white};
289
925
 
290
926
  img {
291
927
  width: 100%;
292
928
  height: 100%;
293
929
  object-fit: cover;
294
930
  }
295
- `,$t=c.styled.span`
931
+ `,nn=d.styled.span`
296
932
  font-size: 12px;
297
- color: ${a.COLORS["iron-grey"]};
298
- `,St=e=>`
933
+ color: ${n.COLORS["iron-grey"]};
934
+ `,ln=e=>`
299
935
  .${e} {
300
936
  padding: 7px 16px;
301
937
  font-size: 14px;
@@ -313,7 +949,7 @@
313
949
  .${e}:active {
314
950
  transform: translate(0, 1px);
315
951
  }
316
- `,vt=e=>`
952
+ `,an=e=>`
317
953
  .${e} {
318
954
  display: flex;
319
955
  flex: 1 1 auto;
@@ -337,7 +973,7 @@
337
973
  max-height: 70vh;
338
974
  }
339
975
  }
340
- `,Ct=e=>`
976
+ `,dn=e=>`
341
977
  .${e} {
342
978
  padding: 7px 16px;
343
979
  font-size: 14px;
@@ -355,7 +991,7 @@
355
991
  .${e}:active {
356
992
  transform: translate(0, 1px);
357
993
  }
358
- `,Ot=e=>`
994
+ `,sn=e=>`
359
995
  .${e} {
360
996
  display: flex;
361
997
  flex-direction: column;
@@ -373,7 +1009,7 @@
373
1009
  border-radius: 8px;
374
1010
  }
375
1011
  }
376
- `,Rt=e=>`
1012
+ `,cn=e=>`
377
1013
  .${e} {
378
1014
  display: flex;
379
1015
  justify-content: flex-end;
@@ -392,7 +1028,7 @@
392
1028
  gap: 8px;
393
1029
  }
394
1030
  }
395
- `,Et=e=>`
1031
+ `,pn=e=>`
396
1032
  .${e} {
397
1033
  display: flex;
398
1034
  justify-content: flex-start;
@@ -414,7 +1050,7 @@
414
1050
  font-size: 14px;
415
1051
  }
416
1052
  }
417
- `,Lt=e=>`
1053
+ `,un=e=>`
418
1054
  .${e} {
419
1055
  display: block;
420
1056
  z-index: 101;
@@ -432,27 +1068,27 @@
432
1068
  position: absolute;
433
1069
  touch-action: none;
434
1070
  }
435
- `,kt=e=>`
1071
+ `,gn=e=>`
436
1072
  .${e} {
437
1073
  position: absolute;
438
1074
  z-index: 2;
439
1075
  background-color: rgba(0, 0, 0, 0.6);
440
1076
  touch-action: none;
441
1077
  }
442
- `,zt=e=>`
1078
+ `,xn=e=>`
443
1079
  .${e} {
444
1080
  position: absolute;
445
1081
  z-index: 3;
446
1082
  touch-action: none;
447
1083
  }
448
- `,Tt=e=>`
1084
+ `,hn=e=>`
449
1085
  .${e} {
450
1086
  backface-visibility: hidden;
451
1087
  perspective: 1000px;
452
1088
  max-inline-size: unset !important;
453
1089
  max-block-size: unset !important;
454
1090
  }
455
- `,Pt=e=>`
1091
+ `,fn=e=>`
456
1092
  .${e} {
457
1093
  position: absolute;
458
1094
  z-index: 100;
@@ -463,7 +1099,7 @@
463
1099
  overflow: hidden;
464
1100
  border-radius: 50%;
465
1101
  }
466
- `,At={tl:"nw-resize",tr:"ne-resize",bl:"sw-resize",br:"se-resize"},It={tl:{h:"left",v:"top"},tr:{h:"right",v:"top"},bl:{h:"left",v:"bottom"},br:{h:"right",v:"bottom"}},ie=(e,t)=>{const o=At[t],{h:i,v:n}=It[t];return`
1102
+ `,yn={tl:"nw-resize",tr:"ne-resize",bl:"sw-resize",br:"se-resize"},bn={tl:{h:"left",v:"top"},tr:{h:"right",v:"top"},bl:{h:"left",v:"bottom"},br:{h:"right",v:"bottom"}},me=(e,t)=>{const o=yn[t],{h:r,v:i}=bn[t];return`
467
1103
  .${e} {
468
1104
  display: block;
469
1105
  z-index: 102;
@@ -473,8 +1109,8 @@
473
1109
  -moz-user-select: none;
474
1110
  -ms-user-select: none;
475
1111
  user-select: none;
1112
+ ${r}: -3px;
476
1113
  ${i}: -3px;
477
- ${n}: -3px;
478
1114
  position: absolute;
479
1115
  width: 5px;
480
1116
  height: 5px;
@@ -485,11 +1121,11 @@
485
1121
  .${e} {
486
1122
  width: 24px;
487
1123
  height: 24px;
1124
+ ${r}: -12px;
488
1125
  ${i}: -12px;
489
- ${n}: -12px;
490
1126
  }
491
1127
  }
492
- `},Nt=e=>`
1128
+ `},$n=e=>`
493
1129
  .${e} {
494
1130
  display: flex;
495
1131
  align-items: center;
@@ -515,7 +1151,7 @@
515
1151
  padding-bottom: env(safe-area-inset-bottom, 8px);
516
1152
  }
517
1153
  }
518
- `,jt=e=>`
1154
+ `,Sn=e=>`
519
1155
  .${e} {
520
1156
  backface-visibility: hidden;
521
1157
  user-select: none;
@@ -528,37 +1164,37 @@
528
1164
  position: absolute;
529
1165
  z-index: 1;
530
1166
  }
531
- `,Bt=e=>{let t=5381;for(let o=0;o<e.length;o++)t=(t<<5)+t^e.charCodeAt(o);return Math.abs(t).toString(36)},O=e=>`hq-cropper__${Bt(e)}`,R=e=>e||[],E=(e,t)=>{if(t)for(const o of t)e.classList.add(o)},Ft=e=>{const t={applyButton:[O("applyButton"),...R(e.applyButton)],cancelButton:[O("cancelButton"),...R(e.cancelButton)],container:[O("container"),...R(e.container)],handlerMove:[O("handlerMove"),...R(e.handlerMove)],handlerResizeTopLeft:[O("handlerResizeTopLeft"),...R(e.handlerResizeTopLeft)],handlerResizeTopRight:[O("handlerResizeTopRight"),...R(e.handlerResizeTopRight)],handlerResizeBottomLeft:[O("handlerResizeBottomLeft"),...R(e.handlerResizeBottomLeft)],handlerResizeBottomRight:[O("handlerResizeBottomRight"),...R(e.handlerResizeBottomRight)],sourceImage:[O("sourceImage"),...R(e.sourceImage)],portalArea:[O("portalArea"),...R(e.portalArea)],previewImage:[O("previewImage"),...R(e.previewImage)],body:[O("body"),...R(e.body)],header:[O("header"),...R(e.header)],footer:[O("footer"),...R(e.footer)],portal:[O("portal"),...R(e.portal)],preview:[O("preview"),...R(e.preview)],root:[O("root"),...R(e.root)]},o=`
532
- ${St(t.applyButton[0])}
533
- ${vt(t.body[0])}
534
- ${Ct(t.cancelButton[0])}
535
- ${Ot(t.container[0])}
536
- ${Rt(t.footer[0])}
537
- ${Et(t.header[0])}
538
- ${Lt(t.handlerMove[0])}
539
- ${kt(t.portalArea[0])}
540
- ${zt(t.portal[0])}
541
- ${Tt(t.previewImage[0])}
542
- ${Pt(t.preview[0])}
543
- ${ie(t.handlerResizeBottomLeft[0],"bl")}
544
- ${ie(t.handlerResizeBottomRight[0],"br")}
545
- ${ie(t.handlerResizeTopLeft[0],"tl")}
546
- ${ie(t.handlerResizeTopRight[0],"tr")}
547
- ${Nt(t.root[0])}
548
- ${jt(t.sourceImage[0])}
549
- `,i=document.createElement("style");return i.innerHTML=o,document.getElementsByTagName("head")[0].prepend(i),t};let Mt=0;const _t=e=>{const t=new Map,o=new Proxy({...e},{set(i,n,r){return Reflect.set(i,n,r),(t.get(n)||[]).forEach(l=>l.action(r,i,n)),!0}});return{getState:()=>({...o}),setState:i=>{for(const n of Object.keys(i)){const r=i[n];r!==void 0&&(o[n]=r)}},subscribe:(i,n)=>{const r=String(++Mt),l=t.get(i)||[];return t.set(i,[...l,{action:n,id:r}]),r},unsubscribe:i=>{for(const[n,r]of t.entries()){const l=r.filter(s=>s.id!==i);if(l.length!==r.length){t.set(n,l);return}}},unsubscribeAll:()=>{t.clear()}}},ue={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"]}},Dt=(e={},t={})=>_t({...ue,config:{...ue.config,...e},css:Ft(t)}),Yt=(e,t)=>{var x;const o=e(),i=document.querySelector(`.${(x=o.css)==null?void 0:x.body[0]}`);if(!i)return o.frame;const{width:n,height:r}=i.getBoundingClientRect(),l=n/r,s=t.width/t.height;let p,h,g=0,f=0;return l>s?(p=r*s,h=r,f=(n-p)/2):(p=n,h=n*(t.height/t.width),g=(r-h)/2),{width:p,height:h,left:f,top:g}},Xt=(e,t,o)=>{const[i,n]=t,r=i+e>o.width?(o.width-e)/2:i,l=n+e>o.height?(o.height-e)/2:n;return[r,l]},qt=(e,t)=>{const{config:o}=e(),i=Math.min(t.width,t.height)-o.framePadding*2,n=o.portalSize>i?i:o.portalSize;if(Array.isArray(o.portalPosition)&&o.portalPosition.length===2){const[r,l]=Xt(n,o.portalPosition,t);return{left:r,top:l,size:n}}return o.portalPosition==="center"?{size:n,left:(t.width-n)/2,top:(t.height-n)/2}:{left:0,top:0,size:n}};var B=(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))(B||{});const Gt=e=>{var i;const t=e(),o=document.createElement("span");return E(o,(i=t.css)==null?void 0:i.handlerMove),o.setAttribute("data-action",B.MOVE),o},Kt=e=>{var i;const t=e(),o=document.createElement("span");return E(o,(i=t.css)==null?void 0:i.handlerResizeBottomLeft),o.setAttribute("data-action",B.RESIZE_BL),o},Ut=e=>{var i;const t=e(),o=document.createElement("span");return E(o,(i=t.css)==null?void 0:i.handlerResizeBottomRight),o.setAttribute("data-action",B.RESIZE_BR),o},Ht=e=>{var i;const t=e(),o=document.createElement("span");return E(o,(i=t.css)==null?void 0:i.handlerResizeTopLeft),o.setAttribute("data-action",B.RESIZE_TL),o},Vt=e=>{var i;const t=e(),o=document.createElement("span");return E(o,(i=t.css)==null?void 0:i.handlerResizeTopRight),o.setAttribute("data-action",B.RESIZE_TR),o},Wt=e=>{var i;const t=e(),o=document.createElement("img");return E(o,(i=t.css)==null?void 0:i.previewImage),o},Zt=e=>{var i;const t=e(),o=document.createElement("div");return E(o,(i=t.css)==null?void 0:i.preview),o.appendChild(Wt(e)),o},Qt=e=>{var i;const t=e(),o=document.createElement("div");return E(o,(i=t.css)==null?void 0:i.portal),o.appendChild(Zt(e)),o.appendChild(Gt(e)),o.appendChild(Ht(e)),o.appendChild(Vt(e)),o.appendChild(Kt(e)),o.appendChild(Ut(e)),o},Jt=e=>{var i;const t=e(),o=document.createElement("div");return E(o,(i=t.css)==null?void 0:i.portalArea),o.appendChild(Qt(e)),o},eo=e=>{var i;const t=e(),o=document.createElement("img");return E(o,(i=t.css)==null?void 0:i.sourceImage),o.setAttribute("alt","source"),o.setAttribute("crossOrigin","anonymous"),o.setAttribute("draggable","false"),o.setAttribute("src",t.sourceBase64),o},to=e=>{var i;const t=e(),o=document.createElement("div");return E(o,(i=t.css)==null?void 0:i.body),o.appendChild(eo(e)),o.appendChild(Jt(e)),o},oo=(e,t)=>{var n;const o=e(),i=document.createElement("div");return E(i,(n=o.css)==null?void 0:n.applyButton),i.setAttribute("role","button"),i.innerText=o.config.applyButtonLabel,i.addEventListener("click",t),i},no=(e,t)=>{var n;const o=e(),i=document.createElement("div");return E(i,(n=o.css)==null?void 0:n.cancelButton),i.setAttribute("role","button"),i.innerText=o.config.cancelButtonLabel,i.addEventListener("click",t),i},io=(e,t,o)=>{var r;const i=e(),n=document.createElement("div");return E(n,(r=i.css)==null?void 0:r.footer),n.appendChild(no(e,o)),n.appendChild(oo(e,t)),n},ro=e=>{var i;const t=e(),o=document.createElement("div");return E(o,(i=t.css)==null?void 0:i.header),o},ao=(e,t,o)=>{var r;const i=e(),n=document.createElement("div");return E(n,(r=i.css)==null?void 0:r.container),n.appendChild(ro(e)),n.appendChild(to(e)),n.appendChild(io(e,t,o)),n},so=(e,t,o)=>{var r;const i=e(),n=document.createElement("div");E(n,(r=i.css)==null?void 0:r.root),n.appendChild(ao(e,t,o)),document.body.appendChild(n)},lo=e=>{const t=document.createElement("input");return t.style.display="none",t.setAttribute("type","file"),t.setAttribute("accept","image/x-png,image/jpeg"),t.addEventListener("change",e,!1),document.body.appendChild(t),t},J=new Map,co={header:"header",sourceImage:"sourceImage",portalArea:"portalArea",portal:"portal",previewImage:"previewImage"},H=(e,t)=>{if(J.has(e))return J.get(e);if(!t)return null;const o=t[co[e]],i=document.querySelector(`.${o[0]}`);return J.set(e,i),i},po=()=>{J.clear()},uo=()=>{J.clear()},go=(e,t)=>{const o=H("header",t.css);o&&(o.innerText=e)},ho=(e,t)=>{const o=H("sourceImage",t.css);o&&(o.setAttribute("src",e),o.style.height=`${t.frame.height}px`,o.style.width=`${t.frame.width}px`,o.style.left=`${t.frame.left}px`,o.style.top=`${t.frame.top}px`);const i=H("portalArea",t.css);i&&(i.style.height=`${t.frame.height}px`,i.style.width=`${t.frame.width}px`,i.style.left=`${t.frame.left}px`,i.style.top=`${t.frame.top}px`);const n=H("portal",t.css);n&&(n.style.width=`${t.portal.size}px`,n.style.height=`${t.portal.size}px`,n.style.left=`${t.portal.left}px`,n.style.top=`${t.portal.top}px`);const r=H("previewImage",t.css);r&&(r.setAttribute("src",e),r.style.height=`${t.frame.height}px`,r.style.width=`${t.frame.width}px`,r.style.marginLeft=`-${t.portal.left}px`,r.style.marginTop=`-${t.portal.top}px`)},fo=(e,t)=>{const o=H("portal",t.css);o&&(o.style.left=`${e.left}px`,o.style.top=`${e.top}px`,o.style.width=`${e.size}px`,o.style.height=`${e.size}px`);const i=H("previewImage",t.css);i&&(i.style.marginLeft=`-${e.left}px`,i.style.marginTop=`-${e.top}px`)},se=1,xo=e=>{var b,y;const t=e(),o=document.createElement("canvas"),i=t.frame.width||se,n=t.frame.height||se,r=t.sourceWidth/i,l=t.sourceHeight/n,s=t.portal.left*r,p=t.portal.top*l,h=Math.max(t.portal.size*Math.min(r,l),se),g=t.config.outputSize>0?t.config.outputSize:h;o.width=g,o.height=g;const f=document.querySelector(`.${(b=t.css)==null?void 0:b.sourceImage[0]}`);f&&((y=o.getContext("2d"))==null||y.drawImage(f,s,p,h,h,0,0,g,g));const x=o.toDataURL(`image/${t.config.type}`,t.config.compression);return new Promise((m,$)=>{try{o.toBlob(w=>{if(o.remove(),!w){$(new Error(`Failed to create blob for type: image/${t.config.type}`));return}m([x,w])},`image/${t.config.type}`,t.config.compression)}catch(w){o.remove(),$(w)}})},mo=(e,t,o)=>{const{emitted:i,portal:n,frame:r,config:l}=t();let s=i.left-i.X+e.clientX,p=i.top-i.Y+e.clientY;const h=l.framePadding,g=r.width-l.framePadding-n.size,f=l.framePadding,x=r.height-l.framePadding-n.size;s<h&&(s=h),s>g&&(s=g),p<f&&(p=f),p>x&&(p=x),o({portal:{...n,left:s,top:p}})},bo=(e,t,o)=>{const{action:i,emitted:n,portal:r,frame:l,config:s}=t(),p=e.pageX-n.X,h=e.pageY-n.Y;switch(i){case B.RESIZE_BR:{let g=n.size+Math.max(p,h);return g<s.minPortalSize&&(g=s.minPortalSize),n.top+g>l.height-s.framePadding&&(g=l.height-n.top-s.framePadding),n.left+g>l.width-s.framePadding&&(g=l.width-n.left-s.framePadding),o({portal:{...r,size:g}})}case B.RESIZE_TR:{let g=p+h>0?n.size+p:n.size-h,f=p+h>0?n.top-p:n.top+h;return g<s.minPortalSize&&(f=n.top+n.size-s.minPortalSize,g=s.minPortalSize),n.left+g>l.width-s.framePadding&&(g=l.width-n.left-s.framePadding,f=n.top-l.width+n.left+n.size),f<s.framePadding&&(g=n.top+n.size,f=s.framePadding),o({portal:{...r,top:f,size:g}})}case B.RESIZE_TL:{const g=Math.min(p,h);let f=n.size-g,x=n.left+g,b=n.top+g;if(f<s.minPortalSize){const y=n.size-s.minPortalSize;f=s.minPortalSize,x=n.left+y,b=n.top+y}if(b<s.framePadding){const y=s.framePadding-b;b=s.framePadding,x=x+y,f=f-y}if(x<s.framePadding){const y=s.framePadding-x;x=s.framePadding,b=b+y,f=f-y}return o({portal:{...r,top:b,left:x,size:f}})}case B.RESIZE_BL:{let g=p+h>0?n.size+h:n.size-p,f=p+h>0?n.left-h:n.left+p;return g<s.minPortalSize&&(f=n.left+n.size-s.minPortalSize,g=s.minPortalSize),g+n.top>l.height-s.framePadding&&(f=n.left-l.height+n.top+n.size,g=l.height-n.top-s.framePadding),f<s.framePadding&&(f=s.framePadding,g=n.left+n.size-s.framePadding),o({portal:{...r,left:f,size:g}})}default:return}},xe=e=>{if("touches"in e&&e.touches.length>0){const o=e.touches[0];return{clientX:o.clientX,clientY:o.clientY,pageX:o.pageX,pageY:o.pageY}}if("changedTouches"in e&&e.changedTouches.length>0){const o=e.changedTouches[0];return{clientX:o.clientX,clientY:o.clientY,pageX:o.pageX,pageY:o.pageY}}const t=e;return{clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY}},yo=(e,t)=>{var x,b,y;const o=e(),i=document.querySelector(`.${(x=o.css)==null?void 0:x.portal[0]}`),n=document.querySelector(`.${(b=o.css)==null?void 0:b.portalArea[0]}`),r=document.querySelector(`.${(y=o.css)==null?void 0:y.root[0]}`);let l=null,s=null;const p=m=>{m.preventDefault();const{portal:$}=e(),w=xe(m);if(m.target){const v=m.target.getAttribute("data-action"),C={X:w.pageX,Y:w.pageY,left:$.left,top:$.top,size:$.size};t({action:v,emitted:C})}},h=()=>{const{action:m}=e();l!==null&&(cancelAnimationFrame(l),l=null),s=null,m&&t({action:null})},g=()=>{if(l=null,!s)return;const m=s;s=null;const{action:$}=e();if($)switch($){case B.MOVE:mo(m,e,t);break;default:bo(m,e,t)}},f=m=>{const{action:$}=e();$&&(m.preventDefault(),s=xe(m),l===null&&(l=requestAnimationFrame(g)))};return r&&(r.addEventListener("mouseup",h),r.addEventListener("touchend",h),r.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})),()=>{l!==null&&cancelAnimationFrame(l),r&&(r.removeEventListener("mouseup",h),r.removeEventListener("touchend",h),r.removeEventListener("touchcancel",h)),i&&(i.removeEventListener("mousedown",p),i.removeEventListener("touchstart",p)),n&&(n.removeEventListener("mousemove",f),n.removeEventListener("touchmove",f))}},me=1024*1024,wo=(e,t)=>{if(!t.allowedTypes.includes(e.type))return`Invalid file type "${e.type}". Allowed types: ${t.allowedTypes.join(", ")}`;if(t.maxFileSize>0&&e.size>t.maxFileSize){const o=(t.maxFileSize/me).toFixed(2);return`File size (${(e.size/me).toFixed(2)}MB) exceeds maximum allowed size (${o}MB)`}return null},$o=(e,t,o,i,n,r,l)=>{const s=w=>{l?l(w):console.error(`HqCropper: ${w}`)};if(!e.target.files||e.target.files.length===0){s("Can't read file input");return}const p=e.target.files[0],{config:h}=t(),g=wo(p,h);if(g){s(g),e.target.value="";return}const f=new FileReader;let x=null;const b=()=>{var C;const w=t(),v=document.querySelector(`.${(C=w.css)==null?void 0:C.root[0]}`);v&&(v.remove(),document.removeEventListener("keydown",y),x==null||x(),uo(),r(),o(ue))},y=w=>{w.key==="Escape"&&t().sourceBase64&&m(w)},m=w=>{w.preventDefault(),b()},$=w=>{w.preventDefault();const v=t();xo(t).then(([C,L])=>{i(C,L,v),m(w)}).catch(C=>{s(C instanceof Error?C.message:"Failed to crop image")})};f.onload=w=>{const v=new Image;if(!w.target||typeof w.target.result!="string"){s("Can't load result image");return}v.src=w.target.result,v.onerror=()=>{s("Failed to load image")},v.onload=()=>{var F;so(t,$,m),po(),n("fileName",go),n("sourceBase64",ho),n("portal",fo);const C=Yt(t,v),L=qt(t,C);o({frame:C,portal:L,fileName:p.name,sourceBase64:(F=w.target)==null?void 0:F.result,sourceHeight:v.height,sourceWidth:v.width}),x=yo(t,o),document.addEventListener("keydown",y)}},f.onerror=()=>{s("Failed to read file")},f.readAsDataURL(p),e.target.value=""},So=(e,t,o,i)=>{const{getState:n,setState:r,subscribe:l,unsubscribeAll:s}=Dt(t,o),p=lo(h=>$o(h,n,r,e,l,s,i));return{open:()=>p.click()}},G={portalSize:200,outputSize:400,compression:.9,type:"jpeg",maxFileSize:10*1024*1024,allowedTypes:["image/jpeg","image/png","image/webp"],applyLabel:"Apply",cancelLabel:"Cancel"},be="vacano-image-cropper-styles",vo=`
1167
+ `,mn=e=>{let t=5381;for(let o=0;o<e.length;o++)t=(t<<5)+t^e.charCodeAt(o);return Math.abs(t).toString(36)},I=e=>`hq-cropper__${mn(e)}`,A=e=>e||[],P=(e,t)=>{if(t)for(const o of t)e.classList.add(o)},On=e=>{const t={applyButton:[I("applyButton"),...A(e.applyButton)],cancelButton:[I("cancelButton"),...A(e.cancelButton)],container:[I("container"),...A(e.container)],handlerMove:[I("handlerMove"),...A(e.handlerMove)],handlerResizeTopLeft:[I("handlerResizeTopLeft"),...A(e.handlerResizeTopLeft)],handlerResizeTopRight:[I("handlerResizeTopRight"),...A(e.handlerResizeTopRight)],handlerResizeBottomLeft:[I("handlerResizeBottomLeft"),...A(e.handlerResizeBottomLeft)],handlerResizeBottomRight:[I("handlerResizeBottomRight"),...A(e.handlerResizeBottomRight)],sourceImage:[I("sourceImage"),...A(e.sourceImage)],portalArea:[I("portalArea"),...A(e.portalArea)],previewImage:[I("previewImage"),...A(e.previewImage)],body:[I("body"),...A(e.body)],header:[I("header"),...A(e.header)],footer:[I("footer"),...A(e.footer)],portal:[I("portal"),...A(e.portal)],preview:[I("preview"),...A(e.preview)],root:[I("root"),...A(e.root)]},o=`
1168
+ ${ln(t.applyButton[0])}
1169
+ ${an(t.body[0])}
1170
+ ${dn(t.cancelButton[0])}
1171
+ ${sn(t.container[0])}
1172
+ ${cn(t.footer[0])}
1173
+ ${pn(t.header[0])}
1174
+ ${un(t.handlerMove[0])}
1175
+ ${gn(t.portalArea[0])}
1176
+ ${xn(t.portal[0])}
1177
+ ${hn(t.previewImage[0])}
1178
+ ${fn(t.preview[0])}
1179
+ ${me(t.handlerResizeBottomLeft[0],"bl")}
1180
+ ${me(t.handlerResizeBottomRight[0],"br")}
1181
+ ${me(t.handlerResizeTopLeft[0],"tl")}
1182
+ ${me(t.handlerResizeTopRight[0],"tr")}
1183
+ ${$n(t.root[0])}
1184
+ ${Sn(t.sourceImage[0])}
1185
+ `,r=document.createElement("style");return r.innerHTML=o,document.getElementsByTagName("head")[0].prepend(r),t};let vn=0;const wn=e=>{const t=new Map,o=new Proxy({...e},{set(r,i,a){return Reflect.set(r,i,a),(t.get(i)||[]).forEach(c=>c.action(a,r,i)),!0}});return{getState:()=>({...o}),setState:r=>{for(const i of Object.keys(r)){const a=r[i];a!==void 0&&(o[i]=a)}},subscribe:(r,i)=>{const a=String(++vn),c=t.get(r)||[];return t.set(r,[...c,{action:i,id:a}]),a},unsubscribe:r=>{for(const[i,a]of t.entries()){const c=a.filter(s=>s.id!==r);if(c.length!==a.length){t.set(i,c);return}}},unsubscribeAll:()=>{t.clear()}}},Fe={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"]}},Cn=(e={},t={})=>wn({...Fe,config:{...Fe.config,...e},css:On(t)}),Rn=(e,t)=>{var y;const o=e(),r=document.querySelector(`.${(y=o.css)==null?void 0:y.body[0]}`);if(!r)return o.frame;const{width:i,height:a}=r.getBoundingClientRect(),c=i/a,s=t.width/t.height;let p,x,g=0,h=0;return c>s?(p=a*s,x=a,h=(i-p)/2):(p=i,x=i*(t.height/t.width),g=(a-x)/2),{width:p,height:x,left:h,top:g}},Ln=(e,t,o)=>{const[r,i]=t,a=r+e>o.width?(o.width-e)/2:r,c=i+e>o.height?(o.height-e)/2:i;return[a,c]},kn=(e,t)=>{const{config:o}=e(),r=Math.min(t.width,t.height)-o.framePadding*2,i=o.portalSize>r?r:o.portalSize;if(Array.isArray(o.portalPosition)&&o.portalPosition.length===2){const[a,c]=Ln(i,o.portalPosition,t);return{left:a,top:c,size:i}}return o.portalPosition==="center"?{size:i,left:(t.width-i)/2,top:(t.height-i)/2}:{left:0,top:0,size:i}};var G=(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))(G||{});const jn=e=>{var r;const t=e(),o=document.createElement("span");return P(o,(r=t.css)==null?void 0:r.handlerMove),o.setAttribute("data-action",G.MOVE),o},En=e=>{var r;const t=e(),o=document.createElement("span");return P(o,(r=t.css)==null?void 0:r.handlerResizeBottomLeft),o.setAttribute("data-action",G.RESIZE_BL),o},zn=e=>{var r;const t=e(),o=document.createElement("span");return P(o,(r=t.css)==null?void 0:r.handlerResizeBottomRight),o.setAttribute("data-action",G.RESIZE_BR),o},Nn=e=>{var r;const t=e(),o=document.createElement("span");return P(o,(r=t.css)==null?void 0:r.handlerResizeTopLeft),o.setAttribute("data-action",G.RESIZE_TL),o},Tn=e=>{var r;const t=e(),o=document.createElement("span");return P(o,(r=t.css)==null?void 0:r.handlerResizeTopRight),o.setAttribute("data-action",G.RESIZE_TR),o},In=e=>{var r;const t=e(),o=document.createElement("img");return P(o,(r=t.css)==null?void 0:r.previewImage),o},An=e=>{var r;const t=e(),o=document.createElement("div");return P(o,(r=t.css)==null?void 0:r.preview),o.appendChild(In(e)),o},Pn=e=>{var r;const t=e(),o=document.createElement("div");return P(o,(r=t.css)==null?void 0:r.portal),o.appendChild(An(e)),o.appendChild(jn(e)),o.appendChild(Nn(e)),o.appendChild(Tn(e)),o.appendChild(En(e)),o.appendChild(zn(e)),o},Bn=e=>{var r;const t=e(),o=document.createElement("div");return P(o,(r=t.css)==null?void 0:r.portalArea),o.appendChild(Pn(e)),o},Mn=e=>{var r;const t=e(),o=document.createElement("img");return P(o,(r=t.css)==null?void 0:r.sourceImage),o.setAttribute("alt","source"),o.setAttribute("crossOrigin","anonymous"),o.setAttribute("draggable","false"),o.setAttribute("src",t.sourceBase64),o},Fn=e=>{var r;const t=e(),o=document.createElement("div");return P(o,(r=t.css)==null?void 0:r.body),o.appendChild(Mn(e)),o.appendChild(Bn(e)),o},_n=(e,t)=>{var i;const o=e(),r=document.createElement("div");return P(r,(i=o.css)==null?void 0:i.applyButton),r.setAttribute("role","button"),r.innerText=o.config.applyButtonLabel,r.addEventListener("click",t),r},Dn=(e,t)=>{var i;const o=e(),r=document.createElement("div");return P(r,(i=o.css)==null?void 0:i.cancelButton),r.setAttribute("role","button"),r.innerText=o.config.cancelButtonLabel,r.addEventListener("click",t),r},Gn=(e,t,o)=>{var a;const r=e(),i=document.createElement("div");return P(i,(a=r.css)==null?void 0:a.footer),i.appendChild(Dn(e,o)),i.appendChild(_n(e,t)),i},Yn=e=>{var r;const t=e(),o=document.createElement("div");return P(o,(r=t.css)==null?void 0:r.header),o},Hn=(e,t,o)=>{var a;const r=e(),i=document.createElement("div");return P(i,(a=r.css)==null?void 0:a.container),i.appendChild(Yn(e)),i.appendChild(Fn(e)),i.appendChild(Gn(e,t,o)),i},Xn=(e,t,o)=>{var a;const r=e(),i=document.createElement("div");P(i,(a=r.css)==null?void 0:a.root),i.appendChild(Hn(e,t,o)),document.body.appendChild(i)},Un=e=>{const t=document.createElement("input");return t.style.display="none",t.setAttribute("type","file"),t.setAttribute("accept","image/x-png,image/jpeg"),t.addEventListener("change",e,!1),document.body.appendChild(t),t},pe=new Map,Wn={header:"header",sourceImage:"sourceImage",portalArea:"portalArea",portal:"portal",previewImage:"previewImage"},Q=(e,t)=>{if(pe.has(e))return pe.get(e);if(!t)return null;const o=t[Wn[e]],r=document.querySelector(`.${o[0]}`);return pe.set(e,r),r},qn=()=>{pe.clear()},Kn=()=>{pe.clear()},Vn=(e,t)=>{const o=Q("header",t.css);o&&(o.innerText=e)},Zn=(e,t)=>{const o=Q("sourceImage",t.css);o&&(o.setAttribute("src",e),o.style.height=`${t.frame.height}px`,o.style.width=`${t.frame.width}px`,o.style.left=`${t.frame.left}px`,o.style.top=`${t.frame.top}px`);const r=Q("portalArea",t.css);r&&(r.style.height=`${t.frame.height}px`,r.style.width=`${t.frame.width}px`,r.style.left=`${t.frame.left}px`,r.style.top=`${t.frame.top}px`);const i=Q("portal",t.css);i&&(i.style.width=`${t.portal.size}px`,i.style.height=`${t.portal.size}px`,i.style.left=`${t.portal.left}px`,i.style.top=`${t.portal.top}px`);const a=Q("previewImage",t.css);a&&(a.setAttribute("src",e),a.style.height=`${t.frame.height}px`,a.style.width=`${t.frame.width}px`,a.style.marginLeft=`-${t.portal.left}px`,a.style.marginTop=`-${t.portal.top}px`)},Jn=(e,t)=>{const o=Q("portal",t.css);o&&(o.style.left=`${e.left}px`,o.style.top=`${e.top}px`,o.style.width=`${e.size}px`,o.style.height=`${e.size}px`);const r=Q("previewImage",t.css);r&&(r.style.marginLeft=`-${e.left}px`,r.style.marginTop=`-${e.top}px`)},je=1,Qn=e=>{var f,S;const t=e(),o=document.createElement("canvas"),r=t.frame.width||je,i=t.frame.height||je,a=t.sourceWidth/r,c=t.sourceHeight/i,s=t.portal.left*a,p=t.portal.top*c,x=Math.max(t.portal.size*Math.min(a,c),je),g=t.config.outputSize>0?t.config.outputSize:x;o.width=g,o.height=g;const h=document.querySelector(`.${(f=t.css)==null?void 0:f.sourceImage[0]}`);h&&((S=o.getContext("2d"))==null||S.drawImage(h,s,p,x,x,0,0,g,g));const y=o.toDataURL(`image/${t.config.type}`,t.config.compression);return new Promise((b,$)=>{try{o.toBlob(m=>{if(o.remove(),!m){$(new Error(`Failed to create blob for type: image/${t.config.type}`));return}b([y,m])},`image/${t.config.type}`,t.config.compression)}catch(m){o.remove(),$(m)}})},ei=(e,t,o)=>{const{emitted:r,portal:i,frame:a,config:c}=t();let s=r.left-r.X+e.clientX,p=r.top-r.Y+e.clientY;const x=c.framePadding,g=a.width-c.framePadding-i.size,h=c.framePadding,y=a.height-c.framePadding-i.size;s<x&&(s=x),s>g&&(s=g),p<h&&(p=h),p>y&&(p=y),o({portal:{...i,left:s,top:p}})},ti=(e,t,o)=>{const{action:r,emitted:i,portal:a,frame:c,config:s}=t(),p=e.pageX-i.X,x=e.pageY-i.Y;switch(r){case G.RESIZE_BR:{let g=i.size+Math.max(p,x);return g<s.minPortalSize&&(g=s.minPortalSize),i.top+g>c.height-s.framePadding&&(g=c.height-i.top-s.framePadding),i.left+g>c.width-s.framePadding&&(g=c.width-i.left-s.framePadding),o({portal:{...a,size:g}})}case G.RESIZE_TR:{let g=p+x>0?i.size+p:i.size-x,h=p+x>0?i.top-p:i.top+x;return g<s.minPortalSize&&(h=i.top+i.size-s.minPortalSize,g=s.minPortalSize),i.left+g>c.width-s.framePadding&&(g=c.width-i.left-s.framePadding,h=i.top-c.width+i.left+i.size),h<s.framePadding&&(g=i.top+i.size,h=s.framePadding),o({portal:{...a,top:h,size:g}})}case G.RESIZE_TL:{const g=Math.min(p,x);let h=i.size-g,y=i.left+g,f=i.top+g;if(h<s.minPortalSize){const S=i.size-s.minPortalSize;h=s.minPortalSize,y=i.left+S,f=i.top+S}if(f<s.framePadding){const S=s.framePadding-f;f=s.framePadding,y=y+S,h=h-S}if(y<s.framePadding){const S=s.framePadding-y;y=s.framePadding,f=f+S,h=h-S}return o({portal:{...a,top:f,left:y,size:h}})}case G.RESIZE_BL:{let g=p+x>0?i.size+x:i.size-p,h=p+x>0?i.left-x:i.left+p;return g<s.minPortalSize&&(h=i.left+i.size-s.minPortalSize,g=s.minPortalSize),g+i.top>c.height-s.framePadding&&(h=i.left-c.height+i.top+i.size,g=c.height-i.top-s.framePadding),h<s.framePadding&&(h=s.framePadding,g=i.left+i.size-s.framePadding),o({portal:{...a,left:h,size:g}})}default:return}},Qe=e=>{if("touches"in e&&e.touches.length>0){const o=e.touches[0];return{clientX:o.clientX,clientY:o.clientY,pageX:o.pageX,pageY:o.pageY}}if("changedTouches"in e&&e.changedTouches.length>0){const o=e.changedTouches[0];return{clientX:o.clientX,clientY:o.clientY,pageX:o.pageX,pageY:o.pageY}}const t=e;return{clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY}},oi=(e,t)=>{var y,f,S;const o=e(),r=document.querySelector(`.${(y=o.css)==null?void 0:y.portal[0]}`),i=document.querySelector(`.${(f=o.css)==null?void 0:f.portalArea[0]}`),a=document.querySelector(`.${(S=o.css)==null?void 0:S.root[0]}`);let c=null,s=null;const p=b=>{b.preventDefault();const{portal:$}=e(),m=Qe(b);if(b.target){const O=b.target.getAttribute("data-action"),v={X:m.pageX,Y:m.pageY,left:$.left,top:$.top,size:$.size};t({action:O,emitted:v})}},x=()=>{const{action:b}=e();c!==null&&(cancelAnimationFrame(c),c=null),s=null,b&&t({action:null})},g=()=>{if(c=null,!s)return;const b=s;s=null;const{action:$}=e();if($)switch($){case G.MOVE:ei(b,e,t);break;default:ti(b,e,t)}},h=b=>{const{action:$}=e();$&&(b.preventDefault(),s=Qe(b),c===null&&(c=requestAnimationFrame(g)))};return a&&(a.addEventListener("mouseup",x),a.addEventListener("touchend",x),a.addEventListener("touchcancel",x)),r&&(r.addEventListener("mousedown",p),r.addEventListener("touchstart",p,{passive:!1})),i&&(i.addEventListener("mousemove",h),i.addEventListener("touchmove",h,{passive:!1})),()=>{c!==null&&cancelAnimationFrame(c),a&&(a.removeEventListener("mouseup",x),a.removeEventListener("touchend",x),a.removeEventListener("touchcancel",x)),r&&(r.removeEventListener("mousedown",p),r.removeEventListener("touchstart",p)),i&&(i.removeEventListener("mousemove",h),i.removeEventListener("touchmove",h))}},et=1024*1024,ri=(e,t)=>{if(!t.allowedTypes.includes(e.type))return`Invalid file type "${e.type}". Allowed types: ${t.allowedTypes.join(", ")}`;if(t.maxFileSize>0&&e.size>t.maxFileSize){const o=(t.maxFileSize/et).toFixed(2);return`File size (${(e.size/et).toFixed(2)}MB) exceeds maximum allowed size (${o}MB)`}return null},ni=(e,t,o,r,i,a,c)=>{const s=m=>{c?c(m):console.error(`HqCropper: ${m}`)};if(!e.target.files||e.target.files.length===0){s("Can't read file input");return}const p=e.target.files[0],{config:x}=t(),g=ri(p,x);if(g){s(g),e.target.value="";return}const h=new FileReader;let y=null;const f=()=>{var v;const m=t(),O=document.querySelector(`.${(v=m.css)==null?void 0:v.root[0]}`);O&&(O.remove(),document.removeEventListener("keydown",S),y==null||y(),Kn(),a(),o(Fe))},S=m=>{m.key==="Escape"&&t().sourceBase64&&b(m)},b=m=>{m.preventDefault(),f()},$=m=>{m.preventDefault();const O=t();Qn(t).then(([v,k])=>{r(v,k,O),b(m)}).catch(v=>{s(v instanceof Error?v.message:"Failed to crop image")})};h.onload=m=>{const O=new Image;if(!m.target||typeof m.target.result!="string"){s("Can't load result image");return}O.src=m.target.result,O.onerror=()=>{s("Failed to load image")},O.onload=()=>{var z;Xn(t,$,b),qn(),i("fileName",Vn),i("sourceBase64",Zn),i("portal",Jn);const v=Rn(t,O),k=kn(t,v);o({frame:v,portal:k,fileName:p.name,sourceBase64:(z=m.target)==null?void 0:z.result,sourceHeight:O.height,sourceWidth:O.width}),y=oi(t,o),document.addEventListener("keydown",S)}},h.onerror=()=>{s("Failed to read file")},h.readAsDataURL(p),e.target.value=""},ii=(e,t,o,r)=>{const{getState:i,setState:a,subscribe:c,unsubscribeAll:s}=Cn(t,o),p=Un(x=>ni(x,i,a,e,c,s,r));return{open:()=>p.click()}},q={portalSize:200,outputSize:400,compression:.9,type:"jpeg",maxFileSize:10*1024*1024,allowedTypes:["image/jpeg","image/png","image/webp"],applyLabel:"Apply",cancelLabel:"Cancel"},tt="vacano-image-cropper-styles",li=`
550
1186
  .vacano-cropper-root {
551
1187
  background-color: rgba(0, 0, 0, 0.5);
552
1188
  backdrop-filter: blur(4px);
553
1189
  }
554
1190
 
555
1191
  .vacano-cropper-header {
556
- border-bottom: 1px solid ${a.COLORS.gray};
1192
+ border-bottom: 1px solid ${n.COLORS.gray};
557
1193
  padding: 16px 20px;
558
1194
  }
559
1195
 
560
1196
  .vacano-cropper-footer {
561
- border-top: 1px solid ${a.COLORS.gray};
1197
+ border-top: 1px solid ${n.COLORS.gray};
562
1198
  padding: 16px 20px;
563
1199
  gap: 12px;
564
1200
  }
@@ -566,9 +1202,9 @@
566
1202
  .vacano-cropper-cancel-button {
567
1203
  padding: 8px 16px;
568
1204
  border-radius: 16px;
569
- border: 1px solid ${a.COLORS.gray};
570
- background-color: ${a.COLORS.white};
571
- color: ${a.COLORS.black};
1205
+ border: 1px solid ${n.COLORS.gray};
1206
+ background-color: ${n.COLORS.white};
1207
+ color: ${n.COLORS.black};
572
1208
  font-size: 14px;
573
1209
  font-weight: 500;
574
1210
  cursor: pointer;
@@ -576,15 +1212,15 @@
576
1212
  }
577
1213
 
578
1214
  .vacano-cropper-cancel-button:hover {
579
- background-color: ${a.COLORS.gray};
1215
+ background-color: ${n.COLORS.gray};
580
1216
  }
581
1217
 
582
1218
  .vacano-cropper-apply-button {
583
1219
  padding: 8px 16px;
584
1220
  border-radius: 16px;
585
1221
  border: none;
586
- background-color: ${a.COLORS.black};
587
- color: ${a.COLORS.white};
1222
+ background-color: ${n.COLORS.black};
1223
+ color: ${n.COLORS.white};
588
1224
  font-size: 14px;
589
1225
  font-weight: 500;
590
1226
  cursor: pointer;
@@ -592,33 +1228,73 @@
592
1228
  }
593
1229
 
594
1230
  .vacano-cropper-apply-button:hover {
595
- background-color: ${a.COLORS["iron-grey"]};
1231
+ background-color: ${n.COLORS["iron-grey"]};
1232
+ }
1233
+ `,ai=()=>{if(typeof document>"u"||document.getElementById(tt))return;const e=document.createElement("style");e.id=tt,e.textContent=li,document.head.appendChild(e)},di={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"]},mt=(e={})=>{const{allowedTypes:t=q.allowedTypes,applyLabel:o=q.applyLabel,cancelLabel:r=q.cancelLabel,compression:i=q.compression,maxFileSize:a=q.maxFileSize,onCrop:c,onError:s,outputSize:p=q.outputSize,portalSize:x=q.portalSize,type:g=q.type}=e,h=u.useRef(null);return{open:u.useCallback(()=>{h.current||(ai(),h.current=ii((f,S,b)=>{S&&(c==null||c({base64:f,blob:S,state:b}))},{portalSize:x,outputSize:p,compression:i,type:g,maxFileSize:a,allowedTypes:t,applyButtonLabel:o,cancelButtonLabel:r},di,f=>{s==null||s({code:"CROPPER_ERROR",message:f})})),h.current.open()},[t,o,r,i,a,c,s,p,x,g])}},Ee=C.newClassNameGetter("image-cropper"),si=({allowedTypes:e,applyLabel:t,buttonLabel:o="Select Image",cancelLabel:r,className:i,classnames:a,compression:c,maxFileSize:s,onCrop:p,onError:x,outputSize:g,portalSize:h,previewSize:y=120,ref:f,type:S,value:b,...$})=>{const[m,O]=u.useState(b??null),{open:v}=mt({allowedTypes:e,applyLabel:t,cancelLabel:r,compression:c,maxFileSize:s,onCrop:k=>{O(k.base64),p==null||p(k)},onError:x,outputSize:g,portalSize:h,type:S});return l.jsxs(on,{...$,ref:f,className:Ee("container",i),children:[l.jsx(rn,{$size:y,className:Ee("preview",a==null?void 0:a.preview),children:m?l.jsx("img",{src:m,alt:"Preview"}):l.jsx(nn,{children:"No image"})}),l.jsx(d.Button,{variant:"system",onClick:v,className:Ee("button",a==null?void 0:a.button),style:{width:y},children:o})]})},re={default:{box:40,line:22,weight:2.5,gap:6},compact:{box:32,line:18,weight:2,gap:5}},ci=d.styled.button`
1234
+ position: relative;
1235
+ display: flex;
1236
+ align-items: center;
1237
+ justify-content: center;
1238
+ width: ${({$size:e})=>re[e].box}px;
1239
+ height: ${({$size:e})=>re[e].box}px;
1240
+ padding: 0;
1241
+ border: none;
1242
+ border-radius: 8px;
1243
+ background: transparent;
1244
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1245
+ opacity: ${({$disabled:e})=>e?.5:1};
1246
+ outline: none;
1247
+ transition: background-color 0.15s ease;
1248
+
1249
+ &:hover:not(:disabled) {
1250
+ background-color: ${n.COLORS.gray};
1251
+ }
1252
+
1253
+ &:focus-visible {
1254
+ box-shadow: 0 0 0 2px ${n.COLORS["steel-blue"]};
596
1255
  }
597
- `,Co=()=>{if(typeof document>"u"||document.getElementById(be))return;const e=document.createElement("style");e.id=be,e.textContent=vo,document.head.appendChild(e)},Oo={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"]},ze=(e={})=>{const{allowedTypes:t=G.allowedTypes,applyLabel:o=G.applyLabel,cancelLabel:i=G.cancelLabel,compression:n=G.compression,maxFileSize:r=G.maxFileSize,onCrop:l,onError:s,outputSize:p=G.outputSize,portalSize:h=G.portalSize,type:g=G.type}=e,f=u.useRef(null);return{open:u.useCallback(()=>{f.current||(Co(),f.current=So((b,y,m)=>{y&&(l==null||l({base64:b,blob:y,state:m}))},{portalSize:h,outputSize:p,compression:n,type:g,maxFileSize:r,allowedTypes:t,applyButtonLabel:o,cancelButtonLabel:i},Oo,b=>{s==null||s({code:"CROPPER_ERROR",message:b})})),f.current.open()},[t,o,i,n,r,l,s,p,h,g])}},le=A.newClassNameGetter("image-cropper"),Ro=({allowedTypes:e,applyLabel:t,buttonLabel:o="Select Image",cancelLabel:i,className:n,classnames:r,compression:l,maxFileSize:s,onCrop:p,onError:h,outputSize:g,portalSize:f,previewSize:x=120,ref:b,type:y,value:m,...$})=>{const[w,v]=u.useState(m??null),{open:C}=ze({allowedTypes:e,applyLabel:t,cancelLabel:i,compression:l,maxFileSize:s,onCrop:L=>{v(L.base64),p==null||p(L)},onError:h,outputSize:g,portalSize:f,type:y});return d.jsxs(yt,{...$,ref:b,className:le("container",n),children:[d.jsx(wt,{$size:x,className:le("preview",r==null?void 0:r.preview),children:w?d.jsx("img",{src:w,alt:"Preview"}):d.jsx($t,{children:"No image"})}),d.jsx(c.Button,{variant:"system",onClick:C,className:le("button",r==null?void 0:r.button),style:{width:x},children:o})]})},Eo=5e3,ye={default:{background:"#374151",text:a.COLORS.white},success:{background:a.COLORS.green,text:a.COLORS.white},warning:{background:a.COLORS.yellow,text:a.COLORS.white},danger:{background:a.COLORS.red,text:a.COLORS.white},info:{background:a.COLORS["steel-blue"],text:a.COLORS.white}},Te=u.createContext(null),we=e=>ye[e]??ye.default,Lo=c.styled.div`
1256
+ `,pi=d.styled.div`
1257
+ display: flex;
1258
+ flex-direction: column;
1259
+ align-items: center;
1260
+ gap: ${({$size:e})=>re[e].gap}px;
1261
+ `,ze=d.styled.span`
1262
+ display: block;
1263
+ width: ${({$size:e})=>re[e].line}px;
1264
+ height: ${({$size:e})=>re[e].weight}px;
1265
+ background-color: ${n.COLORS.black};
1266
+ border-radius: 2px;
1267
+ transition:
1268
+ transform 0.3s ease,
1269
+ opacity 0.2s ease;
1270
+ transform-origin: center;
1271
+
1272
+ ${({$position:e,$size:t,$open:o})=>{const{gap:r,weight:i}=re[t],a=r+i;if(e==="top")return o?`transform: translateY(${a}px) rotate(45deg);`:"";if(e==="middle")return o?"opacity: 0;":"";if(e==="bottom")return o?`transform: translateY(-${a}px) rotate(-45deg);`:""}}
1273
+ `,Oe=C.newClassNameGetter("menu-button"),ui=({className:e,classnames:t,defaultOpen:o=!1,disabled:r=!1,onOpenChange:i,open:a,ref:c,size:s="default",...p})=>{const[x,g]=u.useState(o),h=a!==void 0,y=h?a:x,f=u.useCallback(()=>{if(r)return;const S=!y;h||g(S),i==null||i(S)},[r,y,h,i]);return l.jsx(ci,{...p,ref:c,type:"button",disabled:r,"aria-label":y?"Close menu":"Open menu","aria-expanded":y,className:Oe("container",e),$size:s,$disabled:r,onClick:f,children:l.jsxs(pi,{$size:s,$open:y,children:[l.jsx(ze,{$size:s,$position:"top",$open:y,className:Oe("line",t==null?void 0:t.line)}),l.jsx(ze,{$size:s,$position:"middle",$open:y,className:Oe("line",t==null?void 0:t.line)}),l.jsx(ze,{$size:s,$position:"bottom",$open:y,className:Oe("line",t==null?void 0:t.line)})]})})},gi=5e3,ot={default:{background:"#374151",text:n.COLORS.white},success:{background:n.COLORS.green,text:n.COLORS.white},warning:{background:n.COLORS.yellow,text:n.COLORS.white},danger:{background:n.COLORS.red,text:n.COLORS.white},info:{background:n.COLORS["steel-blue"],text:n.COLORS.white}},Ot=u.createContext(null),rt=e=>ot[e]??ot.default,xi=d.styled.div`
598
1274
  position: fixed;
599
1275
  top: 0;
600
1276
  left: 0;
601
1277
  right: 0;
602
1278
  z-index: 9999;
603
1279
  pointer-events: none;
604
- `,ko=c.styled.div`
1280
+ `,hi=d.styled.div`
605
1281
  display: flex;
606
1282
  align-items: center;
607
1283
  justify-content: center;
608
1284
  gap: 12px;
609
1285
  min-height: 44px;
610
1286
  padding: 12px 48px;
611
- background-color: ${({$variant:e})=>we(e).background};
612
- color: ${({$variant:e})=>we(e).text};
613
- animation: ${({$isExiting:e})=>e?a.KEYFRAMES.slideOutTopFade:a.KEYFRAMES.slideInTopFade}
1287
+ background-color: ${({$variant:e})=>rt(e).background};
1288
+ color: ${({$variant:e})=>rt(e).text};
1289
+ animation: ${({$isExiting:e})=>e?n.KEYFRAMES.slideOutTopFade:n.KEYFRAMES.slideInTopFade}
614
1290
  0.3s ease-out forwards;
615
1291
  pointer-events: auto;
616
- `,zo=c.styled.span`
1292
+ `,fi=d.styled.span`
617
1293
  font-size: 14px;
618
1294
  font-weight: 500;
619
1295
  line-height: 1.4;
620
1296
  text-align: center;
621
- `,To=c.styled.button`
1297
+ `,yi=d.styled.button`
622
1298
  position: absolute;
623
1299
  right: 16px;
624
1300
  top: 50%;
@@ -639,9 +1315,9 @@
639
1315
  &:hover {
640
1316
  opacity: 1;
641
1317
  }
642
- `,Po=c.styled.div`
1318
+ `,bi=d.styled.div`
643
1319
  position: relative;
644
- `,Ao=({notification:e,onRemove:t,onAnimationEnd:o})=>{const[i,n]=u.useState(!1),r=()=>{n(!0)},l=()=>{i&&(t(),o())};return u.useEffect(()=>{const s=setTimeout(()=>{r()},e.duration);return()=>clearTimeout(s)},[e.duration,e.id]),d.jsx(Po,{children:d.jsxs(ko,{$variant:e.variant,$isExiting:i,onAnimationEnd:l,children:[d.jsx(zo,{children:e.message}),d.jsx(To,{onClick:r,children:d.jsx(d.X,{style:{width:18,height:18}})})]})})},Io=(e,t)=>{switch(t.type){case"ADD_NOTIFICATION":{const o=t.payload;return e.current?{...e,queue:[...e.queue,o]}:{...e,current:o}}case"REMOVE_CURRENT":return{...e,current:null};case"SHOW_NEXT":{const o=e.queue[0];return o?{current:o,queue:e.queue.slice(1)}:e}default:return e}},No={current:null,queue:[]},jo=({children:e})=>{const[t,o]=u.useReducer(Io,No),i=u.useCallback((s,p="default",h=Eo)=>{const g=`notification-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;o({type:"ADD_NOTIFICATION",payload:{id:g,message:s,variant:p,duration:h}})},[]),n=u.useCallback(()=>{o({type:"REMOVE_CURRENT"})},[]),r=u.useCallback(()=>{o({type:"REMOVE_CURRENT"})},[]),l=u.useCallback(()=>{setTimeout(()=>{o({type:"SHOW_NEXT"})},100)},[]);return d.jsxs(Te.Provider,{value:{show:i,hide:n},children:[e,d.jsx(Lo,{children:t.current&&d.jsx(Ao,{notification:t.current,onRemove:r,onAnimationEnd:l},t.current.id)})]})},Bo=()=>{const e=u.useContext(Te);if(!e)throw new Error("useNotification must be used within NotificationProvider");return e},Pe=u.createContext(null),Fo="Agree",Mo="Discard",_o=V.keyframes`
1320
+ `,$i=({notification:e,onRemove:t,onAnimationEnd:o})=>{const[r,i]=u.useState(!1),a=()=>{i(!0)},c=()=>{r&&(t(),o())};return u.useEffect(()=>{const s=setTimeout(()=>{a()},e.duration);return()=>clearTimeout(s)},[e.duration,e.id]),l.jsx(bi,{children:l.jsxs(hi,{$variant:e.variant,$isExiting:r,onAnimationEnd:c,children:[l.jsx(fi,{children:e.message}),l.jsx(yi,{onClick:a,children:l.jsx(l.X,{style:{width:18,height:18}})})]})})},Si=(e,t)=>{switch(t.type){case"ADD_NOTIFICATION":{const o=t.payload;return e.current?{...e,queue:[...e.queue,o]}:{...e,current:o}}case"REMOVE_CURRENT":return{...e,current:null};case"SHOW_NEXT":{const o=e.queue[0];return o?{current:o,queue:e.queue.slice(1)}:e}default:return e}},mi={current:null,queue:[]},Oi=({children:e})=>{const[t,o]=u.useReducer(Si,mi),r=u.useCallback((s,p="default",x=gi)=>{const g=`notification-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;o({type:"ADD_NOTIFICATION",payload:{id:g,message:s,variant:p,duration:x}})},[]),i=u.useCallback(()=>{o({type:"REMOVE_CURRENT"})},[]),a=u.useCallback(()=>{o({type:"REMOVE_CURRENT"})},[]),c=u.useCallback(()=>{setTimeout(()=>{o({type:"SHOW_NEXT"})},100)},[]);return l.jsxs(Ot.Provider,{value:{show:r,hide:i},children:[e,l.jsx(xi,{children:t.current&&l.jsx($i,{notification:t.current,onRemove:a,onAnimationEnd:c},t.current.id)})]})},vi=()=>{const e=u.useContext(Ot);if(!e)throw new Error("useNotification must be used within NotificationProvider");return e},vt=u.createContext(null),wi="Agree",Ci="Discard",Ri=B.keyframes`
645
1321
  from {
646
1322
  opacity: 0;
647
1323
  transform: translateY(100%);
@@ -650,7 +1326,7 @@
650
1326
  opacity: 1;
651
1327
  transform: translateY(0);
652
1328
  }
653
- `,Do=V.keyframes`
1329
+ `,Li=B.keyframes`
654
1330
  from {
655
1331
  opacity: 1;
656
1332
  transform: translateY(0);
@@ -659,7 +1335,7 @@
659
1335
  opacity: 0;
660
1336
  transform: translateY(100%);
661
1337
  }
662
- `,Yo=c.styled.div`
1338
+ `,ki=d.styled.div`
663
1339
  position: fixed;
664
1340
  bottom: 24px;
665
1341
  right: 24px;
@@ -667,76 +1343,323 @@
667
1343
  flex-direction: column;
668
1344
  max-width: 400px;
669
1345
  padding: 16px 16px 0 16px;
670
- background-color: ${a.COLORS.white};
671
- border: 1px dashed ${a.COLORS.gray};
1346
+ background-color: ${n.COLORS.white};
1347
+ border: 1px dashed ${n.COLORS.gray};
672
1348
  border-radius: 12px;
673
1349
  overflow: hidden;
674
1350
  box-shadow:
675
1351
  0 4px 6px -1px rgba(0, 0, 0, 0.1),
676
1352
  0 2px 4px -2px rgba(0, 0, 0, 0.1);
677
- animation: ${({$isExiting:e})=>e?Do:_o} 0.2s ease-out forwards;
1353
+ animation: ${({$isExiting:e})=>e?Li:Ri} 0.2s ease-out forwards;
678
1354
  z-index: 1000;
679
- `,Xo=c.styled.p`
1355
+ `,ji=d.styled.p`
680
1356
  margin: 0;
681
1357
  font-weight: 600;
682
1358
  font-size: 14px;
683
- color: ${a.COLORS.black};
1359
+ color: ${n.COLORS.black};
684
1360
  text-align: left;
685
- `,qo=c.styled.p`
1361
+ `,Ei=d.styled.p`
686
1362
  margin: 4px 0 0;
687
1363
  font-size: 13px;
688
- color: ${a.COLORS["iron-grey"]};
1364
+ color: ${n.COLORS["iron-grey"]};
689
1365
  text-align: left;
690
- `,Go=c.styled.div`
1366
+ `,zi=d.styled.div`
691
1367
  display: flex;
692
1368
  align-items: center;
693
1369
  justify-content: flex-start;
694
1370
  gap: 8px;
695
1371
  margin: 12px -16px 0;
696
1372
  padding: 12px 16px;
697
- border-top: 1px solid ${a.COLORS.gray};
1373
+ border-top: 1px solid ${n.COLORS.gray};
698
1374
  background-color: rgba(0, 0, 0, 0.01);
699
- `,Ko=({confirmation:e,onDone:t})=>{const[o,i]=u.useState(!1),[n,r]=u.useState(!1),{label:l,description:s,onConfirm:p,onDiscard:h,options:g}=e,f=g.confirmLabel||Fo,x=g.discardLabel||Mo,b=u.useCallback($=>{i(!0),setTimeout(()=>{$==null||$(),t()},200)},[t]),y=u.useCallback(async()=>{const $=p();if($ instanceof Promise){r(!0);try{await $}finally{r(!1)}}b()},[b,p]),m=u.useCallback(()=>{n||b(h)},[b,n,h]);return u.useEffect(()=>{const $=w=>{w.key==="Escape"&&!n&&m()};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[m,n]),d.jsxs(Yo,{$isExiting:o,children:[d.jsx(Xo,{children:l}),d.jsx(qo,{children:s}),d.jsxs(Go,{children:[d.jsx(c.Button,{variant:"transparent",size:"compact",onClick:m,disabled:n,children:x}),d.jsx(c.Button,{variant:"system",size:"compact",onClick:y,loading:n,children:f})]})]})},Uo=()=>{},Ho=({children:e})=>{const[t,o]=u.useState(null),i=u.useCallback((r,l,s,p,h)=>{o({open:!0,label:r,description:l,onConfirm:s,onDiscard:p||Uo,options:h||{}})},[]),n=u.useCallback(()=>{o(null)},[]);return d.jsxs(Pe.Provider,{value:{show:i,hide:n},children:[e,t&&d.jsx(Ko,{confirmation:t,onDone:n})]})},Vo=()=>{const e=u.useContext(Pe);if(!e)throw new Error("useNotifyConfirmation must be used within NotifyConfirmationProvider");return e},$e={light:{background:a.COLORS.white,border:a.alpha(a.COLORS.black,30),title:a.COLORS.black,description:a.COLORS["iron-grey"]},dark:{background:a.alpha(a.COLORS.white,5),border:a.alpha(a.COLORS.white,30),title:a.COLORS.white,description:"#9ca3af"}},ae=e=>$e[e]??$e.light,Wo=c.styled.div`
1375
+ `,Ni=({confirmation:e,onDone:t})=>{const[o,r]=u.useState(!1),[i,a]=u.useState(!1),{label:c,description:s,onConfirm:p,onDiscard:x,options:g}=e,h=g.confirmLabel||wi,y=g.discardLabel||Ci,f=u.useCallback($=>{r(!0),setTimeout(()=>{$==null||$(),t()},200)},[t]),S=u.useCallback(async()=>{const $=p();if($ instanceof Promise){a(!0);try{await $}finally{a(!1)}}f()},[f,p]),b=u.useCallback(()=>{i||f(x)},[f,i,x]);return u.useEffect(()=>{const $=m=>{m.key==="Escape"&&!i&&b()};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[b,i]),l.jsxs(ki,{$isExiting:o,children:[l.jsx(ji,{children:c}),l.jsx(Ei,{children:s}),l.jsxs(zi,{children:[l.jsx(d.Button,{variant:"transparent",size:"compact",onClick:b,disabled:i,children:y}),l.jsx(d.Button,{variant:"system",size:"compact",onClick:S,loading:i,children:h})]})]})},Ti=()=>{},Ii=({children:e})=>{const[t,o]=u.useState(null),r=u.useCallback((a,c,s,p,x)=>{o({open:!0,label:a,description:c,onConfirm:s,onDiscard:p||Ti,options:x||{}})},[]),i=u.useCallback(()=>{o(null)},[]);return l.jsxs(vt.Provider,{value:{show:r,hide:i},children:[e,t&&l.jsx(Ni,{confirmation:t,onDone:i})]})},Ai=()=>{const e=u.useContext(vt);if(!e)throw new Error("useNotifyConfirmation must be used within NotifyConfirmationProvider");return e},Pi=d.styled.div`
1376
+ display: flex;
1377
+ flex-direction: column;
1378
+ gap: 2px;
1379
+ `,Bi=d.styled.span`
1380
+ font-size: 10px;
1381
+ font-weight: 700;
1382
+ text-transform: uppercase;
1383
+ letter-spacing: 0.5px;
1384
+ color: #666;
1385
+ `,Mi=d.styled.span`
1386
+ font-size: 12px;
1387
+ color: #666;
1388
+ `,Ne=C.newClassNameGetter("overline"),Fi=({children:e,className:t,classnames:o,description:r,ref:i,...a})=>l.jsxs(Pi,{...a,ref:i,className:Ne("container",t),children:[l.jsx(Bi,{className:Ne("label",o==null?void 0:o.label),children:e}),r&&l.jsx(Mi,{className:Ne("description",o==null?void 0:o.description),children:r})]}),_i=d.styled.div`
1389
+ position: relative;
1390
+ display: flex;
1391
+ flex-direction: column;
1392
+ align-items: center;
1393
+ justify-content: center;
1394
+ min-height: 100vh;
1395
+ min-height: 100dvh;
1396
+ padding: 40px 24px;
1397
+ overflow: hidden;
1398
+ `,Di=d.styled.div`
1399
+ position: absolute;
1400
+ inset: 0;
1401
+ background-image:
1402
+ linear-gradient(${n.COLORS.gray} 1px, transparent 1px),
1403
+ linear-gradient(90deg, ${n.COLORS.gray} 1px, transparent 1px);
1404
+ background-size: ${({$size:e})=>`${e}px ${e}px`};
1405
+ mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 100%);
1406
+ -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 100%);
1407
+ pointer-events: none;
1408
+ `,Gi=d.styled.div`
1409
+ position: relative;
1410
+ z-index: 1;
1411
+ display: flex;
1412
+ flex-direction: column;
1413
+ align-items: center;
1414
+ width: 100%;
1415
+ max-width: 400px;
1416
+ `,Yi=d.styled.div`
1417
+ margin-bottom: 32px;
1418
+ `,Hi=d.styled.div`
1419
+ display: flex;
1420
+ align-items: center;
1421
+ justify-content: center;
1422
+ width: 48px;
1423
+ height: 48px;
1424
+ border-radius: 10px;
1425
+ border: 1px solid ${n.COLORS.gray};
1426
+ background-color: ${n.COLORS.white};
1427
+ color: ${n.COLORS["iron-grey"]};
1428
+ box-shadow:
1429
+ 0 1px 2px rgba(0, 0, 0, 0.05),
1430
+ 0 1px 3px rgba(0, 0, 0, 0.1);
1431
+ margin-bottom: 24px;
1432
+ `,Xi=d.styled.div`
1433
+ display: flex;
1434
+ flex-direction: column;
1435
+ align-items: center;
1436
+ text-align: center;
1437
+ gap: 8px;
1438
+ margin-bottom: 32px;
1439
+ `,Ui=d.styled.h1`
1440
+ margin: 0;
1441
+ font-size: 24px;
1442
+ font-weight: 600;
1443
+ color: ${n.COLORS.black};
1444
+ line-height: 1.3;
1445
+ `,Wi=d.styled.p`
1446
+ margin: 0;
1447
+ font-size: 14px;
1448
+ color: ${n.COLORS["iron-grey"]};
1449
+ line-height: 1.5;
1450
+ max-width: 360px;
1451
+ `,qi=d.styled.div`
1452
+ width: 100%;
1453
+ `,Ki=d.styled.div`
1454
+ margin-top: 32px;
1455
+ text-align: center;
1456
+ font-size: 14px;
1457
+ color: ${n.COLORS["iron-grey"]};
1458
+ `,K=C.newClassNameGetter("shell-screen"),Vi=({children:e,className:t,classnames:o,description:r,footer:i,gridSize:a=64,icon:c,logo:s,ref:p,title:x,...g})=>l.jsxs(_i,{...g,ref:p,className:K("container",t),children:[l.jsx(Di,{$size:a,className:K("grid",o==null?void 0:o.grid)}),l.jsxs(Gi,{children:[s&&l.jsx(Yi,{children:s}),c&&l.jsx(Hi,{className:K("icon"),children:c}),(x||r)&&l.jsxs(Xi,{className:K("header",o==null?void 0:o.header),children:[x&&l.jsx(Ui,{className:K("title",o==null?void 0:o.title),children:x}),r&&l.jsx(Wi,{className:K("description",o==null?void 0:o.description),children:r})]}),e&&l.jsx(qi,{className:K("content",o==null?void 0:o.content),children:e}),i&&l.jsx(Ki,{className:K("footer",o==null?void 0:o.footer),children:i})]})]}),Zi=(e,t,o,r)=>{if(o*2+3+r*2>=e)return Array.from({length:e},(y,f)=>f+1);const a=Math.max(t-o,r+1),c=Math.min(t+o,e-r),s=a>r+2,p=c<e-r-1;if(!s&&p){const y=o*2+r+2,f=Array.from({length:y},(b,$)=>$+1),S=Array.from({length:r},(b,$)=>e-r+$+1);return[...f,"dots",...S]}if(s&&!p){const y=o*2+r+2,f=Array.from({length:r},(b,$)=>$+1),S=Array.from({length:y},(b,$)=>e-y+$+1);return[...f,"dots",...S]}const x=Array.from({length:r},(y,f)=>f+1),g=Array.from({length:c-a+1},(y,f)=>a+f),h=Array.from({length:r},(y,f)=>e-r+f+1);return[...x,"dots",...g,"dots",...h]},Ji=d.styled.nav`
1459
+ display: inline-flex;
1460
+ align-items: center;
1461
+ gap: 2px;
1462
+ position: relative;
1463
+ `,Qi=(e,t)=>{if(!t)switch(e){case"bordered":return`
1464
+ background-color: transparent;
1465
+ border: 1px solid ${n.COLORS.gray};
1466
+ color: ${n.COLORS["iron-grey"]};
1467
+ &:hover { background-color: ${n.COLORS.gray}; }
1468
+ `;case"light":return`
1469
+ background-color: transparent;
1470
+ color: ${n.COLORS["iron-grey"]};
1471
+ &:hover { background-color: ${n.COLORS.gray}; }
1472
+ `;default:return`
1473
+ background-color: transparent;
1474
+ color: ${n.COLORS["iron-grey"]};
1475
+ &:hover { background-color: ${n.COLORS.gray}; }
1476
+ `}return`
1477
+ color: ${n.COLORS.white};
1478
+ position: relative;
1479
+ z-index: 1;
1480
+ `},el=d.styled.button`
1481
+ position: relative;
1482
+ display: inline-flex;
1483
+ align-items: center;
1484
+ justify-content: center;
1485
+ width: 36px;
1486
+ height: 36px;
1487
+ border: none;
1488
+ border-radius: 10px;
1489
+ font-size: 14px;
1490
+ font-weight: 500;
1491
+ line-height: 1;
1492
+ cursor: pointer;
1493
+ user-select: none;
1494
+ transition:
1495
+ background-color 0.15s ease,
1496
+ color 0.15s ease;
1497
+ ${({$variant:e,$active:t})=>Qi(e,t)}
1498
+ ${({$disabled:e})=>e&&`
1499
+ opacity: 0.4;
1500
+ pointer-events: none;
1501
+ cursor: default;
1502
+ `}
1503
+ `,tl=d.styled.span`
1504
+ position: absolute;
1505
+ width: 36px;
1506
+ height: 36px;
1507
+ border-radius: 10px;
1508
+ background-color: ${n.COLORS.black};
1509
+ z-index: 0;
1510
+ transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
1511
+ pointer-events: none;
1512
+ `,ol=d.styled.span`
1513
+ display: inline-flex;
1514
+ align-items: center;
1515
+ justify-content: center;
1516
+ width: 36px;
1517
+ height: 36px;
1518
+ font-size: 14px;
1519
+ color: ${n.COLORS["iron-grey"]};
1520
+ user-select: none;
1521
+ `,nt=d.styled.button`
1522
+ display: inline-flex;
1523
+ align-items: center;
1524
+ justify-content: center;
1525
+ width: 36px;
1526
+ height: 36px;
1527
+ border: none;
1528
+ border-radius: 10px;
1529
+ background-color: transparent;
1530
+ color: ${n.COLORS["iron-grey"]};
1531
+ font-size: 16px;
1532
+ cursor: pointer;
1533
+ user-select: none;
1534
+ transition: background-color 0.15s ease;
1535
+
1536
+ &:hover {
1537
+ background-color: ${n.COLORS.gray};
1538
+ }
1539
+
1540
+ ${({$disabled:e})=>e&&`
1541
+ opacity: 0.4;
1542
+ pointer-events: none;
1543
+ cursor: default;
1544
+ `}
1545
+ `,oe=C.newClassNameGetter("pagination"),rl=({boundaries:e=1,className:t,classnames:o,disabled:r=!1,initialPage:i=1,loop:a=!1,onChange:c,page:s,ref:p,showControls:x=!1,siblings:g=1,total:h,variant:y="flat",...f})=>{const S=s!==void 0,[b,$]=u.useState(i),m=S?s:b,O=u.useRef(new Map),v=u.useRef(null),k=u.useRef(null),z=Zi(h,m,g,e),j=u.useCallback(w=>{S||$(w),c==null||c(w)},[S,c]),L=u.useCallback(w=>{w<1||w>h||w===m||j(w)},[m,j,h]),R=u.useCallback(()=>{if(m<=1){a&&j(h);return}j(m-1)},[m,a,j,h]),E=u.useCallback(()=>{if(m>=h){a&&j(1);return}j(m+1)},[m,a,j,h]);return u.useEffect(()=>{const w=k.current,T=v.current,N=O.current.get(m);if(!w||!T||!N)return;const M=T.getBoundingClientRect(),F=N.getBoundingClientRect().left-M.left;w.style.transform=`translateX(${F}px)`},[m,z]),l.jsxs(Ji,{...f,ref:p||v,className:oe("container",t),children:[l.jsx(tl,{ref:k,className:oe("cursor",o==null?void 0:o.cursor)}),x&&l.jsx(nt,{className:oe("controls",o==null?void 0:o.controls),$disabled:r||!a&&m<=1,onClick:R,"aria-label":"Previous page",children:l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"m15 18-6-6 6-6"})})}),z.map((w,T)=>w==="dots"?l.jsx(ol,{className:oe("ellipsis",o==null?void 0:o.ellipsis),children:"..."},`dots-${T}`):l.jsx(el,{ref:N=>{N?O.current.set(w,N):O.current.delete(w)},className:oe("item",o==null?void 0:o.item),$active:w===m,$variant:y,$disabled:r,onClick:()=>L(w),"aria-label":`Page ${w}`,"aria-current":w===m?"page":void 0,children:w},w)),x&&l.jsx(nt,{className:oe("controls",o==null?void 0:o.controls),$disabled:r||!a&&m>=h,onClick:E,"aria-label":"Next page",children:l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"m9 18 6-6-6-6"})})})]})},it={light:{background:n.COLORS.white,border:n.alpha(n.COLORS.black,30),title:n.COLORS.black,description:n.COLORS["iron-grey"]},dark:{background:n.alpha(n.COLORS.white,5),border:n.alpha(n.COLORS.white,30),title:n.COLORS.white,description:"#9ca3af"}},Re=e=>it[e]??it.light,nl=d.styled.div`
1546
+ position: relative;
700
1547
  display: flex;
701
1548
  flex-direction: column;
702
1549
  gap: 16px;
703
1550
  padding: 12px;
704
- border: 1px dashed ${({$variant:e})=>ae(e).border};
1551
+ border: 1px dashed ${({$variant:e})=>Re(e).border};
705
1552
  border-radius: 16px;
706
- background-color: ${({$variant:e})=>ae(e).background};
1553
+ background-color: ${({$variant:e})=>Re(e).background};
707
1554
  box-shadow:
708
1555
  0 4px 6px -1px rgba(0, 0, 0, 0.1),
709
1556
  0 2px 4px -2px rgba(0, 0, 0, 0.1);
710
- `,Zo=c.styled.div`
1557
+ `,il=d.styled.div`
1558
+ position: absolute;
1559
+ top: -1px;
1560
+ right: 12px;
1561
+ padding: 4px 12px;
1562
+ border-radius: 0 0 8px 8px;
1563
+ background-color: ${n.COLORS.black};
1564
+ color: ${n.COLORS.white};
1565
+ font-size: 11px;
1566
+ font-weight: 600;
1567
+ letter-spacing: 0.5px;
1568
+ text-transform: uppercase;
1569
+ line-height: 1.4;
1570
+ `,ll=d.styled.div`
711
1571
  display: flex;
712
1572
  flex-direction: column;
713
1573
  gap: 4px;
714
- `,Qo=c.styled.div`
1574
+ `,al=d.styled.div`
715
1575
  font-size: 18px;
716
1576
  font-weight: 600;
717
1577
  line-height: 1.4;
718
- color: ${({$variant:e})=>ae(e).title};
719
- `,Jo=c.styled.div`
1578
+ color: ${({$variant:e})=>Re(e).title};
1579
+ `,dl=d.styled.div`
720
1580
  font-size: 14px;
721
1581
  line-height: 1.5;
722
- color: ${({$variant:e})=>ae(e).description};
723
- `,en=c.styled.div`
1582
+ color: ${({$variant:e})=>Re(e).description};
1583
+ `,sl=d.styled.div`
724
1584
  display: flex;
725
1585
  flex-wrap: wrap;
726
1586
  gap: 8px;
727
- `,re=A.newClassNameGetter("panel"),tn=({children:e,className:t,classnames:o,description:i,ref:n,title:r,variant:l="light",...s})=>{const p=r||i;return d.jsxs(Wo,{...s,ref:n,className:re("container",t),$variant:l,children:[p&&d.jsxs(Zo,{children:[r&&d.jsx(Qo,{className:re("title",o==null?void 0:o.title),$variant:l,children:r}),i&&d.jsx(Jo,{className:re("description",o==null?void 0:o.description),$variant:l,children:i})]}),d.jsx(en,{className:re("content",o==null?void 0:o.content),children:e})]})},ge={compact:{height:4,radius:2},default:{height:8,radius:4}},on=c.styled.div`
1587
+ `,se=C.newClassNameGetter("panel"),cl=({children:e,className:t,classnames:o,description:r,label:i,ref:a,title:c,variant:s="light",...p})=>{const x=c||r;return l.jsxs(nl,{...p,ref:a,className:se("container",t),$variant:s,children:[i&&l.jsx(il,{className:se("label",o==null?void 0:o.label),children:i}),x&&l.jsxs(ll,{children:[c&&l.jsx(al,{className:se("title",o==null?void 0:o.title),$variant:s,children:c}),r&&l.jsx(dl,{className:se("description",o==null?void 0:o.description),$variant:s,children:r})]}),l.jsx(sl,{className:se("content",o==null?void 0:o.content),children:e})]})},pl=["Готовим стартовый стол к запуску","Прогреваем фотонные двигатели","Запрашиваем разрешение у ЦУПа","Проверяем герметичность шлюзов","Выводим реактор на рабочую мощность","Ожидаем окно для маневра","Проверяем целостность теплозащиты","Разворачиваем солнечные паруса","Активируем систему навигации","Инициализируем бортовой компьютер","Рассчитываем вектор ускорения","Продуваем топливные магистрали","Тестируем аварийную систему спасения","Стабилизируем гироскопы на платформе","Загружаем полетное задание в память","Синхронизируем орбитальные часы","Рассчитываем траекторию кометы","Настраиваем антенну дальней связи","Считываем телеметрию со спутника","Корректируем азимут наведения","Фиксируем координаты черной дыры","Загружаем карту звездного неба","Калибруем инерциальную платформу","Принимаем эфемериды от станции","Уточняем параметры орбиты","Привязываемся к опорным звездам","Строим модель гравитационного поля","Анализируем метрики далеких звезд","Ждем прохождения первого нейтрино","Декодируем сигналы из туманности","Замеряем гравитационные волны","Отправляем зонд в пояс астероидов","Перехватываем межзвездные частицы","Обрабатываем данные телескопа","Анализируем спектр далекой звезды","Собираем пробы лунного грунта","Сканируем поверхность экзопланеты","Измеряем реликтовое излучение","Картографируем магнитные аномалии","Исследуем состав колец Сатурна","Регистрируем вспышку сверхновой","Фиксируем рентгеновский пульсар","Моделируем столкновение галактик","Наблюдаем транзит далекой планеты","Калибруем квантовый компилятор","Переводим данные в гиперпространство","Синтезируем топливо из вакуума","Компилируем нейронную матрицу","Оптимизируем квантовые вентили","Разматываем кубиты суперпозиции","Интерполируем пространство решений","Нормализуем тензорное поле","Индексируем базу знаний вселенной","Дефрагментируем пространство-время","Хешируем координаты червоточины","Верифицируем квантовую запутанность","Устанавливаем связь с Вояджером","Расшифровываем послание с Проксимы","Ретранслируем сигнал через Юпитер","Пингуем ближайший ретранслятор","Буферизуем поток тахионных данных","Шифруем канал субпространственной связи","Декомпрессируем архив звездных карт","Проверяем давление в отсеках","Балансируем нагрузку на генераторы","Охлаждаем сверхпроводящие магниты","Калибруем датчики внешней среды","Перезагружаем модуль жизнеобеспечения","Тестируем маневровые двигатели","Обновляем прошивку скафандров","Юстируем зеркала главного телескопа","Переключаем контур охлаждения","Диагностируем плазменный щит","Затягиваем болты на обшивке"],ul=3500,gl=e=>e&&e.length>0?e:pl,xl=e=>e&&e>0?e:ul,hl=e=>Math.max(...e.map(t=>t.length)),fl=(e,t)=>{const o=Math.floor((t-e.length)/2);return e.padStart(e.length+o).padEnd(t)},lt=(e,t)=>{const o=Array.from({length:e},(r,i)=>i);for(let r=o.length-1;r>0;r--){const i=Math.floor(Math.random()*(r+1));[o[r],o[i]]=[o[i],o[r]]}if(t!==void 0&&o[0]===t){const r=1+Math.floor(Math.random()*(o.length-1));[o[0],o[r]]=[o[r],o[0]]}return o},yl=B.keyframes`
1588
+ from { transform: rotate(0deg) translateX(20px) rotate(0deg); }
1589
+ to { transform: rotate(360deg) translateX(20px) rotate(-360deg); }
1590
+ `,bl=B.keyframes`
1591
+ from { transform: rotate(120deg) translateX(14px) rotate(-120deg); }
1592
+ to { transform: rotate(480deg) translateX(14px) rotate(-480deg); }
1593
+ `,$l=B.keyframes`
1594
+ from { transform: rotate(240deg) translateX(26px) rotate(-240deg); }
1595
+ to { transform: rotate(600deg) translateX(26px) rotate(-600deg); }
1596
+ `,Sl=d.styled.div`
1597
+ display: flex;
1598
+ flex-direction: column;
1599
+ align-items: center;
1600
+ justify-content: center;
1601
+ padding: 48px 24px;
1602
+ gap: 28px;
1603
+ `,ml=d.styled.div`
1604
+ position: relative;
1605
+ width: 64px;
1606
+ height: 64px;
1607
+ display: flex;
1608
+ align-items: center;
1609
+ justify-content: center;
1610
+ `,Te=d.styled.div`
1611
+ position: absolute;
1612
+ width: ${e=>e.$index===0?6:e.$index===1?4:3}px;
1613
+ height: ${e=>e.$index===0?6:e.$index===1?4:3}px;
1614
+ border-radius: 50%;
1615
+ background: ${n.COLORS.black};
1616
+ opacity: ${e=>e.$index===0?1:e.$index===1?.6:.35};
1617
+ animation: ${e=>e.$index===0?yl:e.$index===1?bl:$l}
1618
+ ${e=>e.$index===0?3:e.$index===1?2:4.5}s linear infinite;
1619
+ `,Ol=d.styled.span`
1620
+ position: absolute;
1621
+ width: 1px;
1622
+ height: 1px;
1623
+ padding: 0;
1624
+ margin: -1px;
1625
+ overflow: hidden;
1626
+ clip: rect(0, 0, 0, 0);
1627
+ white-space: nowrap;
1628
+ border: 0;
1629
+ `,vl=d.styled.p`
1630
+ margin: 0;
1631
+ font-size: 14px;
1632
+ color: ${n.COLORS["iron-grey"]};
1633
+ line-height: 1.5;
1634
+ text-align: center;
1635
+ max-width: 360px;
1636
+ `,wl=40,Cl=200,Rl=30,at="АБВГДЕЖЗИКЛМНОПРСТУФХЦЧШЩЭЮЯабвгдежзиклмнопрстуфхцчшщэюяABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Ll=()=>at[Math.floor(Math.random()*at.length)],kl=e=>Cl+e*Rl,jl=()=>wl,El=d.styled.div`
1637
+ display: flex;
1638
+ justify-content: center;
1639
+ white-space: pre;
1640
+ font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
1641
+ font-size: 18px;
1642
+ font-weight: 500;
1643
+ line-height: 1.6;
1644
+ color: ${n.COLORS.black};
1645
+ min-height: 1.6em;
1646
+ `,zl=d.styled.span`
1647
+ display: inline-block;
1648
+ width: 0.65em;
1649
+ text-align: center;
1650
+ `,Nl=C.newClassNameGetter("split-flap-text"),wt=({className:e,ref:t,text:o,...r})=>{const[i,a]=u.useState(()=>o.split("")),c=u.useRef(o),s=u.useRef([]),p=u.useRef(null),x=u.useRef([]),g=u.useRef(o.split("")),h=u.useCallback(()=>{p.current&&(clearInterval(p.current),p.current=null);for(const f of x.current)clearTimeout(f);x.current=[]},[]),y=u.useCallback(f=>{h(),g.current=f,s.current=f.map(S=>S===" "),p.current=setInterval(()=>{a(S=>S.map((b,$)=>s.current[$]?g.current[$]:Ll()))},jl()),x.current=f.map((S,b)=>setTimeout(()=>{s.current[b]=!0,s.current.every(Boolean)&&(p.current&&(clearInterval(p.current),p.current=null),a([...g.current]))},kl(b)))},[h]);return u.useEffect(()=>{o!==c.current&&(c.current=o,y(o.split("")))},[o,y]),u.useEffect(()=>h,[h]),l.jsx(El,{...r,ref:t,className:Nl("container",e),"aria-hidden":"true",children:i.map((f,S)=>l.jsx(zl,{children:f===" "?" ":f},S))})},ve=C.newClassNameGetter("pending-screen"),Tl=({className:e,classnames:t,description:o,interval:r,phrases:i,ref:a,...c})=>{const s=u.useMemo(()=>gl(i),[i]),p=u.useMemo(()=>xl(r),[r]),x=u.useMemo(()=>hl(s),[s]),g=u.useRef([]),h=u.useRef(0),y=u.useCallback(v=>(h.current>=g.current.length&&(g.current=lt(s.length,v),h.current=0),g.current[h.current++]),[s.length]),[f,S]=u.useState(()=>{g.current=lt(s.length);const v=g.current[0];return h.current=1,v}),b=u.useRef(null),$=u.useCallback(()=>{S(v=>y(v))},[y]);u.useEffect(()=>(b.current=setInterval($,p),()=>{b.current&&clearInterval(b.current)}),[$,p]);const m=s[f],O=fl(m,x);return l.jsxs(Sl,{...c,ref:a,className:ve("container",e),role:"status",children:[l.jsxs(ml,{className:ve("indicator",t==null?void 0:t.indicator),children:[l.jsx(Te,{$index:0}),l.jsx(Te,{$index:1}),l.jsx(Te,{$index:2})]}),l.jsx(wt,{text:O,className:ve("board",t==null?void 0:t.board)}),l.jsx(Ol,{children:m}),o&&l.jsx(vl,{className:ve("description",t==null?void 0:t.description),children:o})]})},_e={compact:{height:4,radius:2},default:{height:8,radius:4}},Il=d.styled.div`
728
1651
  width: 100%;
729
- height: ${({$size:e})=>ge[e].height}px;
730
- border-radius: ${({$size:e})=>ge[e].radius}px;
731
- background-color: ${a.COLORS.gray};
1652
+ height: ${({$size:e})=>_e[e].height}px;
1653
+ border-radius: ${({$size:e})=>_e[e].radius}px;
1654
+ background-color: ${n.COLORS.gray};
732
1655
  overflow: hidden;
733
- `,nn=c.styled.div`
1656
+ `,Al=d.styled.div`
734
1657
  height: 100%;
735
1658
  width: ${({$value:e})=>Math.min(100,Math.max(0,e))}%;
736
- border-radius: ${({$size:e})=>ge[e].radius}px;
737
- background-color: ${a.COLORS.black};
1659
+ border-radius: ${({$size:e})=>_e[e].radius}px;
1660
+ background-color: ${n.COLORS.black};
738
1661
  transition: width 0.2s ease;
739
- `,Se=A.newClassNameGetter("progress"),rn=({value:e,size:t="default",className:o,classnames:i,ref:n,...r})=>d.jsx(on,{...r,ref:n,$size:t,className:Se("track",o,i==null?void 0:i.track),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,children:d.jsx(nn,{$size:t,$value:e,className:Se("bar",i==null?void 0:i.bar)})}),Ae=u.createContext(null),an=c.styled.div`
1662
+ `,dt=C.newClassNameGetter("progress"),Pl=({value:e,size:t="default",className:o,classnames:r,ref:i,...a})=>l.jsx(Il,{...a,ref:i,$size:t,className:dt("track",o,r==null?void 0:r.track),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,children:l.jsx(Al,{$size:t,$value:e,className:dt("bar",r==null?void 0:r.bar)})}),Ct=u.createContext(null),Bl=d.styled.div`
740
1663
  position: fixed;
741
1664
  bottom: 24px;
742
1665
  right: 24px;
@@ -745,21 +1668,156 @@
745
1668
  align-items: center;
746
1669
  gap: 10px;
747
1670
  padding: 10px 16px;
748
- background-color: ${a.alpha(a.COLORS["iron-grey"],10)};
1671
+ background-color: ${n.alpha(n.COLORS["iron-grey"],10)};
749
1672
  backdrop-filter: blur(8px);
750
1673
  border-radius: 24px;
751
- animation: ${a.KEYFRAMES.fadeIn} 0.2s ease-out;
1674
+ animation: ${n.KEYFRAMES.fadeIn} 0.2s ease-out;
752
1675
  pointer-events: none;
753
- color: ${a.COLORS.black};
754
- `,sn=c.styled.span`
1676
+ color: ${n.COLORS.black};
1677
+ `,Ml=d.styled.span`
755
1678
  font-size: 14px;
756
1679
  font-weight: 500;
757
1680
  white-space: nowrap;
758
- `,ln=({children:e,defaultMessage:t="Saving"})=>{const[o,i]=u.useState(!1),[n,r]=u.useState(t),l=u.useCallback(h=>{r(h??t),i(!0)},[t]),s=u.useCallback(()=>{i(!1)},[]),p=u.useMemo(()=>({isVisible:o,show:l,hide:s}),[o,l,s]);return d.jsxs(Ae.Provider,{value:p,children:[e,o&&d.jsxs(an,{children:[d.jsx(c.Spinner,{size:"sm"}),d.jsx(sn,{children:n})]})]})},cn=()=>{const e=u.useContext(Ae);if(!e)throw new Error("useSaveProgress must be used within SaveProgressProvider");return e},dn=c.styled.div`
1681
+ `,Fl=({children:e,defaultMessage:t="Saving"})=>{const[o,r]=u.useState(!1),[i,a]=u.useState(t),c=u.useCallback(x=>{a(x??t),r(!0)},[t]),s=u.useCallback(()=>{r(!1)},[]),p=u.useMemo(()=>({isVisible:o,show:c,hide:s}),[o,c,s]);return l.jsxs(Ct.Provider,{value:p,children:[e,o&&l.jsxs(Bl,{children:[l.jsx(d.Spinner,{size:"sm"}),l.jsx(Ml,{children:i})]})]})},_l=()=>{const e=u.useContext(Ct);if(!e)throw new Error("useSaveProgress must be used within SaveProgressProvider");return e},Dl=B.keyframes`
1682
+ 0% { opacity: 1; }
1683
+ 50% { opacity: 0.4; }
1684
+ 100% { opacity: 1; }
1685
+ `,Gl=B.keyframes`
1686
+ 0% { transform: translateX(-100%); }
1687
+ 60% { transform: translateX(100%); }
1688
+ 100% { transform: translateX(100%); }
1689
+ `,Yl=B.css`
1690
+ animation: ${Dl} 1.5s ease-in-out infinite;
1691
+ `,Hl=B.css`
1692
+ &::after {
1693
+ content: '';
1694
+ position: absolute;
1695
+ inset: 0;
1696
+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
1697
+ animation: ${Gl} 1.6s linear infinite;
1698
+ }
1699
+ `,Xl={pulse:Yl,wave:Hl,none:null},Ul={none:"0",sm:"4px",md:"8px",lg:"12px",full:"9999px"},Ie=e=>typeof e=="number"?`${e}px`:e,Wl=d.styled.div`
1700
+ position: relative;
1701
+ overflow: hidden;
1702
+ background-color: #e5e7eb;
1703
+ width: ${({$width:e,$circle:t,$height:o})=>Ie(t?o:e)};
1704
+ height: ${({$height:e})=>Ie(e)};
1705
+ border-radius: ${({$circle:e,$radius:t})=>e?"50%":Ul[t]};
1706
+ ${({$animation:e})=>Xl[e]}
1707
+ `,ql=C.newClassNameGetter("skeleton"),Kl=({animation:e="pulse",circle:t=!1,className:o,height:r=16,radius:i="md",ref:a,width:c="100%",...s})=>l.jsx(Wl,{...s,ref:a,className:ql("container",o),$animation:e,$circle:t,$height:r,$radius:i,$width:c}),Vl=d.styled.span`
1708
+ display: inline-flex;
1709
+ align-items: baseline;
1710
+ gap: 4px;
1711
+ font-size: 13px;
1712
+ color: #666;
1713
+ `,Zl=d.styled.strong`
1714
+ font-weight: 700;
1715
+ color: ${n.COLORS.black};
1716
+ `,Jl=d.styled.span``,Ae=C.newClassNameGetter("stat"),Ql=({className:e,classnames:t,label:o,ref:r,value:i,...a})=>l.jsxs(Vl,{...a,ref:r,className:Ae("container",e),children:[l.jsx(Zl,{className:Ae("value",t==null?void 0:t.value),children:i}),l.jsx(Jl,{className:Ae("label",t==null?void 0:t.label),children:o})]}),ea=d.styled.div`
1717
+ display: flex;
1718
+ flex-direction: column;
1719
+ border: 1px solid ${n.COLORS.gray};
1720
+ border-radius: 8px;
1721
+ overflow: hidden;
1722
+ `,ta=d.styled.div`
1723
+ &:not(:last-child) {
1724
+ border-bottom: 1px solid ${n.COLORS.gray};
1725
+ }
1726
+ `,oa=d.styled.button`
1727
+ display: flex;
1728
+ align-items: center;
1729
+ gap: 8px;
1730
+ width: 100%;
1731
+ padding: 10px 16px;
1732
+ background-color: ${({$expanded:e})=>e?n.alpha(n.COLORS.black,3):"transparent"};
1733
+ border: none;
1734
+ cursor: ${({$interactive:e})=>e?"pointer":"default"};
1735
+ font-size: 14px;
1736
+ font-weight: 500;
1737
+ color: ${n.COLORS.black};
1738
+ text-align: left;
1739
+ outline: none;
1740
+ transition: background-color 0.15s ease;
1741
+
1742
+ &:hover {
1743
+ background-color: ${({$interactive:e})=>e?n.alpha(n.COLORS.black,3):"transparent"};
1744
+ }
1745
+ `,ra=d.styled.span`
1746
+ display: flex;
1747
+ align-items: center;
1748
+ justify-content: center;
1749
+ width: 16px;
1750
+ height: 16px;
1751
+ flex-shrink: 0;
1752
+ color: ${n.COLORS["iron-grey"]};
1753
+ transition: transform 0.15s ease;
1754
+ transform: rotate(${({$expanded:e})=>e?"90deg":"0deg"});
1755
+ `,na=d.styled.span`
1756
+ width: 16px;
1757
+ height: 16px;
1758
+ flex-shrink: 0;
1759
+ `,ia={success:n.COLORS.green,error:n.COLORS.red,running:n.COLORS["steel-blue"],pending:n.COLORS.gray},la=B.keyframes`
1760
+ from { transform: rotate(0deg); }
1761
+ to { transform: rotate(360deg); }
1762
+ `,aa=B.css`
1763
+ animation: ${la} 1s linear infinite;
1764
+ `,da=d.styled.span`
1765
+ display: flex;
1766
+ align-items: center;
1767
+ justify-content: center;
1768
+ flex-shrink: 0;
1769
+ color: ${({$status:e})=>ia[e]};
1770
+ ${({$status:e})=>e==="running"&&aa}
1771
+ `,sa=d.styled.span`
1772
+ flex: 1;
1773
+ min-width: 0;
1774
+ overflow: hidden;
1775
+ text-overflow: ellipsis;
1776
+ white-space: nowrap;
1777
+ color: ${({$muted:e})=>e?n.COLORS["iron-grey"]:n.COLORS.black};
1778
+ `,ca=d.styled.span`
1779
+ flex-shrink: 0;
1780
+ font-size: 12px;
1781
+ font-weight: 400;
1782
+ color: ${n.COLORS["iron-grey"]};
1783
+ font-variant-numeric: tabular-nums;
1784
+ `,pa=d.styled.div`
1785
+ display: grid;
1786
+ grid-template-rows: ${({$expanded:e})=>e?"1fr":"0fr"};
1787
+ transition: grid-template-rows 0.15s ease;
1788
+ `,ua=d.styled.div`
1789
+ overflow: hidden;
1790
+ `,ga=d.styled.div`
1791
+ padding: 8px 0;
1792
+ background-color: ${n.COLORS.white};
1793
+ border-top: 1px solid ${n.COLORS.gray};
1794
+ font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
1795
+ font-size: 12px;
1796
+ line-height: 20px;
1797
+ `,xa=d.styled.div`
1798
+ display: flex;
1799
+ padding: 0 16px;
1800
+
1801
+ &:hover {
1802
+ background-color: ${n.alpha(n.COLORS.black,3)};
1803
+ }
1804
+ `,ha=d.styled.span`
1805
+ flex-shrink: 0;
1806
+ width: 40px;
1807
+ text-align: right;
1808
+ padding-right: 16px;
1809
+ color: ${n.COLORS["iron-grey"]};
1810
+ user-select: none;
1811
+ `,fa=d.styled.span`
1812
+ flex: 1;
1813
+ min-width: 0;
1814
+ white-space: pre;
1815
+ color: ${n.COLORS.black};
1816
+ `,we=C.newClassNameGetter("step-log"),ya={success:Le.CircleCheck,error:Le.CircleX,running:l.LoaderCircle,pending:Le.Circle},ba=({className:e,classnames:t,defaultValue:o=[],onChange:r,ref:i,steps:a,value:c,...s})=>{const[p,x]=u.useState(o),g=c!==void 0,h=g?c:p,y=u.useCallback(f=>{const b=h.includes(f)?h.filter($=>$!==f):[...h,f];g||x(b),r==null||r(b)},[h,g,r]);return l.jsx(ea,{...s,ref:i,className:we("container",e),children:a.map(f=>{const S=h.includes(f.value),b=f.status??"pending",$=b!=="pending",m=f.lines&&f.lines.length>0,O=ya[b];return l.jsxs(ta,{className:we("step",t==null?void 0:t.step),children:[l.jsxs(oa,{type:"button",$expanded:S,$interactive:$,onClick:$?()=>y(f.value):void 0,className:we("header",t==null?void 0:t.header),children:[$?l.jsx(ra,{$expanded:S,children:l.jsx(l.ChevronRight,{size:14})}):l.jsx(na,{}),l.jsx(da,{$status:b,children:l.jsx(O,{size:16})}),l.jsx(sa,{$muted:b==="pending",children:f.title}),f.duration&&l.jsx(ca,{children:f.duration})]}),$&&m&&l.jsx(pa,{$expanded:S,children:l.jsx(ua,{children:l.jsx(ga,{className:we("log",t==null?void 0:t.log),children:f.lines.map(v=>l.jsxs(xa,{children:[l.jsx(ha,{children:v.line}),l.jsx(fa,{children:v.text})]},v.line))})})})]},f.value)})})},$a=d.styled.div`
759
1817
  display: flex;
760
1818
  align-items: ${e=>e.$orientation==="vertical"?"flex-start":"center"};
761
1819
  flex-direction: ${e=>e.$orientation==="vertical"?"column":"row"};
762
- `,pn=c.styled.div`
1820
+ `,Sa=d.styled.div`
763
1821
  display: flex;
764
1822
  align-items: ${e=>e.$orientation==="vertical"?"flex-start":"center"};
765
1823
  flex-direction: ${e=>e.$orientation==="vertical"?"column":"row"};
@@ -768,7 +1826,7 @@
768
1826
  &:last-child {
769
1827
  flex: 0;
770
1828
  }
771
- `,un=c.styled.button`
1829
+ `,ma=d.styled.button`
772
1830
  display: flex;
773
1831
  align-items: center;
774
1832
  gap: 10px;
@@ -777,7 +1835,7 @@
777
1835
  background: transparent;
778
1836
  cursor: ${e=>e.$clickable?"pointer":"default"};
779
1837
  flex-shrink: 0;
780
- `,gn=c.styled.div`
1838
+ `,Oa=d.styled.div`
781
1839
  display: flex;
782
1840
  align-items: center;
783
1841
  justify-content: center;
@@ -793,22 +1851,22 @@
793
1851
  color 0.2s ease;
794
1852
 
795
1853
  ${e=>e.$active||e.$completed?`
796
- background-color: ${a.COLORS.black};
797
- border: 2px solid ${a.COLORS.black};
798
- color: ${a.COLORS.white};
1854
+ background-color: ${n.COLORS.black};
1855
+ border: 2px solid ${n.COLORS.black};
1856
+ color: ${n.COLORS.white};
799
1857
  `:`
800
1858
  background-color: transparent;
801
- border: 2px solid ${a.COLORS.gray};
802
- color: ${a.COLORS["iron-grey"]};
1859
+ border: 2px solid ${n.COLORS.gray};
1860
+ color: ${n.COLORS["iron-grey"]};
803
1861
  `}
804
- `,hn=c.styled.span`
1862
+ `,va=d.styled.span`
805
1863
  font-size: 14px;
806
1864
  font-weight: 500;
807
1865
  white-space: nowrap;
808
- color: ${e=>e.$active||e.$completed?a.COLORS.black:a.COLORS["iron-grey"]};
1866
+ color: ${e=>e.$active||e.$completed?n.COLORS.black:n.COLORS["iron-grey"]};
809
1867
  transition: color 0.2s ease;
810
- `,fn=c.styled.div`
811
- background-color: ${e=>e.$completed?a.COLORS.black:a.COLORS.gray};
1868
+ `,wa=d.styled.div`
1869
+ background-color: ${e=>e.$completed?n.COLORS.black:n.COLORS.gray};
812
1870
  transition: background-color 0.2s ease;
813
1871
 
814
1872
  ${e=>e.$orientation==="vertical"?`
@@ -821,16 +1879,16 @@
821
1879
  min-width: 16px;
822
1880
  margin: 0 12px;
823
1881
  `}
824
- `,Q=A.newClassNameGetter("stepper"),xn=({className:e,classnames:t,onChange:o,orientation:i="horizontal",ref:n,steps:r,value:l,...s})=>{const p=u.useMemo(()=>r.findIndex(h=>h.value===l),[r,l]);return d.jsx(dn,{...s,ref:n,$orientation:i,className:Q("container",e),children:r.map((h,g)=>{const f=h.value===l,x=g<p,b=g===r.length-1;return d.jsxs(pn,{$orientation:i,children:[d.jsxs(un,{type:"button",$active:f,$completed:x,$clickable:!!o,onClick:()=>o==null?void 0:o(h.value),className:Q("step",t==null?void 0:t.step),children:[d.jsx(gn,{$active:f,$completed:x,className:Q("circle",t==null?void 0:t.circle),children:g+1}),d.jsx(hn,{$active:f,$completed:x,className:Q("label",t==null?void 0:t.label),children:h.label})]}),!b&&d.jsx(fn,{$completed:x,$orientation:i,className:Q("line",t==null?void 0:t.line)})]},h.value)})})},mn=c.styled.div`
1882
+ `,ce=C.newClassNameGetter("stepper"),Ca=({className:e,classnames:t,onChange:o,orientation:r="horizontal",ref:i,steps:a,value:c,...s})=>{const p=u.useMemo(()=>a.findIndex(x=>x.value===c),[a,c]);return l.jsx($a,{...s,ref:i,$orientation:r,className:ce("container",e),children:a.map((x,g)=>{const h=x.value===c,y=g<p,f=g===a.length-1;return l.jsxs(Sa,{$orientation:r,children:[l.jsxs(ma,{type:"button",$active:h,$completed:y,$clickable:!!o,onClick:()=>o==null?void 0:o(x.value),className:ce("step",t==null?void 0:t.step),children:[l.jsx(Oa,{$active:h,$completed:y,className:ce("circle",t==null?void 0:t.circle),children:g+1}),l.jsx(va,{$active:h,$completed:y,className:ce("label",t==null?void 0:t.label),children:x.label})]}),!f&&l.jsx(wa,{$completed:y,$orientation:r,className:ce("line",t==null?void 0:t.line)})]},x.value)})})},Ra=d.styled.div`
825
1883
  display: flex;
826
1884
  align-items: center;
827
1885
  gap: 6px;
828
- `,bn=c.styled.button`
1886
+ `,La=d.styled.button`
829
1887
  padding: 6px 16px;
830
1888
  border: none;
831
1889
  border-radius: 12px;
832
- background-color: ${e=>e.$active?a.COLORS.gray:"transparent"};
833
- color: ${a.COLORS.black};
1890
+ background-color: ${e=>e.$active?n.COLORS.gray:"transparent"};
1891
+ color: ${n.COLORS.black};
834
1892
  font-size: 14px;
835
1893
  font-weight: 500;
836
1894
  line-height: 1.4;
@@ -841,9 +1899,51 @@
841
1899
  opacity 0.15s ease;
842
1900
 
843
1901
  &:hover:not(:disabled) {
844
- background-color: ${e=>e.$active?a.COLORS.gray:"rgba(0, 0, 0, 0.05)"};
1902
+ background-color: ${e=>e.$active?n.COLORS.gray:"rgba(0, 0, 0, 0.05)"};
845
1903
  }
846
- `,ve=A.newClassNameGetter("tabs"),yn=({className:e,classnames:t,onChange:o,ref:i,tabs:n,value:r,...l})=>d.jsx(mn,{...l,ref:i,className:ve("container",e),role:"tablist",children:n.map(s=>d.jsx(bn,{type:"button",role:"tab","aria-selected":r===s.value,$active:r===s.value,$disabled:!!s.disabled,disabled:s.disabled,onClick:()=>o(s.value),className:ve("tab",t==null?void 0:t.tab),children:s.label},s.value))}),Ie=u.createContext(null),ce=3,Ce={default:{background:"#374151",text:a.COLORS.white,border:"#374151"},success:{background:a.COLORS.green,text:a.COLORS.white,border:a.COLORS.green},warning:{background:a.COLORS.yellow,text:a.COLORS.white,border:a.COLORS.yellow},danger:{background:a.COLORS.red,text:a.COLORS.white,border:a.COLORS.red}},wn=(e,t)=>{switch(t.type){case"ADD_TOAST":{const o=t.payload;return e.toasts.length<ce?{...e,toasts:[...e.toasts,o]}:{...e,queue:[...e.queue,o]}}case"REMOVE_TOAST":{const o=t.payload,i=e.toasts.filter(r=>r.id!==o),n=e.queue[0];return n&&i.length<ce?{toasts:[...i,n],queue:e.queue.slice(1)}:{...e,toasts:i}}case"SHOW_NEXT_FROM_QUEUE":{const o=e.queue[0];return!o||e.toasts.length>=ce?e:{toasts:[...e.toasts,o],queue:e.queue.slice(1)}}default:return e}},$n={toasts:[],queue:[]},de=e=>Ce[e]??Ce.default,Sn=c.styled.div`
1904
+ `,st=C.newClassNameGetter("tabs"),ka=({className:e,classnames:t,onChange:o,ref:r,tabs:i,value:a,...c})=>l.jsx(Ra,{...c,ref:r,className:st("container",e),role:"tablist",children:i.map(s=>l.jsx(La,{type:"button",role:"tab","aria-selected":a===s.value,$active:a===s.value,$disabled:!!s.disabled,disabled:s.disabled,onClick:()=>o(s.value),className:st("tab",t==null?void 0:t.tab),children:s.label},s.value))}),ja=d.styled.div`
1905
+ display: flex;
1906
+ flex-direction: column;
1907
+ `,Ea=d.styled.div`
1908
+ display: grid;
1909
+ grid-template-columns: 20px 1fr;
1910
+ gap: 0 12px;
1911
+ `,za=d.styled.div`
1912
+ display: flex;
1913
+ flex-direction: column;
1914
+ align-items: center;
1915
+ grid-row: 1 / -1;
1916
+ `,Na=d.styled.div`
1917
+ width: 10px;
1918
+ height: 10px;
1919
+ border-radius: 50%;
1920
+ background-color: ${n.COLORS.black};
1921
+ flex-shrink: 0;
1922
+ margin-top: 5px;
1923
+ `,Ta=d.styled.div`
1924
+ width: 2px;
1925
+ flex: 1;
1926
+ background-color: ${n.COLORS.gray};
1927
+ visibility: ${e=>e.$last?"hidden":"visible"};
1928
+ `,Ia=d.styled.div`
1929
+ padding-bottom: ${e=>e.$last?"0":"24px"};
1930
+ min-width: 0;
1931
+ `,Aa=d.styled.div`
1932
+ font-size: 15px;
1933
+ font-weight: 600;
1934
+ color: ${n.COLORS.black};
1935
+ line-height: 20px;
1936
+ `,Pa=d.styled.div`
1937
+ font-size: 13px;
1938
+ color: ${n.COLORS["iron-grey"]};
1939
+ margin-top: 2px;
1940
+ line-height: 1.4;
1941
+ `,Ba=d.styled.div`
1942
+ font-size: 14px;
1943
+ color: ${n.COLORS["iron-grey"]};
1944
+ margin-top: 8px;
1945
+ line-height: 1.5;
1946
+ `,V=C.newClassNameGetter("timeline"),Ma=({className:e,classnames:t,items:o,ref:r,...i})=>l.jsx(ja,{...i,ref:r,className:V("container",e),children:o.map((a,c)=>{const s=c===o.length-1;return l.jsxs(Ea,{className:V("item",t==null?void 0:t.item),children:[l.jsxs(za,{$last:s,children:[l.jsx(Na,{className:V("dot",t==null?void 0:t.dot)}),l.jsx(Ta,{className:V("line",t==null?void 0:t.line),$last:s})]}),l.jsxs(Ia,{className:V("content",t==null?void 0:t.content),$last:s,children:[l.jsx(Aa,{className:V("title",t==null?void 0:t.title),children:a.title}),a.description&&l.jsx(Pa,{className:V("description",t==null?void 0:t.description),children:a.description}),a.children&&l.jsx(Ba,{className:V("body",t==null?void 0:t.body),children:a.children})]})]},c)})}),Rt=u.createContext(null),Pe=3,ct={default:{background:"#374151",text:n.COLORS.white,border:"#374151"},success:{background:n.COLORS.green,text:n.COLORS.white,border:n.COLORS.green},warning:{background:n.COLORS.yellow,text:n.COLORS.white,border:n.COLORS.yellow},danger:{background:n.COLORS.red,text:n.COLORS.white,border:n.COLORS.red}},Fa=(e,t)=>{switch(t.type){case"ADD_TOAST":{const o=t.payload;return e.toasts.length<Pe?{...e,toasts:[...e.toasts,o]}:{...e,queue:[...e.queue,o]}}case"REMOVE_TOAST":{const o=t.payload,r=e.toasts.filter(a=>a.id!==o),i=e.queue[0];return i&&r.length<Pe?{toasts:[...r,i],queue:e.queue.slice(1)}:{...e,toasts:r}}case"SHOW_NEXT_FROM_QUEUE":{const o=e.queue[0];return!o||e.toasts.length>=Pe?e:{toasts:[...e.toasts,o],queue:e.queue.slice(1)}}default:return e}},_a={toasts:[],queue:[]},Be=e=>ct[e]??ct.default,Da=d.styled.div`
847
1947
  position: fixed;
848
1948
  bottom: 24px;
849
1949
  left: 24px;
@@ -854,30 +1954,30 @@
854
1954
  pointer-events: none;
855
1955
  width: auto;
856
1956
  max-width: 90vw;
857
- `,vn=c.styled.div`
1957
+ `,Ga=d.styled.div`
858
1958
  display: flex;
859
1959
  align-items: center;
860
1960
  justify-content: space-between;
861
1961
  gap: 12px;
862
1962
  min-height: 32px;
863
1963
  padding: 8px 8px 8px 16px;
864
- background-color: ${({$variant:e})=>de(e).background};
865
- color: ${({$variant:e})=>de(e).text};
866
- border: 1px solid ${({$variant:e})=>de(e).border};
1964
+ background-color: ${({$variant:e})=>Be(e).background};
1965
+ color: ${({$variant:e})=>Be(e).text};
1966
+ border: 1px solid ${({$variant:e})=>Be(e).border};
867
1967
  border-radius: 96px;
868
1968
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
869
- animation: ${({$isExiting:e})=>e?a.KEYFRAMES.slideOutBottomFade:a.KEYFRAMES.slideInBottomFade}
1969
+ animation: ${({$isExiting:e})=>e?n.KEYFRAMES.slideOutBottomFade:n.KEYFRAMES.slideInBottomFade}
870
1970
  0.3s ease-out;
871
1971
  pointer-events: auto;
872
1972
  max-width: 500px;
873
- `,Cn=c.styled.span`
1973
+ `,Ya=d.styled.span`
874
1974
  font-size: 14px;
875
1975
  font-weight: 500;
876
1976
  line-height: 1.4;
877
1977
  white-space: nowrap;
878
1978
  overflow: hidden;
879
1979
  text-overflow: ellipsis;
880
- `,On=c.styled.button`
1980
+ `,Ha=d.styled.button`
881
1981
  display: flex;
882
1982
  align-items: center;
883
1983
  justify-content: center;
@@ -895,20 +1995,20 @@
895
1995
  &:hover {
896
1996
  opacity: 1;
897
1997
  }
898
- `,Rn=c.styled.div`
1998
+ `,Xa=d.styled.div`
899
1999
  display: flex;
900
2000
  align-items: center;
901
2001
  justify-content: space-between;
902
2002
  gap: 12px;
903
2003
  width: 100%;
904
- `,En=c.styled.div`
2004
+ `,Ua=d.styled.div`
905
2005
  display: flex;
906
2006
  align-items: center;
907
2007
  justify-content: center;
908
2008
  min-height: 32px;
909
2009
  padding: 8px 16px;
910
2010
  background-color: #374151;
911
- color: ${a.COLORS.white};
2011
+ color: ${n.COLORS.white};
912
2012
  border-radius: 96px;
913
2013
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
914
2014
  pointer-events: auto;
@@ -916,7 +2016,7 @@
916
2016
  font-weight: 500;
917
2017
  white-space: nowrap;
918
2018
  margin-left: auto;
919
- `,Oe=({toast:e,onHide:t})=>{const[o,i]=u.useState(!1),n=()=>{i(!0),setTimeout(()=>{t(e.id)},300)};return u.useEffect(()=>{if(e.duration){const r=setTimeout(()=>{n()},e.duration);return()=>clearTimeout(r)}},[e.duration,e.id]),d.jsxs(vn,{$variant:e.variant,$isExiting:o,children:[d.jsx(Cn,{children:e.message}),d.jsx(On,{onClick:n,children:d.jsx(d.X,{style:{width:16,height:16}})})]})},Ln=({toasts:e,queueCount:t,onHide:o})=>{if(e.length===0)return null;const i=e.length-1;return d.jsx(Sn,{children:e.map((n,r)=>r===i&&t>0?d.jsxs(Rn,{children:[d.jsx(Oe,{toast:n,onHide:o}),d.jsxs(En,{children:["+",t]})]},n.id):d.jsx(Oe,{toast:n,onHide:o},n.id))})},kn=({children:e})=>{const[t,o]=u.useReducer(wn,$n),i=u.useCallback((r,l="default",s)=>{const p=`toast-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;o({type:"ADD_TOAST",payload:{id:p,message:r,variant:l,duration:s}})},[]),n=u.useCallback(r=>{o({type:"REMOVE_TOAST",payload:r})},[]);return d.jsxs(Ie.Provider,{value:{show:i,hide:n},children:[e,d.jsx(Ln,{toasts:t.toasts,queueCount:t.queue.length,onHide:n})]})},zn=()=>{const e=u.useContext(Ie);if(!e)throw new Error("useToastr must be used within ToastProvider");return e},Re={dark:{background:a.COLORS.black,text:a.COLORS.white},light:{background:a.COLORS.white,text:a.COLORS.black,border:a.COLORS.gray},success:{background:a.COLORS.green,text:a.COLORS.white},warning:{background:a.COLORS.yellow,text:a.COLORS.white},danger:{background:a.COLORS.red,text:a.COLORS.white}},ee=e=>Re[e]??Re.dark,Tn=(e,t)=>{const o=ee(t).background;switch(e){case"top":return`
2019
+ `,pt=({toast:e,onHide:t})=>{const[o,r]=u.useState(!1),i=()=>{r(!0),setTimeout(()=>{t(e.id)},300)};return u.useEffect(()=>{if(e.duration){const a=setTimeout(()=>{i()},e.duration);return()=>clearTimeout(a)}},[e.duration,e.id]),l.jsxs(Ga,{$variant:e.variant,$isExiting:o,children:[l.jsx(Ya,{children:e.message}),l.jsx(Ha,{onClick:i,children:l.jsx(l.X,{style:{width:16,height:16}})})]})},Wa=({toasts:e,queueCount:t,onHide:o})=>{if(e.length===0)return null;const r=e.length-1;return l.jsx(Da,{children:e.map((i,a)=>a===r&&t>0?l.jsxs(Xa,{children:[l.jsx(pt,{toast:i,onHide:o}),l.jsxs(Ua,{children:["+",t]})]},i.id):l.jsx(pt,{toast:i,onHide:o},i.id))})},qa=({children:e})=>{const[t,o]=u.useReducer(Fa,_a),r=u.useCallback((a,c="default",s)=>{const p=`toast-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;o({type:"ADD_TOAST",payload:{id:p,message:a,variant:c,duration:s}})},[]),i=u.useCallback(a=>{o({type:"REMOVE_TOAST",payload:a})},[]);return l.jsxs(Rt.Provider,{value:{show:r,hide:i},children:[e,l.jsx(Wa,{toasts:t.toasts,queueCount:t.queue.length,onHide:i})]})},Ka=()=>{const e=u.useContext(Rt);if(!e)throw new Error("useToastr must be used within ToastProvider");return e},ut={dark:{background:n.COLORS.black,text:n.COLORS.white},light:{background:n.COLORS.white,text:n.COLORS.black,border:n.COLORS.gray},success:{background:n.COLORS.green,text:n.COLORS.white},warning:{background:n.COLORS.yellow,text:n.COLORS.white},danger:{background:n.COLORS.red,text:n.COLORS.white}},ue=e=>ut[e]??ut.dark,Va=(e,t)=>{const o=ue(t).background;switch(e){case"top":return`
920
2020
  bottom: -12px;
921
2021
  left: 50%;
922
2022
  margin-left: -6px;
@@ -936,7 +2036,7 @@
936
2036
  top: 50%;
937
2037
  margin-top: -6px;
938
2038
  border-right-color: ${o};
939
- `;default:return""}},Pn=(e,t)=>{if(t!=="light")return"";const o=ee(t).border;switch(e){case"top":return`
2039
+ `;default:return""}},Za=(e,t)=>{if(t!=="light")return"";const o=ue(t).border;switch(e){case"top":return`
940
2040
  &::after {
941
2041
  bottom: -14px;
942
2042
  left: 50%;
@@ -964,11 +2064,11 @@
964
2064
  margin-top: -7px;
965
2065
  border-right-color: ${o};
966
2066
  }
967
- `;default:return""}},Ne=e=>`
2067
+ `;default:return""}},Lt=e=>`
968
2068
  z-index: 1000;
969
2069
  padding: 6px 12px;
970
- background-color: ${ee(e.$variant).background};
971
- color: ${ee(e.$variant).text};
2070
+ background-color: ${ue(e.$variant).background};
2071
+ color: ${ue(e.$variant).text};
972
2072
  font-size: 13px;
973
2073
  line-height: 1.4;
974
2074
  border-radius: 6px;
@@ -982,7 +2082,7 @@
982
2082
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
983
2083
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
984
2084
 
985
- ${e.$variant==="light"?`border: 1px solid ${ee(e.$variant).border};`:""}
2085
+ ${e.$variant==="light"?`border: 1px solid ${ue(e.$variant).border};`:""}
986
2086
 
987
2087
  &::before {
988
2088
  content: '';
@@ -990,7 +2090,7 @@
990
2090
  width: 0;
991
2091
  height: 0;
992
2092
  border: 6px solid transparent;
993
- ${Tn(e.$placement,e.$variant)}
2093
+ ${Va(e.$placement,e.$variant)}
994
2094
  }
995
2095
 
996
2096
  ${e.$variant==="light"?`
@@ -1003,12 +2103,12 @@
1003
2103
  }
1004
2104
  `:""}
1005
2105
 
1006
- ${Pn(e.$placement,e.$variant)}
1007
- `,An=c.styled.div`
2106
+ ${Za(e.$placement,e.$variant)}
2107
+ `,Ja=d.styled.div`
1008
2108
  position: relative;
1009
2109
  display: inline-block;
1010
2110
  width: fit-content;
1011
- `,In=e=>{switch(e){case"top":return`
2111
+ `,Qa=e=>{switch(e){case"top":return`
1012
2112
  bottom: calc(100% + 8px);
1013
2113
  left: 50%;
1014
2114
  transform: translateX(-50%);
@@ -1024,12 +2124,29 @@
1024
2124
  left: calc(100% + 8px);
1025
2125
  top: 50%;
1026
2126
  transform: translateY(-50%);
1027
- `;default:return""}},Nn=c.styled.div`
2127
+ `;default:return""}},ed=d.styled.div`
1028
2128
  position: absolute;
1029
- ${e=>Ne(e)}
1030
- ${({$placement:e})=>In(e)}
1031
- `,jn=c.styled.div`
2129
+ ${e=>Lt(e)}
2130
+ ${({$placement:e})=>Qa(e)}
2131
+ `,td=d.styled.div`
1032
2132
  position: fixed;
1033
- ${e=>Ne(e)}
1034
- `,pe=A.newClassNameGetter("tooltip"),K=8,Bn=({children:e,className:t,classnames:o,content:i,delay:n=200,placement:r="top",portalRenderNode:l,ref:s,variant:p="dark",...h})=>{const[g,f]=u.useState(!1),[x,b]=u.useState(null),[y,m]=u.useState(r),[$,w]=u.useState({top:0,left:0}),v=u.useRef(null),C=u.useRef(null),L=u.useCallback(()=>{var Y,X;if(!v.current)return;const S=v.current.getBoundingClientRect(),T=((Y=C.current)==null?void 0:Y.offsetWidth)??100,M=((X=C.current)==null?void 0:X.offsetHeight)??30,W=S.top-K,k=window.innerHeight-S.bottom-K,N=S.left-K,D=window.innerWidth-S.right-K;let j=r;if(r==="top"&&W<M&&k>W?j="bottom":r==="bottom"&&k<M&&W>k?j="top":r==="left"&&N<T&&D>N?j="right":r==="right"&&D<T&&N>D&&(j="left"),m(j),l){let z,P;switch(j){case"top":z=S.top-M-K,P=S.left+S.width/2-T/2;break;case"bottom":z=S.bottom+K,P=S.left+S.width/2-T/2;break;case"left":z=S.top+S.height/2-M/2,P=S.left-T-K;break;case"right":z=S.top+S.height/2-M/2,P=S.right+K;break;default:z=0,P=0}const q=8;P=Math.max(q,Math.min(P,window.innerWidth-T-q)),z=Math.max(q,Math.min(z,window.innerHeight-M-q)),w({top:z,left:P})}},[r,l]);u.useLayoutEffect(()=>{g&&L()},[g,L]);const F=()=>{const S=setTimeout(()=>{f(!0)},n);b(S)},I=()=>{x&&(clearTimeout(x),b(null)),f(!1)},U=l?he.createPortal(d.jsx(jn,{ref:C,className:pe("content",o==null?void 0:o.content),$placement:y,$variant:p,$visible:g,style:{top:$.top,left:$.left},children:i}),l):d.jsx(Nn,{ref:C,className:pe("content",o==null?void 0:o.content),$placement:y,$variant:p,$visible:g,children:i});return d.jsxs(An,{...h,ref:S=>{v.current=S,typeof s=="function"?s(S):s&&(s.current=S)},className:pe("wrapper",t),onMouseEnter:F,onMouseLeave:I,children:[e,U]})};exports.BREAKPOINTS=a.BREAKPOINTS;exports.COLORS=a.COLORS;exports.KEYFRAMES=a.KEYFRAMES;exports.KEY_SYMBOLS=a.KEY_SYMBOLS;exports.alpha=a.alpha;exports.getBrowser=a.getBrowser;exports.getKeySymbols=a.getKeySymbols;exports.getOperatingSystem=a.getOperatingSystem;exports.isValid=a.isValid;exports.toHEX=a.toHEX;exports.useKeyBinding=a.useKeyBinding;exports.mediaBetween=_.mediaBetween;exports.mediaDown=_.mediaDown;exports.mediaUp=_.mediaUp;exports.validation=_.index;exports.Autocomplete=c.Autocomplete;exports.Button=c.Button;exports.Checkbox=c.Checkbox;exports.CheckboxCard=c.CheckboxCard;exports.CheckboxGroup=c.CheckboxGroup;exports.Chip=c.Chip;exports.DatePicker=c.DatePicker;exports.FieldLabel=c.FieldLabel;exports.FieldMessage=c.FieldMessage;exports.Input=c.Input;exports.KeySymbol=c.KeySymbol;exports.KeysBindings=c.KeysBindings;exports.Modal=c.Modal;exports.MultiSelect=c.MultiSelect;exports.OtpCode=c.OtpCode;exports.Radio=c.Radio;exports.RadioCard=c.RadioCard;exports.RadioGroup=c.RadioGroup;exports.Select=c.Select;exports.Spinner=c.Spinner;exports.Tags=c.Tags;exports.Textarea=c.Textarea;exports.Toggle=c.Toggle;exports.ToggleCard=c.ToggleCard;exports.ToggleGroup=c.ToggleGroup;exports.formatDateGo=c.formatDateGo;exports.newClassNameGetter=A.newClassNameGetter;exports.Card=De;exports.ConfirmationProvider=Ze;exports.Container=tt;exports.Divider=it;exports.Drawer=ct;exports.Dropdown=ft;exports.FieldRow=bt;exports.GlobalStyle=Fe;exports.ImageCropper=Ro;exports.NotificationProvider=jo;exports.NotifyConfirmationProvider=Ho;exports.Panel=tn;exports.Progress=rn;exports.SaveProgressProvider=ln;exports.Stepper=xn;exports.Tabs=yn;exports.ToastProvider=kn;exports.Tooltip=Bn;exports.useConfirmation=Qe;exports.useImageCropper=ze;exports.useNotification=Bo;exports.useNotifyConfirmation=Vo;exports.useSaveProgress=cn;exports.useToastr=zn;
2133
+ ${e=>Lt(e)}
2134
+ `,Me=C.newClassNameGetter("tooltip"),Z=8,od=({children:e,className:t,classnames:o,content:r,delay:i=200,placement:a="top",portalRenderNode:c,ref:s,variant:p="dark",...x})=>{const[g,h]=u.useState(!1),[y,f]=u.useState(null),[S,b]=u.useState(a),[$,m]=u.useState({top:0,left:0}),O=u.useRef(null),v=u.useRef(null),k=u.useCallback(()=>{var X,U;if(!O.current)return;const R=O.current.getBoundingClientRect(),E=((X=v.current)==null?void 0:X.offsetWidth)??100,w=((U=v.current)==null?void 0:U.offsetHeight)??30,T=R.top-Z,N=window.innerHeight-R.bottom-Z,M=R.left-Z,Y=window.innerWidth-R.right-Z;let F=a;if(a==="top"&&T<w&&N>T?F="bottom":a==="bottom"&&N<w&&T>N?F="top":a==="left"&&M<E&&Y>M?F="right":a==="right"&&Y<E&&M>Y&&(F="left"),b(F),c){let _,D;switch(F){case"top":_=R.top-w-Z,D=R.left+R.width/2-E/2;break;case"bottom":_=R.bottom+Z,D=R.left+R.width/2-E/2;break;case"left":_=R.top+R.height/2-w/2,D=R.left-E-Z;break;case"right":_=R.top+R.height/2-w/2,D=R.right+Z;break;default:_=0,D=0}const W=8;D=Math.max(W,Math.min(D,window.innerWidth-E-W)),_=Math.max(W,Math.min(_,window.innerHeight-w-W)),m({top:_,left:D})}},[a,c]);u.useLayoutEffect(()=>{g&&k()},[g,k]);const z=()=>{const R=setTimeout(()=>{h(!0)},i);f(R)},j=()=>{y&&(clearTimeout(y),f(null)),h(!1)},L=c?De.createPortal(l.jsx(td,{ref:v,className:Me("content",o==null?void 0:o.content),$placement:S,$variant:p,$visible:g,style:{top:$.top,left:$.left},children:r}),c):l.jsx(ed,{ref:v,className:Me("content",o==null?void 0:o.content),$placement:S,$variant:p,$visible:g,children:r});return l.jsxs(Ja,{...x,ref:R=>{O.current=R,typeof s=="function"?s(R):s&&(s.current=R)},className:Me("wrapper",t),onMouseEnter:z,onMouseLeave:j,children:[e,L]})},rd=d.styled.div`
2135
+ display: inline-flex;
2136
+ align-items: center;
2137
+ gap: 12px;
2138
+ flex-direction: ${({$reverse:e})=>e?"row-reverse":"row"};
2139
+ `,nd=d.styled.div`
2140
+ display: flex;
2141
+ flex-direction: column;
2142
+ text-align: ${({$align:e})=>e};
2143
+ `,id=d.styled.span`
2144
+ font-size: 14px;
2145
+ font-weight: 600;
2146
+ line-height: 1.4;
2147
+ `,ld=d.styled.span`
2148
+ font-size: 12px;
2149
+ color: #666;
2150
+ line-height: 1.4;
2151
+ `,Ce=C.newClassNameGetter("user"),ad=({avatarPosition:e="left",avatarProps:t,className:o,classnames:r,description:i,name:a,ref:c,src:s,...p})=>{const x=e==="right";return l.jsxs(rd,{...p,ref:c,className:Ce("container",o),$reverse:x,children:[l.jsx(xt,{size:"sm",...t,name:typeof a=="string"?a:void 0,src:s??(t==null?void 0:t.src),className:Ce("avatar",r==null?void 0:r.avatar)}),l.jsxs(nd,{$align:x?"right":"left",children:[l.jsx(id,{className:Ce("name",r==null?void 0:r.name),children:a}),i&&l.jsx(ld,{className:Ce("description",r==null?void 0:r.description),children:i})]})]})};exports.BREAKPOINTS=n.BREAKPOINTS;exports.COLORS=n.COLORS;exports.KEYFRAMES=n.KEYFRAMES;exports.KEY_SYMBOLS=n.KEY_SYMBOLS;exports.alpha=n.alpha;exports.getBrowser=n.getBrowser;exports.getKeySymbols=n.getKeySymbols;exports.getOperatingSystem=n.getOperatingSystem;exports.isValid=n.isValid;exports.toHEX=n.toHEX;exports.useKeyBinding=n.useKeyBinding;exports.mediaBetween=H.mediaBetween;exports.mediaDown=H.mediaDown;exports.mediaUp=H.mediaUp;exports.validation=H.index;exports.Autocomplete=d.Autocomplete;exports.Button=d.Button;exports.Checkbox=d.Checkbox;exports.CheckboxCard=d.CheckboxCard;exports.CheckboxGroup=d.CheckboxGroup;exports.Chip=d.Chip;exports.DatePicker=d.DatePicker;exports.FieldLabel=d.FieldLabel;exports.FieldMessage=d.FieldMessage;exports.Input=d.Input;exports.KeySymbol=d.KeySymbol;exports.KeysBindings=d.KeysBindings;exports.Modal=d.Modal;exports.MultiSelect=d.MultiSelect;exports.OtpCode=d.OtpCode;exports.Radio=d.Radio;exports.RadioCard=d.RadioCard;exports.RadioGroup=d.RadioGroup;exports.Select=d.Select;exports.Spinner=d.Spinner;exports.Tags=d.Tags;exports.Textarea=d.Textarea;exports.Toggle=d.Toggle;exports.ToggleCard=d.ToggleCard;exports.ToggleGroup=d.ToggleGroup;exports.formatDateGo=d.formatDateGo;exports.newClassNameGetter=C.newClassNameGetter;exports.Accordion=Ft;exports.Alert=Wt;exports.Avatar=xt;exports.AvatarGroup=to;exports.Badge=ao;exports.BreadcrumbItem=so;exports.Breadcrumbs=fo;exports.Card=vo;exports.CardBody=Co;exports.CardFooter=Lo;exports.CardHeader=jo;exports.ConfirmationProvider=Fo;exports.Container=Yo;exports.DateRange=qo;exports.Divider=Zo;exports.Drawer=or;exports.Dropdown=dr;exports.EmptyState=yr;exports.FieldRow=Sr;exports.FileUpload=Yr;exports.FileUploadItem=Wr;exports.GlobalStyle=Et;exports.Hashtag=Jr;exports.Heading=tn;exports.ImageCropper=si;exports.MenuButton=ui;exports.NotificationProvider=Oi;exports.NotifyConfirmationProvider=Ii;exports.Overline=Fi;exports.Pagination=rl;exports.Panel=cl;exports.PendingScreen=Tl;exports.Progress=Pl;exports.SaveProgressProvider=Fl;exports.ShellScreen=Vi;exports.Skeleton=Kl;exports.SplitFlapText=wt;exports.Stat=Ql;exports.StepLog=ba;exports.Stepper=Ca;exports.Tabs=ka;exports.Timeline=Ma;exports.ToastProvider=qa;exports.Tooltip=od;exports.User=ad;exports.formatFileSize=bt;exports.useConfirmation=_o;exports.useImageCropper=mt;exports.useNotification=vi;exports.useNotifyConfirmation=Ai;exports.useSaveProgress=_l;exports.useToastr=Ka;
1035
2152
  //# sourceMappingURL=index.cjs.map