@keboola/design 4.0.0 → 4.1.2

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.js CHANGED
@@ -1,45 +1,45 @@
1
1
  import { Slot, Root as Root$1, Slottable } from '@radix-ui/react-slot';
2
2
  export { Slot } from '@radix-ui/react-slot';
3
3
  import * as lucide_react_star from 'lucide-react';
4
- import { createContext, forwardRef, useMemo, useRef, useEffect, use, useState, useId, Fragment as Fragment$1, useCallback, Children, useLayoutEffect, useReducer, isValidElement } from 'react';
4
+ import React, { createContext, forwardRef, useMemo, useRef, useEffect, useImperativeHandle, Fragment, use, useState, useReducer, useCallback, useId, Children, useLayoutEffect, isValidElement } from 'react';
5
5
  import { clsx } from 'clsx';
6
6
  import { extendTailwindMerge } from 'tailwind-merge';
7
7
  import { Root as Root$6, Trigger, Portal, Content, Provider } from '@radix-ui/react-tooltip';
8
8
  import { cva } from 'class-variance-authority';
9
9
  import { keboolaLegacy, keboola, exampleCustomer, getBrand } from '@keboola/brand-registry';
10
10
  export { brandSchema, brands, exampleCustomer, getBrand, keboola, keboolaLegacy } from '@keboola/brand-registry';
11
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
11
+ import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
12
12
  import * as DropdownMenuPrimitive3 from '@radix-ui/react-dropdown-menu';
13
13
  import { Root, Group, Trigger as Trigger$4 } from '@radix-ui/react-dropdown-menu';
14
14
  import * as ScrollAreaPrimitive2 from '@radix-ui/react-scroll-area';
15
15
  import { Root as Root$7 } from '@radix-ui/react-toggle';
16
16
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
17
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
18
+ import { Root as Root$8, Trigger as Trigger$5, Portal as Portal$1, Content as Content$1, Cancel, Action, Overlay as Overlay$1, Title as Title$1 } from '@radix-ui/react-alert-dialog';
17
19
  import * as DialogPrimitive from '@radix-ui/react-dialog';
18
- import { Root as Root$8, Close, Trigger as Trigger$1, Portal as Portal$1, Content as Content$1, Overlay, Title } from '@radix-ui/react-dialog';
20
+ import { Root as Root$9, Close, Trigger as Trigger$1, Portal as Portal$2, Content as Content$2, Overlay, Title } from '@radix-ui/react-dialog';
19
21
  import { createPortal } from 'react-dom';
20
- import { Root as Root$2, Trigger as Trigger$2, Close as Close$1, Portal as Portal$2, Content as Content$2 } from '@radix-ui/react-popover';
21
- import { Root as Root$9, Trigger as Trigger$3, Portal as Portal$3, Content as Content$3 } from '@radix-ui/react-hover-card';
22
+ import { Root as Root$2, Trigger as Trigger$2, Close as Close$1, Portal as Portal$3, Content as Content$3 } from '@radix-ui/react-popover';
23
+ import { Root as Root$a, Trigger as Trigger$3, Portal as Portal$4, Content as Content$4 } from '@radix-ui/react-hover-card';
22
24
  import { Command as Command$1, CommandInput as CommandInput$1, defaultFilter, useCommandState } from 'cmdk';
23
25
  export { defaultFilter, useCommandState } from 'cmdk';
24
26
  import { getDefaultClassNames, DayPicker } from 'react-day-picker';
25
- import 'react-day-picker/src/style.css';
26
27
  import TextareaAutosize from 'react-textarea-autosize';
27
28
  import * as RLabel from '@radix-ui/react-label';
28
29
  import { Root as Root$3, Thumb } from '@radix-ui/react-switch';
29
30
  import * as RRadioGroup from '@radix-ui/react-radio-group';
30
31
  import { Item, Indicator as Indicator$2 } from '@radix-ui/react-radio-group';
31
32
  import * as RSeparator from '@radix-ui/react-separator';
32
- import { Root as Root$a, Track, Range, Thumb as Thumb$1 } from '@radix-ui/react-slider';
33
+ import { Root as Root$b, Track, Range, Thumb as Thumb$1 } from '@radix-ui/react-slider';
33
34
  import * as SelectPrimitive from '@radix-ui/react-select';
34
35
  import { Root as Root$5 } from '@radix-ui/react-select';
35
36
  import { Root as Root$4, Indicator } from '@radix-ui/react-checkbox';
36
37
  import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
37
38
  import { OTPInput, REGEXP_ONLY_DIGITS, OTPInputContext } from 'input-otp';
38
39
  export { REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from 'input-otp';
39
- import { useDropzone } from 'react-dropzone';
40
40
  import BoringAvatar from 'boring-avatars';
41
- import { Root as Root$b, Indicator as Indicator$1 } from '@radix-ui/react-progress';
42
- import { Root as Root$c, CollapsibleTrigger, Content as Content$4 } from '@radix-ui/react-collapsible';
41
+ import { Root as Root$c, Indicator as Indicator$1 } from '@radix-ui/react-progress';
42
+ import { Root as Root$d, CollapsibleTrigger, Content as Content$5 } from '@radix-ui/react-collapsible';
43
43
  import { toast as toast$1, Toaster as Toaster$1 } from 'sonner';
44
44
  import * as ResizablePrimitive from 'react-resizable-panels';
45
45
  import * as RadixAvatar from '@radix-ui/react-avatar';
@@ -49,10 +49,15 @@ import { diff3Merge } from 'node-diff3';
49
49
  import { createFormHookContexts, createFormHook } from '@tanstack/react-form';
50
50
  import DOMPurify from 'dompurify';
51
51
 
52
+ var __create = Object.create;
52
53
  var __defProp = Object.defineProperty;
53
54
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
54
55
  var __getOwnPropNames = Object.getOwnPropertyNames;
56
+ var __getProtoOf = Object.getPrototypeOf;
55
57
  var __hasOwnProp = Object.prototype.hasOwnProperty;
58
+ var __commonJS = (cb, mod) => function __require() {
59
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
60
+ };
56
61
  var __export = (target, all) => {
57
62
  for (var name in all)
58
63
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -66,6 +71,974 @@ var __copyProps = (to, from, except, desc) => {
66
71
  return to;
67
72
  };
68
73
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
74
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
75
+ // If the importer is in node compatibility mode or this is not an ESM
76
+ // file that has been converted to a CommonJS file using a Babel-
77
+ // compatible transform (i.e. "__esModule" has not been set), then set
78
+ // "default" to the CommonJS "module.exports" for node compatibility.
79
+ !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
80
+ mod
81
+ ));
82
+
83
+ // ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js
84
+ var require_react_is_production_min = __commonJS({
85
+ "../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js"(exports$1) {
86
+ var b = "function" === typeof Symbol && Symbol.for;
87
+ var c = b ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
88
+ var d = b ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
89
+ var e = b ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
90
+ var f = b ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
91
+ var g = b ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
92
+ var h = b ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
93
+ var k = b ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
94
+ var l = b ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
95
+ var m = b ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
96
+ var n = b ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
97
+ var p = b ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
98
+ var q = b ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
99
+ var r = b ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
100
+ var t = b ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
101
+ var v = b ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
102
+ var w = b ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
103
+ var x = b ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
104
+ var y = b ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
105
+ function z(a) {
106
+ if ("object" === typeof a && null !== a) {
107
+ var u = a.$$typeof;
108
+ switch (u) {
109
+ case c:
110
+ switch (a = a.type, a) {
111
+ case l:
112
+ case m:
113
+ case e:
114
+ case g:
115
+ case f:
116
+ case p:
117
+ return a;
118
+ default:
119
+ switch (a = a && a.$$typeof, a) {
120
+ case k:
121
+ case n:
122
+ case t:
123
+ case r:
124
+ case h:
125
+ return a;
126
+ default:
127
+ return u;
128
+ }
129
+ }
130
+ case d:
131
+ return u;
132
+ }
133
+ }
134
+ }
135
+ function A(a) {
136
+ return z(a) === m;
137
+ }
138
+ exports$1.AsyncMode = l;
139
+ exports$1.ConcurrentMode = m;
140
+ exports$1.ContextConsumer = k;
141
+ exports$1.ContextProvider = h;
142
+ exports$1.Element = c;
143
+ exports$1.ForwardRef = n;
144
+ exports$1.Fragment = e;
145
+ exports$1.Lazy = t;
146
+ exports$1.Memo = r;
147
+ exports$1.Portal = d;
148
+ exports$1.Profiler = g;
149
+ exports$1.StrictMode = f;
150
+ exports$1.Suspense = p;
151
+ exports$1.isAsyncMode = function(a) {
152
+ return A(a) || z(a) === l;
153
+ };
154
+ exports$1.isConcurrentMode = A;
155
+ exports$1.isContextConsumer = function(a) {
156
+ return z(a) === k;
157
+ };
158
+ exports$1.isContextProvider = function(a) {
159
+ return z(a) === h;
160
+ };
161
+ exports$1.isElement = function(a) {
162
+ return "object" === typeof a && null !== a && a.$$typeof === c;
163
+ };
164
+ exports$1.isForwardRef = function(a) {
165
+ return z(a) === n;
166
+ };
167
+ exports$1.isFragment = function(a) {
168
+ return z(a) === e;
169
+ };
170
+ exports$1.isLazy = function(a) {
171
+ return z(a) === t;
172
+ };
173
+ exports$1.isMemo = function(a) {
174
+ return z(a) === r;
175
+ };
176
+ exports$1.isPortal = function(a) {
177
+ return z(a) === d;
178
+ };
179
+ exports$1.isProfiler = function(a) {
180
+ return z(a) === g;
181
+ };
182
+ exports$1.isStrictMode = function(a) {
183
+ return z(a) === f;
184
+ };
185
+ exports$1.isSuspense = function(a) {
186
+ return z(a) === p;
187
+ };
188
+ exports$1.isValidElementType = function(a) {
189
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
190
+ };
191
+ exports$1.typeOf = z;
192
+ }
193
+ });
194
+
195
+ // ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js
196
+ var require_react_is_development = __commonJS({
197
+ "../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js"(exports$1) {
198
+ if (process.env.NODE_ENV !== "production") {
199
+ (function() {
200
+ var hasSymbol = typeof Symbol === "function" && Symbol.for;
201
+ var REACT_ELEMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
202
+ var REACT_PORTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
203
+ var REACT_FRAGMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
204
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
205
+ var REACT_PROFILER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
206
+ var REACT_PROVIDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
207
+ var REACT_CONTEXT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
208
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
209
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
210
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
211
+ var REACT_SUSPENSE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
212
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
213
+ var REACT_MEMO_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
214
+ var REACT_LAZY_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
215
+ var REACT_BLOCK_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
216
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
217
+ var REACT_RESPONDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
218
+ var REACT_SCOPE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
219
+ function isValidElementType(type) {
220
+ return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
221
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
222
+ }
223
+ function typeOf(object) {
224
+ if (typeof object === "object" && object !== null) {
225
+ var $$typeof = object.$$typeof;
226
+ switch ($$typeof) {
227
+ case REACT_ELEMENT_TYPE:
228
+ var type = object.type;
229
+ switch (type) {
230
+ case REACT_ASYNC_MODE_TYPE:
231
+ case REACT_CONCURRENT_MODE_TYPE:
232
+ case REACT_FRAGMENT_TYPE:
233
+ case REACT_PROFILER_TYPE:
234
+ case REACT_STRICT_MODE_TYPE:
235
+ case REACT_SUSPENSE_TYPE:
236
+ return type;
237
+ default:
238
+ var $$typeofType = type && type.$$typeof;
239
+ switch ($$typeofType) {
240
+ case REACT_CONTEXT_TYPE:
241
+ case REACT_FORWARD_REF_TYPE:
242
+ case REACT_LAZY_TYPE:
243
+ case REACT_MEMO_TYPE:
244
+ case REACT_PROVIDER_TYPE:
245
+ return $$typeofType;
246
+ default:
247
+ return $$typeof;
248
+ }
249
+ }
250
+ case REACT_PORTAL_TYPE:
251
+ return $$typeof;
252
+ }
253
+ }
254
+ return void 0;
255
+ }
256
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
257
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
258
+ var ContextConsumer = REACT_CONTEXT_TYPE;
259
+ var ContextProvider = REACT_PROVIDER_TYPE;
260
+ var Element = REACT_ELEMENT_TYPE;
261
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
262
+ var Fragment14 = REACT_FRAGMENT_TYPE;
263
+ var Lazy = REACT_LAZY_TYPE;
264
+ var Memo = REACT_MEMO_TYPE;
265
+ var Portal10 = REACT_PORTAL_TYPE;
266
+ var Profiler = REACT_PROFILER_TYPE;
267
+ var StrictMode = REACT_STRICT_MODE_TYPE;
268
+ var Suspense = REACT_SUSPENSE_TYPE;
269
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
270
+ function isAsyncMode(object) {
271
+ {
272
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
273
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
274
+ console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
275
+ }
276
+ }
277
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
278
+ }
279
+ function isConcurrentMode(object) {
280
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
281
+ }
282
+ function isContextConsumer(object) {
283
+ return typeOf(object) === REACT_CONTEXT_TYPE;
284
+ }
285
+ function isContextProvider(object) {
286
+ return typeOf(object) === REACT_PROVIDER_TYPE;
287
+ }
288
+ function isElement(object) {
289
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
290
+ }
291
+ function isForwardRef(object) {
292
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
293
+ }
294
+ function isFragment(object) {
295
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
296
+ }
297
+ function isLazy(object) {
298
+ return typeOf(object) === REACT_LAZY_TYPE;
299
+ }
300
+ function isMemo(object) {
301
+ return typeOf(object) === REACT_MEMO_TYPE;
302
+ }
303
+ function isPortal(object) {
304
+ return typeOf(object) === REACT_PORTAL_TYPE;
305
+ }
306
+ function isProfiler(object) {
307
+ return typeOf(object) === REACT_PROFILER_TYPE;
308
+ }
309
+ function isStrictMode(object) {
310
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
311
+ }
312
+ function isSuspense(object) {
313
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
314
+ }
315
+ exports$1.AsyncMode = AsyncMode;
316
+ exports$1.ConcurrentMode = ConcurrentMode;
317
+ exports$1.ContextConsumer = ContextConsumer;
318
+ exports$1.ContextProvider = ContextProvider;
319
+ exports$1.Element = Element;
320
+ exports$1.ForwardRef = ForwardRef;
321
+ exports$1.Fragment = Fragment14;
322
+ exports$1.Lazy = Lazy;
323
+ exports$1.Memo = Memo;
324
+ exports$1.Portal = Portal10;
325
+ exports$1.Profiler = Profiler;
326
+ exports$1.StrictMode = StrictMode;
327
+ exports$1.Suspense = Suspense;
328
+ exports$1.isAsyncMode = isAsyncMode;
329
+ exports$1.isConcurrentMode = isConcurrentMode;
330
+ exports$1.isContextConsumer = isContextConsumer;
331
+ exports$1.isContextProvider = isContextProvider;
332
+ exports$1.isElement = isElement;
333
+ exports$1.isForwardRef = isForwardRef;
334
+ exports$1.isFragment = isFragment;
335
+ exports$1.isLazy = isLazy;
336
+ exports$1.isMemo = isMemo;
337
+ exports$1.isPortal = isPortal;
338
+ exports$1.isProfiler = isProfiler;
339
+ exports$1.isStrictMode = isStrictMode;
340
+ exports$1.isSuspense = isSuspense;
341
+ exports$1.isValidElementType = isValidElementType;
342
+ exports$1.typeOf = typeOf;
343
+ })();
344
+ }
345
+ }
346
+ });
347
+
348
+ // ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js
349
+ var require_react_is = __commonJS({
350
+ "../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js"(exports$1, module) {
351
+ if (process.env.NODE_ENV === "production") {
352
+ module.exports = require_react_is_production_min();
353
+ } else {
354
+ module.exports = require_react_is_development();
355
+ }
356
+ }
357
+ });
358
+
359
+ // ../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js
360
+ var require_object_assign = __commonJS({
361
+ "../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js"(exports$1, module) {
362
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
363
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
364
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
365
+ function toObject(val) {
366
+ if (val === null || val === void 0) {
367
+ throw new TypeError("Object.assign cannot be called with null or undefined");
368
+ }
369
+ return Object(val);
370
+ }
371
+ function shouldUseNative() {
372
+ try {
373
+ if (!Object.assign) {
374
+ return false;
375
+ }
376
+ var test1 = new String("abc");
377
+ test1[5] = "de";
378
+ if (Object.getOwnPropertyNames(test1)[0] === "5") {
379
+ return false;
380
+ }
381
+ var test2 = {};
382
+ for (var i = 0; i < 10; i++) {
383
+ test2["_" + String.fromCharCode(i)] = i;
384
+ }
385
+ var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
386
+ return test2[n];
387
+ });
388
+ if (order2.join("") !== "0123456789") {
389
+ return false;
390
+ }
391
+ var test3 = {};
392
+ "abcdefghijklmnopqrst".split("").forEach(function(letter) {
393
+ test3[letter] = letter;
394
+ });
395
+ if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
396
+ return false;
397
+ }
398
+ return true;
399
+ } catch (err) {
400
+ return false;
401
+ }
402
+ }
403
+ module.exports = shouldUseNative() ? Object.assign : function(target, source) {
404
+ var from;
405
+ var to = toObject(target);
406
+ var symbols;
407
+ for (var s = 1; s < arguments.length; s++) {
408
+ from = Object(arguments[s]);
409
+ for (var key in from) {
410
+ if (hasOwnProperty.call(from, key)) {
411
+ to[key] = from[key];
412
+ }
413
+ }
414
+ if (getOwnPropertySymbols) {
415
+ symbols = getOwnPropertySymbols(from);
416
+ for (var i = 0; i < symbols.length; i++) {
417
+ if (propIsEnumerable.call(from, symbols[i])) {
418
+ to[symbols[i]] = from[symbols[i]];
419
+ }
420
+ }
421
+ }
422
+ }
423
+ return to;
424
+ };
425
+ }
426
+ });
427
+
428
+ // ../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js
429
+ var require_ReactPropTypesSecret = __commonJS({
430
+ "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports$1, module) {
431
+ var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
432
+ module.exports = ReactPropTypesSecret;
433
+ }
434
+ });
435
+
436
+ // ../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js
437
+ var require_has = __commonJS({
438
+ "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js"(exports$1, module) {
439
+ module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
440
+ }
441
+ });
442
+
443
+ // ../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js
444
+ var require_checkPropTypes = __commonJS({
445
+ "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js"(exports$1, module) {
446
+ var printWarning = function() {
447
+ };
448
+ if (process.env.NODE_ENV !== "production") {
449
+ ReactPropTypesSecret = require_ReactPropTypesSecret();
450
+ loggedTypeFailures = {};
451
+ has = require_has();
452
+ printWarning = function(text) {
453
+ var message = "Warning: " + text;
454
+ if (typeof console !== "undefined") {
455
+ console.error(message);
456
+ }
457
+ try {
458
+ throw new Error(message);
459
+ } catch (x) {
460
+ }
461
+ };
462
+ }
463
+ var ReactPropTypesSecret;
464
+ var loggedTypeFailures;
465
+ var has;
466
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
467
+ if (process.env.NODE_ENV !== "production") {
468
+ for (var typeSpecName in typeSpecs) {
469
+ if (has(typeSpecs, typeSpecName)) {
470
+ var error;
471
+ try {
472
+ if (typeof typeSpecs[typeSpecName] !== "function") {
473
+ var err = Error(
474
+ (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
475
+ );
476
+ err.name = "Invariant Violation";
477
+ throw err;
478
+ }
479
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
480
+ } catch (ex) {
481
+ error = ex;
482
+ }
483
+ if (error && !(error instanceof Error)) {
484
+ printWarning(
485
+ (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
486
+ );
487
+ }
488
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
489
+ loggedTypeFailures[error.message] = true;
490
+ var stack = getStack ? getStack() : "";
491
+ printWarning(
492
+ "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
493
+ );
494
+ }
495
+ }
496
+ }
497
+ }
498
+ }
499
+ checkPropTypes.resetWarningCache = function() {
500
+ if (process.env.NODE_ENV !== "production") {
501
+ loggedTypeFailures = {};
502
+ }
503
+ };
504
+ module.exports = checkPropTypes;
505
+ }
506
+ });
507
+
508
+ // ../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js
509
+ var require_factoryWithTypeCheckers = __commonJS({
510
+ "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js"(exports$1, module) {
511
+ var ReactIs = require_react_is();
512
+ var assign = require_object_assign();
513
+ var ReactPropTypesSecret = require_ReactPropTypesSecret();
514
+ var has = require_has();
515
+ var checkPropTypes = require_checkPropTypes();
516
+ var printWarning = function() {
517
+ };
518
+ if (process.env.NODE_ENV !== "production") {
519
+ printWarning = function(text) {
520
+ var message = "Warning: " + text;
521
+ if (typeof console !== "undefined") {
522
+ console.error(message);
523
+ }
524
+ try {
525
+ throw new Error(message);
526
+ } catch (x) {
527
+ }
528
+ };
529
+ }
530
+ function emptyFunctionThatReturnsNull() {
531
+ return null;
532
+ }
533
+ module.exports = function(isValidElement3, throwOnDirectAccess) {
534
+ var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
535
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
536
+ function getIteratorFn(maybeIterable) {
537
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
538
+ if (typeof iteratorFn === "function") {
539
+ return iteratorFn;
540
+ }
541
+ }
542
+ var ANONYMOUS = "<<anonymous>>";
543
+ var ReactPropTypes = {
544
+ array: createPrimitiveTypeChecker("array"),
545
+ bigint: createPrimitiveTypeChecker("bigint"),
546
+ bool: createPrimitiveTypeChecker("boolean"),
547
+ func: createPrimitiveTypeChecker("function"),
548
+ number: createPrimitiveTypeChecker("number"),
549
+ object: createPrimitiveTypeChecker("object"),
550
+ string: createPrimitiveTypeChecker("string"),
551
+ symbol: createPrimitiveTypeChecker("symbol"),
552
+ any: createAnyTypeChecker(),
553
+ arrayOf: createArrayOfTypeChecker,
554
+ element: createElementTypeChecker(),
555
+ elementType: createElementTypeTypeChecker(),
556
+ instanceOf: createInstanceTypeChecker,
557
+ node: createNodeChecker(),
558
+ objectOf: createObjectOfTypeChecker,
559
+ oneOf: createEnumTypeChecker,
560
+ oneOfType: createUnionTypeChecker,
561
+ shape: createShapeTypeChecker,
562
+ exact: createStrictShapeTypeChecker
563
+ };
564
+ function is(x, y) {
565
+ if (x === y) {
566
+ return x !== 0 || 1 / x === 1 / y;
567
+ } else {
568
+ return x !== x && y !== y;
569
+ }
570
+ }
571
+ function PropTypeError(message, data) {
572
+ this.message = message;
573
+ this.data = data && typeof data === "object" ? data : {};
574
+ this.stack = "";
575
+ }
576
+ PropTypeError.prototype = Error.prototype;
577
+ function createChainableTypeChecker(validate) {
578
+ if (process.env.NODE_ENV !== "production") {
579
+ var manualPropTypeCallCache = {};
580
+ var manualPropTypeWarningCount = 0;
581
+ }
582
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
583
+ componentName = componentName || ANONYMOUS;
584
+ propFullName = propFullName || propName;
585
+ if (secret !== ReactPropTypesSecret) {
586
+ if (throwOnDirectAccess) {
587
+ var err = new Error(
588
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
589
+ );
590
+ err.name = "Invariant Violation";
591
+ throw err;
592
+ } else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
593
+ var cacheKey = componentName + ":" + propName;
594
+ if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
595
+ manualPropTypeWarningCount < 3) {
596
+ printWarning(
597
+ "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
598
+ );
599
+ manualPropTypeCallCache[cacheKey] = true;
600
+ manualPropTypeWarningCount++;
601
+ }
602
+ }
603
+ }
604
+ if (props[propName] == null) {
605
+ if (isRequired) {
606
+ if (props[propName] === null) {
607
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
608
+ }
609
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
610
+ }
611
+ return null;
612
+ } else {
613
+ return validate(props, propName, componentName, location, propFullName);
614
+ }
615
+ }
616
+ var chainedCheckType = checkType.bind(null, false);
617
+ chainedCheckType.isRequired = checkType.bind(null, true);
618
+ return chainedCheckType;
619
+ }
620
+ function createPrimitiveTypeChecker(expectedType) {
621
+ function validate(props, propName, componentName, location, propFullName, secret) {
622
+ var propValue = props[propName];
623
+ var propType = getPropType(propValue);
624
+ if (propType !== expectedType) {
625
+ var preciseType = getPreciseType(propValue);
626
+ return new PropTypeError(
627
+ "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
628
+ { expectedType }
629
+ );
630
+ }
631
+ return null;
632
+ }
633
+ return createChainableTypeChecker(validate);
634
+ }
635
+ function createAnyTypeChecker() {
636
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
637
+ }
638
+ function createArrayOfTypeChecker(typeChecker) {
639
+ function validate(props, propName, componentName, location, propFullName) {
640
+ if (typeof typeChecker !== "function") {
641
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
642
+ }
643
+ var propValue = props[propName];
644
+ if (!Array.isArray(propValue)) {
645
+ var propType = getPropType(propValue);
646
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
647
+ }
648
+ for (var i = 0; i < propValue.length; i++) {
649
+ var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
650
+ if (error instanceof Error) {
651
+ return error;
652
+ }
653
+ }
654
+ return null;
655
+ }
656
+ return createChainableTypeChecker(validate);
657
+ }
658
+ function createElementTypeChecker() {
659
+ function validate(props, propName, componentName, location, propFullName) {
660
+ var propValue = props[propName];
661
+ if (!isValidElement3(propValue)) {
662
+ var propType = getPropType(propValue);
663
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
664
+ }
665
+ return null;
666
+ }
667
+ return createChainableTypeChecker(validate);
668
+ }
669
+ function createElementTypeTypeChecker() {
670
+ function validate(props, propName, componentName, location, propFullName) {
671
+ var propValue = props[propName];
672
+ if (!ReactIs.isValidElementType(propValue)) {
673
+ var propType = getPropType(propValue);
674
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
675
+ }
676
+ return null;
677
+ }
678
+ return createChainableTypeChecker(validate);
679
+ }
680
+ function createInstanceTypeChecker(expectedClass) {
681
+ function validate(props, propName, componentName, location, propFullName) {
682
+ if (!(props[propName] instanceof expectedClass)) {
683
+ var expectedClassName = expectedClass.name || ANONYMOUS;
684
+ var actualClassName = getClassName(props[propName]);
685
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
686
+ }
687
+ return null;
688
+ }
689
+ return createChainableTypeChecker(validate);
690
+ }
691
+ function createEnumTypeChecker(expectedValues) {
692
+ if (!Array.isArray(expectedValues)) {
693
+ if (process.env.NODE_ENV !== "production") {
694
+ if (arguments.length > 1) {
695
+ printWarning(
696
+ "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
697
+ );
698
+ } else {
699
+ printWarning("Invalid argument supplied to oneOf, expected an array.");
700
+ }
701
+ }
702
+ return emptyFunctionThatReturnsNull;
703
+ }
704
+ function validate(props, propName, componentName, location, propFullName) {
705
+ var propValue = props[propName];
706
+ for (var i = 0; i < expectedValues.length; i++) {
707
+ if (is(propValue, expectedValues[i])) {
708
+ return null;
709
+ }
710
+ }
711
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
712
+ var type = getPreciseType(value);
713
+ if (type === "symbol") {
714
+ return String(value);
715
+ }
716
+ return value;
717
+ });
718
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
719
+ }
720
+ return createChainableTypeChecker(validate);
721
+ }
722
+ function createObjectOfTypeChecker(typeChecker) {
723
+ function validate(props, propName, componentName, location, propFullName) {
724
+ if (typeof typeChecker !== "function") {
725
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
726
+ }
727
+ var propValue = props[propName];
728
+ var propType = getPropType(propValue);
729
+ if (propType !== "object") {
730
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
731
+ }
732
+ for (var key in propValue) {
733
+ if (has(propValue, key)) {
734
+ var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
735
+ if (error instanceof Error) {
736
+ return error;
737
+ }
738
+ }
739
+ }
740
+ return null;
741
+ }
742
+ return createChainableTypeChecker(validate);
743
+ }
744
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
745
+ if (!Array.isArray(arrayOfTypeCheckers)) {
746
+ process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
747
+ return emptyFunctionThatReturnsNull;
748
+ }
749
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
750
+ var checker = arrayOfTypeCheckers[i];
751
+ if (typeof checker !== "function") {
752
+ printWarning(
753
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
754
+ );
755
+ return emptyFunctionThatReturnsNull;
756
+ }
757
+ }
758
+ function validate(props, propName, componentName, location, propFullName) {
759
+ var expectedTypes = [];
760
+ for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
761
+ var checker2 = arrayOfTypeCheckers[i2];
762
+ var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
763
+ if (checkerResult == null) {
764
+ return null;
765
+ }
766
+ if (checkerResult.data && has(checkerResult.data, "expectedType")) {
767
+ expectedTypes.push(checkerResult.data.expectedType);
768
+ }
769
+ }
770
+ var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
771
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
772
+ }
773
+ return createChainableTypeChecker(validate);
774
+ }
775
+ function createNodeChecker() {
776
+ function validate(props, propName, componentName, location, propFullName) {
777
+ if (!isNode(props[propName])) {
778
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
779
+ }
780
+ return null;
781
+ }
782
+ return createChainableTypeChecker(validate);
783
+ }
784
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
785
+ return new PropTypeError(
786
+ (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
787
+ );
788
+ }
789
+ function createShapeTypeChecker(shapeTypes) {
790
+ function validate(props, propName, componentName, location, propFullName) {
791
+ var propValue = props[propName];
792
+ var propType = getPropType(propValue);
793
+ if (propType !== "object") {
794
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
795
+ }
796
+ for (var key in shapeTypes) {
797
+ var checker = shapeTypes[key];
798
+ if (typeof checker !== "function") {
799
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
800
+ }
801
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
802
+ if (error) {
803
+ return error;
804
+ }
805
+ }
806
+ return null;
807
+ }
808
+ return createChainableTypeChecker(validate);
809
+ }
810
+ function createStrictShapeTypeChecker(shapeTypes) {
811
+ function validate(props, propName, componentName, location, propFullName) {
812
+ var propValue = props[propName];
813
+ var propType = getPropType(propValue);
814
+ if (propType !== "object") {
815
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
816
+ }
817
+ var allKeys = assign({}, props[propName], shapeTypes);
818
+ for (var key in allKeys) {
819
+ var checker = shapeTypes[key];
820
+ if (has(shapeTypes, key) && typeof checker !== "function") {
821
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
822
+ }
823
+ if (!checker) {
824
+ return new PropTypeError(
825
+ "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
826
+ );
827
+ }
828
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
829
+ if (error) {
830
+ return error;
831
+ }
832
+ }
833
+ return null;
834
+ }
835
+ return createChainableTypeChecker(validate);
836
+ }
837
+ function isNode(propValue) {
838
+ switch (typeof propValue) {
839
+ case "number":
840
+ case "string":
841
+ case "undefined":
842
+ return true;
843
+ case "boolean":
844
+ return !propValue;
845
+ case "object":
846
+ if (Array.isArray(propValue)) {
847
+ return propValue.every(isNode);
848
+ }
849
+ if (propValue === null || isValidElement3(propValue)) {
850
+ return true;
851
+ }
852
+ var iteratorFn = getIteratorFn(propValue);
853
+ if (iteratorFn) {
854
+ var iterator = iteratorFn.call(propValue);
855
+ var step;
856
+ if (iteratorFn !== propValue.entries) {
857
+ while (!(step = iterator.next()).done) {
858
+ if (!isNode(step.value)) {
859
+ return false;
860
+ }
861
+ }
862
+ } else {
863
+ while (!(step = iterator.next()).done) {
864
+ var entry = step.value;
865
+ if (entry) {
866
+ if (!isNode(entry[1])) {
867
+ return false;
868
+ }
869
+ }
870
+ }
871
+ }
872
+ } else {
873
+ return false;
874
+ }
875
+ return true;
876
+ default:
877
+ return false;
878
+ }
879
+ }
880
+ function isSymbol(propType, propValue) {
881
+ if (propType === "symbol") {
882
+ return true;
883
+ }
884
+ if (!propValue) {
885
+ return false;
886
+ }
887
+ if (propValue["@@toStringTag"] === "Symbol") {
888
+ return true;
889
+ }
890
+ if (typeof Symbol === "function" && propValue instanceof Symbol) {
891
+ return true;
892
+ }
893
+ return false;
894
+ }
895
+ function getPropType(propValue) {
896
+ var propType = typeof propValue;
897
+ if (Array.isArray(propValue)) {
898
+ return "array";
899
+ }
900
+ if (propValue instanceof RegExp) {
901
+ return "object";
902
+ }
903
+ if (isSymbol(propType, propValue)) {
904
+ return "symbol";
905
+ }
906
+ return propType;
907
+ }
908
+ function getPreciseType(propValue) {
909
+ if (typeof propValue === "undefined" || propValue === null) {
910
+ return "" + propValue;
911
+ }
912
+ var propType = getPropType(propValue);
913
+ if (propType === "object") {
914
+ if (propValue instanceof Date) {
915
+ return "date";
916
+ } else if (propValue instanceof RegExp) {
917
+ return "regexp";
918
+ }
919
+ }
920
+ return propType;
921
+ }
922
+ function getPostfixForTypeWarning(value) {
923
+ var type = getPreciseType(value);
924
+ switch (type) {
925
+ case "array":
926
+ case "object":
927
+ return "an " + type;
928
+ case "boolean":
929
+ case "date":
930
+ case "regexp":
931
+ return "a " + type;
932
+ default:
933
+ return type;
934
+ }
935
+ }
936
+ function getClassName(propValue) {
937
+ if (!propValue.constructor || !propValue.constructor.name) {
938
+ return ANONYMOUS;
939
+ }
940
+ return propValue.constructor.name;
941
+ }
942
+ ReactPropTypes.checkPropTypes = checkPropTypes;
943
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
944
+ ReactPropTypes.PropTypes = ReactPropTypes;
945
+ return ReactPropTypes;
946
+ };
947
+ }
948
+ });
949
+
950
+ // ../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js
951
+ var require_factoryWithThrowingShims = __commonJS({
952
+ "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js"(exports$1, module) {
953
+ var ReactPropTypesSecret = require_ReactPropTypesSecret();
954
+ function emptyFunction() {
955
+ }
956
+ function emptyFunctionWithReset() {
957
+ }
958
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
959
+ module.exports = function() {
960
+ function shim(props, propName, componentName, location, propFullName, secret) {
961
+ if (secret === ReactPropTypesSecret) {
962
+ return;
963
+ }
964
+ var err = new Error(
965
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
966
+ );
967
+ err.name = "Invariant Violation";
968
+ throw err;
969
+ }
970
+ shim.isRequired = shim;
971
+ function getShim() {
972
+ return shim;
973
+ }
974
+ var ReactPropTypes = {
975
+ array: shim,
976
+ bigint: shim,
977
+ bool: shim,
978
+ func: shim,
979
+ number: shim,
980
+ object: shim,
981
+ string: shim,
982
+ symbol: shim,
983
+ any: shim,
984
+ arrayOf: getShim,
985
+ element: shim,
986
+ elementType: shim,
987
+ instanceOf: getShim,
988
+ node: shim,
989
+ objectOf: getShim,
990
+ oneOf: getShim,
991
+ oneOfType: getShim,
992
+ shape: getShim,
993
+ exact: getShim,
994
+ checkPropTypes: emptyFunctionWithReset,
995
+ resetWarningCache: emptyFunction
996
+ };
997
+ ReactPropTypes.PropTypes = ReactPropTypes;
998
+ return ReactPropTypes;
999
+ };
1000
+ }
1001
+ });
1002
+
1003
+ // ../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js
1004
+ var require_prop_types = __commonJS({
1005
+ "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js"(exports$1, module) {
1006
+ if (process.env.NODE_ENV !== "production") {
1007
+ ReactIs = require_react_is();
1008
+ throwOnDirectAccess = true;
1009
+ module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
1010
+ } else {
1011
+ module.exports = require_factoryWithThrowingShims()();
1012
+ }
1013
+ var ReactIs;
1014
+ var throwOnDirectAccess;
1015
+ }
1016
+ });
1017
+
1018
+ // ../../node_modules/.pnpm/attr-accept@2.2.2/node_modules/attr-accept/dist/es/index.js
1019
+ var require_es = __commonJS({
1020
+ "../../node_modules/.pnpm/attr-accept@2.2.2/node_modules/attr-accept/dist/es/index.js"(exports$1) {
1021
+ exports$1.__esModule = true;
1022
+ exports$1.default = function(file, acceptedFiles) {
1023
+ if (file && acceptedFiles) {
1024
+ var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(",");
1025
+ var fileName = file.name || "";
1026
+ var mimeType = (file.type || "").toLowerCase();
1027
+ var baseMimeType = mimeType.replace(/\/.*$/, "");
1028
+ return acceptedFilesArray.some(function(type) {
1029
+ var validType = type.trim().toLowerCase();
1030
+ if (validType.charAt(0) === ".") {
1031
+ return fileName.toLowerCase().endsWith(validType);
1032
+ } else if (validType.endsWith("/*")) {
1033
+ return baseMimeType === validType.replace(/\/.*$/, "");
1034
+ }
1035
+ return mimeType === validType;
1036
+ });
1037
+ }
1038
+ return true;
1039
+ };
1040
+ }
1041
+ });
69
1042
 
70
1043
  // src/icons/index.ts
71
1044
  var icons_exports = {};
@@ -195,7 +1168,6 @@ var tooltipVariants = cva(
195
1168
  var TooltipContent = ({
196
1169
  className,
197
1170
  variant,
198
- argo,
199
1171
  keepOpenOnPointerDownOutside = false,
200
1172
  children,
201
1173
  onPointerDownOutside,
@@ -206,7 +1178,7 @@ var TooltipContent = ({
206
1178
  ...rest
207
1179
  }) => {
208
1180
  const isLegacy = useIsLegacyBrand();
209
- const renderArgo = !isLegacy || argo === true;
1181
+ const renderArgo = !isLegacy;
210
1182
  const handlePointerDownOutside = (event) => {
211
1183
  if (keepOpenOnPointerDownOutside) event.preventDefault();
212
1184
  onPointerDownOutside?.(event);
@@ -276,7 +1248,6 @@ var Tooltip = ({
276
1248
  className,
277
1249
  keepOpenOnTriggerClick = false,
278
1250
  variant,
279
- argo,
280
1251
  placement = "right",
281
1252
  forceHide = false,
282
1253
  forceShow = false,
@@ -315,7 +1286,6 @@ var Tooltip = ({
315
1286
  {
316
1287
  className,
317
1288
  variant: resolvedVariant,
318
- argo,
319
1289
  placement,
320
1290
  keepOpenOnPointerDownOutside: keepOpenOnTriggerClick,
321
1291
  children: tooltip
@@ -700,14 +1670,13 @@ var Button = ({
700
1670
  isLoading = false,
701
1671
  asChild = false,
702
1672
  onClick,
703
- argo = false,
704
1673
  variant = "primary",
705
1674
  size = "medium",
706
1675
  block = false,
707
1676
  ...buttonProps
708
1677
  }) => {
709
1678
  const isLegacy = useIsLegacyBrand();
710
- const renderArgo = !isLegacy || argo;
1679
+ const renderArgo = !isLegacy;
711
1680
  const Comp = asChild ? Root$1 : "button";
712
1681
  const isIconOnly = String(size).startsWith("icon");
713
1682
  const classNames = renderArgo ? argoVariants({ variant, size, block, className }) : variants({ size, variant, block, className });
@@ -1130,7 +2099,7 @@ var ScrollArea = ({
1130
2099
  children
1131
2100
  }
1132
2101
  ),
1133
- orientation ? /* @__PURE__ */ jsx(ScrollBar, { className: scrollBarClassName, orientation }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2102
+ orientation ? /* @__PURE__ */ jsx(ScrollBar, { className: scrollBarClassName, orientation }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
1134
2103
  /* @__PURE__ */ jsx(ScrollBar, { className: scrollBarClassName, orientation: "vertical" }),
1135
2104
  /* @__PURE__ */ jsx(ScrollBar, { className: scrollBarClassName, orientation: "horizontal" })
1136
2105
  ] }),
@@ -1381,11 +2350,10 @@ var DropdownMenuTrigger = ({
1381
2350
  var DropdownMenu = ({
1382
2351
  // change a default value to false, for modal property, as it is not used in most cases
1383
2352
  modal = false,
1384
- variant,
1385
2353
  ...props
1386
2354
  }) => {
1387
2355
  const isLegacy = useIsLegacyBrand();
1388
- const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : "default";
2356
+ const effectiveVariant = !isLegacy ? "argo" : "default";
1389
2357
  const contextValue = useMemo(() => ({ variant: effectiveVariant }), [effectiveVariant]);
1390
2358
  return /* @__PURE__ */ jsx(DropdownMenuContext, { value: contextValue, children: /* @__PURE__ */ jsx(Root, { ...props, modal }) });
1391
2359
  };
@@ -1415,42 +2383,20 @@ var SplitButtonBase = ({
1415
2383
  size = "medium",
1416
2384
  isActionsOpen,
1417
2385
  onActionsOpenChange,
1418
- argo = false,
1419
2386
  icon,
1420
2387
  children,
1421
2388
  ...rest
1422
- }) => {
1423
- const isLegacy = useIsLegacyBrand();
1424
- const renderArgo = !isLegacy || argo;
1425
- return /* @__PURE__ */ jsxs(ButtonGroup, { space: "compact", children: [
1426
- /* @__PURE__ */ jsxs(Button, { ...rest, ref, disabled, variant, size, argo, children: [
1427
- !rest.isLoading && icon,
1428
- children
1429
- ] }),
1430
- actions && /* @__PURE__ */ jsxs(
1431
- DropdownMenu,
1432
- {
1433
- open: isActionsOpen,
1434
- onOpenChange: onActionsOpenChange,
1435
- variant: renderArgo ? "argo" : "default",
1436
- children: [
1437
- /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ jsx(
1438
- Button,
1439
- {
1440
- argo,
1441
- size: iconSizeMap[size],
1442
- variant,
1443
- "aria-label": "Additional actions",
1444
- children: /* @__PURE__ */ jsx(icons_exports.ChevronDown, { className: "tw-size-5" })
1445
- }
1446
- ) }),
1447
- /* @__PURE__ */ jsx(DropdownMenu.Content, { align: "end", children: actions })
1448
- ]
1449
- }
1450
- )
1451
- ] });
1452
- };
1453
- var SplitButton = Object.assign(SplitButtonBase, {
2389
+ }) => /* @__PURE__ */ jsxs(ButtonGroup, { space: "compact", children: [
2390
+ /* @__PURE__ */ jsxs(Button, { ...rest, ref, disabled, variant, size, children: [
2391
+ !rest.isLoading && icon,
2392
+ children
2393
+ ] }),
2394
+ actions && /* @__PURE__ */ jsxs(DropdownMenu, { open: isActionsOpen, onOpenChange: onActionsOpenChange, children: [
2395
+ /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ jsx(Button, { size: iconSizeMap[size], variant, "aria-label": "Additional actions", children: /* @__PURE__ */ jsx(icons_exports.ChevronDown, { className: "tw-size-5" }) }) }),
2396
+ /* @__PURE__ */ jsx(DropdownMenu.Content, { align: "end", children: actions })
2397
+ ] })
2398
+ ] });
2399
+ var SplitButton = Object.assign(SplitButtonBase, {
1454
2400
  Action: DropdownMenu.Item,
1455
2401
  Actions: DropdownMenu.Group
1456
2402
  });
@@ -1582,33 +2528,6 @@ var toggleVariants = cva(
1582
2528
  // hover on pressed state
1583
2529
  "not-disabled:hover:aria-pressed:tw-bg-secondary-200",
1584
2530
  "[&_svg]:not-disabled:hover:aria-pressed:tw-text-secondary-600"
1585
- ],
1586
- argo: [
1587
- // chrome — semantic tokens, opt-in via variant="argo"
1588
- "tw-border-border",
1589
- "tw-rounded-lg",
1590
- "tw-text-foreground",
1591
- // typography — override base uppercase / tw-text-xs / tracking from outer class list
1592
- // so argo matches `Button argo` (sentence case, sm text)
1593
- "tw-normal-case",
1594
- "tw-tracking-normal",
1595
- "tw-text-sm",
1596
- // default state - transparent background
1597
- "tw-bg-transparent",
1598
- "[&_svg]:tw-text-muted-foreground",
1599
- // hover state (off only — explicit so pressed doesn't double-up) — muted bg
1600
- // is visibly subtler than the accent pressed bg, so hover and active read distinct.
1601
- "not-disabled:hover:tw-border-border",
1602
- "data-[state=off]:not-disabled:hover:tw-bg-muted",
1603
- "data-[state=off]:not-disabled:hover:[&_svg]:tw-text-primary",
1604
- // pressed state — stronger accent bg; hover-on keeps the same colour to avoid flicker
1605
- "data-[state=on]:tw-bg-accent",
1606
- "data-[state=on]:[&_svg]:tw-text-primary",
1607
- // focus-visible ring (overrides base outline + shadow)
1608
- "!tw-outline-none",
1609
- "focus-visible:!tw-shadow-none",
1610
- "focus-visible:tw-ring-2",
1611
- "focus-visible:tw-ring-primary/50"
1612
2531
  ]
1613
2532
  },
1614
2533
  size: {
@@ -1624,27 +2543,7 @@ var toggleVariants = cva(
1624
2543
  compoundVariants: [
1625
2544
  { iconOnly: true, size: "small", className: "tw-size-8" },
1626
2545
  { iconOnly: true, size: "medium", className: "tw-size-10" },
1627
- { iconOnly: true, size: "large", className: "tw-size-12" },
1628
- // argo sizes match `Button argo` (small 32px / medium 36px / large 40px)
1629
- // and `InputGroup argo` heights so argo Toggle aligns vertically next to them.
1630
- {
1631
- variant: "argo",
1632
- size: "small",
1633
- className: "tw-max-h-8 tw-min-h-8 tw-px-3 tw-py-2"
1634
- },
1635
- {
1636
- variant: "argo",
1637
- size: "medium",
1638
- className: "tw-max-h-9 tw-min-h-9 tw-px-4 tw-py-2"
1639
- },
1640
- {
1641
- variant: "argo",
1642
- size: "large",
1643
- className: "tw-max-h-10 tw-min-h-10 tw-px-6 tw-py-2.5"
1644
- },
1645
- { variant: "argo", iconOnly: true, size: "small", className: "tw-size-8" },
1646
- { variant: "argo", iconOnly: true, size: "medium", className: "tw-size-9" },
1647
- { variant: "argo", iconOnly: true, size: "large", className: "tw-size-10" }
2546
+ { iconOnly: true, size: "large", className: "tw-size-12" }
1648
2547
  ],
1649
2548
  defaultVariants: {
1650
2549
  variant: "ai",
@@ -1897,6 +2796,379 @@ var Link = ({
1897
2796
  )
1898
2797
  );
1899
2798
  };
2799
+ var AlertModalDescription = ({ className, ...props }) => /* @__PURE__ */ jsx(
2800
+ AlertDialogPrimitive.Description,
2801
+ {
2802
+ className: cn(
2803
+ "tw-font-sans",
2804
+ "tw-tracking-normal",
2805
+ "tw-font-normal",
2806
+ "tw-text-muted-foreground",
2807
+ "group-data-[design=default]/alert-modal:tw-text-foreground",
2808
+ "group-data-[design=default]/alert-modal:tw-text-sm",
2809
+ className
2810
+ ),
2811
+ ...props
2812
+ }
2813
+ );
2814
+ var AlertModalFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
2815
+ "div",
2816
+ {
2817
+ className: cn(
2818
+ "tw-flex",
2819
+ "tw-gap-2",
2820
+ "group-data-[design=default]/alert-modal:tw-flex-col",
2821
+ "group-data-[design=default]/alert-modal:sm:tw-flex-row",
2822
+ "group-data-[design=argo]/alert-modal:tw-justify-end",
2823
+ className
2824
+ ),
2825
+ ...props
2826
+ }
2827
+ );
2828
+ var AlertModalHeader = ({ className, ...props }) => /* @__PURE__ */ jsx(
2829
+ "div",
2830
+ {
2831
+ className: cn(
2832
+ "tw-grid",
2833
+ "tw-grid-cols-[auto_1fr]",
2834
+ "tw-items-start",
2835
+ "tw-gap-y-1",
2836
+ // default (legacy) needs more breathing room below the title's separator border
2837
+ "group-data-[design=default]/alert-modal:tw-gap-y-4",
2838
+ "group-data-[design=argo]/alert-modal:tw-gap-x-3",
2839
+ className
2840
+ ),
2841
+ ...props
2842
+ }
2843
+ );
2844
+ var VARIANT_ICONS = {
2845
+ info: /* @__PURE__ */ jsx(icons_exports.Info, {}),
2846
+ warning: /* @__PURE__ */ jsx(icons_exports.AlertTriangle, {}),
2847
+ danger: /* @__PURE__ */ jsx(icons_exports.AlertTriangle, {}),
2848
+ success: /* @__PURE__ */ jsx(icons_exports.CircleCheck, {})
2849
+ };
2850
+ var AlertModalIcon = ({ variant, icon }) => {
2851
+ const glyph = icon ?? VARIANT_ICONS[variant];
2852
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
2853
+ /* @__PURE__ */ jsx(
2854
+ "div",
2855
+ {
2856
+ "data-slot": "alert-modal-icon",
2857
+ className: cn(
2858
+ "group-data-[design=argo]/alert-modal:tw-hidden",
2859
+ "tw-absolute",
2860
+ "tw-top-0",
2861
+ "tw-left-8",
2862
+ "tw-translate-y-[-50%]",
2863
+ "tw-size-12"
2864
+ ),
2865
+ children: /* @__PURE__ */ jsx(
2866
+ "div",
2867
+ {
2868
+ className: cn("tw-relative", "tw-rounded-full", "tw-size-12", {
2869
+ "tw-bg-secondary-500": variant === "info",
2870
+ "tw-bg-warning-500": variant === "warning",
2871
+ "tw-bg-error-500": variant === "danger",
2872
+ "tw-bg-primary-500": variant === "success"
2873
+ }),
2874
+ children: /* @__PURE__ */ jsx(
2875
+ "span",
2876
+ {
2877
+ className: cn(
2878
+ "tw-absolute",
2879
+ "tw-inset-0",
2880
+ "tw-flex",
2881
+ "tw-items-center",
2882
+ "tw-justify-center",
2883
+ "tw-text-white",
2884
+ '[&_svg:not([class*="tw-size-"])]:tw-size-6',
2885
+ "[&_svg]:tw-aspect-square"
2886
+ ),
2887
+ children: glyph
2888
+ }
2889
+ )
2890
+ }
2891
+ )
2892
+ }
2893
+ ),
2894
+ /* @__PURE__ */ jsx(
2895
+ "span",
2896
+ {
2897
+ "data-slot": "alert-modal-icon",
2898
+ className: cn(
2899
+ "tw-hidden",
2900
+ "group-data-[design=argo]/alert-modal:tw-inline-flex",
2901
+ // grid placement: column 1 of the first row, top-aligned with the first line of content
2902
+ "tw-col-start-1",
2903
+ "tw-row-start-1",
2904
+ "tw-self-start",
2905
+ "tw-shrink-0",
2906
+ "tw-items-center",
2907
+ "tw-justify-center",
2908
+ "tw-rounded",
2909
+ "tw-size-8",
2910
+ '[&_svg:not([class*="tw-size-"])]:tw-size-5',
2911
+ {
2912
+ "tw-bg-secondary-100 tw-text-secondary-600": variant === "info",
2913
+ "tw-bg-warning-100 tw-text-warning-500": variant === "warning",
2914
+ "tw-bg-error-100 tw-text-error-500": variant === "danger",
2915
+ "tw-bg-primary-100 tw-text-primary-900": variant === "success"
2916
+ }
2917
+ ),
2918
+ children: glyph
2919
+ }
2920
+ )
2921
+ ] });
2922
+ };
2923
+ var AlertModalOverlay = ({ ref, className, ...props }) => /* @__PURE__ */ jsx(
2924
+ Overlay$1,
2925
+ {
2926
+ ...props,
2927
+ ref,
2928
+ className: cn(
2929
+ // positioning
2930
+ "tw-fixed",
2931
+ "tw-inset-0",
2932
+ "tw-z-[1051]",
2933
+ // background
2934
+ "tw-bg-black/50",
2935
+ // opening animation
2936
+ "data-[state=open]:tw-duration-500",
2937
+ "data-[state=open]:tw-fade-in-0",
2938
+ "data-[state=open]:tw-animate-in",
2939
+ // closing animation
2940
+ "data-[state=closed]:tw-duration-500",
2941
+ "data-[state=closed]:tw-fade-out-0",
2942
+ "data-[state=closed]:tw-animate-out",
2943
+ className
2944
+ )
2945
+ }
2946
+ );
2947
+ var AlertModalTitle = ({ children, className, ...props }) => /* @__PURE__ */ jsx(
2948
+ Title$1,
2949
+ {
2950
+ ...props,
2951
+ asChild: true,
2952
+ className: cn(
2953
+ "tw-font-medium",
2954
+ "tw-text-foreground",
2955
+ "tw-break-anywhere",
2956
+ // default (legacy) gets a Modal-style separator line under the title (Modal uses border-neutral-150)
2957
+ "group-data-[design=default]/alert-modal:tw-border-b",
2958
+ "group-data-[design=default]/alert-modal:tw-border-neutral-150",
2959
+ "group-data-[design=default]/alert-modal:tw-pb-3",
2960
+ className
2961
+ ),
2962
+ children: /* @__PURE__ */ jsx("h3", { children })
2963
+ }
2964
+ );
2965
+ var AlertModalContext = createContext(null);
2966
+ var AlertModalContextProvider = AlertModalContext.Provider;
2967
+ var useAlertModalContext = () => {
2968
+ const context = use(AlertModalContext);
2969
+ if (context === null)
2970
+ throw new Error("AlertModal compound components must be rendered inside <AlertModal>.");
2971
+ return context;
2972
+ };
2973
+ var AlertModalContent = ({
2974
+ variant = "info",
2975
+ icon,
2976
+ title,
2977
+ cancelLabel = "Cancel",
2978
+ confirmLabel: actionLabel = "Confirm",
2979
+ container,
2980
+ className,
2981
+ children,
2982
+ onEscapeKeyDown,
2983
+ ...props
2984
+ }) => {
2985
+ const { isLoading, onConfirm, onCancel } = useAlertModalContext();
2986
+ const designLanguage = useIsLegacyBrand() ? "default" : "argo";
2987
+ const handleEscapeKeyDown = (event) => {
2988
+ event.stopPropagation();
2989
+ if (isLoading) event.preventDefault();
2990
+ onEscapeKeyDown?.(event);
2991
+ };
2992
+ return /* @__PURE__ */ jsx(Portal$1, { container, children: /* @__PURE__ */ jsx(
2993
+ AlertModalOverlay,
2994
+ {
2995
+ onClick: (event) => event.stopPropagation(),
2996
+ onKeyDown: (event) => {
2997
+ if (event.key !== "Escape") event.stopPropagation();
2998
+ },
2999
+ children: /* @__PURE__ */ jsxs(
3000
+ Content$1,
3001
+ {
3002
+ "data-design": designLanguage,
3003
+ ...children ? {} : { "aria-describedby": void 0 },
3004
+ onEscapeKeyDown: handleEscapeKeyDown,
3005
+ className: cn(
3006
+ "tailwindcss-preflight",
3007
+ "tw-group/alert-modal",
3008
+ "tw-text-base",
3009
+ // positioning - horizontally centered; vertical anchor depends on the design language
3010
+ "tw-fixed",
3011
+ "tw-left-1/2",
3012
+ "tw--translate-x-1/2",
3013
+ "tw-z-[1051]",
3014
+ "data-[design=default]:tw-top-20",
3015
+ "data-[design=argo]:tw-top-1/2",
3016
+ "data-[design=argo]:tw--translate-y-1/2",
3017
+ // sizing - compact alert width
3018
+ "tw-w-full",
3019
+ "tw-max-w-[480px]",
3020
+ "tw-max-h-[calc(100vh-2*theme(spacing.20))]",
3021
+ "data-[design=argo]:tw-overflow-y-auto",
3022
+ // layout: stack the header and footer (each owns its own internal layout)
3023
+ "tw-flex",
3024
+ "tw-flex-col",
3025
+ "tw-gap-4",
3026
+ "tw-rounded-lg",
3027
+ "tw-bg-popover",
3028
+ "tw-text-popover-foreground",
3029
+ "data-[design=default]:tw-px-7",
3030
+ "data-[design=default]:tw-py-8",
3031
+ "data-[design=argo]:tw-px-3",
3032
+ "data-[design=argo]:tw-py-4",
3033
+ // animation — shared
3034
+ "tw-duration-200",
3035
+ "data-[state=open]:tw-animate-in",
3036
+ "data-[state=open]:tw-fade-in-0",
3037
+ "data-[state=closed]:tw-animate-out",
3038
+ "data-[state=closed]:tw-fade-out-0",
3039
+ // default design: Modal-style slide-down + zoom (slide-from-left-1/2 holds the x-centring)
3040
+ "data-[design=default]:data-[state=open]:tw-zoom-in-80",
3041
+ "data-[design=default]:data-[state=open]:tw-slide-in-from-left-1/2",
3042
+ "data-[design=default]:data-[state=open]:tw-slide-in-from-top-[48%]",
3043
+ "data-[design=default]:data-[state=closed]:tw-zoom-out-80",
3044
+ "data-[design=default]:data-[state=closed]:tw-slide-out-to-left-1/2",
3045
+ "data-[design=default]:data-[state=closed]:tw-slide-out-to-top-[48%]",
3046
+ // argo design: pop from the centre — zoom only. The slide-*-1/2 utilities just pin the
3047
+ // enter/exit translate to the -50%/-50% centring so there is no visible slide.
3048
+ "data-[design=argo]:data-[state=open]:tw-zoom-in-95",
3049
+ "data-[design=argo]:data-[state=open]:tw-slide-in-from-left-1/2",
3050
+ "data-[design=argo]:data-[state=open]:tw-slide-in-from-top-1/2",
3051
+ "data-[design=argo]:data-[state=closed]:tw-zoom-out-95",
3052
+ "data-[design=argo]:data-[state=closed]:tw-slide-out-to-left-1/2",
3053
+ "data-[design=argo]:data-[state=closed]:tw-slide-out-to-top-1/2",
3054
+ className
3055
+ ),
3056
+ ...props,
3057
+ children: [
3058
+ /* @__PURE__ */ jsxs(AlertModalHeader, { children: [
3059
+ /* @__PURE__ */ jsx(AlertModalIcon, { variant, icon }),
3060
+ title && /* @__PURE__ */ jsx(AlertModalTitle, { className: "tw-col-start-2 tw-row-start-1 tw-self-center", children: title }),
3061
+ children && /* @__PURE__ */ jsx(
3062
+ AlertModalDescription,
3063
+ {
3064
+ className: cn(
3065
+ "tw-col-start-2",
3066
+ title ? "tw-row-start-2" : "tw-row-start-1 tw-self-center"
3067
+ ),
3068
+ children
3069
+ }
3070
+ )
3071
+ ] }),
3072
+ /* @__PURE__ */ jsxs(AlertModalFooter, { children: [
3073
+ /* @__PURE__ */ jsx(Cancel, { asChild: true, children: /* @__PURE__ */ jsx(
3074
+ Button,
3075
+ {
3076
+ type: "button",
3077
+ variant: "secondary",
3078
+ disabled: isLoading,
3079
+ onClick: onCancel,
3080
+ className: "group-data-[design=default]/alert-modal:tw-flex-1",
3081
+ children: cancelLabel
3082
+ }
3083
+ ) }),
3084
+ /* @__PURE__ */ jsx(Action, { asChild: true, children: /* @__PURE__ */ jsx(
3085
+ Button,
3086
+ {
3087
+ type: "button",
3088
+ variant: variant === "danger" ? "danger" : "primary",
3089
+ isLoading,
3090
+ disabled: isLoading,
3091
+ onClick: onConfirm,
3092
+ className: "group-data-[design=default]/alert-modal:tw-flex-1",
3093
+ children: actionLabel
3094
+ }
3095
+ ) })
3096
+ ] })
3097
+ ]
3098
+ }
3099
+ )
3100
+ }
3101
+ ) });
3102
+ };
3103
+ var AlertModalTrigger = ({ ref, onClick, onKeyDown, ...props }) => /* @__PURE__ */ jsx(
3104
+ Trigger$5,
3105
+ {
3106
+ ...props,
3107
+ ref,
3108
+ onClick: (event) => {
3109
+ event.stopPropagation();
3110
+ onClick?.(event);
3111
+ },
3112
+ onKeyDown: (event) => {
3113
+ if (event.key === "Enter" || event.key === " ") event.stopPropagation();
3114
+ onKeyDown?.(event);
3115
+ }
3116
+ }
3117
+ );
3118
+ var noop2 = () => void 0;
3119
+ var AlertModal = ({
3120
+ children,
3121
+ onConfirm = noop2,
3122
+ onCancel = noop2,
3123
+ skipAsyncWait = false,
3124
+ open,
3125
+ defaultOpen,
3126
+ onOpenChange,
3127
+ ...rest
3128
+ }) => {
3129
+ const [isLoading, setIsLoading] = useState(false);
3130
+ const isControlled = open !== void 0;
3131
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen ?? false);
3132
+ const isOpen = isControlled ? open : uncontrolledOpen;
3133
+ const confirmRef = useRef(onConfirm);
3134
+ const cancelRef = useRef(onCancel);
3135
+ const onOpenChangeRef = useRef(onOpenChange);
3136
+ useEffect(() => {
3137
+ confirmRef.current = onConfirm;
3138
+ cancelRef.current = onCancel;
3139
+ onOpenChangeRef.current = onOpenChange;
3140
+ }, [onConfirm, onCancel, onOpenChange]);
3141
+ const setOpen = useCallback(
3142
+ (next) => {
3143
+ if (!isControlled) setUncontrolledOpen(next);
3144
+ onOpenChangeRef.current?.(next);
3145
+ },
3146
+ [isControlled]
3147
+ );
3148
+ const context = useMemo(
3149
+ () => ({
3150
+ isLoading,
3151
+ onConfirm: (event) => {
3152
+ const result = confirmRef.current(event);
3153
+ const isThenable = result !== null && typeof result === "object" && typeof result.then === "function";
3154
+ if (!isThenable || skipAsyncWait) return;
3155
+ event.preventDefault();
3156
+ setIsLoading(true);
3157
+ Promise.resolve(result).finally(() => {
3158
+ setIsLoading(false);
3159
+ setOpen(false);
3160
+ });
3161
+ },
3162
+ onCancel: (event) => {
3163
+ cancelRef.current(event);
3164
+ }
3165
+ }),
3166
+ [isLoading, skipAsyncWait, setOpen]
3167
+ );
3168
+ return /* @__PURE__ */ jsx(Root$8, { ...rest, open: isOpen, onOpenChange: setOpen, children: /* @__PURE__ */ jsx(AlertModalContextProvider, { value: context, children }) });
3169
+ };
3170
+ AlertModal.Trigger = AlertModalTrigger;
3171
+ AlertModal.Content = AlertModalContent;
1900
3172
  var ModalBody = ({ className, ...props }) => /* @__PURE__ */ jsx(
1901
3173
  "div",
1902
3174
  {
@@ -1954,17 +3226,16 @@ var ModalContent = ({
1954
3226
  className,
1955
3227
  children,
1956
3228
  onEscapeKeyDown,
1957
- argo,
1958
3229
  ...props
1959
3230
  }) => {
1960
3231
  const isLegacy = useIsLegacyBrand();
1961
- const renderArgo = !isLegacy || argo === true;
3232
+ const renderArgo = !isLegacy;
1962
3233
  const handleEscapeKeyDown = (event) => {
1963
3234
  event.stopPropagation();
1964
3235
  onEscapeKeyDown?.(event);
1965
3236
  };
1966
- return /* @__PURE__ */ jsx(Portal$1, { children: /* @__PURE__ */ jsx(ModalOverlay, { children: /* @__PURE__ */ jsx(
1967
- Content$1,
3237
+ return /* @__PURE__ */ jsx(Portal$2, { children: /* @__PURE__ */ jsx(ModalOverlay, { children: /* @__PURE__ */ jsx(
3238
+ Content$2,
1968
3239
  {
1969
3240
  "aria-describedby": void 0,
1970
3241
  "data-argo": renderArgo,
@@ -1986,7 +3257,7 @@ var ModalContent = ({
1986
3257
  "tw-flex-col",
1987
3258
  "tw-gap-4",
1988
3259
  "tw-rounded-lg",
1989
- "tw-bg-surface",
3260
+ "tw-bg-card",
1990
3261
  "tw-px-7",
1991
3262
  // 4 px less padding to prevent input focus rings/outlines from being clipped by overflow
1992
3263
  "tw-py-8",
@@ -2171,7 +3442,7 @@ var ModalIcon = (props) => {
2171
3442
  }
2172
3443
  );
2173
3444
  };
2174
- var Modal = (props) => /* @__PURE__ */ jsx(Root$8, { ...props });
3445
+ var Modal = (props) => /* @__PURE__ */ jsx(Root$9, { ...props });
2175
3446
  Modal.Close = Close;
2176
3447
  Modal.Trigger = Trigger$1;
2177
3448
  Modal.Content = ModalContent;
@@ -2194,7 +3465,6 @@ var Truncated = ({
2194
3465
  className,
2195
3466
  twoLines = false,
2196
3467
  noTooltip = false,
2197
- redact = false,
2198
3468
  tooltipVariant = "explanatory",
2199
3469
  tooltipPlacement = "top",
2200
3470
  ...rest
@@ -2219,7 +3489,7 @@ var Truncated = ({
2219
3489
  placement: tooltipPlacement,
2220
3490
  variant: tooltipVariant,
2221
3491
  forceHide: !showTooltip,
2222
- tooltip: /* @__PURE__ */ jsx("div", { "data-heap-redact-text": redact, children: tooltipText }),
3492
+ tooltip: /* @__PURE__ */ jsx("div", { children: tooltipText }),
2223
3493
  triggerAsChild: true,
2224
3494
  children: /* @__PURE__ */ jsx(
2225
3495
  "span",
@@ -2317,12 +3587,11 @@ var FullScreenModalRoot = ({
2317
3587
  lockBodyScroll = true,
2318
3588
  onEscapeKeyDown,
2319
3589
  onKeyDown,
2320
- argo,
2321
3590
  ...props
2322
3591
  }) => {
2323
3592
  const modalRef = useRef(null);
2324
3593
  const isLegacy = useIsLegacyBrand();
2325
- const renderArgo = !isLegacy || argo === true;
3594
+ const renderArgo = !isLegacy;
2326
3595
  useEffect(() => {
2327
3596
  const modalElement = modalRef.current;
2328
3597
  if (lockBodyScroll) {
@@ -2400,7 +3669,7 @@ var sheetContentVariants = cva(
2400
3669
  "tw-z-[1051]",
2401
3670
  "tw-flex",
2402
3671
  "tw-flex-col",
2403
- "tw-bg-surface",
3672
+ "tw-bg-card",
2404
3673
  "tw-shadow-lg",
2405
3674
  // argo chrome overrides
2406
3675
  "data-[argo=true]:tw-border",
@@ -2473,11 +3742,10 @@ var SheetContent = ({
2473
3742
  onPointerDownOutside,
2474
3743
  onInteractOutside,
2475
3744
  container,
2476
- argo,
2477
3745
  ...props
2478
3746
  }) => {
2479
3747
  const isLegacy = useIsLegacyBrand();
2480
- const renderArgo = !isLegacy || argo === true;
3748
+ const renderArgo = !isLegacy;
2481
3749
  const handleOnPointerDownOutside = (event) => {
2482
3750
  if (keepOpenOnPointerDownOutside) event.preventDefault();
2483
3751
  onPointerDownOutside?.(event);
@@ -2486,10 +3754,10 @@ var SheetContent = ({
2486
3754
  if (keepOpenOnPointerDownOutside) event.preventDefault();
2487
3755
  onInteractOutside?.(event);
2488
3756
  };
2489
- return /* @__PURE__ */ jsxs(Portal$1, { container, children: [
3757
+ return /* @__PURE__ */ jsxs(Portal$2, { container, children: [
2490
3758
  !hideOverlay && /* @__PURE__ */ jsx(SheetOverlay, { disableTransition: disableTransition ?? false }),
2491
3759
  /* @__PURE__ */ jsx(
2492
- Content$1,
3760
+ Content$2,
2493
3761
  {
2494
3762
  ...props,
2495
3763
  "aria-describedby": void 0,
@@ -2525,7 +3793,7 @@ var SheetHeader = ({
2525
3793
  ] });
2526
3794
  };
2527
3795
  var SheetTitle = ({ className, visuallyHidden = false, ...props }) => /* @__PURE__ */ jsx(Title, { className: cn({ "tw-sr-only": visuallyHidden }, className), ...props });
2528
- var Sheet = (props) => /* @__PURE__ */ jsx(Root$8, { ...props });
3796
+ var Sheet = (props) => /* @__PURE__ */ jsx(Root$9, { ...props });
2529
3797
  Sheet.Close = Close;
2530
3798
  Sheet.Trigger = Trigger$1;
2531
3799
  Sheet.Content = SheetContent;
@@ -2595,14 +3863,13 @@ var PopoverContent = ({
2595
3863
  sideOffset = 4,
2596
3864
  matchTriggerWidth = false,
2597
3865
  children,
2598
- variant,
2599
3866
  onEscapeKeyDown,
2600
3867
  ...props
2601
3868
  }) => {
2602
3869
  const isLegacy = useIsLegacyBrand();
2603
- const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : "default";
2604
- return /* @__PURE__ */ jsx(Portal$2, { children: /* @__PURE__ */ jsx(
2605
- Content$2,
3870
+ const effectiveVariant = !isLegacy ? "argo" : "default";
3871
+ return /* @__PURE__ */ jsx(Portal$3, { children: /* @__PURE__ */ jsx(
3872
+ Content$3,
2606
3873
  {
2607
3874
  ref,
2608
3875
  align: matchTriggerWidth ? "start" : align,
@@ -2701,14 +3968,14 @@ var PopconfirmTrigger = ({ onClick, ...props }) => {
2701
3968
  };
2702
3969
  return /* @__PURE__ */ jsx(Popover.Trigger, { ...props, onClick: handleClick });
2703
3970
  };
2704
- var noop2 = () => void 0;
3971
+ var noop3 = () => void 0;
2705
3972
  var Popconfirm = ({
2706
3973
  children,
2707
- onConfirm = noop2,
2708
- onCancel = noop2,
3974
+ onConfirm = noop3,
3975
+ onCancel = noop3,
2709
3976
  variant = "confirm",
2710
3977
  enabled = true,
2711
- onOpenChange = noop2,
3978
+ onOpenChange = noop3,
2712
3979
  open,
2713
3980
  skipAsyncWait = false,
2714
3981
  ...rest
@@ -2757,14 +4024,13 @@ var HoverCardContent = ({
2757
4024
  className,
2758
4025
  align = "center",
2759
4026
  sideOffset = 4,
2760
- argo,
2761
4027
  children,
2762
4028
  ...props
2763
4029
  }) => {
2764
4030
  const isLegacy = useIsLegacyBrand();
2765
- const renderArgo = !isLegacy || argo === true;
2766
- return /* @__PURE__ */ jsx(Portal$3, { children: /* @__PURE__ */ jsx(
2767
- Content$3,
4031
+ const renderArgo = !isLegacy;
4032
+ return /* @__PURE__ */ jsx(Portal$4, { children: /* @__PURE__ */ jsx(
4033
+ Content$4,
2768
4034
  {
2769
4035
  ref,
2770
4036
  align,
@@ -2812,7 +4078,7 @@ var HoverCardContent = ({
2812
4078
  }
2813
4079
  ) });
2814
4080
  };
2815
- var HoverCard = ({ openDelay = 200, closeDelay = 200, ...rest }) => /* @__PURE__ */ jsx(Root$9, { ...rest, openDelay, closeDelay });
4081
+ var HoverCard = ({ openDelay = 200, closeDelay = 200, ...rest }) => /* @__PURE__ */ jsx(Root$a, { ...rest, openDelay, closeDelay });
2816
4082
  HoverCard.Content = HoverCardContent;
2817
4083
  HoverCard.Trigger = Trigger$3;
2818
4084
  var CommandContent = ({ className, ...rest }) => /* @__PURE__ */ jsx(
@@ -2885,38 +4151,32 @@ Calendar.displayName = "Calendar";
2885
4151
  var DatePicker = ({
2886
4152
  align = "end",
2887
4153
  alignOffset = -18,
2888
- argo,
2889
4154
  children,
2890
4155
  defaultOpen,
2891
4156
  onOpenChange,
2892
4157
  open,
2893
4158
  sideOffset = 12,
2894
4159
  ...calendarProps
2895
- }) => {
2896
- const isLegacy = useIsLegacyBrand();
2897
- const renderArgo = !isLegacy || argo === true;
2898
- return /* @__PURE__ */ jsxs(Popover, { defaultOpen, open, onOpenChange, children: [
2899
- /* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children }),
2900
- /* @__PURE__ */ jsx(
2901
- Popover.Content,
2902
- {
2903
- align,
2904
- alignOffset,
2905
- className: "tw-w-auto tw-p-0",
2906
- sideOffset,
2907
- variant: renderArgo ? "argo" : "default",
2908
- children: /* @__PURE__ */ jsx(Calendar, { ...calendarProps })
2909
- }
2910
- )
2911
- ] });
2912
- };
2913
- DatePicker.displayName = "DatePicker";
2914
- var addonVariants = cva(
2915
- [
2916
- "tw-flex",
2917
- "tw-items-center",
2918
- "tw-gap-1",
2919
- // Default size for nested Lucide icons in prefix/suffix slots; callers can override on the icon.
4160
+ }) => /* @__PURE__ */ jsxs(Popover, { defaultOpen, open, onOpenChange, children: [
4161
+ /* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children }),
4162
+ /* @__PURE__ */ jsx(
4163
+ Popover.Content,
4164
+ {
4165
+ align,
4166
+ alignOffset,
4167
+ className: "tw-w-auto tw-p-0",
4168
+ sideOffset,
4169
+ children: /* @__PURE__ */ jsx(Calendar, { ...calendarProps })
4170
+ }
4171
+ )
4172
+ ] });
4173
+ DatePicker.displayName = "DatePicker";
4174
+ var addonVariants = cva(
4175
+ [
4176
+ "tw-flex",
4177
+ "tw-items-center",
4178
+ "tw-gap-1",
4179
+ // Default size for nested Lucide icons in prefix/suffix slots; callers can override on the icon.
2920
4180
  "[&_svg.lucide:not([class*='tw-size-'])]:tw-size-4",
2921
4181
  "[&_svg]:tw-shrink-0"
2922
4182
  ],
@@ -2961,7 +4221,6 @@ var InputGroupButton = ({
2961
4221
  }) => /* @__PURE__ */ jsx(
2962
4222
  Button,
2963
4223
  {
2964
- argo: true,
2965
4224
  ...props,
2966
4225
  tabIndex,
2967
4226
  ref,
@@ -3250,7 +4509,7 @@ var InputGroupRoot = ({
3250
4509
  ...props
3251
4510
  }) => {
3252
4511
  const isLegacy = useIsLegacyBrand();
3253
- const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : variant;
4512
+ const effectiveVariant = !isLegacy ? "argo" : variant;
3254
4513
  const effectiveSizing = effectiveVariant === "argo" ? "medium" : sizing;
3255
4514
  return /* @__PURE__ */ jsx(
3256
4515
  "div",
@@ -3758,7 +5017,6 @@ var MINUTES = Array.from({ length: 60 }, (_, i) => i);
3758
5017
  var TimePicker = ({
3759
5018
  align = "end",
3760
5019
  alignOffset = -18,
3761
- argo,
3762
5020
  children,
3763
5021
  defaultOpen,
3764
5022
  defaultSelected,
@@ -3768,8 +5026,6 @@ var TimePicker = ({
3768
5026
  selected,
3769
5027
  sideOffset = 12
3770
5028
  }) => {
3771
- const isLegacy = useIsLegacyBrand();
3772
- const renderArgo = !isLegacy || argo;
3773
5029
  const [internalSelected, setInternalSelected] = useState(defaultSelected ?? null);
3774
5030
  const isControlled = selected !== void 0;
3775
5031
  const currentValue = isControlled ? selected : internalSelected;
@@ -3799,7 +5055,6 @@ var TimePicker = ({
3799
5055
  alignOffset,
3800
5056
  sideOffset,
3801
5057
  className: "tw-flex tw-flex-row",
3802
- variant: renderArgo ? "argo" : "default",
3803
5058
  children: [
3804
5059
  /* @__PURE__ */ jsx(ScrollArea, { type: "always", ref: scrollToSelected, viewPortClassName: "tw-h-60 tw-px-3", children: HOURS.map((value) => /* @__PURE__ */ jsx(
3805
5060
  TimePickerButton,
@@ -3918,25 +5173,6 @@ var CommandInput = ({
3918
5173
  ) });
3919
5174
  var CheckIndicator = ({ variant = "default" }) => {
3920
5175
  if (variant === "default") return null;
3921
- if (variant === "argo") {
3922
- return /* @__PURE__ */ jsx(
3923
- icons_exports.Check,
3924
- {
3925
- className: cn(
3926
- // visibility
3927
- "tw-hidden",
3928
- "group-data-[checked=true]/command-item:tw-block",
3929
- // positioning
3930
- "tw-order-last",
3931
- "tw-ml-auto",
3932
- // styling
3933
- "tw-text-primary",
3934
- "tw-size-4",
3935
- "tw-shrink-0"
3936
- )
3937
- }
3938
- );
3939
- }
3940
5176
  return /* @__PURE__ */ jsx(
3941
5177
  "span",
3942
5178
  {
@@ -4090,9 +5326,9 @@ var CommandSeparator = ({ className, ...props }) => /* @__PURE__ */ jsx(
4090
5326
  ...props
4091
5327
  }
4092
5328
  );
4093
- var Command = ({ className, variant, ...rest }) => {
5329
+ var Command = ({ className, ...rest }) => {
4094
5330
  const isLegacy = useIsLegacyBrand();
4095
- const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : "default";
5331
+ const effectiveVariant = !isLegacy ? "argo" : "default";
4096
5332
  return /* @__PURE__ */ jsx(
4097
5333
  Command$1,
4098
5334
  {
@@ -4131,7 +5367,6 @@ var DateRangePicker = ({
4131
5367
  /* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
4132
5368
  Button,
4133
5369
  {
4134
- argo: true,
4135
5370
  variant: "secondary",
4136
5371
  disabled,
4137
5372
  className: cn(
@@ -4145,11 +5380,10 @@ var DateRangePicker = ({
4145
5380
  ]
4146
5381
  }
4147
5382
  ) }),
4148
- /* @__PURE__ */ jsx(Popover.Content, { variant: "argo", align: "start", className: "tw-w-auto tw-p-0", children: /* @__PURE__ */ jsxs("div", { className: "tw-flex", children: [
5383
+ /* @__PURE__ */ jsx(Popover.Content, { align: "start", className: "tw-w-auto tw-p-0", children: /* @__PURE__ */ jsxs("div", { className: "tw-flex", children: [
4149
5384
  presets && presets.length > 0 ? /* @__PURE__ */ jsx("div", { className: "tw-flex tw-flex-col tw-gap-1 tw-border-r tw-border-solid tw-border-border tw-p-2", children: presets.map((preset) => /* @__PURE__ */ jsx(
4150
5385
  Button,
4151
5386
  {
4152
- argo: true,
4153
5387
  variant: "invisible",
4154
5388
  size: "small",
4155
5389
  className: "tw-justify-start",
@@ -4449,7 +5683,6 @@ var Switch = ({
4449
5683
  disabled = false,
4450
5684
  id: idProp,
4451
5685
  children,
4452
- argo = false,
4453
5686
  description,
4454
5687
  variant,
4455
5688
  position,
@@ -4458,7 +5691,7 @@ var Switch = ({
4458
5691
  const fallbackId = useId();
4459
5692
  const id = idProp?.toString() ?? fallbackId;
4460
5693
  const isLegacy = useIsLegacyBrand();
4461
- const switchVariant = !isLegacy || argo ? "argo" : "default";
5694
+ const switchVariant = !isLegacy ? "argo" : "default";
4462
5695
  const switchElement = /* @__PURE__ */ jsx(
4463
5696
  Root$3,
4464
5697
  {
@@ -4478,8 +5711,7 @@ var Switch = ({
4478
5711
  };
4479
5712
  var RadioGroupContext = createContext({
4480
5713
  variant: "radio",
4481
- orientation: "horizontal",
4482
- groupArgo: false
5714
+ orientation: "horizontal"
4483
5715
  });
4484
5716
  var RadioGroupProvider = RadioGroupContext;
4485
5717
  var useRadioGroupContext = () => use(RadioGroupContext);
@@ -4644,12 +5876,11 @@ var RadioGroupItem = ({
4644
5876
  tooltipVariant,
4645
5877
  tooltipPlacement,
4646
5878
  description,
4647
- argo,
4648
5879
  ...props
4649
5880
  }) => {
4650
- const { variant, groupArgo } = useRadioGroupContext();
5881
+ const { variant } = useRadioGroupContext();
4651
5882
  const isLegacy = useIsLegacyBrand();
4652
- const styleVariant = argo === true || groupArgo || !isLegacy ? "argo" : "default";
5883
+ const styleVariant = !isLegacy ? "argo" : "default";
4653
5884
  const id = useId();
4654
5885
  const item = (() => {
4655
5886
  if (variant === "button")
@@ -4794,29 +6025,24 @@ var RadioGroup2 = ({
4794
6025
  className,
4795
6026
  disabled = false,
4796
6027
  orientation = "horizontal",
4797
- argo,
4798
6028
  onValueChange,
4799
6029
  children,
4800
6030
  value,
4801
6031
  defaultValue,
4802
6032
  ...props
4803
- }) => {
4804
- const isLegacy = useIsLegacyBrand();
4805
- const groupArgo = !isLegacy || argo === true;
4806
- return /* @__PURE__ */ jsx(
4807
- RRadioGroup.Root,
4808
- {
4809
- ...props,
4810
- onValueChange,
4811
- orientation,
4812
- className: cn(radioGroupVariants({ orientation, variant, className })),
4813
- disabled,
4814
- value: value ?? void 0,
4815
- defaultValue: defaultValue ?? void 0,
4816
- children: /* @__PURE__ */ jsx(RadioGroupProvider, { value: { variant, orientation, groupArgo }, children })
4817
- }
4818
- );
4819
- };
6033
+ }) => /* @__PURE__ */ jsx(
6034
+ RRadioGroup.Root,
6035
+ {
6036
+ ...props,
6037
+ onValueChange,
6038
+ orientation,
6039
+ className: cn(radioGroupVariants({ orientation, variant, className })),
6040
+ disabled,
6041
+ value: value ?? void 0,
6042
+ defaultValue: defaultValue ?? void 0,
6043
+ children: /* @__PURE__ */ jsx(RadioGroupProvider, { value: { variant, orientation }, children })
6044
+ }
6045
+ );
4820
6046
  RadioGroup2.Item = RadioGroupItem;
4821
6047
  RadioGroup2.Separator = RadioGroupSeparator;
4822
6048
  var useInteracting = () => {
@@ -4972,7 +6198,7 @@ var Slider = ({
4972
6198
  onValueChange?.(next);
4973
6199
  };
4974
6200
  const body = /* @__PURE__ */ jsxs(
4975
- Root$a,
6201
+ Root$b,
4976
6202
  {
4977
6203
  ref,
4978
6204
  value: liveValues,
@@ -5261,11 +6487,10 @@ var SelectContent = ({
5261
6487
  container,
5262
6488
  position = "popper",
5263
6489
  sideOffset = 4,
5264
- variant,
5265
6490
  ...props
5266
6491
  }) => {
5267
6492
  const isLegacy = useIsLegacyBrand();
5268
- const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : "default";
6493
+ const effectiveVariant = !isLegacy ? "argo" : "default";
5269
6494
  return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { container, children: /* @__PURE__ */ jsxs(
5270
6495
  SelectPrimitive.Content,
5271
6496
  {
@@ -5547,7 +6772,7 @@ var SelectTrigger = ({
5547
6772
  ...props
5548
6773
  }) => {
5549
6774
  const isLegacy = useIsLegacyBrand();
5550
- const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : variant;
6775
+ const effectiveVariant = !isLegacy ? "argo" : variant;
5551
6776
  return /* @__PURE__ */ jsxs(
5552
6777
  SelectPrimitive.Trigger,
5553
6778
  {
@@ -5583,7 +6808,6 @@ var Select = ({
5583
6808
  // items
5584
6809
  items = []
5585
6810
  }) => {
5586
- const contentVariant = variant === "argo" ? "argo" : "default";
5587
6811
  const groupKeyId = useId();
5588
6812
  const renderItem = (item) => /* @__PURE__ */ jsx(
5589
6813
  SelectItem,
@@ -5619,7 +6843,7 @@ var Select = ({
5619
6843
  className
5620
6844
  }
5621
6845
  ),
5622
- /* @__PURE__ */ jsx(SelectContent, { variant: contentVariant, children: items.map((itemOrGroup, index) => {
6846
+ /* @__PURE__ */ jsx(SelectContent, { children: items.map((itemOrGroup, index) => {
5623
6847
  if (isGroup(itemOrGroup)) {
5624
6848
  return (
5625
6849
  // oxlint-disable-next-line react/no-array-index-key
@@ -5711,7 +6935,6 @@ function Checkbox({
5711
6935
  className,
5712
6936
  id: idProp,
5713
6937
  children,
5714
- argo = false,
5715
6938
  description,
5716
6939
  variant,
5717
6940
  position,
@@ -5722,7 +6945,7 @@ function Checkbox({
5722
6945
  const fallbackId = useId();
5723
6946
  const id = idProp?.toString() ?? fallbackId;
5724
6947
  const isLegacy = useIsLegacyBrand();
5725
- const styleVariant = !isLegacy || argo ? "argo" : "default";
6948
+ const styleVariant = !isLegacy ? "argo" : "default";
5726
6949
  const checkboxElement = /* @__PURE__ */ jsx(Root$4, { id, ...rest, className: cn(rootVariants2({ variant: styleVariant, className })), children: /* @__PURE__ */ jsxs(Indicator, { className: cn(indicatorVariants({ variant: styleVariant })), children: [
5727
6950
  /* @__PURE__ */ jsx(icons_exports.Check, { className: "tw-hidden tw-size-3 tw-stroke-[4px] group-data-[state=checked]:tw-block" }),
5728
6951
  /* @__PURE__ */ jsx(icons_exports.Minus, { className: "tw-hidden tw-size-3 tw-stroke-[4px] group-data-[state=indeterminate]:tw-block" })
@@ -6023,7 +7246,7 @@ var ComboboxChips = ({
6023
7246
  if (!values.length) return null;
6024
7247
  const visible = values.slice(0, maxVisible);
6025
7248
  const overflow = values.slice(maxVisible);
6026
- return /* @__PURE__ */ jsxs(Fragment, { children: [
7249
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
6027
7250
  visible.map((value, index) => /* @__PURE__ */ jsxs(
6028
7251
  Combobox$1.Chip,
6029
7252
  {
@@ -6063,11 +7286,10 @@ var ComboboxContent = ({
6063
7286
  container,
6064
7287
  className,
6065
7288
  children,
6066
- variant,
6067
7289
  ...popupProps
6068
7290
  }) => {
6069
7291
  const isLegacy = useIsLegacyBrand();
6070
- const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : "default";
7292
+ const effectiveVariant = !isLegacy ? "argo" : "default";
6071
7293
  return /* @__PURE__ */ jsx(Combobox$1.Portal, { container, children: /* @__PURE__ */ jsx(
6072
7294
  Combobox$1.Positioner,
6073
7295
  {
@@ -6408,7 +7630,6 @@ var Combobox = ({
6408
7630
  itemToIcon = defaultItemToIcon,
6409
7631
  groupToLabel = defaultGroupToLabel
6410
7632
  }) => {
6411
- const contentVariant = variant === "argo" ? "argo" : "default";
6412
7633
  const closeReasonRef = useRef(
6413
7634
  "none"
6414
7635
  );
@@ -6529,7 +7750,7 @@ var Combobox = ({
6529
7750
  ]
6530
7751
  }
6531
7752
  ),
6532
- /* @__PURE__ */ jsxs(ComboboxContent, { variant: contentVariant, children: [
7753
+ /* @__PURE__ */ jsxs(ComboboxContent, { children: [
6533
7754
  /* @__PURE__ */ jsx(ComboboxEmpty, { children: empty }),
6534
7755
  /* @__PURE__ */ jsx(ComboboxList, { children: (itemOrGroup) => {
6535
7756
  if (isCreatableItem(itemOrGroup))
@@ -6606,8 +7827,7 @@ var MultiCombobox = ({
6606
7827
  const isLegacy = useIsLegacyBrand();
6607
7828
  const itemsProp = _itemsProp ?? [];
6608
7829
  const valueProp = _valueProp ?? [];
6609
- const renderArgo = !isLegacy || variant === "argo";
6610
- const contentVariant = renderArgo ? "argo" : "default";
7830
+ const renderArgo = !isLegacy;
6611
7831
  const chipVariant = renderArgo ? "pill" : "default";
6612
7832
  const allFlatItems = itemsProp.flatMap((item) => isGroupItem(item) ? item.items : item);
6613
7833
  const isAllSelected = allFlatItems.length === (valueProp?.length ?? 0);
@@ -6664,7 +7884,7 @@ var MultiCombobox = ({
6664
7884
  disabled,
6665
7885
  inputRef,
6666
7886
  children: [
6667
- /* @__PURE__ */ jsx(Combobox$1.Chips, { render: /* @__PURE__ */ jsx(Fragment$1, {}), children: /* @__PURE__ */ jsx(
7887
+ /* @__PURE__ */ jsx(Combobox$1.Chips, { render: /* @__PURE__ */ jsx(Fragment, {}), children: /* @__PURE__ */ jsx(
6668
7888
  Combobox.InputGroup,
6669
7889
  {
6670
7890
  variant,
@@ -6698,7 +7918,7 @@ var MultiCombobox = ({
6698
7918
  ] })
6699
7919
  }
6700
7920
  ) }),
6701
- /* @__PURE__ */ jsxs(Combobox.Content, { variant: contentVariant, children: [
7921
+ /* @__PURE__ */ jsxs(Combobox.Content, { children: [
6702
7922
  /* @__PURE__ */ jsx(Combobox.Empty, { children: empty }),
6703
7923
  /* @__PURE__ */ jsx(Combobox.List, { children: (itemOrGroup) => {
6704
7924
  if (isSelectAllItem(itemOrGroup)) {
@@ -6809,11 +8029,11 @@ var AutoSaveTextarea = ({
6809
8029
  /* @__PURE__ */ jsxs("span", { className: "tw-flex tw-items-center tw-gap-1 tw-text-neutral-400", children: [
6810
8030
  isOverLimit && "Character limit exceeded",
6811
8031
  !isOverLimit && isChanged && !isSaving && "Unsaved",
6812
- !isOverLimit && isChanged && isSaving && /* @__PURE__ */ jsxs(Fragment, { children: [
8032
+ !isOverLimit && isChanged && isSaving && /* @__PURE__ */ jsxs(Fragment$1, { children: [
6813
8033
  /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-size-4 tw-animate-spin" }),
6814
8034
  " Saving"
6815
8035
  ] }),
6816
- !isOverLimit && value !== null && !isChanged && !isSaving && /* @__PURE__ */ jsxs(Fragment, { children: [
8036
+ !isOverLimit && value !== null && !isChanged && !isSaving && /* @__PURE__ */ jsxs(Fragment$1, { children: [
6817
8037
  /* @__PURE__ */ jsx(icons_exports.CircleCheck, { className: "tw-size-4 tw-text-primary-500" }),
6818
8038
  " Saved"
6819
8039
  ] })
@@ -7309,7 +8529,7 @@ var InputOtpSlot = ({
7309
8529
  }
7310
8530
  );
7311
8531
  };
7312
- var Root21 = ({
8532
+ var Root22 = ({
7313
8533
  ref,
7314
8534
  sizing = "md",
7315
8535
  state = "default",
@@ -7333,7 +8553,7 @@ var Root21 = ({
7333
8553
  children
7334
8554
  }
7335
8555
  ) });
7336
- var InputOtp = Object.assign(Root21, {
8556
+ var InputOtp = Object.assign(Root22, {
7337
8557
  Group: InputOtpGroup,
7338
8558
  Slot: InputOtpSlot,
7339
8559
  Separator: InputOtpSeparator
@@ -7558,7 +8778,7 @@ var TagSelectCreateItem = ({ onCreate, value }) => {
7558
8778
  children: [
7559
8779
  "Create",
7560
8780
  " ",
7561
- isSearched ? /* @__PURE__ */ jsxs(Fragment, { children: [
8781
+ isSearched ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
7562
8782
  '"',
7563
8783
  /* @__PURE__ */ jsx("span", { className: "-tw-mx-2 tw-max-w-24 tw-truncate", children: search }),
7564
8784
  '"'
@@ -7647,125 +8867,1520 @@ var TagSelectValue = ({ value, onAdd }) => {
7647
8867
  {
7648
8868
  "tw-max-h-20 tw-opacity-100": isSelected
7649
8869
  }
7650
- ),
7651
- children: /* @__PURE__ */ jsxs("div", { className: cn("tw-flex", "tw-items-center", "tw-justify-between", "tw-px-3", "tw-py-2"), children: [
7652
- /* @__PURE__ */ jsxs("span", { children: [
7653
- value.length,
7654
- " selected"
7655
- ] }),
7656
- /* @__PURE__ */ jsx(Button, { size: "small", onClick: handleOnSelect, children: "Add Selected" })
7657
- ] })
8870
+ ),
8871
+ children: /* @__PURE__ */ jsxs("div", { className: cn("tw-flex", "tw-items-center", "tw-justify-between", "tw-px-3", "tw-py-2"), children: [
8872
+ /* @__PURE__ */ jsxs("span", { children: [
8873
+ value.length,
8874
+ " selected"
8875
+ ] }),
8876
+ /* @__PURE__ */ jsx(Button, { size: "small", onClick: handleOnSelect, children: "Add Selected" })
8877
+ ] })
8878
+ }
8879
+ );
8880
+ };
8881
+ var CREATE_ITEM_VALUE = "create-new-tag";
8882
+ var defaultOptions = [];
8883
+ var TagSelectList = ({ options = defaultOptions, onAdd, onCreate }) => {
8884
+ const [selected, setSelected] = useState([]);
8885
+ const handleOnSelect = (value) => {
8886
+ setSelected(
8887
+ (currSelected) => currSelected.includes(value) ? currSelected.filter((x) => x !== value) : [...currSelected, value]
8888
+ );
8889
+ };
8890
+ const handleFilter = (value, search, keywords) => {
8891
+ if (value === CREATE_ITEM_VALUE) return 1;
8892
+ return defaultFilter(value, search, keywords);
8893
+ };
8894
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
8895
+ /* @__PURE__ */ jsxs(Command, { filter: handleFilter, className: "tw-flex tw-flex-col", children: [
8896
+ /* @__PURE__ */ jsx("div", { className: "tw-border-b tw-border-neutral-100 tw-p-3", children: /* @__PURE__ */ jsx(
8897
+ Command.Input,
8898
+ {
8899
+ variant: "secondary",
8900
+ prefix: /* @__PURE__ */ jsx(icons_exports.Search, { className: "tw-size-4 tw-text-neutral-400" }),
8901
+ placeholder: "Search tags",
8902
+ allowClear: true
8903
+ }
8904
+ ) }),
8905
+ /* @__PURE__ */ jsxs(Command.List, { className: "tw-p-3", viewPortClassName: "tw-max-h-60", "data-content": true, children: [
8906
+ /* @__PURE__ */ jsx(TagSelectCreateItem, { value: CREATE_ITEM_VALUE, onCreate }),
8907
+ options.map((option) => /* @__PURE__ */ jsx(
8908
+ TagSelectItem,
8909
+ {
8910
+ option,
8911
+ onSelect: handleOnSelect,
8912
+ checked: selected.includes(option.name)
8913
+ },
8914
+ option.name
8915
+ ))
8916
+ ] })
8917
+ ] }),
8918
+ /* @__PURE__ */ jsx(TagSelectValue, { value: selected, onAdd })
8919
+ ] });
8920
+ };
8921
+ var TagSelectPopover = ({ children, onAdd, options, onCreate }) => {
8922
+ const [isOpen, setIsOpen] = useState(false);
8923
+ const handleAdd = (selected) => {
8924
+ onAdd?.(selected);
8925
+ setIsOpen(false);
8926
+ };
8927
+ const handleCreate = (search) => {
8928
+ onCreate?.(search);
8929
+ setIsOpen(false);
8930
+ };
8931
+ return /* @__PURE__ */ jsxs(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [
8932
+ /* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children }),
8933
+ /* @__PURE__ */ jsx(Popover.Content, { side: "bottom", align: "center", className: "tw-w-80", children: /* @__PURE__ */ jsx(TagSelectList, { onCreate: handleCreate, onAdd: handleAdd, options }) })
8934
+ ] });
8935
+ };
8936
+ var defaultOptions2 = [];
8937
+ var Tagger = ({
8938
+ options = defaultOptions2,
8939
+ value = defaultOptions2,
8940
+ onCreate,
8941
+ onValueChange,
8942
+ disabled
8943
+ }) => {
8944
+ const isAnySelected = value.length > 0;
8945
+ const isVisible = isAnySelected || !disabled;
8946
+ const handleAdd = (selected) => {
8947
+ const selectedSet = new Set(selected);
8948
+ const addedTags = options.filter((option) => selectedSet.has(option.name));
8949
+ const newAllTags = [...value, ...addedTags];
8950
+ onValueChange({
8951
+ action: "add",
8952
+ tags: addedTags,
8953
+ allTags: newAllTags
8954
+ });
8955
+ };
8956
+ const handleRemove = (tagToRemove) => {
8957
+ const removedTags = [tagToRemove];
8958
+ const newAllTags = value.filter((option) => option.name !== tagToRemove.name);
8959
+ onValueChange({
8960
+ action: "remove",
8961
+ tags: removedTags,
8962
+ allTags: newAllTags
8963
+ });
8964
+ };
8965
+ const handleCreate = (search) => {
8966
+ onCreate?.(search);
8967
+ };
8968
+ const tagsToAdd = useMemo(() => {
8969
+ const addedTagsSet = new Set(value.map((tag) => tag.name));
8970
+ return options?.filter((option) => !addedTagsSet.has(option.name));
8971
+ }, [options, value]);
8972
+ if (!isVisible) return null;
8973
+ return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs("ul", { className: "tailwindcss-preflight tw-flex tw-min-h-6 tw-flex-wrap tw-items-center tw-gap-2", children: [
8974
+ value.map((tag) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(TagItem, { disabled, tag, onRemove: handleRemove }) }, tag.name)),
8975
+ !disabled && /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(TagSelectPopover, { options: tagsToAdd, onAdd: handleAdd, onCreate: handleCreate, children: /* @__PURE__ */ jsx(Badge, { color: "gray-inverse", asChild: true, children: /* @__PURE__ */ jsxs("button", { type: "button", className: "tw-flex tw-items-center tw-gap-1", children: [
8976
+ /* @__PURE__ */ jsx(icons_exports.Plus, { className: "tw-size-4" }),
8977
+ /* @__PURE__ */ jsx(
8978
+ "span",
8979
+ {
8980
+ className: cn({
8981
+ "tw-sr-only": isAnySelected
8982
+ }),
8983
+ children: "Add Tag"
8984
+ }
8985
+ )
8986
+ ] }) }) }) })
8987
+ ] }) });
8988
+ };
8989
+
8990
+ // ../../node_modules/.pnpm/react-dropzone@14.2.3_react@19.2.7/node_modules/react-dropzone/dist/es/index.js
8991
+ var import_prop_types = __toESM(require_prop_types());
8992
+
8993
+ // ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
8994
+ function __awaiter(thisArg, _arguments, P, generator) {
8995
+ function adopt(value) {
8996
+ return value instanceof P ? value : new P(function(resolve) {
8997
+ resolve(value);
8998
+ });
8999
+ }
9000
+ return new (P || (P = Promise))(function(resolve, reject) {
9001
+ function fulfilled(value) {
9002
+ try {
9003
+ step(generator.next(value));
9004
+ } catch (e) {
9005
+ reject(e);
9006
+ }
9007
+ }
9008
+ function rejected(value) {
9009
+ try {
9010
+ step(generator["throw"](value));
9011
+ } catch (e) {
9012
+ reject(e);
9013
+ }
9014
+ }
9015
+ function step(result) {
9016
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
9017
+ }
9018
+ step((generator = generator.apply(thisArg, [])).next());
9019
+ });
9020
+ }
9021
+ function __generator(thisArg, body) {
9022
+ var _ = { label: 0, sent: function() {
9023
+ if (t[0] & 1) throw t[1];
9024
+ return t[1];
9025
+ }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
9026
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
9027
+ return this;
9028
+ }), g;
9029
+ function verb(n) {
9030
+ return function(v) {
9031
+ return step([n, v]);
9032
+ };
9033
+ }
9034
+ function step(op) {
9035
+ if (f) throw new TypeError("Generator is already executing.");
9036
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
9037
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
9038
+ if (y = 0, t) op = [op[0] & 2, t.value];
9039
+ switch (op[0]) {
9040
+ case 0:
9041
+ case 1:
9042
+ t = op;
9043
+ break;
9044
+ case 4:
9045
+ _.label++;
9046
+ return { value: op[1], done: false };
9047
+ case 5:
9048
+ _.label++;
9049
+ y = op[1];
9050
+ op = [0];
9051
+ continue;
9052
+ case 7:
9053
+ op = _.ops.pop();
9054
+ _.trys.pop();
9055
+ continue;
9056
+ default:
9057
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
9058
+ _ = 0;
9059
+ continue;
9060
+ }
9061
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
9062
+ _.label = op[1];
9063
+ break;
9064
+ }
9065
+ if (op[0] === 6 && _.label < t[1]) {
9066
+ _.label = t[1];
9067
+ t = op;
9068
+ break;
9069
+ }
9070
+ if (t && _.label < t[2]) {
9071
+ _.label = t[2];
9072
+ _.ops.push(op);
9073
+ break;
9074
+ }
9075
+ if (t[2]) _.ops.pop();
9076
+ _.trys.pop();
9077
+ continue;
9078
+ }
9079
+ op = body.call(thisArg, _);
9080
+ } catch (e) {
9081
+ op = [6, e];
9082
+ y = 0;
9083
+ } finally {
9084
+ f = t = 0;
9085
+ }
9086
+ if (op[0] & 5) throw op[1];
9087
+ return { value: op[0] ? op[1] : void 0, done: true };
9088
+ }
9089
+ }
9090
+ function __read(o, n) {
9091
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
9092
+ if (!m) return o;
9093
+ var i = m.call(o), r, ar = [], e;
9094
+ try {
9095
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
9096
+ } catch (error) {
9097
+ e = { error };
9098
+ } finally {
9099
+ try {
9100
+ if (r && !r.done && (m = i["return"])) m.call(i);
9101
+ } finally {
9102
+ if (e) throw e.error;
9103
+ }
9104
+ }
9105
+ return ar;
9106
+ }
9107
+ function __spreadArray(to, from, pack) {
9108
+ if (arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
9109
+ if (ar || !(i in from)) {
9110
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
9111
+ ar[i] = from[i];
9112
+ }
9113
+ }
9114
+ return to.concat(ar || Array.prototype.slice.call(from));
9115
+ }
9116
+
9117
+ // ../../node_modules/.pnpm/file-selector@0.6.0/node_modules/file-selector/dist/es5/file.js
9118
+ var COMMON_MIME_TYPES = /* @__PURE__ */ new Map([
9119
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
9120
+ ["aac", "audio/aac"],
9121
+ ["abw", "application/x-abiword"],
9122
+ ["arc", "application/x-freearc"],
9123
+ ["avif", "image/avif"],
9124
+ ["avi", "video/x-msvideo"],
9125
+ ["azw", "application/vnd.amazon.ebook"],
9126
+ ["bin", "application/octet-stream"],
9127
+ ["bmp", "image/bmp"],
9128
+ ["bz", "application/x-bzip"],
9129
+ ["bz2", "application/x-bzip2"],
9130
+ ["cda", "application/x-cdf"],
9131
+ ["csh", "application/x-csh"],
9132
+ ["css", "text/css"],
9133
+ ["csv", "text/csv"],
9134
+ ["doc", "application/msword"],
9135
+ ["docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
9136
+ ["eot", "application/vnd.ms-fontobject"],
9137
+ ["epub", "application/epub+zip"],
9138
+ ["gz", "application/gzip"],
9139
+ ["gif", "image/gif"],
9140
+ ["heic", "image/heic"],
9141
+ ["heif", "image/heif"],
9142
+ ["htm", "text/html"],
9143
+ ["html", "text/html"],
9144
+ ["ico", "image/vnd.microsoft.icon"],
9145
+ ["ics", "text/calendar"],
9146
+ ["jar", "application/java-archive"],
9147
+ ["jpeg", "image/jpeg"],
9148
+ ["jpg", "image/jpeg"],
9149
+ ["js", "text/javascript"],
9150
+ ["json", "application/json"],
9151
+ ["jsonld", "application/ld+json"],
9152
+ ["mid", "audio/midi"],
9153
+ ["midi", "audio/midi"],
9154
+ ["mjs", "text/javascript"],
9155
+ ["mp3", "audio/mpeg"],
9156
+ ["mp4", "video/mp4"],
9157
+ ["mpeg", "video/mpeg"],
9158
+ ["mpkg", "application/vnd.apple.installer+xml"],
9159
+ ["odp", "application/vnd.oasis.opendocument.presentation"],
9160
+ ["ods", "application/vnd.oasis.opendocument.spreadsheet"],
9161
+ ["odt", "application/vnd.oasis.opendocument.text"],
9162
+ ["oga", "audio/ogg"],
9163
+ ["ogv", "video/ogg"],
9164
+ ["ogx", "application/ogg"],
9165
+ ["opus", "audio/opus"],
9166
+ ["otf", "font/otf"],
9167
+ ["png", "image/png"],
9168
+ ["pdf", "application/pdf"],
9169
+ ["php", "application/x-httpd-php"],
9170
+ ["ppt", "application/vnd.ms-powerpoint"],
9171
+ ["pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"],
9172
+ ["rar", "application/vnd.rar"],
9173
+ ["rtf", "application/rtf"],
9174
+ ["sh", "application/x-sh"],
9175
+ ["svg", "image/svg+xml"],
9176
+ ["swf", "application/x-shockwave-flash"],
9177
+ ["tar", "application/x-tar"],
9178
+ ["tif", "image/tiff"],
9179
+ ["tiff", "image/tiff"],
9180
+ ["ts", "video/mp2t"],
9181
+ ["ttf", "font/ttf"],
9182
+ ["txt", "text/plain"],
9183
+ ["vsd", "application/vnd.visio"],
9184
+ ["wav", "audio/wav"],
9185
+ ["weba", "audio/webm"],
9186
+ ["webm", "video/webm"],
9187
+ ["webp", "image/webp"],
9188
+ ["woff", "font/woff"],
9189
+ ["woff2", "font/woff2"],
9190
+ ["xhtml", "application/xhtml+xml"],
9191
+ ["xls", "application/vnd.ms-excel"],
9192
+ ["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
9193
+ ["xml", "application/xml"],
9194
+ ["xul", "application/vnd.mozilla.xul+xml"],
9195
+ ["zip", "application/zip"],
9196
+ ["7z", "application/x-7z-compressed"],
9197
+ // Others
9198
+ ["mkv", "video/x-matroska"],
9199
+ ["mov", "video/quicktime"],
9200
+ ["msg", "application/vnd.ms-outlook"]
9201
+ ]);
9202
+ function toFileWithPath(file, path) {
9203
+ var f = withMimeType(file);
9204
+ if (typeof f.path !== "string") {
9205
+ var webkitRelativePath = file.webkitRelativePath;
9206
+ Object.defineProperty(f, "path", {
9207
+ value: typeof path === "string" ? path : typeof webkitRelativePath === "string" && webkitRelativePath.length > 0 ? webkitRelativePath : file.name,
9208
+ writable: false,
9209
+ configurable: false,
9210
+ enumerable: true
9211
+ });
9212
+ }
9213
+ return f;
9214
+ }
9215
+ function withMimeType(file) {
9216
+ var name = file.name;
9217
+ var hasExtension = name && name.lastIndexOf(".") !== -1;
9218
+ if (hasExtension && !file.type) {
9219
+ var ext = name.split(".").pop().toLowerCase();
9220
+ var type = COMMON_MIME_TYPES.get(ext);
9221
+ if (type) {
9222
+ Object.defineProperty(file, "type", {
9223
+ value: type,
9224
+ writable: false,
9225
+ configurable: false,
9226
+ enumerable: true
9227
+ });
9228
+ }
9229
+ }
9230
+ return file;
9231
+ }
9232
+
9233
+ // ../../node_modules/.pnpm/file-selector@0.6.0/node_modules/file-selector/dist/es5/file-selector.js
9234
+ var FILES_TO_IGNORE = [
9235
+ // Thumbnail cache files for macOS and Windows
9236
+ ".DS_Store",
9237
+ "Thumbs.db"
9238
+ // Windows
9239
+ ];
9240
+ function fromEvent(evt) {
9241
+ return __awaiter(this, void 0, void 0, function() {
9242
+ return __generator(this, function(_a) {
9243
+ if (isObject(evt) && isDataTransfer(evt.dataTransfer)) {
9244
+ return [2, getDataTransferFiles(evt.dataTransfer, evt.type)];
9245
+ } else if (isChangeEvt(evt)) {
9246
+ return [2, getInputFiles(evt)];
9247
+ } else if (Array.isArray(evt) && evt.every(function(item) {
9248
+ return "getFile" in item && typeof item.getFile === "function";
9249
+ })) {
9250
+ return [2, getFsHandleFiles(evt)];
9251
+ }
9252
+ return [2, []];
9253
+ });
9254
+ });
9255
+ }
9256
+ function isDataTransfer(value) {
9257
+ return isObject(value);
9258
+ }
9259
+ function isChangeEvt(value) {
9260
+ return isObject(value) && isObject(value.target);
9261
+ }
9262
+ function isObject(v) {
9263
+ return typeof v === "object" && v !== null;
9264
+ }
9265
+ function getInputFiles(evt) {
9266
+ return fromList(evt.target.files).map(function(file) {
9267
+ return toFileWithPath(file);
9268
+ });
9269
+ }
9270
+ function getFsHandleFiles(handles) {
9271
+ return __awaiter(this, void 0, void 0, function() {
9272
+ var files;
9273
+ return __generator(this, function(_a) {
9274
+ switch (_a.label) {
9275
+ case 0:
9276
+ return [4, Promise.all(handles.map(function(h) {
9277
+ return h.getFile();
9278
+ }))];
9279
+ case 1:
9280
+ files = _a.sent();
9281
+ return [2, files.map(function(file) {
9282
+ return toFileWithPath(file);
9283
+ })];
9284
+ }
9285
+ });
9286
+ });
9287
+ }
9288
+ function getDataTransferFiles(dt, type) {
9289
+ return __awaiter(this, void 0, void 0, function() {
9290
+ var items, files;
9291
+ return __generator(this, function(_a) {
9292
+ switch (_a.label) {
9293
+ case 0:
9294
+ if (!dt.items) return [3, 2];
9295
+ items = fromList(dt.items).filter(function(item) {
9296
+ return item.kind === "file";
9297
+ });
9298
+ if (type !== "drop") {
9299
+ return [2, items];
9300
+ }
9301
+ return [4, Promise.all(items.map(toFilePromises))];
9302
+ case 1:
9303
+ files = _a.sent();
9304
+ return [2, noIgnoredFiles(flatten(files))];
9305
+ case 2:
9306
+ return [2, noIgnoredFiles(fromList(dt.files).map(function(file) {
9307
+ return toFileWithPath(file);
9308
+ }))];
9309
+ }
9310
+ });
9311
+ });
9312
+ }
9313
+ function noIgnoredFiles(files) {
9314
+ return files.filter(function(file) {
9315
+ return FILES_TO_IGNORE.indexOf(file.name) === -1;
9316
+ });
9317
+ }
9318
+ function fromList(items) {
9319
+ if (items === null) {
9320
+ return [];
9321
+ }
9322
+ var files = [];
9323
+ for (var i = 0; i < items.length; i++) {
9324
+ var file = items[i];
9325
+ files.push(file);
9326
+ }
9327
+ return files;
9328
+ }
9329
+ function toFilePromises(item) {
9330
+ if (typeof item.webkitGetAsEntry !== "function") {
9331
+ return fromDataTransferItem(item);
9332
+ }
9333
+ var entry = item.webkitGetAsEntry();
9334
+ if (entry && entry.isDirectory) {
9335
+ return fromDirEntry(entry);
9336
+ }
9337
+ return fromDataTransferItem(item);
9338
+ }
9339
+ function flatten(items) {
9340
+ return items.reduce(function(acc, files) {
9341
+ return __spreadArray(__spreadArray([], __read(acc), false), __read(Array.isArray(files) ? flatten(files) : [files]), false);
9342
+ }, []);
9343
+ }
9344
+ function fromDataTransferItem(item) {
9345
+ var file = item.getAsFile();
9346
+ if (!file) {
9347
+ return Promise.reject("".concat(item, " is not a File"));
9348
+ }
9349
+ var fwp = toFileWithPath(file);
9350
+ return Promise.resolve(fwp);
9351
+ }
9352
+ function fromEntry(entry) {
9353
+ return __awaiter(this, void 0, void 0, function() {
9354
+ return __generator(this, function(_a) {
9355
+ return [2, entry.isDirectory ? fromDirEntry(entry) : fromFileEntry(entry)];
9356
+ });
9357
+ });
9358
+ }
9359
+ function fromDirEntry(entry) {
9360
+ var reader = entry.createReader();
9361
+ return new Promise(function(resolve, reject) {
9362
+ var entries = [];
9363
+ function readEntries() {
9364
+ var _this = this;
9365
+ reader.readEntries(function(batch) {
9366
+ return __awaiter(_this, void 0, void 0, function() {
9367
+ var files, err_1, items;
9368
+ return __generator(this, function(_a) {
9369
+ switch (_a.label) {
9370
+ case 0:
9371
+ if (!!batch.length) return [3, 5];
9372
+ _a.label = 1;
9373
+ case 1:
9374
+ _a.trys.push([1, 3, , 4]);
9375
+ return [4, Promise.all(entries)];
9376
+ case 2:
9377
+ files = _a.sent();
9378
+ resolve(files);
9379
+ return [3, 4];
9380
+ case 3:
9381
+ err_1 = _a.sent();
9382
+ reject(err_1);
9383
+ return [3, 4];
9384
+ case 4:
9385
+ return [3, 6];
9386
+ case 5:
9387
+ items = Promise.all(batch.map(fromEntry));
9388
+ entries.push(items);
9389
+ readEntries();
9390
+ _a.label = 6;
9391
+ case 6:
9392
+ return [
9393
+ 2
9394
+ /*return*/
9395
+ ];
9396
+ }
9397
+ });
9398
+ });
9399
+ }, function(err) {
9400
+ reject(err);
9401
+ });
9402
+ }
9403
+ readEntries();
9404
+ });
9405
+ }
9406
+ function fromFileEntry(entry) {
9407
+ return __awaiter(this, void 0, void 0, function() {
9408
+ return __generator(this, function(_a) {
9409
+ return [2, new Promise(function(resolve, reject) {
9410
+ entry.file(function(file) {
9411
+ var fwp = toFileWithPath(file, entry.fullPath);
9412
+ resolve(fwp);
9413
+ }, function(err) {
9414
+ reject(err);
9415
+ });
9416
+ })];
9417
+ });
9418
+ });
9419
+ }
9420
+
9421
+ // ../../node_modules/.pnpm/react-dropzone@14.2.3_react@19.2.7/node_modules/react-dropzone/dist/es/utils/index.js
9422
+ var import_attr_accept = __toESM(require_es());
9423
+ function _toConsumableArray(arr) {
9424
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
9425
+ }
9426
+ function _nonIterableSpread() {
9427
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9428
+ }
9429
+ function _iterableToArray(iter) {
9430
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
9431
+ }
9432
+ function _arrayWithoutHoles(arr) {
9433
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
9434
+ }
9435
+ function ownKeys(object, enumerableOnly) {
9436
+ var keys2 = Object.keys(object);
9437
+ if (Object.getOwnPropertySymbols) {
9438
+ var symbols = Object.getOwnPropertySymbols(object);
9439
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
9440
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
9441
+ })), keys2.push.apply(keys2, symbols);
9442
+ }
9443
+ return keys2;
9444
+ }
9445
+ function _objectSpread(target) {
9446
+ for (var i = 1; i < arguments.length; i++) {
9447
+ var source = null != arguments[i] ? arguments[i] : {};
9448
+ i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
9449
+ _defineProperty(target, key, source[key]);
9450
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
9451
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
9452
+ });
9453
+ }
9454
+ return target;
9455
+ }
9456
+ function _defineProperty(obj, key, value) {
9457
+ if (key in obj) {
9458
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
9459
+ } else {
9460
+ obj[key] = value;
9461
+ }
9462
+ return obj;
9463
+ }
9464
+ function _slicedToArray(arr, i) {
9465
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
9466
+ }
9467
+ function _nonIterableRest() {
9468
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9469
+ }
9470
+ function _unsupportedIterableToArray(o, minLen) {
9471
+ if (!o) return;
9472
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
9473
+ var n = Object.prototype.toString.call(o).slice(8, -1);
9474
+ if (n === "Object" && o.constructor) n = o.constructor.name;
9475
+ if (n === "Map" || n === "Set") return Array.from(o);
9476
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
9477
+ }
9478
+ function _arrayLikeToArray(arr, len) {
9479
+ if (len == null || len > arr.length) len = arr.length;
9480
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
9481
+ arr2[i] = arr[i];
9482
+ }
9483
+ return arr2;
9484
+ }
9485
+ function _iterableToArrayLimit(arr, i) {
9486
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
9487
+ if (_i == null) return;
9488
+ var _arr = [];
9489
+ var _n = true;
9490
+ var _d = false;
9491
+ var _s, _e;
9492
+ try {
9493
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
9494
+ _arr.push(_s.value);
9495
+ if (i && _arr.length === i) break;
9496
+ }
9497
+ } catch (err) {
9498
+ _d = true;
9499
+ _e = err;
9500
+ } finally {
9501
+ try {
9502
+ if (!_n && _i["return"] != null) _i["return"]();
9503
+ } finally {
9504
+ if (_d) throw _e;
9505
+ }
9506
+ }
9507
+ return _arr;
9508
+ }
9509
+ function _arrayWithHoles(arr) {
9510
+ if (Array.isArray(arr)) return arr;
9511
+ }
9512
+ var FILE_INVALID_TYPE = "file-invalid-type";
9513
+ var FILE_TOO_LARGE = "file-too-large";
9514
+ var FILE_TOO_SMALL = "file-too-small";
9515
+ var TOO_MANY_FILES = "too-many-files";
9516
+ var getInvalidTypeRejectionErr = function getInvalidTypeRejectionErr2(accept) {
9517
+ accept = Array.isArray(accept) && accept.length === 1 ? accept[0] : accept;
9518
+ var messageSuffix = Array.isArray(accept) ? "one of ".concat(accept.join(", ")) : accept;
9519
+ return {
9520
+ code: FILE_INVALID_TYPE,
9521
+ message: "File type must be ".concat(messageSuffix)
9522
+ };
9523
+ };
9524
+ var getTooLargeRejectionErr = function getTooLargeRejectionErr2(maxSize) {
9525
+ return {
9526
+ code: FILE_TOO_LARGE,
9527
+ message: "File is larger than ".concat(maxSize, " ").concat(maxSize === 1 ? "byte" : "bytes")
9528
+ };
9529
+ };
9530
+ var getTooSmallRejectionErr = function getTooSmallRejectionErr2(minSize) {
9531
+ return {
9532
+ code: FILE_TOO_SMALL,
9533
+ message: "File is smaller than ".concat(minSize, " ").concat(minSize === 1 ? "byte" : "bytes")
9534
+ };
9535
+ };
9536
+ var TOO_MANY_FILES_REJECTION = {
9537
+ code: TOO_MANY_FILES,
9538
+ message: "Too many files"
9539
+ };
9540
+ function fileAccepted(file, accept) {
9541
+ var isAcceptable = file.type === "application/x-moz-file" || (0, import_attr_accept.default)(file, accept);
9542
+ return [isAcceptable, isAcceptable ? null : getInvalidTypeRejectionErr(accept)];
9543
+ }
9544
+ function fileMatchSize(file, minSize, maxSize) {
9545
+ if (isDefined(file.size)) {
9546
+ if (isDefined(minSize) && isDefined(maxSize)) {
9547
+ if (file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];
9548
+ if (file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];
9549
+ } else if (isDefined(minSize) && file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];
9550
+ else if (isDefined(maxSize) && file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];
9551
+ }
9552
+ return [true, null];
9553
+ }
9554
+ function isDefined(value) {
9555
+ return value !== void 0 && value !== null;
9556
+ }
9557
+ function allFilesAccepted(_ref) {
9558
+ var files = _ref.files, accept = _ref.accept, minSize = _ref.minSize, maxSize = _ref.maxSize, multiple = _ref.multiple, maxFiles = _ref.maxFiles, validator = _ref.validator;
9559
+ if (!multiple && files.length > 1 || multiple && maxFiles >= 1 && files.length > maxFiles) {
9560
+ return false;
9561
+ }
9562
+ return files.every(function(file) {
9563
+ var _fileAccepted = fileAccepted(file, accept), _fileAccepted2 = _slicedToArray(_fileAccepted, 1), accepted = _fileAccepted2[0];
9564
+ var _fileMatchSize = fileMatchSize(file, minSize, maxSize), _fileMatchSize2 = _slicedToArray(_fileMatchSize, 1), sizeMatch = _fileMatchSize2[0];
9565
+ var customErrors = validator ? validator(file) : null;
9566
+ return accepted && sizeMatch && !customErrors;
9567
+ });
9568
+ }
9569
+ function isPropagationStopped(event) {
9570
+ if (typeof event.isPropagationStopped === "function") {
9571
+ return event.isPropagationStopped();
9572
+ } else if (typeof event.cancelBubble !== "undefined") {
9573
+ return event.cancelBubble;
9574
+ }
9575
+ return false;
9576
+ }
9577
+ function isEvtWithFiles(event) {
9578
+ if (!event.dataTransfer) {
9579
+ return !!event.target && !!event.target.files;
9580
+ }
9581
+ return Array.prototype.some.call(event.dataTransfer.types, function(type) {
9582
+ return type === "Files" || type === "application/x-moz-file";
9583
+ });
9584
+ }
9585
+ function onDocumentDragOver(event) {
9586
+ event.preventDefault();
9587
+ }
9588
+ function isIe(userAgent) {
9589
+ return userAgent.indexOf("MSIE") !== -1 || userAgent.indexOf("Trident/") !== -1;
9590
+ }
9591
+ function isEdge(userAgent) {
9592
+ return userAgent.indexOf("Edge/") !== -1;
9593
+ }
9594
+ function isIeOrEdge() {
9595
+ var userAgent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
9596
+ return isIe(userAgent) || isEdge(userAgent);
9597
+ }
9598
+ function composeEventHandlers() {
9599
+ for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
9600
+ fns[_key] = arguments[_key];
9601
+ }
9602
+ return function(event) {
9603
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
9604
+ args[_key2 - 1] = arguments[_key2];
9605
+ }
9606
+ return fns.some(function(fn) {
9607
+ if (!isPropagationStopped(event) && fn) {
9608
+ fn.apply(void 0, [event].concat(args));
9609
+ }
9610
+ return isPropagationStopped(event);
9611
+ });
9612
+ };
9613
+ }
9614
+ function canUseFileSystemAccessAPI() {
9615
+ return "showOpenFilePicker" in window;
9616
+ }
9617
+ function pickerOptionsFromAccept(accept) {
9618
+ if (isDefined(accept)) {
9619
+ var acceptForPicker = Object.entries(accept).filter(function(_ref2) {
9620
+ var _ref3 = _slicedToArray(_ref2, 2), mimeType = _ref3[0], ext = _ref3[1];
9621
+ var ok = true;
9622
+ if (!isMIMEType(mimeType)) {
9623
+ console.warn('Skipped "'.concat(mimeType, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.'));
9624
+ ok = false;
9625
+ }
9626
+ if (!Array.isArray(ext) || !ext.every(isExt)) {
9627
+ console.warn('Skipped "'.concat(mimeType, '" because an invalid file extension was provided.'));
9628
+ ok = false;
9629
+ }
9630
+ return ok;
9631
+ }).reduce(function(agg, _ref4) {
9632
+ var _ref5 = _slicedToArray(_ref4, 2), mimeType = _ref5[0], ext = _ref5[1];
9633
+ return _objectSpread(_objectSpread({}, agg), {}, _defineProperty({}, mimeType, ext));
9634
+ }, {});
9635
+ return [{
9636
+ // description is required due to https://crbug.com/1264708
9637
+ description: "Files",
9638
+ accept: acceptForPicker
9639
+ }];
9640
+ }
9641
+ return accept;
9642
+ }
9643
+ function acceptPropAsAcceptAttr(accept) {
9644
+ if (isDefined(accept)) {
9645
+ return Object.entries(accept).reduce(function(a, _ref6) {
9646
+ var _ref7 = _slicedToArray(_ref6, 2), mimeType = _ref7[0], ext = _ref7[1];
9647
+ return [].concat(_toConsumableArray(a), [mimeType], _toConsumableArray(ext));
9648
+ }, []).filter(function(v) {
9649
+ return isMIMEType(v) || isExt(v);
9650
+ }).join(",");
9651
+ }
9652
+ return void 0;
9653
+ }
9654
+ function isAbort(v) {
9655
+ return v instanceof DOMException && (v.name === "AbortError" || v.code === v.ABORT_ERR);
9656
+ }
9657
+ function isSecurityError(v) {
9658
+ return v instanceof DOMException && (v.name === "SecurityError" || v.code === v.SECURITY_ERR);
9659
+ }
9660
+ function isMIMEType(v) {
9661
+ return v === "audio/*" || v === "video/*" || v === "image/*" || v === "text/*" || /\w+\/[-+.\w]+/g.test(v);
9662
+ }
9663
+ function isExt(v) {
9664
+ return /^.*\.[\w]+$/.test(v);
9665
+ }
9666
+
9667
+ // ../../node_modules/.pnpm/react-dropzone@14.2.3_react@19.2.7/node_modules/react-dropzone/dist/es/index.js
9668
+ var _excluded = ["children"];
9669
+ var _excluded2 = ["open"];
9670
+ var _excluded3 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"];
9671
+ var _excluded4 = ["refKey", "onChange", "onClick"];
9672
+ function _toConsumableArray2(arr) {
9673
+ return _arrayWithoutHoles2(arr) || _iterableToArray2(arr) || _unsupportedIterableToArray2(arr) || _nonIterableSpread2();
9674
+ }
9675
+ function _nonIterableSpread2() {
9676
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9677
+ }
9678
+ function _iterableToArray2(iter) {
9679
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
9680
+ }
9681
+ function _arrayWithoutHoles2(arr) {
9682
+ if (Array.isArray(arr)) return _arrayLikeToArray2(arr);
9683
+ }
9684
+ function _slicedToArray2(arr, i) {
9685
+ return _arrayWithHoles2(arr) || _iterableToArrayLimit2(arr, i) || _unsupportedIterableToArray2(arr, i) || _nonIterableRest2();
9686
+ }
9687
+ function _nonIterableRest2() {
9688
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9689
+ }
9690
+ function _unsupportedIterableToArray2(o, minLen) {
9691
+ if (!o) return;
9692
+ if (typeof o === "string") return _arrayLikeToArray2(o, minLen);
9693
+ var n = Object.prototype.toString.call(o).slice(8, -1);
9694
+ if (n === "Object" && o.constructor) n = o.constructor.name;
9695
+ if (n === "Map" || n === "Set") return Array.from(o);
9696
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray2(o, minLen);
9697
+ }
9698
+ function _arrayLikeToArray2(arr, len) {
9699
+ if (len == null || len > arr.length) len = arr.length;
9700
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
9701
+ arr2[i] = arr[i];
9702
+ }
9703
+ return arr2;
9704
+ }
9705
+ function _iterableToArrayLimit2(arr, i) {
9706
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
9707
+ if (_i == null) return;
9708
+ var _arr = [];
9709
+ var _n = true;
9710
+ var _d = false;
9711
+ var _s, _e;
9712
+ try {
9713
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
9714
+ _arr.push(_s.value);
9715
+ if (i && _arr.length === i) break;
9716
+ }
9717
+ } catch (err) {
9718
+ _d = true;
9719
+ _e = err;
9720
+ } finally {
9721
+ try {
9722
+ if (!_n && _i["return"] != null) _i["return"]();
9723
+ } finally {
9724
+ if (_d) throw _e;
9725
+ }
9726
+ }
9727
+ return _arr;
9728
+ }
9729
+ function _arrayWithHoles2(arr) {
9730
+ if (Array.isArray(arr)) return arr;
9731
+ }
9732
+ function ownKeys2(object, enumerableOnly) {
9733
+ var keys2 = Object.keys(object);
9734
+ if (Object.getOwnPropertySymbols) {
9735
+ var symbols = Object.getOwnPropertySymbols(object);
9736
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
9737
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
9738
+ })), keys2.push.apply(keys2, symbols);
9739
+ }
9740
+ return keys2;
9741
+ }
9742
+ function _objectSpread2(target) {
9743
+ for (var i = 1; i < arguments.length; i++) {
9744
+ var source = null != arguments[i] ? arguments[i] : {};
9745
+ i % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
9746
+ _defineProperty2(target, key, source[key]);
9747
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
9748
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
9749
+ });
9750
+ }
9751
+ return target;
9752
+ }
9753
+ function _defineProperty2(obj, key, value) {
9754
+ if (key in obj) {
9755
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
9756
+ } else {
9757
+ obj[key] = value;
9758
+ }
9759
+ return obj;
9760
+ }
9761
+ function _objectWithoutProperties(source, excluded) {
9762
+ if (source == null) return {};
9763
+ var target = _objectWithoutPropertiesLoose(source, excluded);
9764
+ var key, i;
9765
+ if (Object.getOwnPropertySymbols) {
9766
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
9767
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
9768
+ key = sourceSymbolKeys[i];
9769
+ if (excluded.indexOf(key) >= 0) continue;
9770
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
9771
+ target[key] = source[key];
9772
+ }
9773
+ }
9774
+ return target;
9775
+ }
9776
+ function _objectWithoutPropertiesLoose(source, excluded) {
9777
+ if (source == null) return {};
9778
+ var target = {};
9779
+ var sourceKeys = Object.keys(source);
9780
+ var key, i;
9781
+ for (i = 0; i < sourceKeys.length; i++) {
9782
+ key = sourceKeys[i];
9783
+ if (excluded.indexOf(key) >= 0) continue;
9784
+ target[key] = source[key];
9785
+ }
9786
+ return target;
9787
+ }
9788
+ var Dropzone = /* @__PURE__ */ forwardRef(function(_ref, ref) {
9789
+ var children = _ref.children, params = _objectWithoutProperties(_ref, _excluded);
9790
+ var _useDropzone = useDropzone(params), open = _useDropzone.open, props = _objectWithoutProperties(_useDropzone, _excluded2);
9791
+ useImperativeHandle(ref, function() {
9792
+ return {
9793
+ open
9794
+ };
9795
+ }, [open]);
9796
+ return /* @__PURE__ */ React.createElement(Fragment, null, children(_objectSpread2(_objectSpread2({}, props), {}, {
9797
+ open
9798
+ })));
9799
+ });
9800
+ Dropzone.displayName = "Dropzone";
9801
+ var defaultProps = {
9802
+ disabled: false,
9803
+ getFilesFromEvent: fromEvent,
9804
+ maxSize: Infinity,
9805
+ minSize: 0,
9806
+ multiple: true,
9807
+ maxFiles: 0,
9808
+ preventDropOnDocument: true,
9809
+ noClick: false,
9810
+ noKeyboard: false,
9811
+ noDrag: false,
9812
+ noDragEventsBubbling: false,
9813
+ validator: null,
9814
+ useFsAccessApi: true,
9815
+ autoFocus: false
9816
+ };
9817
+ Dropzone.defaultProps = defaultProps;
9818
+ Dropzone.propTypes = {
9819
+ /**
9820
+ * Render function that exposes the dropzone state and prop getter fns
9821
+ *
9822
+ * @param {object} params
9823
+ * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render
9824
+ * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render
9825
+ * @param {Function} params.open Open the native file selection dialog
9826
+ * @param {boolean} params.isFocused Dropzone area is in focus
9827
+ * @param {boolean} params.isFileDialogActive File dialog is opened
9828
+ * @param {boolean} params.isDragActive Active drag is in progress
9829
+ * @param {boolean} params.isDragAccept Dragged files are accepted
9830
+ * @param {boolean} params.isDragReject Some dragged files are rejected
9831
+ * @param {File[]} params.acceptedFiles Accepted files
9832
+ * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
9833
+ */
9834
+ children: import_prop_types.default.func,
9835
+ /**
9836
+ * Set accepted file types.
9837
+ * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
9838
+ * Keep in mind that mime type determination is not reliable across platforms. CSV files,
9839
+ * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
9840
+ * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
9841
+ */
9842
+ accept: import_prop_types.default.objectOf(import_prop_types.default.arrayOf(import_prop_types.default.string)),
9843
+ /**
9844
+ * Allow drag 'n' drop (or selection from the file dialog) of multiple files
9845
+ */
9846
+ multiple: import_prop_types.default.bool,
9847
+ /**
9848
+ * If false, allow dropped items to take over the current browser window
9849
+ */
9850
+ preventDropOnDocument: import_prop_types.default.bool,
9851
+ /**
9852
+ * If true, disables click to open the native file selection dialog
9853
+ */
9854
+ noClick: import_prop_types.default.bool,
9855
+ /**
9856
+ * If true, disables SPACE/ENTER to open the native file selection dialog.
9857
+ * Note that it also stops tracking the focus state.
9858
+ */
9859
+ noKeyboard: import_prop_types.default.bool,
9860
+ /**
9861
+ * If true, disables drag 'n' drop
9862
+ */
9863
+ noDrag: import_prop_types.default.bool,
9864
+ /**
9865
+ * If true, stops drag event propagation to parents
9866
+ */
9867
+ noDragEventsBubbling: import_prop_types.default.bool,
9868
+ /**
9869
+ * Minimum file size (in bytes)
9870
+ */
9871
+ minSize: import_prop_types.default.number,
9872
+ /**
9873
+ * Maximum file size (in bytes)
9874
+ */
9875
+ maxSize: import_prop_types.default.number,
9876
+ /**
9877
+ * Maximum accepted number of files
9878
+ * The default value is 0 which means there is no limitation to how many files are accepted.
9879
+ */
9880
+ maxFiles: import_prop_types.default.number,
9881
+ /**
9882
+ * Enable/disable the dropzone
9883
+ */
9884
+ disabled: import_prop_types.default.bool,
9885
+ /**
9886
+ * Use this to provide a custom file aggregator
9887
+ *
9888
+ * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
9889
+ */
9890
+ getFilesFromEvent: import_prop_types.default.func,
9891
+ /**
9892
+ * Cb for when closing the file dialog with no selection
9893
+ */
9894
+ onFileDialogCancel: import_prop_types.default.func,
9895
+ /**
9896
+ * Cb for when opening the file dialog
9897
+ */
9898
+ onFileDialogOpen: import_prop_types.default.func,
9899
+ /**
9900
+ * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
9901
+ * to open the file picker instead of using an `<input type="file">` click event.
9902
+ */
9903
+ useFsAccessApi: import_prop_types.default.bool,
9904
+ /**
9905
+ * Set to true to focus the root element on render
9906
+ */
9907
+ autoFocus: import_prop_types.default.bool,
9908
+ /**
9909
+ * Cb for when the `dragenter` event occurs.
9910
+ *
9911
+ * @param {DragEvent} event
9912
+ */
9913
+ onDragEnter: import_prop_types.default.func,
9914
+ /**
9915
+ * Cb for when the `dragleave` event occurs
9916
+ *
9917
+ * @param {DragEvent} event
9918
+ */
9919
+ onDragLeave: import_prop_types.default.func,
9920
+ /**
9921
+ * Cb for when the `dragover` event occurs
9922
+ *
9923
+ * @param {DragEvent} event
9924
+ */
9925
+ onDragOver: import_prop_types.default.func,
9926
+ /**
9927
+ * Cb for when the `drop` event occurs.
9928
+ * Note that this callback is invoked after the `getFilesFromEvent` callback is done.
9929
+ *
9930
+ * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.
9931
+ * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.
9932
+ * If `multiple` is set to false and additional files are dropped,
9933
+ * all files besides the first will be rejected.
9934
+ * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.
9935
+ *
9936
+ * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.
9937
+ * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.
9938
+ *
9939
+ * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.
9940
+ * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:
9941
+ *
9942
+ * ```js
9943
+ * function onDrop(acceptedFiles) {
9944
+ * const req = request.post('/upload')
9945
+ * acceptedFiles.forEach(file => {
9946
+ * req.attach(file.name, file)
9947
+ * })
9948
+ * req.end(callback)
9949
+ * }
9950
+ * ```
9951
+ *
9952
+ * @param {File[]} acceptedFiles
9953
+ * @param {FileRejection[]} fileRejections
9954
+ * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
9955
+ */
9956
+ onDrop: import_prop_types.default.func,
9957
+ /**
9958
+ * Cb for when the `drop` event occurs.
9959
+ * Note that if no files are accepted, this callback is not invoked.
9960
+ *
9961
+ * @param {File[]} files
9962
+ * @param {(DragEvent|Event)} event
9963
+ */
9964
+ onDropAccepted: import_prop_types.default.func,
9965
+ /**
9966
+ * Cb for when the `drop` event occurs.
9967
+ * Note that if no files are rejected, this callback is not invoked.
9968
+ *
9969
+ * @param {FileRejection[]} fileRejections
9970
+ * @param {(DragEvent|Event)} event
9971
+ */
9972
+ onDropRejected: import_prop_types.default.func,
9973
+ /**
9974
+ * Cb for when there's some error from any of the promises.
9975
+ *
9976
+ * @param {Error} error
9977
+ */
9978
+ onError: import_prop_types.default.func,
9979
+ /**
9980
+ * Custom validation function. It must return null if there's no errors.
9981
+ * @param {File} file
9982
+ * @returns {FileError|FileError[]|null}
9983
+ */
9984
+ validator: import_prop_types.default.func
9985
+ };
9986
+ var initialState = {
9987
+ isFocused: false,
9988
+ isFileDialogActive: false,
9989
+ isDragActive: false,
9990
+ isDragAccept: false,
9991
+ isDragReject: false,
9992
+ acceptedFiles: [],
9993
+ fileRejections: []
9994
+ };
9995
+ function useDropzone() {
9996
+ var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
9997
+ var _defaultProps$props = _objectSpread2(_objectSpread2({}, defaultProps), props), accept = _defaultProps$props.accept, disabled = _defaultProps$props.disabled, getFilesFromEvent = _defaultProps$props.getFilesFromEvent, maxSize = _defaultProps$props.maxSize, minSize = _defaultProps$props.minSize, multiple = _defaultProps$props.multiple, maxFiles = _defaultProps$props.maxFiles, onDragEnter = _defaultProps$props.onDragEnter, onDragLeave = _defaultProps$props.onDragLeave, onDragOver = _defaultProps$props.onDragOver, onDrop = _defaultProps$props.onDrop, onDropAccepted = _defaultProps$props.onDropAccepted, onDropRejected = _defaultProps$props.onDropRejected, onFileDialogCancel = _defaultProps$props.onFileDialogCancel, onFileDialogOpen = _defaultProps$props.onFileDialogOpen, useFsAccessApi = _defaultProps$props.useFsAccessApi, autoFocus = _defaultProps$props.autoFocus, preventDropOnDocument = _defaultProps$props.preventDropOnDocument, noClick = _defaultProps$props.noClick, noKeyboard = _defaultProps$props.noKeyboard, noDrag = _defaultProps$props.noDrag, noDragEventsBubbling = _defaultProps$props.noDragEventsBubbling, onError = _defaultProps$props.onError, validator = _defaultProps$props.validator;
9998
+ var acceptAttr = useMemo(function() {
9999
+ return acceptPropAsAcceptAttr(accept);
10000
+ }, [accept]);
10001
+ var pickerTypes = useMemo(function() {
10002
+ return pickerOptionsFromAccept(accept);
10003
+ }, [accept]);
10004
+ var onFileDialogOpenCb = useMemo(function() {
10005
+ return typeof onFileDialogOpen === "function" ? onFileDialogOpen : noop4;
10006
+ }, [onFileDialogOpen]);
10007
+ var onFileDialogCancelCb = useMemo(function() {
10008
+ return typeof onFileDialogCancel === "function" ? onFileDialogCancel : noop4;
10009
+ }, [onFileDialogCancel]);
10010
+ var rootRef = useRef(null);
10011
+ var inputRef = useRef(null);
10012
+ var _useReducer = useReducer(reducer, initialState), _useReducer2 = _slicedToArray2(_useReducer, 2), state = _useReducer2[0], dispatch = _useReducer2[1];
10013
+ var isFocused = state.isFocused, isFileDialogActive = state.isFileDialogActive;
10014
+ var fsAccessApiWorksRef = useRef(typeof window !== "undefined" && window.isSecureContext && useFsAccessApi && canUseFileSystemAccessAPI());
10015
+ var onWindowFocus = function onWindowFocus2() {
10016
+ if (!fsAccessApiWorksRef.current && isFileDialogActive) {
10017
+ setTimeout(function() {
10018
+ if (inputRef.current) {
10019
+ var files = inputRef.current.files;
10020
+ if (!files.length) {
10021
+ dispatch({
10022
+ type: "closeDialog"
10023
+ });
10024
+ onFileDialogCancelCb();
10025
+ }
10026
+ }
10027
+ }, 300);
10028
+ }
10029
+ };
10030
+ useEffect(function() {
10031
+ window.addEventListener("focus", onWindowFocus, false);
10032
+ return function() {
10033
+ window.removeEventListener("focus", onWindowFocus, false);
10034
+ };
10035
+ }, [inputRef, isFileDialogActive, onFileDialogCancelCb, fsAccessApiWorksRef]);
10036
+ var dragTargetsRef = useRef([]);
10037
+ var onDocumentDrop = function onDocumentDrop2(event) {
10038
+ if (rootRef.current && rootRef.current.contains(event.target)) {
10039
+ return;
10040
+ }
10041
+ event.preventDefault();
10042
+ dragTargetsRef.current = [];
10043
+ };
10044
+ useEffect(function() {
10045
+ if (preventDropOnDocument) {
10046
+ document.addEventListener("dragover", onDocumentDragOver, false);
10047
+ document.addEventListener("drop", onDocumentDrop, false);
10048
+ }
10049
+ return function() {
10050
+ if (preventDropOnDocument) {
10051
+ document.removeEventListener("dragover", onDocumentDragOver);
10052
+ document.removeEventListener("drop", onDocumentDrop);
10053
+ }
10054
+ };
10055
+ }, [rootRef, preventDropOnDocument]);
10056
+ useEffect(function() {
10057
+ if (!disabled && autoFocus && rootRef.current) {
10058
+ rootRef.current.focus();
10059
+ }
10060
+ return function() {
10061
+ };
10062
+ }, [rootRef, autoFocus, disabled]);
10063
+ var onErrCb = useCallback(function(e) {
10064
+ if (onError) {
10065
+ onError(e);
10066
+ } else {
10067
+ console.error(e);
10068
+ }
10069
+ }, [onError]);
10070
+ var onDragEnterCb = useCallback(function(event) {
10071
+ event.preventDefault();
10072
+ event.persist();
10073
+ stopPropagation2(event);
10074
+ dragTargetsRef.current = [].concat(_toConsumableArray2(dragTargetsRef.current), [event.target]);
10075
+ if (isEvtWithFiles(event)) {
10076
+ Promise.resolve(getFilesFromEvent(event)).then(function(files) {
10077
+ if (isPropagationStopped(event) && !noDragEventsBubbling) {
10078
+ return;
10079
+ }
10080
+ var fileCount = files.length;
10081
+ var isDragAccept = fileCount > 0 && allFilesAccepted({
10082
+ files,
10083
+ accept: acceptAttr,
10084
+ minSize,
10085
+ maxSize,
10086
+ multiple,
10087
+ maxFiles,
10088
+ validator
10089
+ });
10090
+ var isDragReject = fileCount > 0 && !isDragAccept;
10091
+ dispatch({
10092
+ isDragAccept,
10093
+ isDragReject,
10094
+ isDragActive: true,
10095
+ type: "setDraggedFiles"
10096
+ });
10097
+ if (onDragEnter) {
10098
+ onDragEnter(event);
10099
+ }
10100
+ }).catch(function(e) {
10101
+ return onErrCb(e);
10102
+ });
10103
+ }
10104
+ }, [getFilesFromEvent, onDragEnter, onErrCb, noDragEventsBubbling, acceptAttr, minSize, maxSize, multiple, maxFiles, validator]);
10105
+ var onDragOverCb = useCallback(function(event) {
10106
+ event.preventDefault();
10107
+ event.persist();
10108
+ stopPropagation2(event);
10109
+ var hasFiles = isEvtWithFiles(event);
10110
+ if (hasFiles && event.dataTransfer) {
10111
+ try {
10112
+ event.dataTransfer.dropEffect = "copy";
10113
+ } catch (_unused) {
10114
+ }
10115
+ }
10116
+ if (hasFiles && onDragOver) {
10117
+ onDragOver(event);
10118
+ }
10119
+ return false;
10120
+ }, [onDragOver, noDragEventsBubbling]);
10121
+ var onDragLeaveCb = useCallback(function(event) {
10122
+ event.preventDefault();
10123
+ event.persist();
10124
+ stopPropagation2(event);
10125
+ var targets = dragTargetsRef.current.filter(function(target) {
10126
+ return rootRef.current && rootRef.current.contains(target);
10127
+ });
10128
+ var targetIdx = targets.indexOf(event.target);
10129
+ if (targetIdx !== -1) {
10130
+ targets.splice(targetIdx, 1);
10131
+ }
10132
+ dragTargetsRef.current = targets;
10133
+ if (targets.length > 0) {
10134
+ return;
10135
+ }
10136
+ dispatch({
10137
+ type: "setDraggedFiles",
10138
+ isDragActive: false,
10139
+ isDragAccept: false,
10140
+ isDragReject: false
10141
+ });
10142
+ if (isEvtWithFiles(event) && onDragLeave) {
10143
+ onDragLeave(event);
10144
+ }
10145
+ }, [rootRef, onDragLeave, noDragEventsBubbling]);
10146
+ var setFiles = useCallback(function(files, event) {
10147
+ var acceptedFiles = [];
10148
+ var fileRejections = [];
10149
+ files.forEach(function(file) {
10150
+ var _fileAccepted = fileAccepted(file, acceptAttr), _fileAccepted2 = _slicedToArray2(_fileAccepted, 2), accepted = _fileAccepted2[0], acceptError = _fileAccepted2[1];
10151
+ var _fileMatchSize = fileMatchSize(file, minSize, maxSize), _fileMatchSize2 = _slicedToArray2(_fileMatchSize, 2), sizeMatch = _fileMatchSize2[0], sizeError = _fileMatchSize2[1];
10152
+ var customErrors = validator ? validator(file) : null;
10153
+ if (accepted && sizeMatch && !customErrors) {
10154
+ acceptedFiles.push(file);
10155
+ } else {
10156
+ var errors = [acceptError, sizeError];
10157
+ if (customErrors) {
10158
+ errors = errors.concat(customErrors);
10159
+ }
10160
+ fileRejections.push({
10161
+ file,
10162
+ errors: errors.filter(function(e) {
10163
+ return e;
10164
+ })
10165
+ });
10166
+ }
10167
+ });
10168
+ if (!multiple && acceptedFiles.length > 1 || multiple && maxFiles >= 1 && acceptedFiles.length > maxFiles) {
10169
+ acceptedFiles.forEach(function(file) {
10170
+ fileRejections.push({
10171
+ file,
10172
+ errors: [TOO_MANY_FILES_REJECTION]
10173
+ });
10174
+ });
10175
+ acceptedFiles.splice(0);
10176
+ }
10177
+ dispatch({
10178
+ acceptedFiles,
10179
+ fileRejections,
10180
+ type: "setFiles"
10181
+ });
10182
+ if (onDrop) {
10183
+ onDrop(acceptedFiles, fileRejections, event);
10184
+ }
10185
+ if (fileRejections.length > 0 && onDropRejected) {
10186
+ onDropRejected(fileRejections, event);
10187
+ }
10188
+ if (acceptedFiles.length > 0 && onDropAccepted) {
10189
+ onDropAccepted(acceptedFiles, event);
10190
+ }
10191
+ }, [dispatch, multiple, acceptAttr, minSize, maxSize, maxFiles, onDrop, onDropAccepted, onDropRejected, validator]);
10192
+ var onDropCb = useCallback(function(event) {
10193
+ event.preventDefault();
10194
+ event.persist();
10195
+ stopPropagation2(event);
10196
+ dragTargetsRef.current = [];
10197
+ if (isEvtWithFiles(event)) {
10198
+ Promise.resolve(getFilesFromEvent(event)).then(function(files) {
10199
+ if (isPropagationStopped(event) && !noDragEventsBubbling) {
10200
+ return;
10201
+ }
10202
+ setFiles(files, event);
10203
+ }).catch(function(e) {
10204
+ return onErrCb(e);
10205
+ });
7658
10206
  }
7659
- );
7660
- };
7661
- var CREATE_ITEM_VALUE = "create-new-tag";
7662
- var defaultOptions = [];
7663
- var TagSelectList = ({ options = defaultOptions, onAdd, onCreate }) => {
7664
- const [selected, setSelected] = useState([]);
7665
- const handleOnSelect = (value) => {
7666
- setSelected(
7667
- (currSelected) => currSelected.includes(value) ? currSelected.filter((x) => x !== value) : [...currSelected, value]
7668
- );
7669
- };
7670
- const handleFilter = (value, search, keywords) => {
7671
- if (value === CREATE_ITEM_VALUE) return 1;
7672
- return defaultFilter(value, search, keywords);
7673
- };
7674
- return /* @__PURE__ */ jsxs(Fragment, { children: [
7675
- /* @__PURE__ */ jsxs(Command, { filter: handleFilter, className: "tw-flex tw-flex-col", children: [
7676
- /* @__PURE__ */ jsx("div", { className: "tw-border-b tw-border-neutral-100 tw-p-3", children: /* @__PURE__ */ jsx(
7677
- Command.Input,
7678
- {
7679
- variant: "secondary",
7680
- prefix: /* @__PURE__ */ jsx(icons_exports.Search, { className: "tw-size-4 tw-text-neutral-400" }),
7681
- placeholder: "Search tags",
7682
- allowClear: true
10207
+ dispatch({
10208
+ type: "reset"
10209
+ });
10210
+ }, [getFilesFromEvent, setFiles, onErrCb, noDragEventsBubbling]);
10211
+ var openFileDialog = useCallback(function() {
10212
+ if (fsAccessApiWorksRef.current) {
10213
+ dispatch({
10214
+ type: "openDialog"
10215
+ });
10216
+ onFileDialogOpenCb();
10217
+ var opts = {
10218
+ multiple,
10219
+ types: pickerTypes
10220
+ };
10221
+ window.showOpenFilePicker(opts).then(function(handles) {
10222
+ return getFilesFromEvent(handles);
10223
+ }).then(function(files) {
10224
+ setFiles(files, null);
10225
+ dispatch({
10226
+ type: "closeDialog"
10227
+ });
10228
+ }).catch(function(e) {
10229
+ if (isAbort(e)) {
10230
+ onFileDialogCancelCb(e);
10231
+ dispatch({
10232
+ type: "closeDialog"
10233
+ });
10234
+ } else if (isSecurityError(e)) {
10235
+ fsAccessApiWorksRef.current = false;
10236
+ if (inputRef.current) {
10237
+ inputRef.current.value = null;
10238
+ inputRef.current.click();
10239
+ } else {
10240
+ onErrCb(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."));
10241
+ }
10242
+ } else {
10243
+ onErrCb(e);
7683
10244
  }
7684
- ) }),
7685
- /* @__PURE__ */ jsxs(Command.List, { className: "tw-p-3", viewPortClassName: "tw-max-h-60", "data-content": true, children: [
7686
- /* @__PURE__ */ jsx(TagSelectCreateItem, { value: CREATE_ITEM_VALUE, onCreate }),
7687
- options.map((option) => /* @__PURE__ */ jsx(
7688
- TagSelectItem,
7689
- {
7690
- option,
7691
- onSelect: handleOnSelect,
7692
- checked: selected.includes(option.name)
7693
- },
7694
- option.name
7695
- ))
7696
- ] })
7697
- ] }),
7698
- /* @__PURE__ */ jsx(TagSelectValue, { value: selected, onAdd })
7699
- ] });
7700
- };
7701
- var TagSelectPopover = ({ children, onAdd, options, onCreate }) => {
7702
- const [isOpen, setIsOpen] = useState(false);
7703
- const handleAdd = (selected) => {
7704
- onAdd?.(selected);
7705
- setIsOpen(false);
7706
- };
7707
- const handleCreate = (search) => {
7708
- onCreate?.(search);
7709
- setIsOpen(false);
7710
- };
7711
- return /* @__PURE__ */ jsxs(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [
7712
- /* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children }),
7713
- /* @__PURE__ */ jsx(Popover.Content, { side: "bottom", align: "center", className: "tw-w-80", children: /* @__PURE__ */ jsx(TagSelectList, { onCreate: handleCreate, onAdd: handleAdd, options }) })
7714
- ] });
7715
- };
7716
- var defaultOptions2 = [];
7717
- var Tagger = ({
7718
- options = defaultOptions2,
7719
- value = defaultOptions2,
7720
- onCreate,
7721
- onValueChange,
7722
- disabled
7723
- }) => {
7724
- const isAnySelected = value.length > 0;
7725
- const isVisible = isAnySelected || !disabled;
7726
- const handleAdd = (selected) => {
7727
- const selectedSet = new Set(selected);
7728
- const addedTags = options.filter((option) => selectedSet.has(option.name));
7729
- const newAllTags = [...value, ...addedTags];
7730
- onValueChange({
7731
- action: "add",
7732
- tags: addedTags,
7733
- allTags: newAllTags
10245
+ });
10246
+ return;
10247
+ }
10248
+ if (inputRef.current) {
10249
+ dispatch({
10250
+ type: "openDialog"
10251
+ });
10252
+ onFileDialogOpenCb();
10253
+ inputRef.current.value = null;
10254
+ inputRef.current.click();
10255
+ }
10256
+ }, [dispatch, onFileDialogOpenCb, onFileDialogCancelCb, useFsAccessApi, setFiles, onErrCb, pickerTypes, multiple]);
10257
+ var onKeyDownCb = useCallback(function(event) {
10258
+ if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {
10259
+ return;
10260
+ }
10261
+ if (event.key === " " || event.key === "Enter" || event.keyCode === 32 || event.keyCode === 13) {
10262
+ event.preventDefault();
10263
+ openFileDialog();
10264
+ }
10265
+ }, [rootRef, openFileDialog]);
10266
+ var onFocusCb = useCallback(function() {
10267
+ dispatch({
10268
+ type: "focus"
7734
10269
  });
7735
- };
7736
- const handleRemove = (tagToRemove) => {
7737
- const removedTags = [tagToRemove];
7738
- const newAllTags = value.filter((option) => option.name !== tagToRemove.name);
7739
- onValueChange({
7740
- action: "remove",
7741
- tags: removedTags,
7742
- allTags: newAllTags
10270
+ }, []);
10271
+ var onBlurCb = useCallback(function() {
10272
+ dispatch({
10273
+ type: "blur"
7743
10274
  });
10275
+ }, []);
10276
+ var onClickCb = useCallback(function() {
10277
+ if (noClick) {
10278
+ return;
10279
+ }
10280
+ if (isIeOrEdge()) {
10281
+ setTimeout(openFileDialog, 0);
10282
+ } else {
10283
+ openFileDialog();
10284
+ }
10285
+ }, [noClick, openFileDialog]);
10286
+ var composeHandler = function composeHandler2(fn) {
10287
+ return disabled ? null : fn;
7744
10288
  };
7745
- const handleCreate = (search) => {
7746
- onCreate?.(search);
10289
+ var composeKeyboardHandler = function composeKeyboardHandler2(fn) {
10290
+ return noKeyboard ? null : composeHandler(fn);
7747
10291
  };
7748
- const tagsToAdd = useMemo(() => {
7749
- const addedTagsSet = new Set(value.map((tag) => tag.name));
7750
- return options?.filter((option) => !addedTagsSet.has(option.name));
7751
- }, [options, value]);
7752
- if (!isVisible) return null;
7753
- return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs("ul", { className: "tailwindcss-preflight tw-flex tw-min-h-6 tw-flex-wrap tw-items-center tw-gap-2", children: [
7754
- value.map((tag) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(TagItem, { disabled, tag, onRemove: handleRemove }) }, tag.name)),
7755
- !disabled && /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(TagSelectPopover, { options: tagsToAdd, onAdd: handleAdd, onCreate: handleCreate, children: /* @__PURE__ */ jsx(Badge, { color: "gray-inverse", asChild: true, children: /* @__PURE__ */ jsxs("button", { type: "button", className: "tw-flex tw-items-center tw-gap-1", children: [
7756
- /* @__PURE__ */ jsx(icons_exports.Plus, { className: "tw-size-4" }),
7757
- /* @__PURE__ */ jsx(
7758
- "span",
7759
- {
7760
- className: cn({
7761
- "tw-sr-only": isAnySelected
7762
- }),
7763
- children: "Add Tag"
7764
- }
7765
- )
7766
- ] }) }) }) })
7767
- ] }) });
7768
- };
10292
+ var composeDragHandler = function composeDragHandler2(fn) {
10293
+ return noDrag ? null : composeHandler(fn);
10294
+ };
10295
+ var stopPropagation2 = function stopPropagation3(event) {
10296
+ if (noDragEventsBubbling) {
10297
+ event.stopPropagation();
10298
+ }
10299
+ };
10300
+ var getRootProps = useMemo(function() {
10301
+ return function() {
10302
+ var _ref2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref2$refKey = _ref2.refKey, refKey = _ref2$refKey === void 0 ? "ref" : _ref2$refKey, role = _ref2.role, onKeyDown = _ref2.onKeyDown, onFocus = _ref2.onFocus, onBlur = _ref2.onBlur, onClick = _ref2.onClick, onDragEnter2 = _ref2.onDragEnter, onDragOver2 = _ref2.onDragOver, onDragLeave2 = _ref2.onDragLeave, onDrop2 = _ref2.onDrop, rest = _objectWithoutProperties(_ref2, _excluded3);
10303
+ return _objectSpread2(_objectSpread2(_defineProperty2({
10304
+ onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
10305
+ onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
10306
+ onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
10307
+ onClick: composeHandler(composeEventHandlers(onClick, onClickCb)),
10308
+ onDragEnter: composeDragHandler(composeEventHandlers(onDragEnter2, onDragEnterCb)),
10309
+ onDragOver: composeDragHandler(composeEventHandlers(onDragOver2, onDragOverCb)),
10310
+ onDragLeave: composeDragHandler(composeEventHandlers(onDragLeave2, onDragLeaveCb)),
10311
+ onDrop: composeDragHandler(composeEventHandlers(onDrop2, onDropCb)),
10312
+ role: typeof role === "string" && role !== "" ? role : "presentation"
10313
+ }, refKey, rootRef), !disabled && !noKeyboard ? {
10314
+ tabIndex: 0
10315
+ } : {}), rest);
10316
+ };
10317
+ }, [rootRef, onKeyDownCb, onFocusCb, onBlurCb, onClickCb, onDragEnterCb, onDragOverCb, onDragLeaveCb, onDropCb, noKeyboard, noDrag, disabled]);
10318
+ var onInputElementClick = useCallback(function(event) {
10319
+ event.stopPropagation();
10320
+ }, []);
10321
+ var getInputProps = useMemo(function() {
10322
+ return function() {
10323
+ var _ref3 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref3$refKey = _ref3.refKey, refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey, onChange = _ref3.onChange, onClick = _ref3.onClick, rest = _objectWithoutProperties(_ref3, _excluded4);
10324
+ var inputProps = _defineProperty2({
10325
+ accept: acceptAttr,
10326
+ multiple,
10327
+ type: "file",
10328
+ style: {
10329
+ display: "none"
10330
+ },
10331
+ onChange: composeHandler(composeEventHandlers(onChange, onDropCb)),
10332
+ onClick: composeHandler(composeEventHandlers(onClick, onInputElementClick)),
10333
+ tabIndex: -1
10334
+ }, refKey, inputRef);
10335
+ return _objectSpread2(_objectSpread2({}, inputProps), rest);
10336
+ };
10337
+ }, [inputRef, accept, multiple, onDropCb, disabled]);
10338
+ return _objectSpread2(_objectSpread2({}, state), {}, {
10339
+ isFocused: isFocused && !disabled,
10340
+ getRootProps,
10341
+ getInputProps,
10342
+ rootRef,
10343
+ inputRef,
10344
+ open: composeHandler(openFileDialog)
10345
+ });
10346
+ }
10347
+ function reducer(state, action) {
10348
+ switch (action.type) {
10349
+ case "focus":
10350
+ return _objectSpread2(_objectSpread2({}, state), {}, {
10351
+ isFocused: true
10352
+ });
10353
+ case "blur":
10354
+ return _objectSpread2(_objectSpread2({}, state), {}, {
10355
+ isFocused: false
10356
+ });
10357
+ case "openDialog":
10358
+ return _objectSpread2(_objectSpread2({}, initialState), {}, {
10359
+ isFileDialogActive: true
10360
+ });
10361
+ case "closeDialog":
10362
+ return _objectSpread2(_objectSpread2({}, state), {}, {
10363
+ isFileDialogActive: false
10364
+ });
10365
+ case "setDraggedFiles":
10366
+ return _objectSpread2(_objectSpread2({}, state), {}, {
10367
+ isDragActive: action.isDragActive,
10368
+ isDragAccept: action.isDragAccept,
10369
+ isDragReject: action.isDragReject
10370
+ });
10371
+ case "setFiles":
10372
+ return _objectSpread2(_objectSpread2({}, state), {}, {
10373
+ acceptedFiles: action.acceptedFiles,
10374
+ fileRejections: action.fileRejections
10375
+ });
10376
+ case "reset":
10377
+ return _objectSpread2({}, initialState);
10378
+ default:
10379
+ return state;
10380
+ }
10381
+ }
10382
+ function noop4() {
10383
+ }
7769
10384
  var FileUploadContext = createContext(null);
7770
10385
  var FileUploadProvider = FileUploadContext.Provider;
7771
10386
  var useFileUploadContext = () => {
@@ -7837,7 +10452,7 @@ var FileUploadDropZone = ({ children, className, ...rest }) => {
7837
10452
  const rootProps = getRootProps(rest);
7838
10453
  return /* @__PURE__ */ jsxs("div", { ...rootProps, className: cn(dropZoneVariants({ state }), className), children: [
7839
10454
  /* @__PURE__ */ jsx("input", { ...getInputProps() }),
7840
- children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
10455
+ children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [
7841
10456
  /* @__PURE__ */ jsx(icons_exports.Upload, { className: "tw-size-8 tw-text-muted-foreground" }),
7842
10457
  /* @__PURE__ */ jsx("p", { className: "tw-m-0 tw-text-sm tw-font-medium", children: "Drag files here or click to browse" })
7843
10458
  ] })
@@ -7873,7 +10488,6 @@ var FileUploadFileList = ({ files, onRemove, className, ...rest }) => {
7873
10488
  onRemove && /* @__PURE__ */ jsx(
7874
10489
  Button,
7875
10490
  {
7876
- argo: true,
7877
10491
  variant: "invisible",
7878
10492
  size: "icon-sm",
7879
10493
  "aria-label": `Remove ${file.name}`,
@@ -8330,7 +10944,6 @@ var PlanApproval = ({
8330
10944
  showClose && /* @__PURE__ */ jsx(
8331
10945
  Button,
8332
10946
  {
8333
- argo: true,
8334
10947
  variant: "outline",
8335
10948
  size: "icon-sm",
8336
10949
  "aria-label": closeLabel,
@@ -8377,7 +10990,6 @@ var PlanApproval = ({
8377
10990
  /* @__PURE__ */ jsx(
8378
10991
  Button,
8379
10992
  {
8380
- argo: true,
8381
10993
  type: "submit",
8382
10994
  variant: "invisible",
8383
10995
  size: "icon-sm",
@@ -8412,7 +11024,6 @@ var PlanApproval = ({
8412
11024
  isRequestingChanges ? /* @__PURE__ */ jsx(
8413
11025
  Button,
8414
11026
  {
8415
- argo: true,
8416
11027
  variant: "outline",
8417
11028
  size: "small",
8418
11029
  onClick: handleCancelChangeRequest,
@@ -8423,7 +11034,6 @@ var PlanApproval = ({
8423
11034
  ) : onRequestChanges && /* @__PURE__ */ jsx(
8424
11035
  Button,
8425
11036
  {
8426
- argo: true,
8427
11037
  variant: "outline",
8428
11038
  size: "small",
8429
11039
  onClick: handleOpenRequestChanges,
@@ -8435,7 +11045,6 @@ var PlanApproval = ({
8435
11045
  onApprove && (approveTooltip ? /* @__PURE__ */ jsx(Tooltip, { tooltip: approveTooltip, placement: "top", triggerAsChild: true, children: /* @__PURE__ */ jsx(
8436
11046
  Button,
8437
11047
  {
8438
- argo: true,
8439
11048
  variant: "primary",
8440
11049
  size: "small",
8441
11050
  onClick: onApprove,
@@ -8446,7 +11055,6 @@ var PlanApproval = ({
8446
11055
  ) }) : /* @__PURE__ */ jsx(
8447
11056
  Button,
8448
11057
  {
8449
- argo: true,
8450
11058
  variant: "primary",
8451
11059
  size: "small",
8452
11060
  onClick: onApprove,
@@ -8777,7 +11385,7 @@ var Progress = ({
8777
11385
  variant,
8778
11386
  size,
8779
11387
  ...props
8780
- }) => /* @__PURE__ */ jsx(Root$b, { ...props, ref, className: cn(variants5({ variant, size, className })), value, children: /* @__PURE__ */ jsx(
11388
+ }) => /* @__PURE__ */ jsx(Root$c, { ...props, ref, className: cn(variants5({ variant, size, className })), value, children: /* @__PURE__ */ jsx(
8781
11389
  Indicator$1,
8782
11390
  {
8783
11391
  "data-slot": "progress-indicator",
@@ -8874,7 +11482,6 @@ var Question = ({
8874
11482
  onClose && /* @__PURE__ */ jsx(
8875
11483
  Button,
8876
11484
  {
8877
- argo: true,
8878
11485
  variant: "outline",
8879
11486
  size: "icon-sm",
8880
11487
  "aria-label": "Close",
@@ -9033,7 +11640,6 @@ var Question = ({
9033
11640
  showSkip && onSkip && /* @__PURE__ */ jsx(
9034
11641
  Button,
9035
11642
  {
9036
- argo: true,
9037
11643
  variant: "outline",
9038
11644
  size: "small",
9039
11645
  onClick: onSkip,
@@ -9044,7 +11650,6 @@ var Question = ({
9044
11650
  (multiSelect || isCustomSelected) && (submitTooltip ? /* @__PURE__ */ jsx(Tooltip, { tooltip: submitTooltip, placement: "top", triggerAsChild: true, children: /* @__PURE__ */ jsx(
9045
11651
  Button,
9046
11652
  {
9047
- argo: true,
9048
11653
  variant: "primary",
9049
11654
  size: "small",
9050
11655
  onClick: onNext,
@@ -9054,7 +11659,6 @@ var Question = ({
9054
11659
  ) }) : /* @__PURE__ */ jsx(
9055
11660
  Button,
9056
11661
  {
9057
- argo: true,
9058
11662
  variant: "primary",
9059
11663
  size: "small",
9060
11664
  onClick: onNext,
@@ -9157,13 +11761,93 @@ var ThinkingIndicator = ({ label = "Thinking..." }) => {
9157
11761
  /* @__PURE__ */ jsx("span", { className: "tw-text-sm tw-italic tw-text-secondary-500", children: label })
9158
11762
  ] });
9159
11763
  };
11764
+
11765
+ // src/blocks/AIKit/usageStatsHelpers.ts
11766
+ var clampPercentage = (value) => Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : 0;
11767
+ var UsageStatsRing = ({ value, size = 16, strokeWidth = 2.5, className }) => {
11768
+ const radius = Math.max(0, (size - strokeWidth) / 2);
11769
+ const circumference = 2 * Math.PI * radius;
11770
+ const offset = circumference * (1 - clampPercentage(value) / 100);
11771
+ return /* @__PURE__ */ jsxs(
11772
+ "svg",
11773
+ {
11774
+ width: size,
11775
+ height: size,
11776
+ viewBox: `0 0 ${size} ${size}`,
11777
+ className: cn("tw--rotate-90", className),
11778
+ role: "presentation",
11779
+ children: [
11780
+ /* @__PURE__ */ jsx(
11781
+ "circle",
11782
+ {
11783
+ cx: size / 2,
11784
+ cy: size / 2,
11785
+ r: radius,
11786
+ fill: "none",
11787
+ strokeWidth,
11788
+ className: "tw-stroke-neutral-400 tw-opacity-50"
11789
+ }
11790
+ ),
11791
+ /* @__PURE__ */ jsx(
11792
+ "circle",
11793
+ {
11794
+ cx: size / 2,
11795
+ cy: size / 2,
11796
+ r: radius,
11797
+ fill: "none",
11798
+ strokeWidth,
11799
+ strokeLinecap: "round",
11800
+ strokeDasharray: circumference,
11801
+ strokeDashoffset: offset,
11802
+ className: "tw-stroke-primary tw-transition-all"
11803
+ }
11804
+ )
11805
+ ]
11806
+ }
11807
+ );
11808
+ };
11809
+ var UsageStats = ({
11810
+ value,
11811
+ alert = false,
11812
+ children,
11813
+ className,
11814
+ ariaLabel,
11815
+ align = "end",
11816
+ side = "top",
11817
+ sideOffset = 8
11818
+ }) => {
11819
+ const defaultLabel = `Usage: ${Math.round(clampPercentage(value))}%${alert ? " (usage alert)" : ""}`;
11820
+ return /* @__PURE__ */ jsxs(HoverCard, { children: [
11821
+ /* @__PURE__ */ jsx(HoverCard.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
11822
+ "span",
11823
+ {
11824
+ "aria-label": ariaLabel ?? defaultLabel,
11825
+ className: cn(
11826
+ "tw-relative tw-inline-flex tw-size-8 tw-items-center tw-justify-center",
11827
+ className
11828
+ ),
11829
+ children: [
11830
+ /* @__PURE__ */ jsx(UsageStatsRing, { value }),
11831
+ alert && /* @__PURE__ */ jsx(
11832
+ icons_exports.AlertCircle,
11833
+ {
11834
+ "data-testid": "usage-stats-alert",
11835
+ className: "tw-absolute tw--right-0.5 tw--top-0.5 tw-size-3 tw-text-error-500"
11836
+ }
11837
+ )
11838
+ ]
11839
+ }
11840
+ ) }),
11841
+ /* @__PURE__ */ jsx(HoverCard.Content, { align, side, sideOffset, children })
11842
+ ] });
11843
+ };
9160
11844
  var CollapsibleContent = ({
9161
11845
  ref,
9162
11846
  className,
9163
11847
  children,
9164
11848
  ...props
9165
11849
  }) => /* @__PURE__ */ jsx(
9166
- Content$4,
11850
+ Content$5,
9167
11851
  {
9168
11852
  ref,
9169
11853
  className: cn(
@@ -9175,7 +11859,7 @@ var CollapsibleContent = ({
9175
11859
  children
9176
11860
  }
9177
11861
  );
9178
- var Collapsible = (props) => /* @__PURE__ */ jsx(Root$c, { ...props });
11862
+ var Collapsible = (props) => /* @__PURE__ */ jsx(Root$d, { ...props });
9179
11863
  Collapsible.Trigger = CollapsibleTrigger;
9180
11864
  Collapsible.Content = CollapsibleContent;
9181
11865
  var AlertAction = ({
@@ -9242,7 +11926,7 @@ var AlertDescription = ({
9242
11926
  children
9243
11927
  }
9244
11928
  );
9245
- var VARIANT_ICONS = {
11929
+ var VARIANT_ICONS2 = {
9246
11930
  info: /* @__PURE__ */ jsx(icons_exports.Info, {}),
9247
11931
  warning: /* @__PURE__ */ jsx(icons_exports.AlertTriangle, {}),
9248
11932
  error: /* @__PURE__ */ jsx(icons_exports.AlertTriangle, {}),
@@ -9266,7 +11950,7 @@ var AlertIcon = ({ variant, icon, className, ...rest }) => /* @__PURE__ */ jsx(
9266
11950
  "group-data-[variant=success]/alert:tw-text-primary-500",
9267
11951
  className
9268
11952
  ),
9269
- children: icon ?? VARIANT_ICONS[variant]
11953
+ children: icon ?? VARIANT_ICONS2[variant]
9270
11954
  }
9271
11955
  );
9272
11956
  var AlertRoot = ({
@@ -9274,11 +11958,10 @@ var AlertRoot = ({
9274
11958
  children,
9275
11959
  className,
9276
11960
  variant,
9277
- argo = false,
9278
11961
  ...rest
9279
11962
  }) => {
9280
11963
  const isLegacy = useIsLegacyBrand();
9281
- const renderArgo = !isLegacy || argo;
11964
+ const renderArgo = !isLegacy;
9282
11965
  return /* @__PURE__ */ jsx(
9283
11966
  "div",
9284
11967
  {
@@ -9596,11 +12279,10 @@ var ToastRoot = ({
9596
12279
  duration = Infinity,
9597
12280
  variant = "info",
9598
12281
  loading = false,
9599
- icon: iconProp,
9600
- argo
12282
+ icon: iconProp
9601
12283
  }) => {
9602
12284
  const isLegacy = useIsLegacyBrand();
9603
- const renderArgo = !isLegacy || argo;
12285
+ const renderArgo = !isLegacy;
9604
12286
  const icon = (() => {
9605
12287
  if (loading) return /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-animate-spin" });
9606
12288
  if (iconProp) return iconProp;
@@ -9750,7 +12432,7 @@ var EmptySearchContent = ({ children = "No results found." }) => {
9750
12432
  var CardContent = ({ children, ...rest }) => /* @__PURE__ */ jsx("div", { ...rest, children });
9751
12433
  var CardHeader = ({ children, ...rest }) => /* @__PURE__ */ jsx("div", { ...rest, children });
9752
12434
  var cardClassnames = cva(
9753
- ["tw-flex", "tw-flex-col", "tw-rounded-lg", "tw-gap-4", "tw-bg-surface"],
12435
+ ["tw-flex", "tw-flex-col", "tw-rounded-lg", "tw-gap-4", "tw-bg-card"],
9754
12436
  {
9755
12437
  defaultVariants: {
9756
12438
  padding: "small"
@@ -9782,11 +12464,10 @@ var Card = ({
9782
12464
  className,
9783
12465
  bordered = false,
9784
12466
  padding = "small",
9785
- argo = false,
9786
12467
  ...rest
9787
12468
  }) => {
9788
12469
  const isLegacy = useIsLegacyBrand();
9789
- const renderArgo = !isLegacy || argo;
12470
+ const renderArgo = !isLegacy;
9790
12471
  return /* @__PURE__ */ jsx(
9791
12472
  "div",
9792
12473
  {
@@ -9999,7 +12680,7 @@ var ANIMATION_CLASS_NAME = cn(
9999
12680
  var Skeleton = ({ height = "md", className, count = 1 }) => {
10000
12681
  const prefixId = useId();
10001
12682
  const keys2 = Array.from({ length: count }, (_, i) => `${prefixId}-${i}`);
10002
- return /* @__PURE__ */ jsx(Fragment, { children: keys2.map((key) => /* @__PURE__ */ jsx(
12683
+ return /* @__PURE__ */ jsx(Fragment$1, { children: keys2.map((key) => /* @__PURE__ */ jsx(
10003
12684
  "div",
10004
12685
  {
10005
12686
  "data-skeleton": "true",
@@ -10386,7 +13067,7 @@ var ThemeProvider = ({
10386
13067
  };
10387
13068
  }, [brand, resolvedMode]);
10388
13069
  return /* @__PURE__ */ jsxs(ThemeContext, { value: { brand, setBrand, colorScheme, resolvedMode }, children: [
10389
- /* @__PURE__ */ jsx(AIGradientsSvg, {}),
13070
+ isRoot && /* @__PURE__ */ jsx(AIGradientsSvg, {}),
10390
13071
  children
10391
13072
  ] });
10392
13073
  };
@@ -10457,7 +13138,7 @@ var TopNavShell = ({
10457
13138
  children
10458
13139
  }
10459
13140
  );
10460
- var Root24 = ({
13141
+ var Root25 = ({
10461
13142
  ref,
10462
13143
  className,
10463
13144
  children,
@@ -10555,7 +13236,7 @@ var Aside = ({
10555
13236
  }
10556
13237
  );
10557
13238
  };
10558
- var AppShell = Object.assign(Root24, {
13239
+ var AppShell = Object.assign(Root25, {
10559
13240
  /**
10560
13241
  * Top header row. Renders above `Main` in the sidebar shell; renders as the
10561
13242
  * top bar (with full-width navigation room) in the top-nav shell.
@@ -10578,7 +13259,7 @@ var maxWidthClass = {
10578
13259
  wide: "tw-max-w-[1600px]",
10579
13260
  full: "tw-max-w-full"
10580
13261
  };
10581
- var Root25 = ({
13262
+ var Root26 = ({
10582
13263
  ref,
10583
13264
  className,
10584
13265
  maxWidth = "full",
@@ -10623,7 +13304,7 @@ var Tabs = ({
10623
13304
  children
10624
13305
  }
10625
13306
  );
10626
- var Content9 = ({
13307
+ var Content10 = ({
10627
13308
  ref,
10628
13309
  className,
10629
13310
  children,
@@ -10648,7 +13329,7 @@ var Footer = ({
10648
13329
  children
10649
13330
  }
10650
13331
  );
10651
- var PageLayout = Object.assign(Root25, {
13332
+ var PageLayout = Object.assign(Root26, {
10652
13333
  /** Detail-pattern breadcrumb row. Usually composed automatically by `PageHeader.Detail` — slot exists for layouts that don't fit either `PageHeader` variant. */
10653
13334
  Breadcrumbs,
10654
13335
  /** Host slot for `PageHeader.Index` / `PageHeader.Detail`, or custom header JSX when neither variant fits. */
@@ -10656,7 +13337,7 @@ var PageLayout = Object.assign(Root25, {
10656
13337
  /** Escape hatch for routing-based tab rows. Use `Tabs` / `TabsContent` core components inside, never a raw `<button>`. */
10657
13338
  Tabs,
10658
13339
  /** Main content slot. Lists, cards, tables. */
10659
- Content: Content9,
13340
+ Content: Content10,
10660
13341
  /** Bottom action bar — form submit + cancel. Pass `sticky` for a footer that pins to the viewport. */
10661
13342
  Footer
10662
13343
  });
@@ -10680,28 +13361,52 @@ var PageHeaderDetail = ({
10680
13361
  primaryAction,
10681
13362
  secondaryAction,
10682
13363
  headerNav,
13364
+ fullWidthDescription = false,
10683
13365
  ...props
10684
- }) => /* @__PURE__ */ jsxs("header", { ref, className: cn("tw-flex tw-w-full tw-flex-col tw-gap-4", className), ...props, children: [
10685
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-between tw-gap-4", children: [
10686
- /* @__PURE__ */ jsx("div", { className: "tw-min-w-0 tw-flex-1", children: breadcrumbs }),
10687
- overflowActions && /* @__PURE__ */ jsx("div", { className: "tw-flex tw-shrink-0 tw-items-center tw-gap-2", children: overflowActions })
10688
- ] }),
10689
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-items-start tw-justify-between tw-gap-4", children: [
10690
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-min-w-0 tw-flex-1 tw-flex-col tw-gap-2 tw-pr-2", children: [
10691
- /* @__PURE__ */ jsxs("div", { className: titleRowClass, children: [
10692
- titleIcon && /* @__PURE__ */ jsx("span", { className: "tw-flex tw-shrink-0 tw-items-center", children: titleIcon }),
10693
- /* @__PURE__ */ jsx("h1", { className: compact ? titleCompactClass : titleClass, children: title }),
10694
- badges && /* @__PURE__ */ jsx("div", { className: badgesClass, children: badges })
10695
- ] }),
10696
- description && /* @__PURE__ */ jsx("p", { className: descriptionClass, children: description })
10697
- ] }),
10698
- (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-shrink-0 tw-items-center tw-gap-2", children: [
10699
- secondaryAction,
10700
- primaryAction
10701
- ] })
10702
- ] }),
10703
- headerNav
10704
- ] });
13366
+ }) => {
13367
+ const titleRow = /* @__PURE__ */ jsxs("div", { className: cn(titleRowClass, "tw-min-w-64 tw-flex-1 tw-pr-2"), children: [
13368
+ titleIcon && /* @__PURE__ */ jsx("span", { className: "tw-flex tw-shrink-0 tw-items-center", children: titleIcon }),
13369
+ /* @__PURE__ */ jsx("h1", { className: compact ? titleCompactClass : titleClass, children: title }),
13370
+ badges && /* @__PURE__ */ jsx("div", { className: badgesClass, children: badges })
13371
+ ] });
13372
+ const actions = (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs("div", { className: "tw-ml-auto tw-flex tw-flex-wrap tw-items-center tw-justify-end tw-gap-2", children: [
13373
+ secondaryAction,
13374
+ primaryAction
13375
+ ] });
13376
+ const descriptionNode = description && /* @__PURE__ */ jsx("p", { className: descriptionClass, children: description });
13377
+ return /* @__PURE__ */ jsxs(
13378
+ "header",
13379
+ {
13380
+ ref,
13381
+ className: cn("tw-flex tw-w-full tw-flex-col tw-gap-4", className),
13382
+ ...props,
13383
+ children: [
13384
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-between tw-gap-4", children: [
13385
+ /* @__PURE__ */ jsx("div", { className: "tw-min-w-0 tw-flex-1", children: breadcrumbs }),
13386
+ overflowActions && /* @__PURE__ */ jsx("div", { className: "tw-flex tw-shrink-0 tw-items-center tw-gap-2", children: overflowActions })
13387
+ ] }),
13388
+ fullWidthDescription ? /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-flex-col tw-gap-2", children: [
13389
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-flex-wrap tw-items-start tw-justify-between tw-gap-x-4 tw-gap-y-3", children: [
13390
+ titleRow,
13391
+ actions
13392
+ ] }),
13393
+ descriptionNode
13394
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-flex-wrap tw-items-start tw-justify-between tw-gap-x-4 tw-gap-y-3", children: [
13395
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-min-w-64 tw-flex-1 tw-flex-col tw-gap-2 tw-pr-2", children: [
13396
+ /* @__PURE__ */ jsxs("div", { className: titleRowClass, children: [
13397
+ titleIcon && /* @__PURE__ */ jsx("span", { className: "tw-flex tw-shrink-0 tw-items-center", children: titleIcon }),
13398
+ /* @__PURE__ */ jsx("h1", { className: compact ? titleCompactClass : titleClass, children: title }),
13399
+ badges && /* @__PURE__ */ jsx("div", { className: badgesClass, children: badges })
13400
+ ] }),
13401
+ descriptionNode
13402
+ ] }),
13403
+ actions
13404
+ ] }),
13405
+ headerNav
13406
+ ]
13407
+ }
13408
+ );
13409
+ };
10705
13410
  var PageHeaderIndex = ({
10706
13411
  ref,
10707
13412
  className,
@@ -10711,9 +13416,11 @@ var PageHeaderIndex = ({
10711
13416
  documentation,
10712
13417
  action,
10713
13418
  headerNav,
13419
+ fullWidthDescription = false,
10714
13420
  ...props
10715
13421
  }) => {
10716
13422
  const subtitle = metadata ?? description;
13423
+ const hasActions = Boolean(documentation || action);
10717
13424
  return /* @__PURE__ */ jsxs(
10718
13425
  "header",
10719
13426
  {
@@ -10721,12 +13428,21 @@ var PageHeaderIndex = ({
10721
13428
  className: cn("tw-flex tw-w-full tw-flex-col tw-gap-4", className),
10722
13429
  ...props,
10723
13430
  children: [
10724
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-items-start tw-justify-between tw-gap-4", children: [
13431
+ fullWidthDescription ? /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-flex-col tw-gap-2", children: [
13432
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-flex-wrap tw-items-start tw-justify-between tw-gap-x-4 tw-gap-y-3", children: [
13433
+ /* @__PURE__ */ jsx("div", { className: cn(titleRowClass, "tw-min-w-64 tw-flex-1 tw-pr-2"), children: /* @__PURE__ */ jsx("h1", { className: titleClass, children: title }) }),
13434
+ hasActions && /* @__PURE__ */ jsxs("div", { className: "tw-ml-auto tw-flex tw-flex-wrap tw-items-center tw-justify-end tw-gap-2", children: [
13435
+ documentation,
13436
+ action
13437
+ ] })
13438
+ ] }),
13439
+ subtitle && /* @__PURE__ */ jsx("p", { className: descriptionClass, children: subtitle })
13440
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-items-start tw-justify-between tw-gap-4", children: [
10725
13441
  /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-min-w-0 tw-flex-1 tw-flex-col tw-gap-2 tw-pr-2", children: [
10726
13442
  /* @__PURE__ */ jsx("div", { className: titleRowClass, children: /* @__PURE__ */ jsx("h1", { className: titleClass, children: title }) }),
10727
13443
  subtitle && /* @__PURE__ */ jsx("p", { className: descriptionClass, children: subtitle })
10728
13444
  ] }),
10729
- (documentation || action) && /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-shrink-0 tw-items-center tw-gap-2", children: [
13445
+ hasActions && /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-shrink-0 tw-items-center tw-gap-2", children: [
10730
13446
  documentation,
10731
13447
  action
10732
13448
  ] })
@@ -10782,9 +13498,9 @@ var PageToolbarToken = ({
10782
13498
  )
10783
13499
  }
10784
13500
  ),
10785
- /* @__PURE__ */ jsx(Popover.Content, { variant: "argo", align: "start", children: popover })
13501
+ /* @__PURE__ */ jsx(Popover.Content, { align: "start", children: popover })
10786
13502
  ] });
10787
- var Root26 = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsx(
13503
+ var Root27 = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsx(
10788
13504
  "div",
10789
13505
  {
10790
13506
  ref,
@@ -10844,12 +13560,12 @@ var Chip = ({ children, onRemove, removeAriaLabel, ...props }) => /* @__PURE__ *
10844
13560
  children
10845
13561
  }
10846
13562
  );
10847
- var AddFilter = ({ className, children, ...props }) => /* @__PURE__ */ jsxs(Button, { argo: true, variant: "invisible", size: "small", className: cn("tw-gap-1.5", className), ...props, children: [
13563
+ var AddFilter = ({ className, children, ...props }) => /* @__PURE__ */ jsxs(Button, { variant: "invisible", size: "small", className: cn("tw-gap-1.5", className), ...props, children: [
10848
13564
  /* @__PURE__ */ jsx(icons_exports.Plus, { className: "tw-size-4" }),
10849
13565
  children ?? "Add filter"
10850
13566
  ] });
10851
- var Clear = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Button, { argo: true, variant: "invisible", size: "small", className: cn("tw-ml-auto", className), ...props, children: children ?? "Clear all" });
10852
- var PageToolbar = Object.assign(Root26, {
13567
+ var Clear = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Button, { variant: "invisible", size: "small", className: cn("tw-ml-auto", className), ...props, children: children ?? "Clear all" });
13568
+ var PageToolbar = Object.assign(Root27, {
10853
13569
  /** Left slot — typically a `SearchInput`. */
10854
13570
  Search: Search5,
10855
13571
  /** Right cluster — host the four control groups below in the recommended order. */
@@ -10945,7 +13661,7 @@ var ResizablePanelGroup = ({
10945
13661
  );
10946
13662
  };
10947
13663
  var FALLBACK_TIMEOUT_MS = 500;
10948
- var reducer = (state, event) => {
13664
+ var reducer2 = (state, event) => {
10949
13665
  switch (event) {
10950
13666
  case "MOUNT":
10951
13667
  return "mounted";
@@ -10961,7 +13677,7 @@ var useTransitionPresence = ({
10961
13677
  mounted,
10962
13678
  keepMounted = false
10963
13679
  }) => {
10964
- const [state, send] = useReducer(reducer, mounted ? "mounted" : "unmounted");
13680
+ const [state, send] = useReducer(reducer2, mounted ? "mounted" : "unmounted");
10965
13681
  useLayoutEffect(() => {
10966
13682
  if (keepMounted) return;
10967
13683
  mounted ? send("MOUNT") : send("TRANSITION_OUT");
@@ -11768,8 +14484,8 @@ var SidebarSearchInput = ({
11768
14484
  )
11769
14485
  ] });
11770
14486
  };
11771
- var Title3 = ({ children }) => /* @__PURE__ */ jsx("div", { className: "tw-flex tw-select-none tw-gap-2 tw-text-sm tw-font-semibold", children });
11772
- var Content10 = ({ children, className }) => /* @__PURE__ */ jsx(
14487
+ var Title4 = ({ children }) => /* @__PURE__ */ jsx("div", { className: "tw-flex tw-select-none tw-gap-2 tw-text-sm tw-font-semibold", children });
14488
+ var Content11 = ({ children, className }) => /* @__PURE__ */ jsx(
11773
14489
  "div",
11774
14490
  {
11775
14491
  className: cn(
@@ -11826,11 +14542,11 @@ var SidebarMenuCard = ({ children, className, icon, title, ...rest }) => {
11826
14542
  "tw-ease-linear"
11827
14543
  ),
11828
14544
  children: /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-flex-col tw-gap-2", children: [
11829
- /* @__PURE__ */ jsxs(Title3, { children: [
14545
+ /* @__PURE__ */ jsxs(Title4, { children: [
11830
14546
  /* @__PURE__ */ jsx(SidebarMenuIcon, { className: "tw-p-px", children: icon }),
11831
14547
  title
11832
14548
  ] }),
11833
- /* @__PURE__ */ jsx(Content10, { className, children })
14549
+ /* @__PURE__ */ jsx(Content11, { className, children })
11834
14550
  ] })
11835
14551
  }
11836
14552
  ) }),
@@ -11842,8 +14558,8 @@ var SidebarMenuCard = ({ children, className, icon, title, ...rest }) => {
11842
14558
  side: side === "left" ? "right" : "left",
11843
14559
  className: "tw-flex tw-flex-col tw-gap-2",
11844
14560
  children: [
11845
- /* @__PURE__ */ jsx(Title3, { children: title }),
11846
- /* @__PURE__ */ jsx(Content10, { className, children })
14561
+ /* @__PURE__ */ jsx(Title4, { children: title }),
14562
+ /* @__PURE__ */ jsx(Content11, { className, children })
11847
14563
  ]
11848
14564
  }
11849
14565
  )
@@ -11928,35 +14644,27 @@ var SidebarMenuSub = ({
11928
14644
  });
11929
14645
  };
11930
14646
  if (isDropdownMenu) {
11931
- return /* @__PURE__ */ jsxs(
11932
- DropdownMenu,
11933
- {
11934
- open: open === "open-dropdown-menu",
11935
- onOpenChange: handleDropdownOpenChange,
11936
- variant: "argo",
11937
- children: [
11938
- /* @__PURE__ */ jsxs(Tooltip.Root, { open: open === "open-tooltip", onOpenChange: handleTooltipOpenChange, children: [
11939
- /* @__PURE__ */ jsx(Tooltip.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
11940
- SidebarMenuButton,
11941
- {
11942
- icon,
11943
- "data-active": isActive,
11944
- className: cn(
11945
- "data-[active=true]:tw-bg-sidebar-accent",
11946
- "data-[active=true]:tw-font-medium"
11947
- ),
11948
- children: label
11949
- }
11950
- ) }) }),
11951
- /* @__PURE__ */ jsx(Tooltip.Content, { variant: "action", placement: side, children: label })
11952
- ] }),
11953
- /* @__PURE__ */ jsxs(DropdownMenu.Content, { side, align: "start", children: [
11954
- /* @__PURE__ */ jsx(DropdownMenu.Label, { children: label }),
11955
- children
11956
- ] })
11957
- ]
11958
- }
11959
- );
14647
+ return /* @__PURE__ */ jsxs(DropdownMenu, { open: open === "open-dropdown-menu", onOpenChange: handleDropdownOpenChange, children: [
14648
+ /* @__PURE__ */ jsxs(Tooltip.Root, { open: open === "open-tooltip", onOpenChange: handleTooltipOpenChange, children: [
14649
+ /* @__PURE__ */ jsx(Tooltip.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
14650
+ SidebarMenuButton,
14651
+ {
14652
+ icon,
14653
+ "data-active": isActive,
14654
+ className: cn(
14655
+ "data-[active=true]:tw-bg-sidebar-accent",
14656
+ "data-[active=true]:tw-font-medium"
14657
+ ),
14658
+ children: label
14659
+ }
14660
+ ) }) }),
14661
+ /* @__PURE__ */ jsx(Tooltip.Content, { variant: "action", placement: side, children: label })
14662
+ ] }),
14663
+ /* @__PURE__ */ jsxs(DropdownMenu.Content, { side, align: "start", children: [
14664
+ /* @__PURE__ */ jsx(DropdownMenu.Label, { children: label }),
14665
+ children
14666
+ ] })
14667
+ ] });
11960
14668
  }
11961
14669
  return /* @__PURE__ */ jsxs(Collapsible, { open: isCollapsibleOpen, onOpenChange: handleCollapsibleOpenChange, children: [
11962
14670
  /* @__PURE__ */ jsx(Collapsible.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
@@ -12858,7 +15566,7 @@ var Tabs2 = ({
12858
15566
  disabled: triggerRest.disabled,
12859
15567
  onClick: () => onClose(value),
12860
15568
  onMouseDown: (e) => e.preventDefault(),
12861
- className: "!tw-size-8 tw-opacity-0 tw-duration-200 focus-visible:tw-opacity-100 group-hover/tab-trigger-group:tw-opacity-100 group-focus-within/tab-trigger-group:tw-opacity-100",
15569
+ className: "!tw-size-8 tw-opacity-0 tw-duration-200 focus-visible:tw-opacity-100 group-focus-within/tab-trigger-group:tw-opacity-100 group-hover/tab-trigger-group:tw-opacity-100",
12862
15570
  "aria-label": typeof title === "string" ? `Close ${title}` : "Close tab",
12863
15571
  children: /* @__PURE__ */ jsx(icons_exports.X, { className: "tw-size-4" })
12864
15572
  }
@@ -13038,13 +15746,13 @@ var StepperStep = ({ status = "upcoming", children, className, ...props }) => {
13038
15746
  const stepContext = { index, isLast, status };
13039
15747
  const stepClassName = cn(stepVariants({ orientation, interactive }), className);
13040
15748
  const ariaCurrent = status === "active" ? "step" : void 0;
13041
- const inner = orientation === "vertical" ? /* @__PURE__ */ jsxs(Fragment, { children: [
15749
+ const inner = orientation === "vertical" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
13042
15750
  /* @__PURE__ */ jsxs("span", { className: "tw-flex tw-flex-col tw-items-center tw-self-stretch", children: [
13043
15751
  indicator,
13044
15752
  !isLast && /* @__PURE__ */ jsx(StepperStepConnector, {})
13045
15753
  ] }),
13046
15754
  /* @__PURE__ */ jsx("span", { className: "tw-flex tw-min-w-0 tw-flex-col tw-items-start tw-pb-6 tw-text-left", children: contentChildren })
13047
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
15755
+ ] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
13048
15756
  indicator,
13049
15757
  /* @__PURE__ */ jsx("span", { className: "tw-flex tw-flex-col tw-items-center tw-text-center", children: contentChildren })
13050
15758
  ] });
@@ -13451,7 +16159,7 @@ var KbdGroup = ({
13451
16159
  // oxlint-disable-next-line react-x/no-children-to-array
13452
16160
  Children.toArray(children).map((child, index) => (
13453
16161
  // oxlint-disable-next-line
13454
- /* @__PURE__ */ jsxs(Fragment$1, { children: [
16162
+ /* @__PURE__ */ jsxs(Fragment, { children: [
13455
16163
  index > 0 && /* @__PURE__ */ jsx(KbdSeparator, { children: separator }),
13456
16164
  child
13457
16165
  ] }, index)
@@ -13536,7 +16244,6 @@ var PaginationButton = ({
13536
16244
  {
13537
16245
  ...props,
13538
16246
  ref,
13539
- argo: true,
13540
16247
  variant: "invisible",
13541
16248
  size,
13542
16249
  "data-slot": "pagination-link",
@@ -14568,7 +17275,7 @@ var FieldShell = ({ field, label, required, help, className, children }) => {
14568
17275
  return /* @__PURE__ */ jsxs(FormGroup, { className, state: showError ? "error" : void 0, children: [
14569
17276
  label && /* @__PURE__ */ jsxs(Label2, { htmlFor: field.name, children: [
14570
17277
  label,
14571
- required && /* @__PURE__ */ jsx("span", { className: "tw-ml-0.5 tw-text-secondary-500", children: "*" })
17278
+ required && /* @__PURE__ */ jsx("span", { className: "tw-ml-0.5 tw-text-primary", children: "*" })
14572
17279
  ] }),
14573
17280
  children,
14574
17281
  showError ? /* @__PURE__ */ jsx(FormGroup.Help, { children: error }) : help && /* @__PURE__ */ jsx(FormGroup.Help, { children: help })
@@ -14662,7 +17369,7 @@ var SelectField = ({
14662
17369
  onBlur: field.handleBlur
14663
17370
  }
14664
17371
  ),
14665
- /* @__PURE__ */ jsx(Select.Content, { variant: variant === "argo" ? "argo" : "default", children: resolved.map((option) => /* @__PURE__ */ jsx(Select.Item, { value: option.value, children: option.label }, option.value)) })
17372
+ /* @__PURE__ */ jsx(Select.Content, { children: resolved.map((option) => /* @__PURE__ */ jsx(Select.Item, { value: option.value, children: option.label }, option.value)) })
14666
17373
  ]
14667
17374
  }
14668
17375
  ) });
@@ -14800,7 +17507,7 @@ function useAutosizeInput({
14800
17507
  () => ({ width, boxSizing: "content-box", flex: "none" }),
14801
17508
  [width]
14802
17509
  );
14803
- const sizerElement = /* @__PURE__ */ jsxs(Fragment, { children: [
17510
+ const sizerElement = /* @__PURE__ */ jsxs(Fragment$1, { children: [
14804
17511
  /* @__PURE__ */ jsx("span", { ref: setSizerNode, "data-slot": "autosize-sizer", style: SIZER_STYLE, children: value }),
14805
17512
  placeholder && /* @__PURE__ */ jsx(
14806
17513
  "span",
@@ -14929,17 +17636,8 @@ var ZoomableSvg = ({ html, copyText, className }) => {
14929
17636
  className: "tw-absolute tw-right-1 tw-top-1 tw-flex tw-gap-1 tw-opacity-0 tw-transition-opacity group-hover/zoom:tw-opacity-100",
14930
17637
  onClick: stopPropagation2,
14931
17638
  children: [
14932
- isZoomed && /* @__PURE__ */ jsx(Tooltip, { tooltip: "Reset zoom", placement: "top", triggerAsChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "outline", onClick: handleReset, argo: true, children: "Reset" }) }),
14933
- copyText && /* @__PURE__ */ jsx(
14934
- ClipboardButton,
14935
- {
14936
- text: copyText,
14937
- tooltip: "Copy code",
14938
- size: "icon-sm",
14939
- variant: "outline",
14940
- argo: true
14941
- }
14942
- ),
17639
+ isZoomed && /* @__PURE__ */ jsx(Tooltip, { tooltip: "Reset zoom", placement: "top", triggerAsChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "outline", onClick: handleReset, children: "Reset" }) }),
17640
+ copyText && /* @__PURE__ */ jsx(ClipboardButton, { text: copyText, tooltip: "Copy code", size: "icon-sm", variant: "outline" }),
14943
17641
  /* @__PURE__ */ jsx(
14944
17642
  Tooltip,
14945
17643
  {
@@ -14953,7 +17651,6 @@ var ZoomableSvg = ({ html, copyText, className }) => {
14953
17651
  variant: "outline",
14954
17652
  "aria-label": isFullscreen ? "Exit fullscreen" : "Fullscreen",
14955
17653
  onClick: () => setIsFullscreen((f) => !f),
14956
- argo: true,
14957
17654
  children: isFullscreen ? /* @__PURE__ */ jsx(icons_exports.Minimize2, { className: "tw-size-4" }) : /* @__PURE__ */ jsx(icons_exports.Maximize2, { className: "tw-size-4" })
14958
17655
  }
14959
17656
  )
@@ -14987,7 +17684,36 @@ var ZoomableSvg = ({ html, copyText, className }) => {
14987
17684
  }
14988
17685
  );
14989
17686
  };
17687
+ /*! Bundled license information:
17688
+
17689
+ react-is/cjs/react-is.production.min.js:
17690
+ (** @license React v16.13.1
17691
+ * react-is.production.min.js
17692
+ *
17693
+ * Copyright (c) Facebook, Inc. and its affiliates.
17694
+ *
17695
+ * This source code is licensed under the MIT license found in the
17696
+ * LICENSE file in the root directory of this source tree.
17697
+ *)
17698
+
17699
+ react-is/cjs/react-is.development.js:
17700
+ (** @license React v16.13.1
17701
+ * react-is.development.js
17702
+ *
17703
+ * Copyright (c) Facebook, Inc. and its affiliates.
17704
+ *
17705
+ * This source code is licensed under the MIT license found in the
17706
+ * LICENSE file in the root directory of this source tree.
17707
+ *)
17708
+
17709
+ object-assign/index.js:
17710
+ (*
17711
+ object-assign
17712
+ (c) Sindre Sorhus
17713
+ @license MIT
17714
+ *)
17715
+ */
14990
17716
 
14991
- export { Alert, AnswerSummary, AppShell, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar, Card, Checkbox, Clipboard, ClipboardButton, ClipboardInline, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, DateRangeInput, DateRangePicker, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, ErrorState, FileUpload, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, InlineStepDetail, InlineStepLabel, InputGroup, InputOtp, Kbd, Label2 as Label, Link, MarkedText, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, PlanRewritingIndicator, Popconfirm, Popover, Progress, PromptInput, Question, QuestionBlock, RadioGroup2 as RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, Separator2 as Separator, Sheet, Sidebar, SidebarProvider, Skeleton, SkeletonList, Slider, SplitButton, Stepper, SuggestedPrompt, Switch, Table, Tabs2 as Tabs, TabsContent, Tagger, TextInput, Textarea, ThemeDecorator, ThemeProvider, ThinkingIndicator, TimeInput, TimePicker, Timeline, Toaster, Toggle, ToggleGroup, Tooltip, TooltipProvider, Truncated, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isMac, kbdVariants, keys, mergeRefs, resolveStorybookBrand, setServerFieldErrors, themeToolbarBrands, toast, useAppForm, useAutosizeInput, useColorScheme, useInputOtpContext, useIsLegacyBrand, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, useTheme, withForm };
17717
+ export { Alert, AlertModal, AnswerSummary, AppShell, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar, Card, Checkbox, Clipboard, ClipboardButton, ClipboardInline, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, DateRangeInput, DateRangePicker, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, ErrorState, FileUpload, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, InlineStepDetail, InlineStepLabel, InputGroup, InputOtp, Kbd, Label2 as Label, Link, MarkedText, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, PlanRewritingIndicator, Popconfirm, Popover, Progress, PromptInput, Question, QuestionBlock, RadioGroup2 as RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, Separator2 as Separator, Sheet, Sidebar, SidebarProvider, Skeleton, SkeletonList, Slider, SplitButton, Stepper, SuggestedPrompt, Switch, Table, Tabs2 as Tabs, TabsContent, Tagger, TextInput, Textarea, ThemeDecorator, ThemeProvider, ThinkingIndicator, TimeInput, TimePicker, Timeline, Toaster, Toggle, ToggleGroup, Tooltip, TooltipProvider, Truncated, UsageStats, UsageStatsRing, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isMac, kbdVariants, keys, mergeRefs, resolveStorybookBrand, setServerFieldErrors, themeToolbarBrands, toast, useAppForm, useAutosizeInput, useColorScheme, useInputOtpContext, useIsLegacyBrand, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, useTheme, withForm };
14992
17718
  //# sourceMappingURL=index.js.map
14993
17719
  //# sourceMappingURL=index.js.map