@cronocode/react-box 2.0.5 → 2.0.7

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/core.mjs CHANGED
@@ -1,72 +1,72 @@
1
- import { useMemo as xe, useLayoutEffect as je, useEffect as Me } from "react";
2
- import { O as we } from "./utils.mjs";
3
- var d;
4
- ((u) => {
5
- ((o) => {
6
- function t(e, O) {
7
- return `${e}${O.replace("/", "-")}`;
1
+ import { useMemo as U, useLayoutEffect as ee, useEffect as se } from "react";
2
+ import { O as X } from "./utils.mjs";
3
+ var s;
4
+ ((e) => {
5
+ ((l) => {
6
+ function u(t, d) {
7
+ return `${t}${d.replace("/", "-")}`;
8
8
  }
9
- o.fraction = t;
10
- function m(e) {
11
- return [`${e} path`, `${e} circle`, `${e} rect`, `${e} line`];
9
+ l.fraction = u;
10
+ function n(t) {
11
+ return [`${t} path`, `${t} circle`, `${t} rect`, `${t} line`];
12
12
  }
13
- o.svg = m;
14
- })(u.ClassName || (u.ClassName = {})), ((o) => {
15
- function t(p, h) {
16
- return `${h / 4}rem`;
13
+ l.svg = n;
14
+ })(e.ClassName || (e.ClassName = {})), ((l) => {
15
+ function u(r, a) {
16
+ return `${a / 4}rem`;
17
17
  }
18
- o.rem = t;
19
- function m(p, h) {
20
- return `${h}px`;
18
+ l.rem = u;
19
+ function n(r, a) {
20
+ return `${a}px`;
21
21
  }
22
- o.px = m;
23
- function e(p, h) {
24
- const [b, x] = h.split("/");
25
- return `${+b / +x * 100}%`;
22
+ l.px = n;
23
+ function t(r, a) {
24
+ const [o, v] = a.split("/");
25
+ return `${+o / +v * 100}%`;
26
26
  }
27
- o.fraction = e;
28
- function O(p, h) {
29
- switch (h) {
27
+ l.fraction = t;
28
+ function d(r, a) {
29
+ switch (a) {
30
30
  case "fit":
31
31
  return "100%";
32
32
  case "fit-screen":
33
- return p.toLocaleLowerCase().includes("height") ? "100vh" : "100vw";
33
+ return r.toLocaleLowerCase().includes("height") ? "100vh" : "100vw";
34
34
  default:
35
- return h;
35
+ return a;
36
36
  }
37
37
  }
38
- o.widthHeight = O;
39
- function q(p) {
40
- return (h, b) => `var(--${p}${b});`;
38
+ l.widthHeight = d;
39
+ function p(r) {
40
+ return (a, o) => `var(--${r}${o});`;
41
41
  }
42
- o.variables = q;
43
- function H(p) {
44
- return (h, b) => `var(--${p}${b});`;
42
+ l.variables = p;
43
+ function k(r) {
44
+ return (a, o) => `var(--${r}${o});`;
45
45
  }
46
- o.svgVariables = H;
47
- function L(p, h) {
48
- return `repeat(${h},minmax(0,1fr))`;
46
+ l.svgVariables = k;
47
+ function E(r, a) {
48
+ return `repeat(${a},minmax(0,1fr))`;
49
49
  }
50
- o.gridColumns = L;
51
- function G(p, h) {
52
- return h === "full-row" ? "1/-1" : `span ${h}/span ${h}`;
50
+ l.gridColumns = E;
51
+ function C(r, a) {
52
+ return a === "full-row" ? "1/-1" : `span ${a}/span ${a}`;
53
53
  }
54
- o.gridColumn = G;
55
- function y(p, h) {
56
- return `${h}ms`;
54
+ l.gridColumn = C;
55
+ function i(r, a) {
56
+ return `${a}ms`;
57
57
  }
58
- o.ms = y;
59
- function j(p, h) {
60
- return `${h}deg`;
58
+ l.ms = i;
59
+ function m(r, a) {
60
+ return `${a}deg`;
61
61
  }
62
- o.rotate = j;
63
- function C(p, h) {
64
- return h === "xAxis" ? "-1 1" : "1 -1";
62
+ l.rotate = m;
63
+ function f(r, a) {
64
+ return a === "xAxis" ? "-1 1" : "1 -1";
65
65
  }
66
- o.flip = C;
67
- })(u.Value || (u.Value = {}));
68
- })(d || (d = {}));
69
- const M = [
66
+ l.flip = f;
67
+ })(e.Value || (e.Value = {}));
68
+ })(s || (s = {}));
69
+ const c = [
70
70
  0,
71
71
  1,
72
72
  2,
@@ -139,7 +139,7 @@ const M = [
139
139
  350,
140
140
  384,
141
141
  400
142
- ], Oe = [
142
+ ], ae = [
143
143
  -1,
144
144
  -2,
145
145
  -3,
@@ -185,7 +185,7 @@ const M = [
185
185
  -92,
186
186
  -96,
187
187
  -100
188
- ], T = [...M, ...Oe], fe = ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"], re = ["auto", "hidden", "scroll", "visible"], _ = [
188
+ ], h = [...c, ...ae], W = ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"], R = ["auto", "hidden", "scroll", "visible"], T = [
189
189
  "1/2",
190
190
  "1/3",
191
191
  "2/3",
@@ -212,7 +212,7 @@ const M = [
212
212
  "9/12",
213
213
  "10/12",
214
214
  "11/12"
215
- ], ee = ["fit", "fit-screen", "auto", "fit-content", "max-content", "min-content"], me = ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"], Ce = {
215
+ ], O = ["fit", "fit-screen", "auto", "fit-content", "max-content", "min-content"], F = ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"], le = {
216
216
  /** The `display` CSS property sets whether an element is treated as a block or inline box and the layout used for its children, such as flow layout, grid or flex. */
217
217
  display: {
218
218
  cssNames: ["display"],
@@ -236,61 +236,61 @@ const M = [
236
236
  },
237
237
  width: {
238
238
  cssNames: ["width"],
239
- values1: { values: ee, formatValue: d.Value.widthHeight },
240
- values2: { values: M, formatValue: d.Value.rem },
239
+ values1: { values: O, formatValue: s.Value.widthHeight },
240
+ values2: { values: c, formatValue: s.Value.rem },
241
241
  values3: {
242
- values: _,
243
- formatValue: d.Value.fraction
242
+ values: T,
243
+ formatValue: s.Value.fraction
244
244
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
245
245
  }
246
246
  },
247
247
  minWidth: {
248
248
  cssNames: ["min-width"],
249
- values1: { values: ee, formatValue: d.Value.widthHeight },
250
- values2: { values: M, formatValue: d.Value.rem },
249
+ values1: { values: O, formatValue: s.Value.widthHeight },
250
+ values2: { values: c, formatValue: s.Value.rem },
251
251
  values3: {
252
- values: _,
253
- formatValue: d.Value.fraction
252
+ values: T,
253
+ formatValue: s.Value.fraction
254
254
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
255
255
  }
256
256
  },
257
257
  maxWidth: {
258
258
  cssNames: ["max-width"],
259
- values1: { values: ee, formatValue: d.Value.widthHeight },
260
- values2: { values: M, formatValue: d.Value.rem },
259
+ values1: { values: O, formatValue: s.Value.widthHeight },
260
+ values2: { values: c, formatValue: s.Value.rem },
261
261
  values3: {
262
- values: _,
263
- formatValue: d.Value.fraction
262
+ values: T,
263
+ formatValue: s.Value.fraction
264
264
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
265
265
  }
266
266
  },
267
267
  height: {
268
268
  cssNames: ["height"],
269
- values1: { values: ee, formatValue: d.Value.widthHeight },
270
- values2: { values: M, formatValue: d.Value.rem },
269
+ values1: { values: O, formatValue: s.Value.widthHeight },
270
+ values2: { values: c, formatValue: s.Value.rem },
271
271
  values3: {
272
- values: _,
273
- formatValue: d.Value.fraction
272
+ values: T,
273
+ formatValue: s.Value.fraction
274
274
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
275
275
  }
276
276
  },
277
277
  minHeight: {
278
278
  cssNames: ["min-height"],
279
- values1: { values: ee, formatValue: d.Value.widthHeight },
280
- values2: { values: M, formatValue: d.Value.rem },
279
+ values1: { values: O, formatValue: s.Value.widthHeight },
280
+ values2: { values: c, formatValue: s.Value.rem },
281
281
  values3: {
282
- values: _,
283
- formatValue: d.Value.fraction
282
+ values: T,
283
+ formatValue: s.Value.fraction
284
284
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
285
285
  }
286
286
  },
287
287
  maxHeight: {
288
288
  cssNames: ["max-height"],
289
- values1: { values: ee, formatValue: d.Value.widthHeight },
290
- values2: { values: M, formatValue: d.Value.rem },
289
+ values1: { values: O, formatValue: s.Value.widthHeight },
290
+ values2: { values: c, formatValue: s.Value.rem },
291
291
  values3: {
292
- values: _,
293
- formatValue: d.Value.fraction
292
+ values: T,
293
+ formatValue: s.Value.fraction
294
294
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
295
295
  }
296
296
  },
@@ -302,217 +302,217 @@ const M = [
302
302
  },
303
303
  top: {
304
304
  cssNames: ["top"],
305
- values1: { values: T, formatValue: d.Value.rem },
305
+ values1: { values: h, formatValue: s.Value.rem },
306
306
  values2: { values: [] },
307
307
  values3: { values: [] }
308
308
  },
309
309
  right: {
310
310
  cssNames: ["right"],
311
- values1: { values: T, formatValue: d.Value.rem },
311
+ values1: { values: h, formatValue: s.Value.rem },
312
312
  values2: { values: [] },
313
313
  values3: { values: [] }
314
314
  },
315
315
  bottom: {
316
316
  cssNames: ["bottom"],
317
- values1: { values: T, formatValue: d.Value.rem },
317
+ values1: { values: h, formatValue: s.Value.rem },
318
318
  values2: { values: [] },
319
319
  values3: { values: [] }
320
320
  },
321
321
  left: {
322
322
  cssNames: ["left"],
323
- values1: { values: T, formatValue: d.Value.rem },
323
+ values1: { values: h, formatValue: s.Value.rem },
324
324
  values2: { values: [] },
325
325
  values3: { values: [] }
326
326
  },
327
327
  inset: {
328
328
  cssNames: ["inset"],
329
- values1: { values: T, formatValue: d.Value.rem },
329
+ values1: { values: h, formatValue: s.Value.rem },
330
330
  values2: { values: [] },
331
331
  values3: { values: [] }
332
332
  },
333
333
  m: {
334
334
  cssNames: ["margin"],
335
- values1: { values: T, formatValue: d.Value.rem },
335
+ values1: { values: h, formatValue: s.Value.rem },
336
336
  values2: { values: ["auto"] },
337
337
  values3: { values: [] }
338
338
  },
339
339
  mx: {
340
340
  cssNames: ["margin-inline"],
341
- values1: { values: T, formatValue: d.Value.rem },
341
+ values1: { values: h, formatValue: s.Value.rem },
342
342
  values2: { values: ["auto"] },
343
343
  values3: { values: [] }
344
344
  },
345
345
  my: {
346
346
  cssNames: ["margin-block"],
347
- values1: { values: T, formatValue: d.Value.rem },
347
+ values1: { values: h, formatValue: s.Value.rem },
348
348
  values2: { values: ["auto"] },
349
349
  values3: { values: [] }
350
350
  },
351
351
  mt: {
352
352
  cssNames: ["margin-top"],
353
- values1: { values: T, formatValue: d.Value.rem },
353
+ values1: { values: h, formatValue: s.Value.rem },
354
354
  values2: { values: ["auto"] },
355
355
  values3: { values: [] }
356
356
  },
357
357
  mr: {
358
358
  cssNames: ["margin-right"],
359
- values1: { values: T, formatValue: d.Value.rem },
359
+ values1: { values: h, formatValue: s.Value.rem },
360
360
  values2: { values: ["auto"] },
361
361
  values3: { values: [] }
362
362
  },
363
363
  mb: {
364
364
  cssNames: ["margin-bottom"],
365
- values1: { values: T, formatValue: d.Value.rem },
365
+ values1: { values: h, formatValue: s.Value.rem },
366
366
  values2: { values: ["auto"] },
367
367
  values3: { values: [] }
368
368
  },
369
369
  ml: {
370
370
  cssNames: ["margin-left"],
371
- values1: { values: T, formatValue: d.Value.rem },
371
+ values1: { values: h, formatValue: s.Value.rem },
372
372
  values2: { values: ["auto"] },
373
373
  values3: { values: [] }
374
374
  },
375
375
  p: {
376
376
  cssNames: ["padding"],
377
- values1: { values: T, formatValue: d.Value.rem },
377
+ values1: { values: h, formatValue: s.Value.rem },
378
378
  values2: { values: [] },
379
379
  values3: { values: [] }
380
380
  },
381
381
  px: {
382
382
  cssNames: ["padding-inline"],
383
- values1: { values: T, formatValue: d.Value.rem },
383
+ values1: { values: h, formatValue: s.Value.rem },
384
384
  values2: { values: [] },
385
385
  values3: { values: [] }
386
386
  },
387
387
  py: {
388
388
  cssNames: ["padding-block"],
389
- values1: { values: T, formatValue: d.Value.rem },
389
+ values1: { values: h, formatValue: s.Value.rem },
390
390
  values2: { values: [] },
391
391
  values3: { values: [] }
392
392
  },
393
393
  pt: {
394
394
  cssNames: ["padding-top"],
395
- values1: { values: T, formatValue: d.Value.rem },
395
+ values1: { values: h, formatValue: s.Value.rem },
396
396
  values2: { values: [] },
397
397
  values3: { values: [] }
398
398
  },
399
399
  pr: {
400
400
  cssNames: ["padding-right"],
401
- values1: { values: T, formatValue: d.Value.rem },
401
+ values1: { values: h, formatValue: s.Value.rem },
402
402
  values2: { values: [] },
403
403
  values3: { values: [] }
404
404
  },
405
405
  pb: {
406
406
  cssNames: ["padding-bottom"],
407
- values1: { values: T, formatValue: d.Value.rem },
407
+ values1: { values: h, formatValue: s.Value.rem },
408
408
  values2: { values: [] },
409
409
  values3: { values: [] }
410
410
  },
411
411
  pl: {
412
412
  cssNames: ["padding-left"],
413
- values1: { values: T, formatValue: d.Value.rem },
413
+ values1: { values: h, formatValue: s.Value.rem },
414
414
  values2: { values: [] },
415
415
  values3: { values: [] }
416
416
  },
417
417
  b: {
418
418
  cssNames: ["border-width"],
419
- values1: { values: M, formatValue: d.Value.px },
419
+ values1: { values: c, formatValue: s.Value.px },
420
420
  values2: { values: [] },
421
421
  values3: { values: [] }
422
422
  },
423
423
  bx: {
424
424
  cssNames: ["border-inline-width"],
425
- values1: { values: T, formatValue: d.Value.px },
425
+ values1: { values: h, formatValue: s.Value.px },
426
426
  values2: { values: [] },
427
427
  values3: { values: [] }
428
428
  },
429
429
  by: {
430
430
  cssNames: ["border-block-width"],
431
- values1: { values: T, formatValue: d.Value.px },
431
+ values1: { values: h, formatValue: s.Value.px },
432
432
  values2: { values: [] },
433
433
  values3: { values: [] }
434
434
  },
435
435
  bt: {
436
436
  cssNames: ["border-top-width"],
437
- values1: { values: T, formatValue: d.Value.px },
437
+ values1: { values: h, formatValue: s.Value.px },
438
438
  values2: { values: [] },
439
439
  values3: { values: [] }
440
440
  },
441
441
  br: {
442
442
  cssNames: ["border-right-width"],
443
- values1: { values: T, formatValue: d.Value.px },
443
+ values1: { values: h, formatValue: s.Value.px },
444
444
  values2: { values: [] },
445
445
  values3: { values: [] }
446
446
  },
447
447
  bb: {
448
448
  cssNames: ["border-bottom-width"],
449
- values1: { values: T, formatValue: d.Value.px },
449
+ values1: { values: h, formatValue: s.Value.px },
450
450
  values2: { values: [] },
451
451
  values3: { values: [] }
452
452
  },
453
453
  bl: {
454
454
  cssNames: ["border-left-width"],
455
- values1: { values: T, formatValue: d.Value.px },
455
+ values1: { values: h, formatValue: s.Value.px },
456
456
  values2: { values: [] },
457
457
  values3: { values: [] }
458
458
  },
459
459
  borderStyle: {
460
460
  cssNames: ["border-style"],
461
- values1: { values: fe },
461
+ values1: { values: W },
462
462
  values2: { values: [] },
463
463
  values3: { values: [] }
464
464
  },
465
465
  borderRadius: {
466
466
  cssNames: ["border-radius"],
467
- values1: { values: M, formatValue: d.Value.rem },
467
+ values1: { values: c, formatValue: s.Value.rem },
468
468
  values2: { values: [] },
469
469
  values3: { values: [] }
470
470
  },
471
471
  borderRadiusTop: {
472
472
  cssNames: ["border-top-left-radius", "border-top-right-radius"],
473
- values1: { values: M, formatValue: d.Value.rem },
473
+ values1: { values: c, formatValue: s.Value.rem },
474
474
  values2: { values: [] },
475
475
  values3: { values: [] }
476
476
  },
477
477
  borderRadiusRight: {
478
478
  cssNames: ["border-top-right-radius", "border-bottom-right-radius"],
479
- values1: { values: M, formatValue: d.Value.rem },
479
+ values1: { values: c, formatValue: s.Value.rem },
480
480
  values2: { values: [] },
481
481
  values3: { values: [] }
482
482
  },
483
483
  borderRadiusBottom: {
484
484
  cssNames: ["border-bottom-left-radius", "border-bottom-right-radius"],
485
- values1: { values: M, formatValue: d.Value.rem },
485
+ values1: { values: c, formatValue: s.Value.rem },
486
486
  values2: { values: [] },
487
487
  values3: { values: [] }
488
488
  },
489
489
  borderRadiusLeft: {
490
490
  cssNames: ["border-top-left-radius", "border-bottom-left-radius"],
491
- values1: { values: M, formatValue: d.Value.rem },
491
+ values1: { values: c, formatValue: s.Value.rem },
492
492
  values2: { values: [] },
493
493
  values3: { values: [] }
494
494
  },
495
495
  borderRadiusTopLeft: {
496
496
  cssNames: ["border-top-left-radius"],
497
- values1: { values: M, formatValue: d.Value.rem },
497
+ values1: { values: c, formatValue: s.Value.rem },
498
498
  values2: { values: [] },
499
499
  values3: { values: [] }
500
500
  },
501
501
  borderRadiusTopRight: {
502
502
  cssNames: ["border-top-right-radius"],
503
- values1: { values: M, formatValue: d.Value.rem },
503
+ values1: { values: c, formatValue: s.Value.rem },
504
504
  values2: { values: [] },
505
505
  values3: { values: [] }
506
506
  },
507
507
  borderRadiusBottomLeft: {
508
508
  cssNames: ["border-bottom-left-radius"],
509
- values1: { values: M, formatValue: d.Value.rem },
509
+ values1: { values: c, formatValue: s.Value.rem },
510
510
  values2: { values: [] },
511
511
  values3: { values: [] }
512
512
  },
513
513
  borderRadiusBottomRight: {
514
514
  cssNames: ["border-bottom-right-radius"],
515
- values1: { values: M, formatValue: d.Value.rem },
515
+ values1: { values: c, formatValue: s.Value.rem },
516
516
  values2: { values: [] },
517
517
  values3: { values: [] }
518
518
  },
@@ -571,19 +571,19 @@ const M = [
571
571
  },
572
572
  overflow: {
573
573
  cssNames: ["overflow"],
574
- values1: { values: re },
574
+ values1: { values: R },
575
575
  values2: { values: [] },
576
576
  values3: { values: [] }
577
577
  },
578
578
  overflowX: {
579
579
  cssNames: ["overflow-x"],
580
- values1: { values: re },
580
+ values1: { values: R },
581
581
  values2: { values: [] },
582
582
  values3: { values: [] }
583
583
  },
584
584
  overflowY: {
585
585
  cssNames: ["overflow-y"],
586
- values1: { values: re },
586
+ values1: { values: R },
587
587
  values2: { values: [] },
588
588
  values3: { values: [] }
589
589
  },
@@ -595,7 +595,7 @@ const M = [
595
595
  },
596
596
  fontSize: {
597
597
  cssNames: ["font-size"],
598
- values1: { values: M, formatValue: d.Value.px },
598
+ values1: { values: c, formatValue: s.Value.px },
599
599
  values2: { values: ["inherit"] },
600
600
  values3: { values: [] }
601
601
  },
@@ -613,13 +613,13 @@ const M = [
613
613
  },
614
614
  letterSpacing: {
615
615
  cssNames: ["letter-spacing"],
616
- values1: { values: M, formatValue: d.Value.px },
616
+ values1: { values: c, formatValue: s.Value.px },
617
617
  values2: { values: [] },
618
618
  values3: { values: [] }
619
619
  },
620
620
  lineHeight: {
621
621
  cssNames: ["line-height"],
622
- values1: { values: M, formatValue: d.Value.px },
622
+ values1: { values: c, formatValue: s.Value.px },
623
623
  values2: { values: ["font-size"], formatValue: () => "1" },
624
624
  values3: { values: [] }
625
625
  },
@@ -708,91 +708,91 @@ const M = [
708
708
  },
709
709
  gap: {
710
710
  cssNames: ["gap"],
711
- values1: { values: M, formatValue: d.Value.rem },
711
+ values1: { values: c, formatValue: s.Value.rem },
712
712
  values2: { values: [] },
713
713
  values3: { values: [] }
714
714
  },
715
715
  rowGap: {
716
716
  cssNames: ["row-gap"],
717
- values1: { values: M, formatValue: d.Value.rem },
717
+ values1: { values: c, formatValue: s.Value.rem },
718
718
  values2: { values: [] },
719
719
  values3: { values: [] }
720
720
  },
721
721
  columnGap: {
722
722
  cssNames: ["column-gap"],
723
- values1: { values: M, formatValue: d.Value.rem },
723
+ values1: { values: c, formatValue: s.Value.rem },
724
724
  values2: { values: [] },
725
725
  values3: { values: [] }
726
726
  },
727
727
  order: {
728
728
  cssNames: ["order"],
729
- values1: { values: M },
729
+ values1: { values: c },
730
730
  values2: { values: [] },
731
731
  values3: { values: [] }
732
732
  },
733
733
  flexGrow: {
734
734
  cssNames: ["flex-grow"],
735
- values1: { values: M },
735
+ values1: { values: c },
736
736
  values2: { values: [] },
737
737
  values3: { values: [] }
738
738
  },
739
739
  flexShrink: {
740
740
  cssNames: ["flex-shrink"],
741
- values1: { values: M },
741
+ values1: { values: c },
742
742
  values2: { values: [] },
743
743
  values3: { values: [] }
744
744
  },
745
745
  alignSelf: {
746
746
  cssNames: ["align-self"],
747
- values1: { values: me },
747
+ values1: { values: F },
748
748
  values2: { values: [] },
749
749
  values3: { values: [] }
750
750
  },
751
751
  justifySelf: {
752
752
  cssNames: ["justify-self"],
753
- values1: { values: me },
753
+ values1: { values: F },
754
754
  values2: { values: [] },
755
755
  values3: { values: [] }
756
756
  },
757
757
  gridColumns: {
758
758
  cssNames: ["grid-template-columns"],
759
- values1: { values: M, formatValue: d.Value.gridColumns },
759
+ values1: { values: c, formatValue: s.Value.gridColumns },
760
760
  values2: { values: [] },
761
761
  values3: { values: [] }
762
762
  },
763
763
  colSpan: {
764
764
  cssNames: ["grid-column"],
765
- values1: { values: M, formatValue: d.Value.gridColumn },
766
- values2: { values: ["full-row"], formatValue: d.Value.gridColumn },
765
+ values1: { values: c, formatValue: s.Value.gridColumn },
766
+ values2: { values: ["full-row"], formatValue: s.Value.gridColumn },
767
767
  values3: { values: [] }
768
768
  },
769
769
  colStart: {
770
770
  cssNames: ["grid-column-start"],
771
- values1: { values: M },
771
+ values1: { values: c },
772
772
  values2: { values: [] },
773
773
  values3: { values: [] }
774
774
  },
775
775
  colEnd: {
776
776
  cssNames: ["grid-column-end"],
777
- values1: { values: M },
777
+ values1: { values: c },
778
778
  values2: { values: [] },
779
779
  values3: { values: [] }
780
780
  },
781
781
  outline: {
782
782
  cssNames: ["outline-width"],
783
- values1: { values: M, formatValue: d.Value.px },
783
+ values1: { values: c, formatValue: s.Value.px },
784
784
  values2: { values: [] },
785
785
  values3: { values: [] }
786
786
  },
787
787
  outlineStyle: {
788
788
  cssNames: ["outline-style"],
789
- values1: { values: fe },
789
+ values1: { values: W },
790
790
  values2: { values: [] },
791
791
  values3: { values: [] }
792
792
  },
793
793
  outlineOffset: {
794
794
  cssNames: ["outline-offset"],
795
- values1: { values: M, formatValue: d.Value.px },
795
+ values1: { values: c, formatValue: s.Value.px },
796
796
  values2: { values: [] },
797
797
  values3: { values: [] }
798
798
  },
@@ -806,7 +806,7 @@ const M = [
806
806
  cssNames: ["transition-duration"],
807
807
  values1: {
808
808
  values: [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1e3],
809
- formatValue: d.Value.ms
809
+ formatValue: s.Value.ms
810
810
  },
811
811
  values2: { values: [] },
812
812
  values3: { values: [] }
@@ -843,13 +843,13 @@ const M = [
843
843
  },
844
844
  rotate: {
845
845
  cssNames: ["rotate"],
846
- values1: { values: [0, 90, 180, 270, -90, -180, -270], formatValue: d.Value.rotate },
846
+ values1: { values: [0, 90, 180, 270, -90, -180, -270], formatValue: s.Value.rotate },
847
847
  values2: { values: [] },
848
848
  values3: { values: [] }
849
849
  },
850
850
  flip: {
851
851
  cssNames: ["scale"],
852
- values1: { values: ["xAxis", "yAxis"], formatValue: d.Value.flip },
852
+ values1: { values: ["xAxis", "yAxis"], formatValue: s.Value.flip },
853
853
  values2: { values: [] },
854
854
  values3: { values: [] }
855
855
  },
@@ -865,26 +865,26 @@ const M = [
865
865
  values2: { values: [] },
866
866
  values3: { values: [] }
867
867
  }
868
- }, be = {
869
- shadow: { cssNames: ["box-shadow"], formatValue: d.Value.variables("shadow") },
870
- background: { cssNames: ["background"], formatValue: d.Value.variables("background") },
871
- backgroundImage: { cssNames: ["background-image"], formatValue: d.Value.variables("backgroundImage") },
872
- color: { cssNames: ["color"], formatValue: d.Value.variables("color") },
873
- bgColor: { cssNames: ["background-color"], formatValue: d.Value.variables("color") },
874
- borderColor: { cssNames: ["border-color"], formatValue: d.Value.variables("color") },
875
- outlineColor: { cssNames: ["outline-color"], formatValue: d.Value.variables("color") }
876
- }, pe = {
868
+ }, q = {
869
+ shadow: { cssNames: ["box-shadow"], formatValue: s.Value.variables("shadow") },
870
+ background: { cssNames: ["background"], formatValue: s.Value.variables("background") },
871
+ backgroundImage: { cssNames: ["background-image"], formatValue: s.Value.variables("backgroundImage") },
872
+ color: { cssNames: ["color"], formatValue: s.Value.variables("color") },
873
+ bgColor: { cssNames: ["background-color"], formatValue: s.Value.variables("color") },
874
+ borderColor: { cssNames: ["border-color"], formatValue: s.Value.variables("color") },
875
+ outlineColor: { cssNames: ["outline-color"], formatValue: s.Value.variables("color") }
876
+ }, K = {
877
877
  fill: {
878
878
  cssNames: ["fill"],
879
- formatValue: d.Value.svgVariables("color"),
880
- formatSelector: d.ClassName.svg
879
+ formatValue: s.Value.svgVariables("color"),
880
+ formatSelector: s.ClassName.svg
881
881
  },
882
882
  stroke: {
883
883
  cssNames: ["stroke"],
884
- formatValue: d.Value.svgVariables("color"),
885
- formatSelector: d.ClassName.svg
884
+ formatValue: s.Value.svgVariables("color"),
885
+ formatSelector: s.ClassName.svg
886
886
  }
887
- }, Ee = ["disabledGroup", "hoverGroup", "focusGroup", "activeGroup"], le = [
887
+ }, ue = ["disabledGroup", "hoverGroup", "focusGroup", "activeGroup"], H = [
888
888
  "hover",
889
889
  "focus",
890
890
  "hasFocus",
@@ -900,119 +900,119 @@ const M = [
900
900
  "optional",
901
901
  "disabled",
902
902
  "hasDisabled"
903
- ], te = ["sm", "md", "lg", "xl", "xxl"], $e = {
903
+ ], B = ["sm", "md", "lg", "xl", "xxl"], te = {
904
904
  sm: 640,
905
905
  md: 768,
906
906
  lg: 1024,
907
907
  xl: 1280,
908
908
  xxl: 1536
909
909
  };
910
- function ye() {
911
- const u = { ...Ce };
912
- Object.keys(be).forEach((t) => {
913
- u[t] = be[t], u[t].isThemeStyle = !0;
914
- }), Object.keys(pe).forEach((t) => {
915
- u[t] = pe[t], u[t].isThemeStyle = !0;
910
+ function Y() {
911
+ const e = { ...le };
912
+ Object.keys(q).forEach((u) => {
913
+ e[u] = q[u], e[u].isThemeStyle = !0;
914
+ }), Object.keys(K).forEach((u) => {
915
+ e[u] = K[u], e[u].isThemeStyle = !0;
916
916
  });
917
- let o = Object.keys(u);
918
- return le.forEach((t) => {
919
- o.forEach((m) => {
920
- u[`${m}${t}`] = { ...u[m], pseudoSuffix: t };
917
+ let l = Object.keys(e);
918
+ return H.forEach((u) => {
919
+ l.forEach((n) => {
920
+ e[`${n}${u}`] = { ...e[n], pseudoSuffix: u };
921
921
  });
922
- }), o = Object.keys(u), te.forEach((t) => {
923
- o.forEach((m) => {
924
- u[`${t}${m}`] = { ...u[m], breakpoint: t };
922
+ }), l = Object.keys(e), B.forEach((u) => {
923
+ l.forEach((n) => {
924
+ e[`${u}${n}`] = { ...e[n], breakpoint: u };
925
925
  });
926
- }), u;
926
+ }), e;
927
927
  }
928
- let U = ye();
929
- function Te() {
930
- U = ye();
928
+ let $ = Y();
929
+ function oe() {
930
+ $ = Y();
931
931
  }
932
- function Se(u, o, t) {
933
- const m = Object.entries(U).filter(
934
- ([e, O]) => O.pseudoSuffix === u && !O.customPseudoSuffix && !(`${e}${o}` in U)
935
- ).map(([e]) => e);
936
- return m.forEach((e) => {
937
- U[`${e}${o}`] = {
938
- ...U[e],
939
- customPseudoSuffix: t + o
932
+ function re(e, l, u) {
933
+ const n = Object.entries($).filter(
934
+ ([t, d]) => d.pseudoSuffix === e && !d.customPseudoSuffix && !(`${t}${l}` in $)
935
+ ).map(([t]) => t);
936
+ return n.forEach((t) => {
937
+ $[`${t}${l}`] = {
938
+ ...$[t],
939
+ customPseudoSuffix: u + l
940
940
  };
941
- }), m.map((e) => `${e}${o}`);
941
+ }), n.map((t) => `${t}${l}`);
942
942
  }
943
- class ke {
943
+ class ne {
944
944
  constructor() {
945
945
  this._index = 0, this._cache = {};
946
946
  }
947
- getIdentity(o) {
948
- return this._cache[o] || (this._cache[o] = this.getByIndex(this._index++)), this._cache[o];
947
+ getIdentity(l) {
948
+ return this._cache[l] || (this._cache[l] = this.getByIndex(this._index++)), this._cache[l];
949
949
  }
950
- getByIndex(o) {
951
- const { first: t, next: m } = Pe, e = o - t.length;
952
- if (e < 0)
953
- return t[o];
954
- const O = Math.floor(e / m.length), q = e - O * m.length;
955
- return this.getByIndex(O) + m[q];
950
+ getByIndex(l) {
951
+ const { first: u, next: n } = ve, t = l - u.length;
952
+ if (t < 0)
953
+ return u[l];
954
+ const d = Math.floor(t / n.length), p = t - d * n.length;
955
+ return this.getByIndex(d) + n[p];
956
956
  }
957
957
  }
958
- const Pe = {
958
+ const ve = {
959
959
  first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
960
960
  next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
961
961
  };
962
- var ue;
963
- ((u) => {
964
- u.boxClassName = "_box", u.svgClassName = "_svg", u.cronoStylesElementId = "crono-styles";
965
- const o = `:root{--borderColor: black;--outlineColor: black;--lineHeight: 1.2;--fontSize: 14px;--transitionTime: 0.25s;--svgTransitionTime: 0.3s;#crono-box {position: absolute;top: 0;left: 0;height: 0;}}
962
+ var _;
963
+ ((e) => {
964
+ e.boxClassName = "_box", e.svgClassName = "_svg", e.cronoStylesElementId = "crono-styles";
965
+ const l = `:root{--borderColor: black;--outlineColor: black;--lineHeight: 1.2;--fontSize: 14px;--transitionTime: 0.25s;--svgTransitionTime: 0.3s;#crono-box {position: absolute;top: 0;left: 0;height: 0;}}
966
966
  html{font-size: 16px;font-family: Arial, sans-serif;}
967
967
  body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
968
968
  a,ul{all: unset;}
969
- .${u.boxClassName}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;background-color: initial;transition: all var(--transitionTime);box-sizing: border-box;font-family: inherit;font-size: inherit;}
970
- .${u.svgClassName}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;transition: all var(--svgTransitionTime);}.${u.svgClassName} path,.${u.svgClassName} circle,.${u.svgClassName} rect,.${u.svgClassName} line {transition: all var(--svgTransitionTime);}
971
- `, t = new ke();
972
- let m = !0, e = {};
973
- H();
974
- function O(h, b, x) {
975
- if (h in U)
976
- return G(h, b, x);
977
- if (Ee.includes(h))
978
- return h + b;
969
+ .${e.boxClassName}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;background-color: initial;transition: all var(--transitionTime);box-sizing: border-box;font-family: inherit;font-size: inherit;}
970
+ .${e.svgClassName}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;transition: all var(--svgTransitionTime);}.${e.svgClassName} path,.${e.svgClassName} circle,.${e.svgClassName} rect,.${e.svgClassName} line {transition: all var(--svgTransitionTime);}
971
+ `, u = new ne();
972
+ let n = !0, t = {};
973
+ k();
974
+ function d(a, o, v) {
975
+ if (a in $)
976
+ return C(a, o, v);
977
+ if (ue.includes(a))
978
+ return a + o;
979
979
  }
980
- u.get = O;
981
- function q() {
982
- if (m) {
983
- let h = j([o]);
984
- le.forEach((x) => {
985
- h = j(h, x);
986
- }), te.forEach((x) => {
987
- h.push(`@media(min-width: ${$e[x]}px){`), h = j(h, void 0, x), le.forEach((z) => {
988
- h = j(h, z, x);
989
- }), h.push("}");
980
+ e.get = d;
981
+ function p() {
982
+ if (n) {
983
+ let a = m([l]);
984
+ H.forEach((v) => {
985
+ a = m(a, v);
986
+ }), B.forEach((v) => {
987
+ a.push(`@media(min-width: ${te[v]}px){`), a = m(a, void 0, v), H.forEach((V) => {
988
+ a = m(a, V, v);
989
+ }), a.push("}");
990
990
  });
991
- const b = p();
992
- b.innerHTML = h.join(""), m = !1;
991
+ const o = r();
992
+ o.innerHTML = a.join(""), n = !1;
993
993
  }
994
994
  }
995
- u.flush = q;
996
- function H() {
997
- Te(), e = Object.keys(U).reduce(
998
- (b, x) => (b[x] = /* @__PURE__ */ new Set(), b),
995
+ e.flush = p;
996
+ function k() {
997
+ oe(), t = Object.keys($).reduce(
998
+ (o, v) => (o[v] = /* @__PURE__ */ new Set(), o),
999
999
  {}
1000
1000
  );
1001
1001
  }
1002
- u.clear = H;
1003
- function L(h, b, x) {
1004
- Se(h, b, x).forEach((k) => {
1005
- e[k] = /* @__PURE__ */ new Set();
1002
+ e.clear = k;
1003
+ function E(a, o, v) {
1004
+ re(a, o, v).forEach((b) => {
1005
+ t[b] = /* @__PURE__ */ new Set();
1006
1006
  });
1007
1007
  }
1008
- u.addCustomPseudoClass = L;
1009
- function G(h, b, x) {
1010
- const z = (x ?? "") + h;
1011
- e[z].has(b) || (m = !0, e[z].add(b));
1012
- const k = `${z}${b}`;
1013
- return process.env.NODE_ENV === "test" ? k : t.getIdentity(k);
1008
+ e.addCustomPseudoClass = E;
1009
+ function C(a, o, v) {
1010
+ const V = (v ?? "") + a;
1011
+ t[V].has(o) || (n = !0, t[V].add(o));
1012
+ const b = `${V}${o}`;
1013
+ return process.env.NODE_ENV === "test" ? b : u.getIdentity(b);
1014
1014
  }
1015
- const y = {
1015
+ const i = {
1016
1016
  hover: "hover",
1017
1017
  focus: "focus-within",
1018
1018
  hasFocus: "has(:focus-within)",
@@ -1029,38 +1029,38 @@ a,ul{all: unset;}
1029
1029
  disabled: "disabled",
1030
1030
  hasDisabled: "has(:disabled)"
1031
1031
  };
1032
- function j(h, b, x) {
1033
- return Object.entries(e).filter(
1034
- ([k, I]) => {
1035
- var D, A;
1036
- return ((D = U[k]) == null ? void 0 : D.pseudoSuffix) === b && ((A = U[k]) == null ? void 0 : A.breakpoint) === x && I.size > 0;
1032
+ function m(a, o, v) {
1033
+ return Object.entries(t).filter(
1034
+ ([b, y]) => {
1035
+ var N, x;
1036
+ return ((N = $[b]) == null ? void 0 : N.pseudoSuffix) === o && ((x = $[b]) == null ? void 0 : x.breakpoint) === v && y.size > 0;
1037
1037
  }
1038
- ).reduce((k, [I, D]) => (D.forEach((A) => {
1039
- var oe;
1040
- const W = U[I], Y = C(W, A), J = `.${G(I, A)}`, X = z(
1041
- J,
1042
- W,
1043
- Y,
1044
- b ? y[b] : void 0
1045
- ), P = ((oe = Y.formatValue) == null ? void 0 : oe.call(Y, I, A)) ?? A, ae = U[I].cssNames.map((ne) => `${ne}:${P};`).join("");
1046
- k.push(`${X.join(",")}{${ae}}`);
1047
- }), k), h);
1048
- function z(k, I, D, A) {
1049
- let W = k;
1050
- return A && (W = I.customPseudoSuffix ? `.${I.customPseudoSuffix}:${A} ${k}` : `${k}:${A}`), D.formatSelector ? D.formatSelector(W) : [W];
1038
+ ).reduce((b, [y, N]) => (N.forEach((x) => {
1039
+ var L;
1040
+ const S = $[y], z = f(S, x), P = `.${C(y, x)}`, G = V(
1041
+ P,
1042
+ S,
1043
+ z,
1044
+ o ? i[o] : void 0
1045
+ ), g = ((L = z.formatValue) == null ? void 0 : L.call(z, y, x)) ?? x, Q = $[y].cssNames.map((Z) => `${Z}:${g};`).join("");
1046
+ b.push(`${G.join(",")}{${Q}}`);
1047
+ }), b), a);
1048
+ function V(b, y, N, x) {
1049
+ let S = b;
1050
+ return x && (S = y.customPseudoSuffix ? `.${y.customPseudoSuffix}:${x} ${b}` : `${b}:${x}`), N.formatSelector ? N.formatSelector(S) : [S];
1051
1051
  }
1052
1052
  }
1053
- function C(h, b) {
1054
- return h.isThemeStyle ? h : h.values1.values.includes(b) ? h.values1 : h.values2.values.includes(b) ? h.values2 : h.values3;
1053
+ function f(a, o) {
1054
+ return a.isThemeStyle ? a : a.values1.values.includes(o) ? a.values1 : a.values2.values.includes(o) ? a.values2 : a.values3;
1055
1055
  }
1056
- function p() {
1057
- const b = typeof window < "u" && typeof window.document < "u" ? window.document : global.document;
1058
- let x = b.getElementById(u.cronoStylesElementId);
1059
- return x || (x = b.createElement("style"), x.setAttribute("id", u.cronoStylesElementId), x.setAttribute("type", "text/css"), b.head.insertBefore(x, b.head.firstChild)), x;
1056
+ function r() {
1057
+ const o = typeof window < "u" && typeof window.document < "u" ? window.document : global.document;
1058
+ let v = o.getElementById(e.cronoStylesElementId);
1059
+ return v || (v = o.createElement("style"), v.setAttribute("id", e.cronoStylesElementId), v.setAttribute("type", "text/css"), o.head.insertBefore(v, o.head.firstChild)), v;
1060
1060
  }
1061
- u.getElement = p;
1062
- })(ue || (ue = {}));
1063
- const se = ue, ze = {
1061
+ e.getElement = r;
1062
+ })(_ || (_ = {}));
1063
+ const I = _, ie = {
1064
1064
  button: {
1065
1065
  styles: {
1066
1066
  display: "inline-block",
@@ -1102,29 +1102,29 @@ const se = ue, ze = {
1102
1102
  }
1103
1103
  }
1104
1104
  };
1105
- var ce;
1106
- ((u) => {
1107
- u.Styles = {};
1108
- function o(y) {
1109
- u.Styles = e(ze), m(y);
1105
+ var D;
1106
+ ((e) => {
1107
+ e.Styles = {};
1108
+ function l(i) {
1109
+ e.Styles = t(ie), n(i);
1110
1110
  }
1111
- u.setup = o;
1112
- function t(y, j) {
1113
- const { colors: C = {}, shadows: p = {}, backgrounds: h = {}, backgroundImages: b = {} } = y;
1114
- C.none = "none", p.none = "none", h.none = "none", b.none = "none";
1115
- const x = Object.entries(C).map(([P, K]) => `--color${P}: ${K};`).join(`
1116
- `), z = Object.entries(p).map(([P, K]) => `--shadow${P}: ${K};`).join(`
1117
- `), k = Object.entries(h).map(([P, K]) => `--background${P}: ${K};`).join(`
1118
- `), I = Object.entries(b).map(([P, K]) => `--backgroundImage${P}: ${K};`).join(`
1119
- `), D = [":root {"];
1120
- x && D.push(` ${x}`), z && D.push(` ${z}`), k && D.push(` ${k}`), I && D.push(` ${I}`), D.push("}");
1121
- const A = Object.keys(C).map((P) => `'${P}'`).join(" | "), W = Object.keys(h).map((P) => `'${P}'`).join(" | "), Y = Object.keys(b).map((P) => `'${P}'`).join(" | "), J = Object.keys(p).map((P) => `'${P}'`).join(" | "), X = `import '@cronocode/react-box';
1111
+ e.setup = l;
1112
+ function u(i, m) {
1113
+ const { colors: f = {}, shadows: r = {}, backgrounds: a = {}, backgroundImages: o = {} } = i;
1114
+ f.none = "none", r.none = "none", a.none = "none", o.none = "none";
1115
+ const v = Object.entries(f).map(([g, j]) => `--color${g}: ${j};`).join(`
1116
+ `), V = Object.entries(r).map(([g, j]) => `--shadow${g}: ${j};`).join(`
1117
+ `), b = Object.entries(a).map(([g, j]) => `--background${g}: ${j};`).join(`
1118
+ `), y = Object.entries(o).map(([g, j]) => `--backgroundImage${g}: ${j};`).join(`
1119
+ `), N = [":root {"];
1120
+ v && N.push(` ${v}`), V && N.push(` ${V}`), b && N.push(` ${b}`), y && N.push(` ${y}`), N.push("}");
1121
+ const x = Object.keys(f).map((g) => `'${g}'`).join(" | "), S = Object.keys(a).map((g) => `'${g}'`).join(" | "), z = Object.keys(o).map((g) => `'${g}'`).join(" | "), P = Object.keys(r).map((g) => `'${g}'`).join(" | "), G = `import '@cronocode/react-box';
1122
1122
 
1123
- declare module '${(j == null ? void 0 : j.namespacePath) ?? "@cronocode/react-box/core/types"}' {
1124
- type ColorType = ${A};
1125
- type BackgroundType = ${W};
1126
- type BackgroundImageType = ${Y};
1127
- type ShadowType = ${J};
1123
+ declare module '${(m == null ? void 0 : m.namespacePath) ?? "@cronocode/react-box/core/types"}' {
1124
+ type ColorType = ${x};
1125
+ type BackgroundType = ${S};
1126
+ type BackgroundImageType = ${z};
1127
+ type ShadowType = ${P};
1128
1128
 
1129
1129
  namespace Augmented {
1130
1130
  interface BoxProps {
@@ -1145,970 +1145,140 @@ var ce;
1145
1145
  }
1146
1146
  `;
1147
1147
  return {
1148
- variables: D.join(`
1148
+ variables: N.join(`
1149
1149
  `),
1150
- boxDts: X
1150
+ boxDts: G
1151
1151
  };
1152
1152
  }
1153
- u.setupAugmentedProps = t;
1154
- function m(y) {
1155
- const j = e(y);
1156
- if (j.components)
1157
- return Object.entries(j.components).forEach(([C, p]) => {
1158
- var b;
1159
- const h = (b = u.Styles.components) == null ? void 0 : b[C];
1160
- h ? u.Styles.components[C].styles = { ...h.styles, ...p.styles } : u.Styles.components[C] = p;
1161
- }), j;
1153
+ e.setupAugmentedProps = u;
1154
+ function n(i) {
1155
+ const m = t(i);
1156
+ if (m.components)
1157
+ return Object.entries(m.components).forEach(([f, r]) => {
1158
+ var o;
1159
+ const a = (o = e.Styles.components) == null ? void 0 : o[f];
1160
+ a ? (e.Styles.components[f].styles = { ...a.styles, ...r.styles }, e.Styles.components[f].themes = r.themes) : e.Styles.components[f] = r;
1161
+ }), m;
1162
1162
  }
1163
- function e(y) {
1164
- return O(y), q(y), L(y), y;
1163
+ function t(i) {
1164
+ return d(i), p(i), E(i), i;
1165
1165
  }
1166
- function O(y) {
1167
- const { components: j, ...C } = y, p = Object.entries(C);
1168
- p.length && !y.components && (y.components = {});
1169
- for (const h of p) {
1170
- const [b, x] = h;
1171
- y.components[b] = x, delete y[b];
1166
+ function d(i) {
1167
+ const { components: m, ...f } = i, r = Object.entries(f);
1168
+ r.length && !i.components && (i.components = {});
1169
+ for (const a of r) {
1170
+ const [o, v] = a;
1171
+ i.components[o] = v, delete i[o];
1172
1172
  }
1173
1173
  }
1174
- function q(y) {
1175
- if (!y.components)
1174
+ function p(i) {
1175
+ if (!i.components)
1176
1176
  return;
1177
- const j = Object.keys(y.components);
1178
- for (const C of j) {
1179
- const p = y.components[C], h = H(C, p);
1180
- delete p.children;
1181
- for (const b of h) {
1182
- const [x, z] = b;
1183
- y.components[x] = z;
1177
+ const m = Object.keys(i.components);
1178
+ for (const f of m) {
1179
+ const r = i.components[f], a = k(f, r);
1180
+ delete r.children;
1181
+ for (const o of a) {
1182
+ const [v, V] = o;
1183
+ i.components[v] = V;
1184
1184
  }
1185
1185
  }
1186
1186
  }
1187
- function H(y, j) {
1188
- if (!j.children)
1187
+ function k(i, m) {
1188
+ if (!m.children)
1189
1189
  return [];
1190
- const C = Object.keys(j.children), p = [];
1191
- for (const h of C) {
1192
- const b = `${y}.${h}`, x = j.children[h], z = H(b, x);
1193
- p.push(...z), delete x.children, p.push([b, x]);
1190
+ const f = Object.keys(m.children), r = [];
1191
+ for (const a of f) {
1192
+ const o = `${i}.${a}`, v = m.children[a], V = k(o, v);
1193
+ r.push(...V), delete v.children, r.push([o, v]);
1194
1194
  }
1195
- return p;
1195
+ return r;
1196
1196
  }
1197
- function L(y) {
1198
- if (!y.components)
1197
+ function E(i) {
1198
+ if (!i.components)
1199
1199
  return;
1200
- const j = Object.values(y.components);
1201
- for (const C of j)
1202
- G(C.styles), te.forEach((p) => {
1203
- if (p in C.styles) {
1204
- const h = C.styles[p];
1205
- G(h);
1200
+ const m = Object.values(i.components);
1201
+ for (const f of m)
1202
+ C(f.styles), B.forEach((r) => {
1203
+ if (r in f.styles) {
1204
+ const a = f.styles[r];
1205
+ C(a);
1206
1206
  }
1207
- }), C.themes && Object.values(C.themes).forEach((p) => {
1208
- G(p), te.forEach((h) => {
1209
- if (h in p) {
1210
- const b = p[h];
1211
- G(b);
1207
+ }), f.themes && Object.values(f.themes).forEach((r) => {
1208
+ C(r), B.forEach((a) => {
1209
+ if (a in r) {
1210
+ const o = r[a];
1211
+ C(o);
1212
1212
  }
1213
1213
  });
1214
1214
  });
1215
1215
  }
1216
- function G(y) {
1217
- le.forEach((j) => {
1218
- if (j in y) {
1219
- const C = y[j];
1220
- Object.entries(C).map(([p, h]) => {
1221
- y[`${p}${j}`] = h;
1222
- }), delete y[j];
1216
+ function C(i) {
1217
+ H.forEach((m) => {
1218
+ if (m in i) {
1219
+ const f = i[m];
1220
+ Object.entries(f).map(([r, a]) => {
1221
+ i[`${r}${m}`] = a;
1222
+ }), delete i[m];
1223
1223
  }
1224
1224
  });
1225
1225
  }
1226
- })(ce || (ce = {}));
1227
- const qe = ce;
1228
- function De(u) {
1229
- const { clean: o, theme: t, component: m } = u;
1230
- return xe(() => {
1231
- var O, q;
1232
- if (o)
1226
+ })(D || (D = {}));
1227
+ const ce = D;
1228
+ function me(e) {
1229
+ const { clean: l, theme: u, component: n } = e;
1230
+ return U(() => {
1231
+ var d, p;
1232
+ if (l)
1233
1233
  return;
1234
- let e = (O = qe.Styles.components) == null ? void 0 : O[m];
1235
- if (e)
1236
- return t ? { ...e.styles, ...(q = e.themes) == null ? void 0 : q[t] } : e.styles;
1237
- }, [m, o, t]);
1234
+ let t = (d = ce.Styles.components) == null ? void 0 : d[n];
1235
+ if (t)
1236
+ return u ? { ...t.styles, ...(p = t.themes) == null ? void 0 : p[u] } : t.styles;
1237
+ }, [n, l, u]);
1238
1238
  }
1239
- const Ae = typeof window < "u" && typeof window.document < "u", Ie = Ae ? je : Me;
1240
- function Ge(u, o) {
1241
- const t = De(u);
1242
- return Ie(se.flush, [u]), xe(() => {
1243
- const m = [o ? se.svgClassName : se.boxClassName], e = t ? { ...t, ...u } : { ...u };
1244
- return ge(e), Object.entries(e).forEach(([O, q]) => {
1245
- m.push(se.get(O, q));
1246
- }), te.forEach((O) => {
1247
- if (O in e) {
1248
- const q = e[O];
1249
- ge(q), Object.entries(q).forEach(([H, L]) => {
1250
- m.push(se.get(H, L, O));
1251
- }), delete e[O];
1239
+ const de = typeof window < "u" && typeof window.document < "u", fe = de ? ee : se;
1240
+ function pe(e, l) {
1241
+ const u = me(e);
1242
+ return fe(I.flush, [e]), U(() => {
1243
+ const n = [l ? I.svgClassName : I.boxClassName], t = u ? { ...u, ...e } : { ...e };
1244
+ return M(t), Object.entries(t).forEach(([d, p]) => {
1245
+ n.push(I.get(d, p));
1246
+ }), B.forEach((d) => {
1247
+ if (d in t) {
1248
+ const p = t[d];
1249
+ M(p), Object.entries(p).forEach(([k, E]) => {
1250
+ n.push(I.get(k, E, d));
1251
+ }), delete t[d];
1252
1252
  }
1253
- }), m;
1254
- }, [u, t]);
1253
+ }), n;
1254
+ }, [e, u]);
1255
1255
  }
1256
- function ge(u) {
1257
- R(u, "hover", "hover"), R(u, "focus", "focus"), R(u, "hasFocus", "hasFocus"), R(u, "active", "active"), R(u, "disabled", "disabled"), R(u, "hasDisabled", "hasDisabled"), R(u, "checked", "checked"), R(u, "hasChecked", "hasChecked"), R(u, "valid", "valid"), R(u, "hasValid", "hasValid"), R(u, "invalid", "invalid"), R(u, "hasInvalid", "hasInvalid"), ie(u, "hoverGroup", "hover"), ie(u, "focusGroup", "focus"), ie(u, "activeGroup", "active"), ie(u, "disabledGroup", "disabled");
1256
+ function M(e) {
1257
+ w(e, "hover", "hover"), w(e, "focus", "focus"), w(e, "hasFocus", "hasFocus"), w(e, "active", "active"), w(e, "disabled", "disabled"), w(e, "hasDisabled", "hasDisabled"), w(e, "checked", "checked"), w(e, "hasChecked", "hasChecked"), w(e, "valid", "valid"), w(e, "hasValid", "hasValid"), w(e, "invalid", "invalid"), w(e, "hasInvalid", "hasInvalid"), A(e, "hoverGroup", "hover"), A(e, "focusGroup", "focus"), A(e, "activeGroup", "active"), A(e, "disabledGroup", "disabled");
1258
1258
  }
1259
- function R(u, o, t) {
1260
- o in u && Ve(u, o, t, u[o]);
1259
+ function w(e, l, u) {
1260
+ l in e && J(e, l, u, e[l]);
1261
1261
  }
1262
- function ie(u, o, t) {
1263
- o in u && we.isObject(u[o]) && Object.entries(u[o]).forEach(([m, e]) => {
1264
- se.addCustomPseudoClass(t, m, o), Ve(u, o, t + m, e);
1262
+ function A(e, l, u) {
1263
+ l in e && X.isObject(e[l]) && Object.entries(e[l]).forEach(([n, t]) => {
1264
+ I.addCustomPseudoClass(u, n, l), J(e, l, u + n, t);
1265
1265
  });
1266
1266
  }
1267
- function Ve(u, o, t, m) {
1268
- Array.isArray(m) ? (Object.entries(m[1]).forEach(([e, O]) => {
1269
- u[`${e}${t}`] = O;
1270
- }), u[o] = m[0]) : we.isObject(m) && (Object.entries(m).forEach(([e, O]) => {
1271
- u[`${e}${t}`] = O;
1272
- }), delete u[o]);
1267
+ function J(e, l, u, n) {
1268
+ Array.isArray(n) ? (Object.entries(n[1]).forEach(([t, d]) => {
1269
+ e[`${t}${u}`] = d;
1270
+ }), e[l] = n[0]) : X.isObject(n) && (Object.entries(n).forEach(([t, d]) => {
1271
+ e[`${t}${u}`] = d;
1272
+ }), delete e[l]);
1273
1273
  }
1274
- function Be(...u) {
1275
- return u.reduce((o, t) => t ? typeof t == "string" ? (o.push(t), o) : Array.isArray(t) ? (o.push(...Be(...t)), o) : (Object.entries(t).forEach(([m, e]) => {
1276
- e && o.push(m);
1277
- }), o) : o, []);
1274
+ function he(...e) {
1275
+ return e.reduce((l, u) => u ? typeof u == "string" ? (l.push(u), l) : Array.isArray(u) ? (l.push(...he(...u)), l) : (Object.entries(u).forEach(([n, t]) => {
1276
+ t && l.push(n);
1277
+ }), l) : l, []);
1278
1278
  }
1279
- /*!
1280
- * chai
1281
- * http://chaijs.com
1282
- * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
1283
- * MIT Licensed
1284
- */
1285
- var Fe = function(u, o) {
1286
- var t = u.Assertion, m = u.AssertionError, e = o.flag;
1287
- [
1288
- "to",
1289
- "be",
1290
- "been",
1291
- "is",
1292
- "and",
1293
- "has",
1294
- "have",
1295
- "with",
1296
- "that",
1297
- "which",
1298
- "at",
1299
- "of",
1300
- "same",
1301
- "but",
1302
- "does",
1303
- "still",
1304
- "also"
1305
- ].forEach(function(s) {
1306
- t.addProperty(s);
1307
- }), t.addProperty("not", function() {
1308
- e(this, "negate", !0);
1309
- }), t.addProperty("deep", function() {
1310
- e(this, "deep", !0);
1311
- }), t.addProperty("nested", function() {
1312
- e(this, "nested", !0);
1313
- }), t.addProperty("own", function() {
1314
- e(this, "own", !0);
1315
- }), t.addProperty("ordered", function() {
1316
- e(this, "ordered", !0);
1317
- }), t.addProperty("any", function() {
1318
- e(this, "any", !0), e(this, "all", !1);
1319
- }), t.addProperty("all", function() {
1320
- e(this, "all", !0), e(this, "any", !1);
1321
- });
1322
- function O(s, a) {
1323
- a && e(this, "message", a), s = s.toLowerCase();
1324
- var l = e(this, "object"), n = ~["a", "e", "i", "o", "u"].indexOf(s.charAt(0)) ? "an " : "a ";
1325
- this.assert(
1326
- s === o.type(l).toLowerCase(),
1327
- "expected #{this} to be " + n + s,
1328
- "expected #{this} not to be " + n + s
1329
- );
1330
- }
1331
- t.addChainableMethod("an", O), t.addChainableMethod("a", O);
1332
- function q(s, a) {
1333
- return o.isNaN(s) && o.isNaN(a) || s === a;
1334
- }
1335
- function H() {
1336
- e(this, "contains", !0);
1337
- }
1338
- function L(s, a) {
1339
- a && e(this, "message", a);
1340
- var l = e(this, "object"), n = o.type(l).toLowerCase(), c = e(this, "message"), v = e(this, "negate"), r = e(this, "ssfi"), i = e(this, "deep"), f = i ? "deep " : "", g = i ? e(this, "eql") : q;
1341
- c = c ? c + ": " : "";
1342
- var w = !1;
1343
- switch (n) {
1344
- case "string":
1345
- w = l.indexOf(s) !== -1;
1346
- break;
1347
- case "weakset":
1348
- if (i)
1349
- throw new m(
1350
- c + "unable to use .deep.include with WeakSet",
1351
- void 0,
1352
- r
1353
- );
1354
- w = l.has(s);
1355
- break;
1356
- case "map":
1357
- l.forEach(function(E) {
1358
- w = w || g(E, s);
1359
- });
1360
- break;
1361
- case "set":
1362
- i ? l.forEach(function(E) {
1363
- w = w || g(E, s);
1364
- }) : w = l.has(s);
1365
- break;
1366
- case "array":
1367
- i ? w = l.some(function(E) {
1368
- return g(E, s);
1369
- }) : w = l.indexOf(s) !== -1;
1370
- break;
1371
- default:
1372
- if (s !== Object(s))
1373
- throw new m(
1374
- c + "the given combination of arguments (" + n + " and " + o.type(s).toLowerCase() + ") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a " + o.type(s).toLowerCase(),
1375
- void 0,
1376
- r
1377
- );
1378
- var $ = Object.keys(s), N = null, V = 0;
1379
- if ($.forEach(function(E) {
1380
- var S = new t(l);
1381
- if (o.transferFlags(this, S, !0), e(S, "lockSsfi", !0), !v || $.length === 1) {
1382
- S.property(E, s[E]);
1383
- return;
1384
- }
1385
- try {
1386
- S.property(E, s[E]);
1387
- } catch (B) {
1388
- if (!o.checkError.compatibleConstructor(B, m))
1389
- throw B;
1390
- N === null && (N = B), V++;
1391
- }
1392
- }, this), v && $.length > 1 && V === $.length)
1393
- throw N;
1394
- return;
1395
- }
1396
- this.assert(
1397
- w,
1398
- "expected #{this} to " + f + "include " + o.inspect(s),
1399
- "expected #{this} to not " + f + "include " + o.inspect(s)
1400
- );
1401
- }
1402
- t.addChainableMethod("include", L, H), t.addChainableMethod("contain", L, H), t.addChainableMethod("contains", L, H), t.addChainableMethod("includes", L, H), t.addProperty("ok", function() {
1403
- this.assert(
1404
- e(this, "object"),
1405
- "expected #{this} to be truthy",
1406
- "expected #{this} to be falsy"
1407
- );
1408
- }), t.addProperty("true", function() {
1409
- this.assert(
1410
- e(this, "object") === !0,
1411
- "expected #{this} to be true",
1412
- "expected #{this} to be false",
1413
- !e(this, "negate")
1414
- );
1415
- }), t.addProperty("false", function() {
1416
- this.assert(
1417
- e(this, "object") === !1,
1418
- "expected #{this} to be false",
1419
- "expected #{this} to be true",
1420
- !!e(this, "negate")
1421
- );
1422
- }), t.addProperty("null", function() {
1423
- this.assert(
1424
- e(this, "object") === null,
1425
- "expected #{this} to be null",
1426
- "expected #{this} not to be null"
1427
- );
1428
- }), t.addProperty("undefined", function() {
1429
- this.assert(
1430
- e(this, "object") === void 0,
1431
- "expected #{this} to be undefined",
1432
- "expected #{this} not to be undefined"
1433
- );
1434
- }), t.addProperty("NaN", function() {
1435
- this.assert(
1436
- o.isNaN(e(this, "object")),
1437
- "expected #{this} to be NaN",
1438
- "expected #{this} not to be NaN"
1439
- );
1440
- });
1441
- function G() {
1442
- var s = e(this, "object");
1443
- this.assert(
1444
- s != null,
1445
- "expected #{this} to exist",
1446
- "expected #{this} to not exist"
1447
- );
1448
- }
1449
- t.addProperty("exist", G), t.addProperty("exists", G), t.addProperty("empty", function() {
1450
- var s = e(this, "object"), a = e(this, "ssfi"), l = e(this, "message"), n;
1451
- switch (l = l ? l + ": " : "", o.type(s).toLowerCase()) {
1452
- case "array":
1453
- case "string":
1454
- n = s.length;
1455
- break;
1456
- case "map":
1457
- case "set":
1458
- n = s.size;
1459
- break;
1460
- case "weakmap":
1461
- case "weakset":
1462
- throw new m(
1463
- l + ".empty was passed a weak collection",
1464
- void 0,
1465
- a
1466
- );
1467
- case "function":
1468
- var c = l + ".empty was passed a function " + o.getName(s);
1469
- throw new m(c.trim(), void 0, a);
1470
- default:
1471
- if (s !== Object(s))
1472
- throw new m(
1473
- l + ".empty was passed non-string primitive " + o.inspect(s),
1474
- void 0,
1475
- a
1476
- );
1477
- n = Object.keys(s).length;
1478
- }
1479
- this.assert(
1480
- n === 0,
1481
- "expected #{this} to be empty",
1482
- "expected #{this} not to be empty"
1483
- );
1484
- });
1485
- function y() {
1486
- var s = e(this, "object"), a = o.type(s);
1487
- this.assert(
1488
- a === "Arguments",
1489
- "expected #{this} to be arguments but got " + a,
1490
- "expected #{this} to not be arguments"
1491
- );
1492
- }
1493
- t.addProperty("arguments", y), t.addProperty("Arguments", y);
1494
- function j(s, a) {
1495
- a && e(this, "message", a);
1496
- var l = e(this, "object");
1497
- if (e(this, "deep")) {
1498
- var n = e(this, "lockSsfi");
1499
- e(this, "lockSsfi", !0), this.eql(s), e(this, "lockSsfi", n);
1500
- } else
1501
- this.assert(
1502
- s === l,
1503
- "expected #{this} to equal #{exp}",
1504
- "expected #{this} to not equal #{exp}",
1505
- s,
1506
- this._obj,
1507
- !0
1508
- );
1509
- }
1510
- t.addMethod("equal", j), t.addMethod("equals", j), t.addMethod("eq", j);
1511
- function C(s, a) {
1512
- a && e(this, "message", a);
1513
- var l = e(this, "eql");
1514
- this.assert(
1515
- l(s, e(this, "object")),
1516
- "expected #{this} to deeply equal #{exp}",
1517
- "expected #{this} to not deeply equal #{exp}",
1518
- s,
1519
- this._obj,
1520
- !0
1521
- );
1522
- }
1523
- t.addMethod("eql", C), t.addMethod("eqls", C);
1524
- function p(s, a) {
1525
- a && e(this, "message", a);
1526
- var l = e(this, "object"), n = e(this, "doLength"), c = e(this, "message"), v = c ? c + ": " : "", r = e(this, "ssfi"), i = o.type(l).toLowerCase(), f = o.type(s).toLowerCase(), g, w = !0;
1527
- if (n && i !== "map" && i !== "set" && new t(l, c, r, !0).to.have.property("length"), !n && i === "date" && f !== "date")
1528
- g = v + "the argument to above must be a date";
1529
- else if (f !== "number" && (n || i === "number"))
1530
- g = v + "the argument to above must be a number";
1531
- else if (!n && i !== "date" && i !== "number") {
1532
- var $ = i === "string" ? "'" + l + "'" : l;
1533
- g = v + "expected " + $ + " to be a number or a date";
1534
- } else
1535
- w = !1;
1536
- if (w)
1537
- throw new m(g, void 0, r);
1538
- if (n) {
1539
- var N = "length", V;
1540
- i === "map" || i === "set" ? (N = "size", V = l.size) : V = l.length, this.assert(
1541
- V > s,
1542
- "expected #{this} to have a " + N + " above #{exp} but got #{act}",
1543
- "expected #{this} to not have a " + N + " above #{exp}",
1544
- s,
1545
- V
1546
- );
1547
- } else
1548
- this.assert(
1549
- l > s,
1550
- "expected #{this} to be above #{exp}",
1551
- "expected #{this} to be at most #{exp}",
1552
- s
1553
- );
1554
- }
1555
- t.addMethod("above", p), t.addMethod("gt", p), t.addMethod("greaterThan", p);
1556
- function h(s, a) {
1557
- a && e(this, "message", a);
1558
- var l = e(this, "object"), n = e(this, "doLength"), c = e(this, "message"), v = c ? c + ": " : "", r = e(this, "ssfi"), i = o.type(l).toLowerCase(), f = o.type(s).toLowerCase(), g, w = !0;
1559
- if (n && i !== "map" && i !== "set" && new t(l, c, r, !0).to.have.property("length"), !n && i === "date" && f !== "date")
1560
- g = v + "the argument to least must be a date";
1561
- else if (f !== "number" && (n || i === "number"))
1562
- g = v + "the argument to least must be a number";
1563
- else if (!n && i !== "date" && i !== "number") {
1564
- var $ = i === "string" ? "'" + l + "'" : l;
1565
- g = v + "expected " + $ + " to be a number or a date";
1566
- } else
1567
- w = !1;
1568
- if (w)
1569
- throw new m(g, void 0, r);
1570
- if (n) {
1571
- var N = "length", V;
1572
- i === "map" || i === "set" ? (N = "size", V = l.size) : V = l.length, this.assert(
1573
- V >= s,
1574
- "expected #{this} to have a " + N + " at least #{exp} but got #{act}",
1575
- "expected #{this} to have a " + N + " below #{exp}",
1576
- s,
1577
- V
1578
- );
1579
- } else
1580
- this.assert(
1581
- l >= s,
1582
- "expected #{this} to be at least #{exp}",
1583
- "expected #{this} to be below #{exp}",
1584
- s
1585
- );
1586
- }
1587
- t.addMethod("least", h), t.addMethod("gte", h), t.addMethod("greaterThanOrEqual", h);
1588
- function b(s, a) {
1589
- a && e(this, "message", a);
1590
- var l = e(this, "object"), n = e(this, "doLength"), c = e(this, "message"), v = c ? c + ": " : "", r = e(this, "ssfi"), i = o.type(l).toLowerCase(), f = o.type(s).toLowerCase(), g, w = !0;
1591
- if (n && i !== "map" && i !== "set" && new t(l, c, r, !0).to.have.property("length"), !n && i === "date" && f !== "date")
1592
- g = v + "the argument to below must be a date";
1593
- else if (f !== "number" && (n || i === "number"))
1594
- g = v + "the argument to below must be a number";
1595
- else if (!n && i !== "date" && i !== "number") {
1596
- var $ = i === "string" ? "'" + l + "'" : l;
1597
- g = v + "expected " + $ + " to be a number or a date";
1598
- } else
1599
- w = !1;
1600
- if (w)
1601
- throw new m(g, void 0, r);
1602
- if (n) {
1603
- var N = "length", V;
1604
- i === "map" || i === "set" ? (N = "size", V = l.size) : V = l.length, this.assert(
1605
- V < s,
1606
- "expected #{this} to have a " + N + " below #{exp} but got #{act}",
1607
- "expected #{this} to not have a " + N + " below #{exp}",
1608
- s,
1609
- V
1610
- );
1611
- } else
1612
- this.assert(
1613
- l < s,
1614
- "expected #{this} to be below #{exp}",
1615
- "expected #{this} to be at least #{exp}",
1616
- s
1617
- );
1618
- }
1619
- t.addMethod("below", b), t.addMethod("lt", b), t.addMethod("lessThan", b);
1620
- function x(s, a) {
1621
- a && e(this, "message", a);
1622
- var l = e(this, "object"), n = e(this, "doLength"), c = e(this, "message"), v = c ? c + ": " : "", r = e(this, "ssfi"), i = o.type(l).toLowerCase(), f = o.type(s).toLowerCase(), g, w = !0;
1623
- if (n && i !== "map" && i !== "set" && new t(l, c, r, !0).to.have.property("length"), !n && i === "date" && f !== "date")
1624
- g = v + "the argument to most must be a date";
1625
- else if (f !== "number" && (n || i === "number"))
1626
- g = v + "the argument to most must be a number";
1627
- else if (!n && i !== "date" && i !== "number") {
1628
- var $ = i === "string" ? "'" + l + "'" : l;
1629
- g = v + "expected " + $ + " to be a number or a date";
1630
- } else
1631
- w = !1;
1632
- if (w)
1633
- throw new m(g, void 0, r);
1634
- if (n) {
1635
- var N = "length", V;
1636
- i === "map" || i === "set" ? (N = "size", V = l.size) : V = l.length, this.assert(
1637
- V <= s,
1638
- "expected #{this} to have a " + N + " at most #{exp} but got #{act}",
1639
- "expected #{this} to have a " + N + " above #{exp}",
1640
- s,
1641
- V
1642
- );
1643
- } else
1644
- this.assert(
1645
- l <= s,
1646
- "expected #{this} to be at most #{exp}",
1647
- "expected #{this} to be above #{exp}",
1648
- s
1649
- );
1650
- }
1651
- t.addMethod("most", x), t.addMethod("lte", x), t.addMethod("lessThanOrEqual", x), t.addMethod("within", function(s, a, l) {
1652
- l && e(this, "message", l);
1653
- var n = e(this, "object"), c = e(this, "doLength"), v = e(this, "message"), r = v ? v + ": " : "", i = e(this, "ssfi"), f = o.type(n).toLowerCase(), g = o.type(s).toLowerCase(), w = o.type(a).toLowerCase(), $, N = !0, V = g === "date" && w === "date" ? s.toISOString() + ".." + a.toISOString() : s + ".." + a;
1654
- if (c && f !== "map" && f !== "set" && new t(n, v, i, !0).to.have.property("length"), !c && f === "date" && (g !== "date" || w !== "date"))
1655
- $ = r + "the arguments to within must be dates";
1656
- else if ((g !== "number" || w !== "number") && (c || f === "number"))
1657
- $ = r + "the arguments to within must be numbers";
1658
- else if (!c && f !== "date" && f !== "number") {
1659
- var E = f === "string" ? "'" + n + "'" : n;
1660
- $ = r + "expected " + E + " to be a number or a date";
1661
- } else
1662
- N = !1;
1663
- if (N)
1664
- throw new m($, void 0, i);
1665
- if (c) {
1666
- var S = "length", B;
1667
- f === "map" || f === "set" ? (S = "size", B = n.size) : B = n.length, this.assert(
1668
- B >= s && B <= a,
1669
- "expected #{this} to have a " + S + " within " + V,
1670
- "expected #{this} to not have a " + S + " within " + V
1671
- );
1672
- } else
1673
- this.assert(
1674
- n >= s && n <= a,
1675
- "expected #{this} to be within " + V,
1676
- "expected #{this} to not be within " + V
1677
- );
1678
- });
1679
- function z(s, a) {
1680
- a && e(this, "message", a);
1681
- var l = e(this, "object"), n = e(this, "ssfi"), c = e(this, "message");
1682
- try {
1683
- var v = l instanceof s;
1684
- } catch (i) {
1685
- throw i instanceof TypeError ? (c = c ? c + ": " : "", new m(
1686
- c + "The instanceof assertion needs a constructor but " + o.type(s) + " was given.",
1687
- void 0,
1688
- n
1689
- )) : i;
1690
- }
1691
- var r = o.getName(s);
1692
- r === null && (r = "an unnamed constructor"), this.assert(
1693
- v,
1694
- "expected #{this} to be an instance of " + r,
1695
- "expected #{this} to not be an instance of " + r
1696
- );
1697
- }
1698
- t.addMethod("instanceof", z), t.addMethod("instanceOf", z);
1699
- function k(s, a, l) {
1700
- l && e(this, "message", l);
1701
- var n = e(this, "nested"), c = e(this, "own"), v = e(this, "message"), r = e(this, "object"), i = e(this, "ssfi"), f = typeof s;
1702
- if (v = v ? v + ": " : "", n) {
1703
- if (f !== "string")
1704
- throw new m(
1705
- v + "the argument to property must be a string when using nested syntax",
1706
- void 0,
1707
- i
1708
- );
1709
- } else if (f !== "string" && f !== "number" && f !== "symbol")
1710
- throw new m(
1711
- v + "the argument to property must be a string, number, or symbol",
1712
- void 0,
1713
- i
1714
- );
1715
- if (n && c)
1716
- throw new m(
1717
- v + 'The "nested" and "own" flags cannot be combined.',
1718
- void 0,
1719
- i
1720
- );
1721
- if (r == null)
1722
- throw new m(
1723
- v + "Target cannot be null or undefined.",
1724
- void 0,
1725
- i
1726
- );
1727
- var g = e(this, "deep"), w = e(this, "negate"), $ = n ? o.getPathInfo(r, s) : null, N = n ? $.value : r[s], V = g ? e(this, "eql") : (B, Q) => B === Q, E = "";
1728
- g && (E += "deep "), c && (E += "own "), n && (E += "nested "), E += "property ";
1729
- var S;
1730
- c ? S = Object.prototype.hasOwnProperty.call(r, s) : n ? S = $.exists : S = o.hasProperty(r, s), (!w || arguments.length === 1) && this.assert(
1731
- S,
1732
- "expected #{this} to have " + E + o.inspect(s),
1733
- "expected #{this} to not have " + E + o.inspect(s)
1734
- ), arguments.length > 1 && this.assert(
1735
- S && V(a, N),
1736
- "expected #{this} to have " + E + o.inspect(s) + " of #{exp}, but got #{act}",
1737
- "expected #{this} to not have " + E + o.inspect(s) + " of #{act}",
1738
- a,
1739
- N
1740
- ), e(this, "object", N);
1741
- }
1742
- t.addMethod("property", k);
1743
- function I(s, a, l) {
1744
- e(this, "own", !0), k.apply(this, arguments);
1745
- }
1746
- t.addMethod("ownProperty", I), t.addMethod("haveOwnProperty", I);
1747
- function D(s, a, l) {
1748
- typeof a == "string" && (l = a, a = null), l && e(this, "message", l);
1749
- var n = e(this, "object"), c = Object.getOwnPropertyDescriptor(Object(n), s), v = e(this, "eql");
1750
- c && a ? this.assert(
1751
- v(a, c),
1752
- "expected the own property descriptor for " + o.inspect(s) + " on #{this} to match " + o.inspect(a) + ", got " + o.inspect(c),
1753
- "expected the own property descriptor for " + o.inspect(s) + " on #{this} to not match " + o.inspect(a),
1754
- a,
1755
- c,
1756
- !0
1757
- ) : this.assert(
1758
- c,
1759
- "expected #{this} to have an own property descriptor for " + o.inspect(s),
1760
- "expected #{this} to not have an own property descriptor for " + o.inspect(s)
1761
- ), e(this, "object", c);
1762
- }
1763
- t.addMethod("ownPropertyDescriptor", D), t.addMethod("haveOwnPropertyDescriptor", D);
1764
- function A() {
1765
- e(this, "doLength", !0);
1766
- }
1767
- function W(s, a) {
1768
- a && e(this, "message", a);
1769
- var l = e(this, "object"), n = o.type(l).toLowerCase(), c = e(this, "message"), v = e(this, "ssfi"), r = "length", i;
1770
- switch (n) {
1771
- case "map":
1772
- case "set":
1773
- r = "size", i = l.size;
1774
- break;
1775
- default:
1776
- new t(l, c, v, !0).to.have.property("length"), i = l.length;
1777
- }
1778
- this.assert(
1779
- i == s,
1780
- "expected #{this} to have a " + r + " of #{exp} but got #{act}",
1781
- "expected #{this} to not have a " + r + " of #{act}",
1782
- s,
1783
- i
1784
- );
1785
- }
1786
- t.addChainableMethod("length", W, A), t.addChainableMethod("lengthOf", W, A);
1787
- function Y(s, a) {
1788
- a && e(this, "message", a);
1789
- var l = e(this, "object");
1790
- this.assert(
1791
- s.exec(l),
1792
- "expected #{this} to match " + s,
1793
- "expected #{this} not to match " + s
1794
- );
1795
- }
1796
- t.addMethod("match", Y), t.addMethod("matches", Y), t.addMethod("string", function(s, a) {
1797
- a && e(this, "message", a);
1798
- var l = e(this, "object"), n = e(this, "message"), c = e(this, "ssfi");
1799
- new t(l, n, c, !0).is.a("string"), this.assert(
1800
- ~l.indexOf(s),
1801
- "expected #{this} to contain " + o.inspect(s),
1802
- "expected #{this} to not contain " + o.inspect(s)
1803
- );
1804
- });
1805
- function J(s) {
1806
- var a = e(this, "object"), l = o.type(a), n = o.type(s), c = e(this, "ssfi"), v = e(this, "deep"), r, i = "", f, g = !0, w = e(this, "message");
1807
- w = w ? w + ": " : "";
1808
- var $ = w + "when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";
1809
- if (l === "Map" || l === "Set")
1810
- i = v ? "deeply " : "", f = [], a.forEach(function(F, Z) {
1811
- f.push(Z);
1812
- }), n !== "Array" && (s = Array.prototype.slice.call(arguments));
1813
- else {
1814
- switch (f = o.getOwnEnumerableProperties(a), n) {
1815
- case "Array":
1816
- if (arguments.length > 1)
1817
- throw new m($, void 0, c);
1818
- break;
1819
- case "Object":
1820
- if (arguments.length > 1)
1821
- throw new m($, void 0, c);
1822
- s = Object.keys(s);
1823
- break;
1824
- default:
1825
- s = Array.prototype.slice.call(arguments);
1826
- }
1827
- s = s.map(function(F) {
1828
- return typeof F == "symbol" ? F : String(F);
1829
- });
1830
- }
1831
- if (!s.length)
1832
- throw new m(w + "keys required", void 0, c);
1833
- var N = s.length, V = e(this, "any"), E = e(this, "all"), S = s, B = v ? e(this, "eql") : (F, Z) => F === Z;
1834
- if (!V && !E && (E = !0), V && (g = S.some(function(F) {
1835
- return f.some(function(Z) {
1836
- return B(F, Z);
1837
- });
1838
- })), E && (g = S.every(function(F) {
1839
- return f.some(function(Z) {
1840
- return B(F, Z);
1841
- });
1842
- }), e(this, "contains") || (g = g && s.length == f.length)), N > 1) {
1843
- s = s.map(function(F) {
1844
- return o.inspect(F);
1845
- });
1846
- var Q = s.pop();
1847
- E && (r = s.join(", ") + ", and " + Q), V && (r = s.join(", ") + ", or " + Q);
1848
- } else
1849
- r = o.inspect(s[0]);
1850
- r = (N > 1 ? "keys " : "key ") + r, r = (e(this, "contains") ? "contain " : "have ") + r, this.assert(
1851
- g,
1852
- "expected #{this} to " + i + r,
1853
- "expected #{this} to not " + i + r,
1854
- S.slice(0).sort(o.compareByInspect),
1855
- f.sort(o.compareByInspect),
1856
- !0
1857
- );
1858
- }
1859
- t.addMethod("keys", J), t.addMethod("key", J);
1860
- function X(s, a, l) {
1861
- l && e(this, "message", l);
1862
- var n = e(this, "object"), c = e(this, "ssfi"), v = e(this, "message"), r = e(this, "negate") || !1;
1863
- new t(n, v, c, !0).is.a("function"), (s instanceof RegExp || typeof s == "string") && (a = s, s = null);
1864
- var i;
1865
- try {
1866
- n();
1867
- } catch (Q) {
1868
- i = Q;
1869
- }
1870
- var f = s === void 0 && a === void 0, g = !!(s && a), w = !1, $ = !1;
1871
- if (f || !f && !r) {
1872
- var N = "an error";
1873
- s instanceof Error ? N = "#{exp}" : s && (N = o.checkError.getConstructorName(s)), this.assert(
1874
- i,
1875
- "expected #{this} to throw " + N,
1876
- "expected #{this} to not throw an error but #{act} was thrown",
1877
- s && s.toString(),
1878
- i instanceof Error ? i.toString() : typeof i == "string" ? i : i && o.checkError.getConstructorName(i)
1879
- );
1880
- }
1881
- if (s && i) {
1882
- if (s instanceof Error) {
1883
- var V = o.checkError.compatibleInstance(i, s);
1884
- V === r && (g && r ? w = !0 : this.assert(
1885
- r,
1886
- "expected #{this} to throw #{exp} but #{act} was thrown",
1887
- "expected #{this} to not throw #{exp}" + (i && !r ? " but #{act} was thrown" : ""),
1888
- s.toString(),
1889
- i.toString()
1890
- ));
1891
- }
1892
- var E = o.checkError.compatibleConstructor(i, s);
1893
- E === r && (g && r ? w = !0 : this.assert(
1894
- r,
1895
- "expected #{this} to throw #{exp} but #{act} was thrown",
1896
- "expected #{this} to not throw #{exp}" + (i ? " but #{act} was thrown" : ""),
1897
- s instanceof Error ? s.toString() : s && o.checkError.getConstructorName(s),
1898
- i instanceof Error ? i.toString() : i && o.checkError.getConstructorName(i)
1899
- ));
1900
- }
1901
- if (i && a !== void 0 && a !== null) {
1902
- var S = "including";
1903
- a instanceof RegExp && (S = "matching");
1904
- var B = o.checkError.compatibleMessage(i, a);
1905
- B === r && (g && r ? $ = !0 : this.assert(
1906
- r,
1907
- "expected #{this} to throw error " + S + " #{exp} but got #{act}",
1908
- "expected #{this} to throw error not " + S + " #{exp}",
1909
- a,
1910
- o.checkError.getMessage(i)
1911
- ));
1912
- }
1913
- w && $ && this.assert(
1914
- r,
1915
- "expected #{this} to throw #{exp} but #{act} was thrown",
1916
- "expected #{this} to not throw #{exp}" + (i ? " but #{act} was thrown" : ""),
1917
- s instanceof Error ? s.toString() : s && o.checkError.getConstructorName(s),
1918
- i instanceof Error ? i.toString() : i && o.checkError.getConstructorName(i)
1919
- ), e(this, "object", i);
1920
- }
1921
- t.addMethod("throw", X), t.addMethod("throws", X), t.addMethod("Throw", X);
1922
- function P(s, a) {
1923
- a && e(this, "message", a);
1924
- var l = e(this, "object"), n = e(this, "itself"), c = typeof l == "function" && !n ? l.prototype[s] : l[s];
1925
- this.assert(
1926
- typeof c == "function",
1927
- "expected #{this} to respond to " + o.inspect(s),
1928
- "expected #{this} to not respond to " + o.inspect(s)
1929
- );
1930
- }
1931
- t.addMethod("respondTo", P), t.addMethod("respondsTo", P), t.addProperty("itself", function() {
1932
- e(this, "itself", !0);
1933
- });
1934
- function K(s, a) {
1935
- a && e(this, "message", a);
1936
- var l = e(this, "object"), n = s(l);
1937
- this.assert(
1938
- n,
1939
- "expected #{this} to satisfy " + o.objDisplay(s),
1940
- "expected #{this} to not satisfy" + o.objDisplay(s),
1941
- !e(this, "negate"),
1942
- n
1943
- );
1944
- }
1945
- t.addMethod("satisfy", K), t.addMethod("satisfies", K);
1946
- function ae(s, a, l) {
1947
- l && e(this, "message", l);
1948
- var n = e(this, "object"), c = e(this, "message"), v = e(this, "ssfi");
1949
- if (new t(n, c, v, !0).is.a("number"), typeof s != "number" || typeof a != "number") {
1950
- c = c ? c + ": " : "";
1951
- var r = a === void 0 ? ", and a delta is required" : "";
1952
- throw new m(
1953
- c + "the arguments to closeTo or approximately must be numbers" + r,
1954
- void 0,
1955
- v
1956
- );
1957
- }
1958
- this.assert(
1959
- Math.abs(n - s) <= a,
1960
- "expected #{this} to be close to " + s + " +/- " + a,
1961
- "expected #{this} not to be close to " + s + " +/- " + a
1962
- );
1963
- }
1964
- t.addMethod("closeTo", ae), t.addMethod("approximately", ae);
1965
- function oe(s, a, l, n, c) {
1966
- if (!n) {
1967
- if (s.length !== a.length)
1968
- return !1;
1969
- a = a.slice();
1970
- }
1971
- return s.every(function(v, r) {
1972
- if (c)
1973
- return l ? l(v, a[r]) : v === a[r];
1974
- if (!l) {
1975
- var i = a.indexOf(v);
1976
- return i === -1 ? !1 : (n || a.splice(i, 1), !0);
1977
- }
1978
- return a.some(function(f, g) {
1979
- return l(v, f) ? (n || a.splice(g, 1), !0) : !1;
1980
- });
1981
- });
1982
- }
1983
- t.addMethod("members", function(s, a) {
1984
- a && e(this, "message", a);
1985
- var l = e(this, "object"), n = e(this, "message"), c = e(this, "ssfi");
1986
- new t(l, n, c, !0).to.be.an("array"), new t(s, n, c, !0).to.be.an("array");
1987
- var v = e(this, "contains"), r = e(this, "ordered"), i, f, g;
1988
- v ? (i = r ? "an ordered superset" : "a superset", f = "expected #{this} to be " + i + " of #{exp}", g = "expected #{this} to not be " + i + " of #{exp}") : (i = r ? "ordered members" : "members", f = "expected #{this} to have the same " + i + " as #{exp}", g = "expected #{this} to not have the same " + i + " as #{exp}");
1989
- var w = e(this, "deep") ? e(this, "eql") : void 0;
1990
- this.assert(
1991
- oe(s, l, w, v, r),
1992
- f,
1993
- g,
1994
- s,
1995
- l,
1996
- !0
1997
- );
1998
- });
1999
- function ne(s, a) {
2000
- a && e(this, "message", a);
2001
- var l = e(this, "object"), n = e(this, "message"), c = e(this, "ssfi"), v = e(this, "contains"), r = e(this, "deep"), i = e(this, "eql");
2002
- new t(s, n, c, !0).to.be.an("array"), v ? this.assert(
2003
- s.some(function(f) {
2004
- return l.indexOf(f) > -1;
2005
- }),
2006
- "expected #{this} to contain one of #{exp}",
2007
- "expected #{this} to not contain one of #{exp}",
2008
- s,
2009
- l
2010
- ) : r ? this.assert(
2011
- s.some(function(f) {
2012
- return i(l, f);
2013
- }),
2014
- "expected #{this} to deeply equal one of #{exp}",
2015
- "expected #{this} to deeply equal one of #{exp}",
2016
- s,
2017
- l
2018
- ) : this.assert(
2019
- s.indexOf(l) > -1,
2020
- "expected #{this} to be one of #{exp}",
2021
- "expected #{this} to not be one of #{exp}",
2022
- s,
2023
- l
2024
- );
2025
- }
2026
- t.addMethod("oneOf", ne);
2027
- function de(s, a, l) {
2028
- l && e(this, "message", l);
2029
- var n = e(this, "object"), c = e(this, "message"), v = e(this, "ssfi");
2030
- new t(n, c, v, !0).is.a("function");
2031
- var r;
2032
- a ? (new t(s, c, v, !0).to.have.property(a), r = s[a]) : (new t(s, c, v, !0).is.a("function"), r = s()), n();
2033
- var i = a == null ? s() : s[a], f = a == null ? r : "." + a;
2034
- e(this, "deltaMsgObj", f), e(this, "initialDeltaValue", r), e(this, "finalDeltaValue", i), e(this, "deltaBehavior", "change"), e(this, "realDelta", i !== r), this.assert(
2035
- r !== i,
2036
- "expected " + f + " to change",
2037
- "expected " + f + " to not change"
2038
- );
2039
- }
2040
- t.addMethod("change", de), t.addMethod("changes", de);
2041
- function he(s, a, l) {
2042
- l && e(this, "message", l);
2043
- var n = e(this, "object"), c = e(this, "message"), v = e(this, "ssfi");
2044
- new t(n, c, v, !0).is.a("function");
2045
- var r;
2046
- a ? (new t(s, c, v, !0).to.have.property(a), r = s[a]) : (new t(s, c, v, !0).is.a("function"), r = s()), new t(r, c, v, !0).is.a("number"), n();
2047
- var i = a == null ? s() : s[a], f = a == null ? r : "." + a;
2048
- e(this, "deltaMsgObj", f), e(this, "initialDeltaValue", r), e(this, "finalDeltaValue", i), e(this, "deltaBehavior", "increase"), e(this, "realDelta", i - r), this.assert(
2049
- i - r > 0,
2050
- "expected " + f + " to increase",
2051
- "expected " + f + " to not increase"
2052
- );
2053
- }
2054
- t.addMethod("increase", he), t.addMethod("increases", he);
2055
- function ve(s, a, l) {
2056
- l && e(this, "message", l);
2057
- var n = e(this, "object"), c = e(this, "message"), v = e(this, "ssfi");
2058
- new t(n, c, v, !0).is.a("function");
2059
- var r;
2060
- a ? (new t(s, c, v, !0).to.have.property(a), r = s[a]) : (new t(s, c, v, !0).is.a("function"), r = s()), new t(r, c, v, !0).is.a("number"), n();
2061
- var i = a == null ? s() : s[a], f = a == null ? r : "." + a;
2062
- e(this, "deltaMsgObj", f), e(this, "initialDeltaValue", r), e(this, "finalDeltaValue", i), e(this, "deltaBehavior", "decrease"), e(this, "realDelta", r - i), this.assert(
2063
- i - r < 0,
2064
- "expected " + f + " to decrease",
2065
- "expected " + f + " to not decrease"
2066
- );
2067
- }
2068
- t.addMethod("decrease", ve), t.addMethod("decreases", ve);
2069
- function Ne(s, a) {
2070
- a && e(this, "message", a);
2071
- var l = e(this, "deltaMsgObj"), n = e(this, "initialDeltaValue"), c = e(this, "finalDeltaValue"), v = e(this, "deltaBehavior"), r = e(this, "realDelta"), i;
2072
- v === "change" ? i = Math.abs(c - n) === Math.abs(s) : i = r === Math.abs(s), this.assert(
2073
- i,
2074
- "expected " + l + " to " + v + " by " + s,
2075
- "expected " + l + " to not " + v + " by " + s
2076
- );
2077
- }
2078
- t.addMethod("by", Ne), t.addProperty("extensible", function() {
2079
- var s = e(this, "object"), a = s === Object(s) && Object.isExtensible(s);
2080
- this.assert(
2081
- a,
2082
- "expected #{this} to be extensible",
2083
- "expected #{this} to not be extensible"
2084
- );
2085
- }), t.addProperty("sealed", function() {
2086
- var s = e(this, "object"), a = s === Object(s) ? Object.isSealed(s) : !0;
2087
- this.assert(
2088
- a,
2089
- "expected #{this} to be sealed",
2090
- "expected #{this} to not be sealed"
2091
- );
2092
- }), t.addProperty("frozen", function() {
2093
- var s = e(this, "object"), a = s === Object(s) ? Object.isFrozen(s) : !0;
2094
- this.assert(
2095
- a,
2096
- "expected #{this} to be frozen",
2097
- "expected #{this} to not be frozen"
2098
- );
2099
- }), t.addProperty("finite", function(s) {
2100
- var a = e(this, "object");
2101
- this.assert(
2102
- typeof a == "number" && isFinite(a),
2103
- "expected #{this} to be a finite number",
2104
- "expected #{this} to not be a finite number"
2105
- );
2106
- });
2107
- };
2108
1279
  export {
2109
- se as S,
2110
- qe as T,
2111
- Fe as a,
2112
- Be as c,
2113
- Ge as u
1280
+ I as S,
1281
+ ce as T,
1282
+ he as c,
1283
+ pe as u
2114
1284
  };