@cfx-dev/ui-components 5.0.22 → 5.0.24

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.
Files changed (188) hide show
  1. package/dist/CarouselControls-CJ3tupLr.js +41 -0
  2. package/dist/Combination-BNueeiCk.js +2227 -0
  3. package/dist/{Combination-N-vN9BB-.js → Combination-DFRGuWx2.js} +50 -48
  4. package/dist/{DropdownContent-BTzahw95.js → DropdownContent-DCqFWnzj.js} +10 -10
  5. package/dist/assets/all_css.css +2 -1
  6. package/dist/assets/css/Button.css +1 -1
  7. package/dist/assets/css/CarouselControls.css +1 -0
  8. package/dist/assets/css/CarouselItem.css +1 -0
  9. package/dist/assets/css/RangeInput.css +1 -1
  10. package/dist/assets/css/Text.css +1 -1
  11. package/dist/assets/general/global.css +1 -1
  12. package/dist/assets/general/themes.css +1 -1
  13. package/dist/cfxIcons-YyDWNxmM.js +110 -0
  14. package/dist/cfxIconsXLarge-Dw37ZSw2.js +110 -0
  15. package/dist/components/Accordion/AccordionShowcase.js +2 -2
  16. package/dist/components/Badge/BadgeShowcase.js +3 -3
  17. package/dist/components/BurgerMenu/BurgerMenuShowcase.js +4 -4
  18. package/dist/components/Carousel/Carousel.d.ts +24 -0
  19. package/dist/components/Carousel/Carousel.js +125 -0
  20. package/dist/components/Carousel/Carousel.types.d.ts +41 -0
  21. package/dist/components/Carousel/Carousel.types.js +1 -0
  22. package/dist/components/Carousel/CarouselControls.d.ts +8 -0
  23. package/dist/components/Carousel/CarouselControls.js +8 -0
  24. package/dist/components/Carousel/CarouselItem.d.ts +11 -0
  25. package/dist/components/Carousel/CarouselItem.js +85 -0
  26. package/dist/components/Carousel/CarouselShowcase.d.ts +6 -0
  27. package/dist/components/Carousel/CarouselShowcase.js +177 -0
  28. package/dist/components/Carousel/index.d.ts +4 -0
  29. package/dist/components/Carousel/index.js +6 -0
  30. package/dist/components/Carousel/playIcon.d.ts +6 -0
  31. package/dist/components/Carousel/playIcon.js +25 -0
  32. package/dist/components/Checkbox/Checkbox.js +7 -7
  33. package/dist/components/Checkbox/CheckboxShowcase.js +5 -5
  34. package/dist/components/ClipboardButton/ClipboardButton.js +9 -9
  35. package/dist/components/ControlBox/ControlBox.js +10 -10
  36. package/dist/components/Decorate/Decorate.js +5 -5
  37. package/dist/components/DropdownContent/DropdownContent.js +1 -1
  38. package/dist/components/DropdownContent/index.js +1 -1
  39. package/dist/components/DropdownMenu/DropdownMenu.js +12 -12
  40. package/dist/components/DropdownSelect/DropdownSelect.js +1 -1
  41. package/dist/components/DropdownSelect/DropdownSelectShowcase.js +4 -4
  42. package/dist/components/Flex/FlexShowcase.js +4 -4
  43. package/dist/components/Flyout/Flyout.js +1 -1
  44. package/dist/components/Flyout/FlyoutShowcase.js +3 -3
  45. package/dist/components/FormField/FormFieldShowcase.js +1 -1
  46. package/dist/components/Icon/Icon.js +2 -2
  47. package/dist/components/Icons/IconsShowcase.js +1 -1
  48. package/dist/components/Icons/cfx-icons/Close.js +2 -2
  49. package/dist/components/Icons/cfx-icons/Copy.js +3 -3
  50. package/dist/components/Icons/cfx-icons/DownChevron.js +2 -2
  51. package/dist/components/Icons/cfx-icons/Filter.js +6 -6
  52. package/dist/components/Icons/cfx-icons/Heart.js +2 -2
  53. package/dist/components/Icons/cfx-icons/HeartFilled.js +2 -2
  54. package/dist/components/Icons/cfx-icons/LeftArrow.js +2 -2
  55. package/dist/components/Icons/cfx-icons/LeftChevron.js +2 -2
  56. package/dist/components/Icons/cfx-icons/MoreInfo.js +4 -4
  57. package/dist/components/Icons/cfx-icons/Play.js +5 -5
  58. package/dist/components/Icons/cfx-icons/Plus.js +2 -2
  59. package/dist/components/Icons/cfx-icons/Refresh.js +3 -3
  60. package/dist/components/Icons/cfx-icons/Search.js +2 -2
  61. package/dist/components/Icons/cfx-icons/ServerList.js +2 -2
  62. package/dist/components/Icons/cfx-icons/ServerReconnect.js +7 -7
  63. package/dist/components/Icons/cfx-icons/Square.js +3 -3
  64. package/dist/components/Icons/cfx-icons/SquareFilled.js +7 -7
  65. package/dist/components/Icons/cfx-icons/Trash.js +2 -2
  66. package/dist/components/Icons/cfx-icons/Undo.js +3 -3
  67. package/dist/components/Icons/cfx-icons/User.js +5 -5
  68. package/dist/components/Icons/cfx-icons/Users.js +3 -3
  69. package/dist/components/Icons/cfx-icons/Verified.js +4 -4
  70. package/dist/components/Icons/cfx-icons/Warning.js +2 -2
  71. package/dist/components/Icons/cfx-iconsXLarge/Close.js +2 -2
  72. package/dist/components/Icons/cfx-iconsXLarge/Copy.js +3 -3
  73. package/dist/components/Icons/cfx-iconsXLarge/DownChevron.js +2 -2
  74. package/dist/components/Icons/cfx-iconsXLarge/Filter.js +2 -2
  75. package/dist/components/Icons/cfx-iconsXLarge/Heart.js +5 -5
  76. package/dist/components/Icons/cfx-iconsXLarge/HeartFilled.js +2 -2
  77. package/dist/components/Icons/cfx-iconsXLarge/LeftArrow.js +2 -2
  78. package/dist/components/Icons/cfx-iconsXLarge/LeftChevron.js +2 -2
  79. package/dist/components/Icons/cfx-iconsXLarge/MoreInfo.js +4 -4
  80. package/dist/components/Icons/cfx-iconsXLarge/Play.js +5 -5
  81. package/dist/components/Icons/cfx-iconsXLarge/Plus.js +2 -2
  82. package/dist/components/Icons/cfx-iconsXLarge/Refresh.js +3 -3
  83. package/dist/components/Icons/cfx-iconsXLarge/Search.js +2 -2
  84. package/dist/components/Icons/cfx-iconsXLarge/ServerList.js +2 -2
  85. package/dist/components/Icons/cfx-iconsXLarge/ServerReconnect.js +7 -7
  86. package/dist/components/Icons/cfx-iconsXLarge/Square.js +3 -3
  87. package/dist/components/Icons/cfx-iconsXLarge/SquareFilled.js +4 -4
  88. package/dist/components/Icons/cfx-iconsXLarge/Trash.js +2 -2
  89. package/dist/components/Icons/cfx-iconsXLarge/Undo.js +4 -4
  90. package/dist/components/Icons/cfx-iconsXLarge/User.js +5 -5
  91. package/dist/components/Icons/cfx-iconsXLarge/Users.js +3 -3
  92. package/dist/components/Icons/cfx-iconsXLarge/Verified.js +4 -4
  93. package/dist/components/Icons/cfx-iconsXLarge/VisibilityOff.js +2 -2
  94. package/dist/components/Icons/cfx-iconsXLarge/Warning.js +2 -2
  95. package/dist/components/Icons/index.js +2 -2
  96. package/dist/components/InfoPanel/InfoPanelShowcase.js +9 -9
  97. package/dist/components/Input/InputShowcase.js +19 -19
  98. package/dist/components/Input/RichInput.js +1 -1
  99. package/dist/components/InputDropzone/InputDropzone.js +340 -304
  100. package/dist/components/Link/LinkShowcase.js +5 -5
  101. package/dist/components/Logos/LogosShowcase.js +2 -2
  102. package/dist/components/Logos/cfx/Icon.js +7 -7
  103. package/dist/components/Logos/cfx/Logo.js +3 -3
  104. package/dist/components/Logos/cfx/Wordmark.js +2 -2
  105. package/dist/components/Logos/discord/Icon.js +5 -5
  106. package/dist/components/Logos/fivem/Icon.js +2 -2
  107. package/dist/components/Logos/fivem/WhiteLogo.js +2 -2
  108. package/dist/components/Logos/github/Icon.js +7 -7
  109. package/dist/components/Logos/google/Icon.js +6 -6
  110. package/dist/components/Logos/google/Wordmark.js +3 -3
  111. package/dist/components/Logos/index.js +7 -7
  112. package/dist/components/Logos/patreon/Icon.js +7 -7
  113. package/dist/components/Logos/patreon/Wordmark.js +5 -5
  114. package/dist/components/Logos/redm/CompositeLogo.js +2 -2
  115. package/dist/components/Logos/rockstar/Icon.js +2 -2
  116. package/dist/components/Logos/tebex/Icon.js +7 -7
  117. package/dist/components/Logos/tebex/Wordmark.js +2 -2
  118. package/dist/components/Logos/x/Icon.js +3 -3
  119. package/dist/components/Modal/Modal.js +1 -1
  120. package/dist/components/Modal/ModalShowcase.js +3 -3
  121. package/dist/components/OnScreenSensor.js +1 -1
  122. package/dist/components/Overlay/Overlay.js +1 -1
  123. package/dist/components/Popover/PopoverShowcase.js +6 -6
  124. package/dist/components/Prose/Prose.js +3 -3
  125. package/dist/components/Range/Range.js +1 -1
  126. package/dist/components/Scrollable/ScrollableShowcase.js +2 -2
  127. package/dist/components/Select/Select.js +109 -109
  128. package/dist/components/Select/SelectShowcase.js +21 -21
  129. package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
  130. package/dist/components/Slider/Slider.js +1 -1
  131. package/dist/components/Switch/Switch.js +14 -14
  132. package/dist/components/TableResponsiveText/TableResponsiveText.js +2 -2
  133. package/dist/components/Tabular/TabularShowcase.js +12 -12
  134. package/dist/components/Title/Title.js +81 -77
  135. package/dist/{index-CfQtbUfi.js → index-8cuIcSMB.js} +5 -5
  136. package/dist/index-BcJ929FX.js +20 -0
  137. package/dist/{index-kbBuAY0m.js → index-BcnrbBqR.js} +2 -2
  138. package/dist/{index-BgyFvlVL.js → index-Bg26abkD.js} +2 -2
  139. package/dist/{index-9LBuZ7x4.js → index-BzirdFxK.js} +5 -5
  140. package/dist/{index-Cl_RnsqN.js → index-CUyjBl1Y.js} +2 -2
  141. package/dist/index-CZVyC53C.js +20 -0
  142. package/dist/{index-DwfZyjnS.js → index-CaQzR2YA.js} +2 -2
  143. package/dist/{index-D5SMGei3.js → index-CzUzkeQx.js} +9 -9
  144. package/dist/{index-Cy4ZbWBL.js → index-DqqOUOlj.js} +2 -2
  145. package/dist/{index-3ctv5u9o.js → index-DwdZ_SPo.js} +2 -2
  146. package/dist/{index-Bj7QGXdt.js → index-DxFgF-nY.js} +2 -2
  147. package/dist/main.d.ts +11 -2
  148. package/dist/main.js +279 -257
  149. package/dist/utils/contexts/AnalyticsContext/AnalyticsContext.d.ts +12 -0
  150. package/dist/utils/contexts/AnalyticsContext/AnalyticsContext.js +9 -0
  151. package/dist/utils/contexts/AnalyticsContext/AnalyticsProvider.d.ts +9 -0
  152. package/dist/utils/contexts/AnalyticsContext/AnalyticsProvider.js +33 -0
  153. package/dist/utils/contexts/AnalyticsContext/index.d.ts +6 -0
  154. package/dist/utils/contexts/AnalyticsContext/index.js +10 -0
  155. package/dist/utils/contexts/AnalyticsContext/useAnalytics.d.ts +1 -0
  156. package/dist/utils/contexts/AnalyticsContext/useAnalytics.js +8 -0
  157. package/dist/utils/contexts/AnalyticsContext/useSiteLinkClick.d.ts +7 -0
  158. package/dist/utils/contexts/AnalyticsContext/useSiteLinkClick.js +22 -0
  159. package/dist/utils/contexts/MediaQueryContext/MediaQueryContext.d.ts +11 -0
  160. package/dist/utils/contexts/MediaQueryContext/MediaQueryContext.js +11 -0
  161. package/dist/utils/contexts/MediaQueryContext/MediaQueryContextProvider.d.ts +6 -0
  162. package/dist/utils/contexts/MediaQueryContext/MediaQueryContextProvider.js +38 -0
  163. package/dist/utils/contexts/MediaQueryContext/index.d.ts +4 -0
  164. package/dist/utils/contexts/MediaQueryContext/index.js +8 -0
  165. package/dist/utils/contexts/MediaQueryContext/useMediaQuery.d.ts +2 -0
  166. package/dist/utils/contexts/MediaQueryContext/useMediaQuery.js +8 -0
  167. package/dist/utils/contexts/StoreContext/StoreContext.d.ts +15 -0
  168. package/dist/utils/contexts/StoreContext/StoreContext.js +21 -0
  169. package/dist/utils/contexts/StoreContext/index.d.ts +2 -0
  170. package/dist/utils/contexts/StoreContext/index.js +4 -0
  171. package/dist/utils/formatBytes.d.ts +1 -0
  172. package/dist/utils/formatBytes.js +12 -0
  173. package/dist/utils/hooks/useCarousel.d.ts +11 -0
  174. package/dist/utils/hooks/useCarousel.js +1276 -0
  175. package/dist/utils/hooks/useOutlet.js +1 -1
  176. package/dist/utils/truncateWithEllipsis.d.ts +1 -0
  177. package/dist/utils/truncateWithEllipsis.js +6 -0
  178. package/package.json +2 -1
  179. package/dist/Combination-CcTTSYNP.js +0 -2209
  180. package/dist/assets/css/CountryFlag.css +0 -1
  181. package/dist/cfxIcons-0xD_EEXT.js +0 -110
  182. package/dist/cfxIconsXLarge-D0vz6Yd_.js +0 -110
  183. package/dist/components/CountryFlag/CountryFlag.d.ts +0 -12
  184. package/dist/components/CountryFlag/CountryFlag.js +0 -25
  185. package/dist/components/CountryFlag/index.d.ts +0 -2
  186. package/dist/components/CountryFlag/index.js +0 -4
  187. package/dist/index-B_NGoq0d.js +0 -20
  188. package/dist/index-Cn_D8a9-.js +0 -20
@@ -1,12 +1,12 @@
1
- import { jsxs as wa, jsx as B } from "react/jsx-runtime";
2
- import oa, { useMemo as T, useRef as ea, useReducer as hi, useEffect as ka, useCallback as y, forwardRef as yi, useImperativeHandle as wi, Fragment as ki } from "react";
1
+ import { jsxs as ja, jsx as B } from "react/jsx-runtime";
2
+ import la, { useMemo as M, useRef as U, useReducer as wi, useEffect as ca, useCallback as y, forwardRef as ki, useImperativeHandle as ji, Fragment as Di } from "react";
3
3
  import { P as s } from "../../index-DQMInta3.js";
4
- import { a as I } from "../../tslib.es6-CtHwNPxX.js";
5
- import { Icon as ji } from "../Icon/Icon.js";
4
+ import { a as q } from "../../tslib.es6-CtHwNPxX.js";
5
+ import { Icon as zi } from "../Icon/Icon.js";
6
6
  import { Text as Na } from "../Text/Text.js";
7
- import { clsx as Di } from "../../utils/clsx.js";
7
+ import { clsx as Ei } from "../../utils/clsx.js";
8
8
  import Wa from "./ItemPreview.js";
9
- const zi = /* @__PURE__ */ new Map([
9
+ const Ai = /* @__PURE__ */ new Map([
10
10
  // https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
11
11
  ["1km", "application/vnd.1000minds.decision-model+xml"],
12
12
  ["3dml", "text/vnd.in3d.3dml"],
@@ -1209,14 +1209,14 @@ const zi = /* @__PURE__ */ new Map([
1209
1209
  ["zmm", "application/vnd.handheld-entertainment+xml"],
1210
1210
  ["zsh", "text/x-scriptzsh"]
1211
1211
  ]);
1212
- function L(a, i, t) {
1213
- const n = Ai(a), { webkitRelativePath: p } = a, o = typeof i == "string" ? i : typeof p == "string" && p.length > 0 ? p : `./${a.name}`;
1212
+ function $(a, i, t) {
1213
+ const n = _i(a), { webkitRelativePath: p } = a, o = typeof i == "string" ? i : typeof p == "string" && p.length > 0 ? p : `./${a.name}`;
1214
1214
  return typeof n.path != "string" && Ba(n, "path", o), Ba(n, "relativePath", o), n;
1215
1215
  }
1216
- function Ai(a) {
1216
+ function _i(a) {
1217
1217
  const { name: i } = a;
1218
1218
  if (i && i.lastIndexOf(".") !== -1 && !a.type) {
1219
- const n = i.split(".").pop().toLowerCase(), p = zi.get(n);
1219
+ const n = i.split(".").pop().toLowerCase(), p = Ai.get(n);
1220
1220
  p && Object.defineProperty(a, "type", {
1221
1221
  value: p,
1222
1222
  writable: !1,
@@ -1234,51 +1234,51 @@ function Ba(a, i, t) {
1234
1234
  enumerable: !0
1235
1235
  });
1236
1236
  }
1237
- const _i = [
1237
+ const Fi = [
1238
1238
  // Thumbnail cache files for macOS and Windows
1239
1239
  ".DS_Store",
1240
1240
  // macOs
1241
1241
  "Thumbs.db"
1242
1242
  // Windows
1243
1243
  ];
1244
- function Ei(a) {
1245
- return I(this, void 0, void 0, function* () {
1246
- return ca(a) && Fi(a.dataTransfer) ? Ri(a.dataTransfer, a.type) : Oi(a) ? Pi(a) : Array.isArray(a) && a.every((i) => "getFile" in i && typeof i.getFile == "function") ? Ii(a) : [];
1244
+ function Oi(a) {
1245
+ return q(this, void 0, void 0, function* () {
1246
+ return ra(a) && Pi(a.dataTransfer) ? qi(a.dataTransfer, a.type) : Ii(a) ? Ri(a) : Array.isArray(a) && a.every((i) => "getFile" in i && typeof i.getFile == "function") ? Ti(a) : [];
1247
1247
  });
1248
1248
  }
1249
- function Fi(a) {
1250
- return ca(a);
1249
+ function Pi(a) {
1250
+ return ra(a);
1251
1251
  }
1252
- function Oi(a) {
1253
- return ca(a) && ca(a.target);
1252
+ function Ii(a) {
1253
+ return ra(a) && ra(a.target);
1254
1254
  }
1255
- function ca(a) {
1255
+ function ra(a) {
1256
1256
  return typeof a == "object" && a !== null;
1257
1257
  }
1258
- function Pi(a) {
1259
- return za(a.target.files).map((i) => L(i));
1258
+ function Ri(a) {
1259
+ return Ea(a.target.files).map((i) => $(i));
1260
1260
  }
1261
- function Ii(a) {
1262
- return I(this, void 0, void 0, function* () {
1263
- return (yield Promise.all(a.map((t) => t.getFile()))).map((t) => L(t));
1261
+ function Ti(a) {
1262
+ return q(this, void 0, void 0, function* () {
1263
+ return (yield Promise.all(a.map((t) => t.getFile()))).map((t) => $(t));
1264
1264
  });
1265
1265
  }
1266
- function Ri(a, i) {
1267
- return I(this, void 0, void 0, function* () {
1266
+ function qi(a, i) {
1267
+ return q(this, void 0, void 0, function* () {
1268
1268
  if (a.items) {
1269
- const t = za(a.items).filter((p) => p.kind === "file");
1269
+ const t = Ea(a.items).filter((p) => p.kind === "file");
1270
1270
  if (i !== "drop")
1271
1271
  return t;
1272
- const n = yield Promise.all(t.map(qi));
1273
- return Ua(ti(n));
1272
+ const n = yield Promise.all(t.map(Ci));
1273
+ return Ua(ei(n));
1274
1274
  }
1275
- return Ua(za(a.files).map((t) => L(t)));
1275
+ return Ua(Ea(a.files).map((t) => $(t)));
1276
1276
  });
1277
1277
  }
1278
1278
  function Ua(a) {
1279
- return a.filter((i) => _i.indexOf(i.name) === -1);
1279
+ return a.filter((i) => Fi.indexOf(i.name) === -1);
1280
1280
  }
1281
- function za(a) {
1281
+ function Ea(a) {
1282
1282
  if (a === null)
1283
1283
  return [];
1284
1284
  const i = [];
@@ -1288,20 +1288,20 @@ function za(a) {
1288
1288
  }
1289
1289
  return i;
1290
1290
  }
1291
- function qi(a) {
1291
+ function Ci(a) {
1292
1292
  if (typeof a.webkitGetAsEntry != "function")
1293
1293
  return Ya(a);
1294
1294
  const i = a.webkitGetAsEntry();
1295
- return i && i.isDirectory ? ni(i) : Ya(a, i);
1295
+ return i && i.isDirectory ? pi(i) : Ya(a, i);
1296
1296
  }
1297
- function ti(a) {
1297
+ function ei(a) {
1298
1298
  return a.reduce((i, t) => [
1299
1299
  ...i,
1300
- ...Array.isArray(t) ? ti(t) : [t]
1300
+ ...Array.isArray(t) ? ei(t) : [t]
1301
1301
  ], []);
1302
1302
  }
1303
1303
  function Ya(a, i) {
1304
- return I(this, void 0, void 0, function* () {
1304
+ return q(this, void 0, void 0, function* () {
1305
1305
  var t;
1306
1306
  if (globalThis.isSecureContext && typeof a.getAsFileSystemHandle == "function") {
1307
1307
  const o = yield a.getAsFileSystemHandle();
@@ -1309,28 +1309,28 @@ function Ya(a, i) {
1309
1309
  throw new Error(`${a} is not a File`);
1310
1310
  if (o !== void 0) {
1311
1311
  const l = yield o.getFile();
1312
- return l.handle = o, L(l);
1312
+ return l.handle = o, $(l);
1313
1313
  }
1314
1314
  }
1315
1315
  const n = a.getAsFile();
1316
1316
  if (!n)
1317
1317
  throw new Error(`${a} is not a File`);
1318
- return L(n, (t = i == null ? void 0 : i.fullPath) !== null && t !== void 0 ? t : void 0);
1318
+ return $(n, (t = i == null ? void 0 : i.fullPath) !== null && t !== void 0 ? t : void 0);
1319
1319
  });
1320
1320
  }
1321
- function Ci(a) {
1322
- return I(this, void 0, void 0, function* () {
1323
- return a.isDirectory ? ni(a) : Si(a);
1321
+ function Si(a) {
1322
+ return q(this, void 0, void 0, function* () {
1323
+ return a.isDirectory ? pi(a) : Li(a);
1324
1324
  });
1325
1325
  }
1326
- function ni(a) {
1326
+ function pi(a) {
1327
1327
  const i = a.createReader();
1328
1328
  return new Promise((t, n) => {
1329
1329
  const p = [];
1330
1330
  function o() {
1331
- i.readEntries((l) => I(this, void 0, void 0, function* () {
1331
+ i.readEntries((l) => q(this, void 0, void 0, function* () {
1332
1332
  if (l.length) {
1333
- const r = Promise.all(l.map(Ci));
1333
+ const r = Promise.all(l.map(Si));
1334
1334
  p.push(r), o();
1335
1335
  } else
1336
1336
  try {
@@ -1346,11 +1346,11 @@ function ni(a) {
1346
1346
  o();
1347
1347
  });
1348
1348
  }
1349
- function Si(a) {
1350
- return I(this, void 0, void 0, function* () {
1349
+ function Li(a) {
1350
+ return q(this, void 0, void 0, function* () {
1351
1351
  return new Promise((i, t) => {
1352
1352
  a.file((n) => {
1353
- const p = L(n, a.fullPath);
1353
+ const p = $(n, a.fullPath);
1354
1354
  i(p);
1355
1355
  }, (n) => {
1356
1356
  t(n);
@@ -1358,7 +1358,7 @@ function Si(a) {
1358
1358
  });
1359
1359
  });
1360
1360
  }
1361
- var ja = function(a, i) {
1361
+ var Da = function(a, i) {
1362
1362
  if (a && i) {
1363
1363
  var t = Array.isArray(i) ? i : i.split(",");
1364
1364
  if (t.length === 0)
@@ -1371,20 +1371,20 @@ var ja = function(a, i) {
1371
1371
  }
1372
1372
  return !0;
1373
1373
  };
1374
- function Ga(a) {
1375
- return Mi(a) || Li(a) || pi(a) || Ti();
1374
+ function Ja(a) {
1375
+ return Ki(a) || $i(a) || ci(a) || Mi();
1376
1376
  }
1377
- function Ti() {
1377
+ function Mi() {
1378
1378
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
1379
1379
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1380
1380
  }
1381
- function Li(a) {
1381
+ function $i(a) {
1382
1382
  if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
1383
1383
  }
1384
- function Mi(a) {
1384
+ function Ki(a) {
1385
1385
  if (Array.isArray(a)) return Aa(a);
1386
1386
  }
1387
- function Ja(a, i) {
1387
+ function Va(a, i) {
1388
1388
  var t = Object.keys(a);
1389
1389
  if (Object.getOwnPropertySymbols) {
1390
1390
  var n = Object.getOwnPropertySymbols(a);
@@ -1394,28 +1394,28 @@ function Ja(a, i) {
1394
1394
  }
1395
1395
  return t;
1396
1396
  }
1397
- function Va(a) {
1397
+ function Qa(a) {
1398
1398
  for (var i = 1; i < arguments.length; i++) {
1399
1399
  var t = arguments[i] != null ? arguments[i] : {};
1400
- i % 2 ? Ja(Object(t), !0).forEach(function(n) {
1401
- ei(a, n, t[n]);
1402
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : Ja(Object(t)).forEach(function(n) {
1400
+ i % 2 ? Va(Object(t), !0).forEach(function(n) {
1401
+ oi(a, n, t[n]);
1402
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : Va(Object(t)).forEach(function(n) {
1403
1403
  Object.defineProperty(a, n, Object.getOwnPropertyDescriptor(t, n));
1404
1404
  });
1405
1405
  }
1406
1406
  return a;
1407
1407
  }
1408
- function ei(a, i, t) {
1408
+ function oi(a, i, t) {
1409
1409
  return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
1410
1410
  }
1411
- function U(a, i) {
1412
- return Hi(a) || Ki(a, i) || pi(a, i) || $i();
1411
+ function J(a, i) {
1412
+ return Ni(a) || Hi(a, i) || ci(a, i) || Gi();
1413
1413
  }
1414
- function $i() {
1414
+ function Gi() {
1415
1415
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1416
1416
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1417
1417
  }
1418
- function pi(a, i) {
1418
+ function ci(a, i) {
1419
1419
  if (a) {
1420
1420
  if (typeof a == "string") return Aa(a, i);
1421
1421
  var t = Object.prototype.toString.call(a).slice(8, -1);
@@ -1429,7 +1429,7 @@ function Aa(a, i) {
1429
1429
  n[t] = a[t];
1430
1430
  return n;
1431
1431
  }
1432
- function Ki(a, i) {
1432
+ function Hi(a, i) {
1433
1433
  var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
1434
1434
  if (t != null) {
1435
1435
  var n = [], p = !0, o = !1, l, r;
@@ -1448,97 +1448,100 @@ function Ki(a, i) {
1448
1448
  return n;
1449
1449
  }
1450
1450
  }
1451
- function Hi(a) {
1451
+ function Ni(a) {
1452
1452
  if (Array.isArray(a)) return a;
1453
1453
  }
1454
- var Ni = typeof ja == "function" ? ja : ja.default, Wi = "file-invalid-type", Bi = "file-too-large", Ui = "file-too-small", Yi = "too-many-files", Gi = function() {
1454
+ var Wi = typeof Da == "function" ? Da : Da.default, Bi = "file-invalid-type", Ui = "file-too-large", Yi = "file-too-small", Ji = "too-many-files", Vi = function() {
1455
1455
  var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = i.split(","), n = t.length > 1 ? "one of ".concat(t.join(", ")) : t[0];
1456
1456
  return {
1457
- code: Wi,
1457
+ code: Bi,
1458
1458
  message: "File type must be ".concat(n)
1459
1459
  };
1460
- }, Qa = function(i) {
1460
+ }, Xa = function(i) {
1461
1461
  return {
1462
- code: Bi,
1462
+ code: Ui,
1463
1463
  message: "File is larger than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
1464
1464
  };
1465
- }, Xa = function(i) {
1465
+ }, Za = function(i) {
1466
1466
  return {
1467
- code: Ui,
1467
+ code: Yi,
1468
1468
  message: "File is smaller than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
1469
1469
  };
1470
- }, Ji = {
1471
- code: Yi,
1470
+ }, Qi = {
1471
+ code: Ji,
1472
1472
  message: "Too many files"
1473
1473
  };
1474
- function oi(a, i) {
1475
- var t = a.type === "application/x-moz-file" || Ni(a, i);
1476
- return [t, t ? null : Gi(i)];
1477
- }
1478
- function ci(a, i, t) {
1479
- if (P(a.size))
1480
- if (P(i) && P(t)) {
1481
- if (a.size > t) return [!1, Qa(t)];
1482
- if (a.size < i) return [!1, Xa(i)];
1474
+ function Xi(a) {
1475
+ return a.type === "" && typeof a.getAsFile == "function";
1476
+ }
1477
+ function li(a, i) {
1478
+ var t = a.type === "application/x-moz-file" || Wi(a, i) || Xi(a);
1479
+ return [t, t ? null : Vi(i)];
1480
+ }
1481
+ function ri(a, i, t) {
1482
+ if (T(a.size))
1483
+ if (T(i) && T(t)) {
1484
+ if (a.size > t) return [!1, Xa(t)];
1485
+ if (a.size < i) return [!1, Za(i)];
1483
1486
  } else {
1484
- if (P(i) && a.size < i) return [!1, Xa(i)];
1485
- if (P(t) && a.size > t) return [!1, Qa(t)];
1487
+ if (T(i) && a.size < i) return [!1, Za(i)];
1488
+ if (T(t) && a.size > t) return [!1, Xa(t)];
1486
1489
  }
1487
1490
  return [!0, null];
1488
1491
  }
1489
- function P(a) {
1492
+ function T(a) {
1490
1493
  return a != null;
1491
1494
  }
1492
- function Vi(a) {
1495
+ function Zi(a) {
1493
1496
  var i = a.files, t = a.accept, n = a.minSize, p = a.maxSize, o = a.multiple, l = a.maxFiles, r = a.validator;
1494
1497
  return !o && i.length > 1 || o && l >= 1 && i.length > l ? !1 : i.every(function(v) {
1495
- var k = oi(v, t), z = U(k, 1), A = z[0], j = ci(v, n, p), _ = U(j, 1), E = _[0], F = r ? r(v) : null;
1496
- return A && E && !F;
1498
+ var D = li(v, t), A = J(D, 1), _ = A[0], z = ri(v, n, p), F = J(z, 1), O = F[0], P = r ? r(v) : null;
1499
+ return _ && O && !P;
1497
1500
  });
1498
1501
  }
1499
- function la(a) {
1502
+ function sa(a) {
1500
1503
  return typeof a.isPropagationStopped == "function" ? a.isPropagationStopped() : typeof a.cancelBubble < "u" ? a.cancelBubble : !1;
1501
1504
  }
1502
- function pa(a) {
1505
+ function Y(a) {
1503
1506
  return a.dataTransfer ? Array.prototype.some.call(a.dataTransfer.types, function(i) {
1504
1507
  return i === "Files" || i === "application/x-moz-file";
1505
1508
  }) : !!a.target && !!a.target.files;
1506
1509
  }
1507
- function Za(a) {
1510
+ function ai(a) {
1508
1511
  a.preventDefault();
1509
1512
  }
1510
- function Qi(a) {
1513
+ function at(a) {
1511
1514
  return a.indexOf("MSIE") !== -1 || a.indexOf("Trident/") !== -1;
1512
1515
  }
1513
- function Xi(a) {
1516
+ function it(a) {
1514
1517
  return a.indexOf("Edge/") !== -1;
1515
1518
  }
1516
- function Zi() {
1519
+ function tt() {
1517
1520
  var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
1518
- return Qi(a) || Xi(a);
1521
+ return at(a) || it(a);
1519
1522
  }
1520
- function w() {
1523
+ function k() {
1521
1524
  for (var a = arguments.length, i = new Array(a), t = 0; t < a; t++)
1522
1525
  i[t] = arguments[t];
1523
1526
  return function(n) {
1524
1527
  for (var p = arguments.length, o = new Array(p > 1 ? p - 1 : 0), l = 1; l < p; l++)
1525
1528
  o[l - 1] = arguments[l];
1526
1529
  return i.some(function(r) {
1527
- return !la(n) && r && r.apply(void 0, [n].concat(o)), la(n);
1530
+ return !sa(n) && r && r.apply(void 0, [n].concat(o)), sa(n);
1528
1531
  });
1529
1532
  };
1530
1533
  }
1531
- function at() {
1534
+ function nt() {
1532
1535
  return "showOpenFilePicker" in window;
1533
1536
  }
1534
- function it(a) {
1535
- if (P(a)) {
1537
+ function et(a) {
1538
+ if (T(a)) {
1536
1539
  var i = Object.entries(a).filter(function(t) {
1537
- var n = U(t, 2), p = n[0], o = n[1], l = !0;
1538
- return li(p) || (console.warn('Skipped "'.concat(p, '" 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.')), l = !1), (!Array.isArray(o) || !o.every(ri)) && (console.warn('Skipped "'.concat(p, '" because an invalid file extension was provided.')), l = !1), l;
1540
+ var n = J(t, 2), p = n[0], o = n[1], l = !0;
1541
+ return si(p) || (console.warn('Skipped "'.concat(p, '" 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.')), l = !1), (!Array.isArray(o) || !o.every(di)) && (console.warn('Skipped "'.concat(p, '" because an invalid file extension was provided.')), l = !1), l;
1539
1542
  }).reduce(function(t, n) {
1540
- var p = U(n, 2), o = p[0], l = p[1];
1541
- return Va(Va({}, t), {}, ei({}, o, l));
1543
+ var p = J(n, 2), o = p[0], l = p[1];
1544
+ return Qa(Qa({}, t), {}, oi({}, o, l));
1542
1545
  }, {});
1543
1546
  return [{
1544
1547
  // description is required due to https://crbug.com/1264708
@@ -1548,49 +1551,49 @@ function it(a) {
1548
1551
  }
1549
1552
  return a;
1550
1553
  }
1551
- function tt(a) {
1552
- if (P(a))
1554
+ function pt(a) {
1555
+ if (T(a))
1553
1556
  return Object.entries(a).reduce(function(i, t) {
1554
- var n = U(t, 2), p = n[0], o = n[1];
1555
- return [].concat(Ga(i), [p], Ga(o));
1557
+ var n = J(t, 2), p = n[0], o = n[1];
1558
+ return [].concat(Ja(i), [p], Ja(o));
1556
1559
  }, []).filter(function(i) {
1557
- return li(i) || ri(i);
1560
+ return si(i) || di(i);
1558
1561
  }).join(",");
1559
1562
  }
1560
- function nt(a) {
1563
+ function ot(a) {
1561
1564
  return a instanceof DOMException && (a.name === "AbortError" || a.code === a.ABORT_ERR);
1562
1565
  }
1563
- function et(a) {
1566
+ function ct(a) {
1564
1567
  return a instanceof DOMException && (a.name === "SecurityError" || a.code === a.SECURITY_ERR);
1565
1568
  }
1566
- function li(a) {
1569
+ function si(a) {
1567
1570
  return a === "audio/*" || a === "video/*" || a === "image/*" || a === "text/*" || a === "application/*" || /\w+\/[-+.\w]+/g.test(a);
1568
1571
  }
1569
- function ri(a) {
1572
+ function di(a) {
1570
1573
  return /^.*\.[\w]+$/.test(a);
1571
1574
  }
1572
- var pt = ["children"], ot = ["open"], ct = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], lt = ["refKey", "onChange", "onClick"];
1573
- function rt(a) {
1574
- return mt(a) || dt(a) || si(a) || st();
1575
+ var lt = ["children"], rt = ["open"], st = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], dt = ["refKey", "onChange", "onClick"];
1576
+ function ii(a) {
1577
+ return vt(a) || ut(a) || mi(a) || mt();
1575
1578
  }
1576
- function st() {
1579
+ function mt() {
1577
1580
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
1578
1581
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1579
1582
  }
1580
- function dt(a) {
1583
+ function ut(a) {
1581
1584
  if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
1582
1585
  }
1583
- function mt(a) {
1586
+ function vt(a) {
1584
1587
  if (Array.isArray(a)) return _a(a);
1585
1588
  }
1586
- function Da(a, i) {
1587
- return ft(a) || vt(a, i) || si(a, i) || ut();
1589
+ function za(a, i) {
1590
+ return gt(a) || xt(a, i) || mi(a, i) || ft();
1588
1591
  }
1589
- function ut() {
1592
+ function ft() {
1590
1593
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1591
1594
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1592
1595
  }
1593
- function si(a, i) {
1596
+ function mi(a, i) {
1594
1597
  if (a) {
1595
1598
  if (typeof a == "string") return _a(a, i);
1596
1599
  var t = Object.prototype.toString.call(a).slice(8, -1);
@@ -1604,7 +1607,7 @@ function _a(a, i) {
1604
1607
  n[t] = a[t];
1605
1608
  return n;
1606
1609
  }
1607
- function vt(a, i) {
1610
+ function xt(a, i) {
1608
1611
  var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
1609
1612
  if (t != null) {
1610
1613
  var n = [], p = !0, o = !1, l, r;
@@ -1623,10 +1626,10 @@ function vt(a, i) {
1623
1626
  return n;
1624
1627
  }
1625
1628
  }
1626
- function ft(a) {
1629
+ function gt(a) {
1627
1630
  if (Array.isArray(a)) return a;
1628
1631
  }
1629
- function ai(a, i) {
1632
+ function ti(a, i) {
1630
1633
  var t = Object.keys(a);
1631
1634
  if (Object.getOwnPropertySymbols) {
1632
1635
  var n = Object.getOwnPropertySymbols(a);
@@ -1639,20 +1642,20 @@ function ai(a, i) {
1639
1642
  function d(a) {
1640
1643
  for (var i = 1; i < arguments.length; i++) {
1641
1644
  var t = arguments[i] != null ? arguments[i] : {};
1642
- i % 2 ? ai(Object(t), !0).forEach(function(n) {
1643
- Ea(a, n, t[n]);
1644
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : ai(Object(t)).forEach(function(n) {
1645
+ i % 2 ? ti(Object(t), !0).forEach(function(n) {
1646
+ Fa(a, n, t[n]);
1647
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : ti(Object(t)).forEach(function(n) {
1645
1648
  Object.defineProperty(a, n, Object.getOwnPropertyDescriptor(t, n));
1646
1649
  });
1647
1650
  }
1648
1651
  return a;
1649
1652
  }
1650
- function Ea(a, i, t) {
1653
+ function Fa(a, i, t) {
1651
1654
  return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
1652
1655
  }
1653
- function ra(a, i) {
1656
+ function da(a, i) {
1654
1657
  if (a == null) return {};
1655
- var t = xt(a, i), n, p;
1658
+ var t = bt(a, i), n, p;
1656
1659
  if (Object.getOwnPropertySymbols) {
1657
1660
  var o = Object.getOwnPropertySymbols(a);
1658
1661
  for (p = 0; p < o.length; p++)
@@ -1660,27 +1663,27 @@ function ra(a, i) {
1660
1663
  }
1661
1664
  return t;
1662
1665
  }
1663
- function xt(a, i) {
1666
+ function bt(a, i) {
1664
1667
  if (a == null) return {};
1665
1668
  var t = {}, n = Object.keys(a), p, o;
1666
1669
  for (o = 0; o < n.length; o++)
1667
1670
  p = n[o], !(i.indexOf(p) >= 0) && (t[p] = a[p]);
1668
1671
  return t;
1669
1672
  }
1670
- var Oa = /* @__PURE__ */ yi(function(a, i) {
1671
- var t = a.children, n = ra(a, pt), p = mi(n), o = p.open, l = ra(p, ot);
1672
- return wi(i, function() {
1673
+ var Pa = /* @__PURE__ */ ki(function(a, i) {
1674
+ var t = a.children, n = da(a, lt), p = vi(n), o = p.open, l = da(p, rt);
1675
+ return ji(i, function() {
1673
1676
  return {
1674
1677
  open: o
1675
1678
  };
1676
- }, [o]), /* @__PURE__ */ oa.createElement(ki, null, t(d(d({}, l), {}, {
1679
+ }, [o]), /* @__PURE__ */ la.createElement(Di, null, t(d(d({}, l), {}, {
1677
1680
  open: o
1678
1681
  })));
1679
1682
  });
1680
- Oa.displayName = "Dropzone";
1681
- var di = {
1683
+ Pa.displayName = "Dropzone";
1684
+ var ui = {
1682
1685
  disabled: !1,
1683
- getFilesFromEvent: Ei,
1686
+ getFilesFromEvent: Oi,
1684
1687
  maxSize: 1 / 0,
1685
1688
  minSize: 0,
1686
1689
  multiple: !0,
@@ -1694,8 +1697,8 @@ var di = {
1694
1697
  useFsAccessApi: !1,
1695
1698
  autoFocus: !1
1696
1699
  };
1697
- Oa.defaultProps = di;
1698
- Oa.propTypes = {
1700
+ Pa.defaultProps = ui;
1701
+ Pa.propTypes = {
1699
1702
  /**
1700
1703
  * Render function that exposes the dropzone state and prop getter fns
1701
1704
  *
@@ -1708,6 +1711,7 @@ Oa.propTypes = {
1708
1711
  * @param {boolean} params.isDragActive Active drag is in progress
1709
1712
  * @param {boolean} params.isDragAccept Dragged files are accepted
1710
1713
  * @param {boolean} params.isDragReject Some dragged files are rejected
1714
+ * @param {boolean} params.isDragGlobal Files are being dragged anywhere on the document
1711
1715
  * @param {File[]} params.acceptedFiles Accepted files
1712
1716
  * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
1713
1717
  */
@@ -1863,196 +1867,224 @@ Oa.propTypes = {
1863
1867
  */
1864
1868
  validator: s.func
1865
1869
  };
1866
- var Fa = {
1870
+ var Oa = {
1867
1871
  isFocused: !1,
1868
1872
  isFileDialogActive: !1,
1869
1873
  isDragActive: !1,
1870
1874
  isDragAccept: !1,
1871
1875
  isDragReject: !1,
1876
+ isDragGlobal: !1,
1872
1877
  acceptedFiles: [],
1873
1878
  fileRejections: []
1874
1879
  };
1875
- function mi() {
1876
- var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = d(d({}, di), a), t = i.accept, n = i.disabled, p = i.getFilesFromEvent, o = i.maxSize, l = i.minSize, r = i.multiple, v = i.maxFiles, k = i.onDragEnter, z = i.onDragLeave, A = i.onDragOver, j = i.onDrop, _ = i.onDropAccepted, E = i.onDropRejected, F = i.onFileDialogCancel, M = i.onFileDialogOpen, Y = i.useFsAccessApi, G = i.autoFocus, $ = i.preventDropOnDocument, J = i.noClick, K = i.noKeyboard, V = i.noDrag, f = i.noDragEventsBubbling, sa = i.onError, H = i.validator, N = T(function() {
1877
- return tt(t);
1878
- }, [t]), Pa = T(function() {
1879
- return it(t);
1880
- }, [t]), da = T(function() {
1881
- return typeof M == "function" ? M : ii;
1882
- }, [M]), Q = T(function() {
1883
- return typeof F == "function" ? F : ii;
1884
- }, [F]), x = ea(null), h = ea(null), ui = hi(gt, Fa), Ia = Da(ui, 2), ma = Ia[0], g = Ia[1], vi = ma.isFocused, Ra = ma.isFileDialogActive, X = ea(typeof window < "u" && window.isSecureContext && Y && at()), qa = function() {
1885
- !X.current && Ra && setTimeout(function() {
1880
+ function vi() {
1881
+ var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = d(d({}, ui), a), t = i.accept, n = i.disabled, p = i.getFilesFromEvent, o = i.maxSize, l = i.minSize, r = i.multiple, v = i.maxFiles, D = i.onDragEnter, A = i.onDragLeave, _ = i.onDragOver, z = i.onDrop, F = i.onDropAccepted, O = i.onDropRejected, P = i.onFileDialogCancel, K = i.onFileDialogOpen, V = i.useFsAccessApi, Q = i.autoFocus, G = i.preventDropOnDocument, X = i.noClick, H = i.noKeyboard, Z = i.noDrag, f = i.noDragEventsBubbling, ma = i.onError, N = i.validator, W = M(function() {
1882
+ return pt(t);
1883
+ }, [t]), Ia = M(function() {
1884
+ return et(t);
1885
+ }, [t]), ua = M(function() {
1886
+ return typeof K == "function" ? K : ni;
1887
+ }, [K]), aa = M(function() {
1888
+ return typeof P == "function" ? P : ni;
1889
+ }, [P]), b = U(null), h = U(null), fi = wi(ht, Oa), Ra = za(fi, 2), va = Ra[0], x = Ra[1], xi = va.isFocused, Ta = va.isFileDialogActive, ia = U(typeof window < "u" && window.isSecureContext && V && nt()), qa = function() {
1890
+ !ia.current && Ta && setTimeout(function() {
1886
1891
  if (h.current) {
1887
1892
  var c = h.current.files;
1888
- c.length || (g({
1893
+ c.length || (x({
1889
1894
  type: "closeDialog"
1890
- }), Q());
1895
+ }), aa());
1891
1896
  }
1892
1897
  }, 300);
1893
1898
  };
1894
- ka(function() {
1899
+ ca(function() {
1895
1900
  return window.addEventListener("focus", qa, !1), function() {
1896
1901
  window.removeEventListener("focus", qa, !1);
1897
1902
  };
1898
- }, [h, Ra, Q, X]);
1899
- var R = ea([]), Ca = function(c) {
1900
- x.current && x.current.contains(c.target) || (c.preventDefault(), R.current = []);
1903
+ }, [h, Ta, aa, ia]);
1904
+ var C = U([]), I = U([]), Ca = function(c) {
1905
+ b.current && b.current.contains(c.target) || (c.preventDefault(), C.current = []);
1901
1906
  };
1902
- ka(function() {
1903
- return $ && (document.addEventListener("dragover", Za, !1), document.addEventListener("drop", Ca, !1)), function() {
1904
- $ && (document.removeEventListener("dragover", Za), document.removeEventListener("drop", Ca));
1907
+ ca(function() {
1908
+ return G && (document.addEventListener("dragover", ai, !1), document.addEventListener("drop", Ca, !1)), function() {
1909
+ G && (document.removeEventListener("dragover", ai), document.removeEventListener("drop", Ca));
1905
1910
  };
1906
- }, [x, $]), ka(function() {
1907
- return !n && G && x.current && x.current.focus(), function() {
1911
+ }, [b, G]), ca(function() {
1912
+ var e = function(w) {
1913
+ I.current = [].concat(ii(I.current), [w.target]), Y(w) && x({
1914
+ isDragGlobal: !0,
1915
+ type: "setDragGlobal"
1916
+ });
1917
+ }, c = function(w) {
1918
+ I.current = I.current.filter(function(j) {
1919
+ return j !== w.target && j !== null;
1920
+ }), !(I.current.length > 0) && x({
1921
+ isDragGlobal: !1,
1922
+ type: "setDragGlobal"
1923
+ });
1924
+ }, m = function() {
1925
+ I.current = [], x({
1926
+ isDragGlobal: !1,
1927
+ type: "setDragGlobal"
1928
+ });
1929
+ }, u = function() {
1930
+ I.current = [], x({
1931
+ isDragGlobal: !1,
1932
+ type: "setDragGlobal"
1933
+ });
1908
1934
  };
1909
- }, [x, G, n]);
1910
- var O = y(function(e) {
1911
- sa ? sa(e) : console.error(e);
1912
- }, [sa]), Sa = y(function(e) {
1913
- e.preventDefault(), e.persist(), ta(e), R.current = [].concat(rt(R.current), [e.target]), pa(e) && Promise.resolve(p(e)).then(function(c) {
1914
- if (!(la(e) && !f)) {
1915
- var m = c.length, u = m > 0 && Vi({
1935
+ return document.addEventListener("dragenter", e, !1), document.addEventListener("dragleave", c, !1), document.addEventListener("dragend", m, !1), document.addEventListener("drop", u, !1), function() {
1936
+ document.removeEventListener("dragenter", e), document.removeEventListener("dragleave", c), document.removeEventListener("dragend", m), document.removeEventListener("drop", u);
1937
+ };
1938
+ }, [b]), ca(function() {
1939
+ return !n && Q && b.current && b.current.focus(), function() {
1940
+ };
1941
+ }, [b, Q, n]);
1942
+ var R = y(function(e) {
1943
+ ma ? ma(e) : console.error(e);
1944
+ }, [ma]), Sa = y(function(e) {
1945
+ e.preventDefault(), e.persist(), pa(e), C.current = [].concat(ii(C.current), [e.target]), Y(e) && Promise.resolve(p(e)).then(function(c) {
1946
+ if (!(sa(e) && !f)) {
1947
+ var m = c.length, u = m > 0 && Zi({
1916
1948
  files: c,
1917
- accept: N,
1949
+ accept: W,
1918
1950
  minSize: l,
1919
1951
  maxSize: o,
1920
1952
  multiple: r,
1921
1953
  maxFiles: v,
1922
- validator: H
1923
- }), b = m > 0 && !u;
1924
- g({
1954
+ validator: N
1955
+ }), g = m > 0 && !u;
1956
+ x({
1925
1957
  isDragAccept: u,
1926
- isDragReject: b,
1958
+ isDragReject: g,
1927
1959
  isDragActive: !0,
1928
1960
  type: "setDraggedFiles"
1929
- }), k && k(e);
1961
+ }), D && D(e);
1930
1962
  }
1931
1963
  }).catch(function(c) {
1932
- return O(c);
1964
+ return R(c);
1933
1965
  });
1934
- }, [p, k, O, f, N, l, o, r, v, H]), Ta = y(function(e) {
1935
- e.preventDefault(), e.persist(), ta(e);
1936
- var c = pa(e);
1966
+ }, [p, D, R, f, W, l, o, r, v, N]), La = y(function(e) {
1967
+ e.preventDefault(), e.persist(), pa(e);
1968
+ var c = Y(e);
1937
1969
  if (c && e.dataTransfer)
1938
1970
  try {
1939
1971
  e.dataTransfer.dropEffect = "copy";
1940
1972
  } catch {
1941
1973
  }
1942
- return c && A && A(e), !1;
1943
- }, [A, f]), La = y(function(e) {
1944
- e.preventDefault(), e.persist(), ta(e);
1945
- var c = R.current.filter(function(u) {
1946
- return x.current && x.current.contains(u);
1974
+ return c && _ && _(e), !1;
1975
+ }, [_, f]), Ma = y(function(e) {
1976
+ e.preventDefault(), e.persist(), pa(e);
1977
+ var c = C.current.filter(function(u) {
1978
+ return b.current && b.current.contains(u);
1947
1979
  }), m = c.indexOf(e.target);
1948
- m !== -1 && c.splice(m, 1), R.current = c, !(c.length > 0) && (g({
1980
+ m !== -1 && c.splice(m, 1), C.current = c, !(c.length > 0) && (x({
1949
1981
  type: "setDraggedFiles",
1950
1982
  isDragActive: !1,
1951
1983
  isDragAccept: !1,
1952
1984
  isDragReject: !1
1953
- }), pa(e) && z && z(e));
1954
- }, [x, z, f]), Z = y(function(e, c) {
1985
+ }), Y(e) && A && A(e));
1986
+ }, [b, A, f]), ta = y(function(e, c) {
1955
1987
  var m = [], u = [];
1956
- e.forEach(function(b) {
1957
- var W = oi(b, N), S = Da(W, 2), va = S[0], fa = S[1], xa = ci(b, l, o), na = Da(xa, 2), ga = na[0], ba = na[1], ha = H ? H(b) : null;
1958
- if (va && ga && !ha)
1959
- m.push(b);
1988
+ e.forEach(function(g) {
1989
+ var w = li(g, W), j = za(w, 2), xa = j[0], ga = j[1], ba = ri(g, l, o), oa = za(ba, 2), ha = oa[0], ya = oa[1], wa = N ? N(g) : null;
1990
+ if (xa && ha && !wa)
1991
+ m.push(g);
1960
1992
  else {
1961
- var ya = [fa, ba];
1962
- ha && (ya = ya.concat(ha)), u.push({
1963
- file: b,
1964
- errors: ya.filter(function(bi) {
1965
- return bi;
1993
+ var ka = [ga, ya];
1994
+ wa && (ka = ka.concat(wa)), u.push({
1995
+ file: g,
1996
+ errors: ka.filter(function(yi) {
1997
+ return yi;
1966
1998
  })
1967
1999
  });
1968
2000
  }
1969
- }), (!r && m.length > 1 || r && v >= 1 && m.length > v) && (m.forEach(function(b) {
2001
+ }), (!r && m.length > 1 || r && v >= 1 && m.length > v) && (m.forEach(function(g) {
1970
2002
  u.push({
1971
- file: b,
1972
- errors: [Ji]
2003
+ file: g,
2004
+ errors: [Qi]
1973
2005
  });
1974
- }), m.splice(0)), g({
2006
+ }), m.splice(0)), x({
1975
2007
  acceptedFiles: m,
1976
2008
  fileRejections: u,
1977
2009
  isDragReject: u.length > 0,
1978
2010
  type: "setFiles"
1979
- }), j && j(m, u, c), u.length > 0 && E && E(u, c), m.length > 0 && _ && _(m, c);
1980
- }, [g, r, N, l, o, v, j, _, E, H]), aa = y(function(e) {
1981
- e.preventDefault(), e.persist(), ta(e), R.current = [], pa(e) && Promise.resolve(p(e)).then(function(c) {
1982
- la(e) && !f || Z(c, e);
2011
+ }), z && z(m, u, c), u.length > 0 && O && O(u, c), m.length > 0 && F && F(m, c);
2012
+ }, [x, r, W, l, o, v, z, F, O, N]), na = y(function(e) {
2013
+ e.preventDefault(), e.persist(), pa(e), C.current = [], Y(e) && Promise.resolve(p(e)).then(function(c) {
2014
+ sa(e) && !f || ta(c, e);
1983
2015
  }).catch(function(c) {
1984
- return O(c);
1985
- }), g({
2016
+ return R(c);
2017
+ }), x({
1986
2018
  type: "reset"
1987
2019
  });
1988
- }, [p, Z, O, f]), q = y(function() {
1989
- if (X.current) {
1990
- g({
2020
+ }, [p, ta, R, f]), S = y(function() {
2021
+ if (ia.current) {
2022
+ x({
1991
2023
  type: "openDialog"
1992
- }), da();
2024
+ }), ua();
1993
2025
  var e = {
1994
2026
  multiple: r,
1995
- types: Pa
2027
+ types: Ia
1996
2028
  };
1997
2029
  window.showOpenFilePicker(e).then(function(c) {
1998
2030
  return p(c);
1999
2031
  }).then(function(c) {
2000
- Z(c, null), g({
2032
+ ta(c, null), x({
2001
2033
  type: "closeDialog"
2002
2034
  });
2003
2035
  }).catch(function(c) {
2004
- nt(c) ? (Q(c), g({
2036
+ ot(c) ? (aa(c), x({
2005
2037
  type: "closeDialog"
2006
- })) : et(c) ? (X.current = !1, h.current ? (h.current.value = null, h.current.click()) : O(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."))) : O(c);
2038
+ })) : ct(c) ? (ia.current = !1, h.current ? (h.current.value = null, h.current.click()) : R(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."))) : R(c);
2007
2039
  });
2008
2040
  return;
2009
2041
  }
2010
- h.current && (g({
2042
+ h.current && (x({
2011
2043
  type: "openDialog"
2012
- }), da(), h.current.value = null, h.current.click());
2013
- }, [g, da, Q, Y, Z, O, Pa, r]), Ma = y(function(e) {
2014
- !x.current || !x.current.isEqualNode(e.target) || (e.key === " " || e.key === "Enter" || e.keyCode === 32 || e.keyCode === 13) && (e.preventDefault(), q());
2015
- }, [x, q]), $a = y(function() {
2016
- g({
2044
+ }), ua(), h.current.value = null, h.current.click());
2045
+ }, [x, ua, aa, V, ta, R, Ia, r]), $a = y(function(e) {
2046
+ !b.current || !b.current.isEqualNode(e.target) || (e.key === " " || e.key === "Enter" || e.keyCode === 32 || e.keyCode === 13) && (e.preventDefault(), S());
2047
+ }, [b, S]), Ka = y(function() {
2048
+ x({
2017
2049
  type: "focus"
2018
2050
  });
2019
- }, []), Ka = y(function() {
2020
- g({
2051
+ }, []), Ga = y(function() {
2052
+ x({
2021
2053
  type: "blur"
2022
2054
  });
2023
2055
  }, []), Ha = y(function() {
2024
- J || (Zi() ? setTimeout(q, 0) : q());
2025
- }, [J, q]), C = function(c) {
2056
+ X || (tt() ? setTimeout(S, 0) : S());
2057
+ }, [X, S]), L = function(c) {
2026
2058
  return n ? null : c;
2027
- }, ua = function(c) {
2028
- return K ? null : C(c);
2029
- }, ia = function(c) {
2030
- return V ? null : C(c);
2031
- }, ta = function(c) {
2059
+ }, fa = function(c) {
2060
+ return H ? null : L(c);
2061
+ }, ea = function(c) {
2062
+ return Z ? null : L(c);
2063
+ }, pa = function(c) {
2032
2064
  f && c.stopPropagation();
2033
- }, fi = T(function() {
2065
+ }, gi = M(function() {
2034
2066
  return function() {
2035
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = e.refKey, m = c === void 0 ? "ref" : c, u = e.role, b = e.onKeyDown, W = e.onFocus, S = e.onBlur, va = e.onClick, fa = e.onDragEnter, xa = e.onDragOver, na = e.onDragLeave, ga = e.onDrop, ba = ra(e, ct);
2036
- return d(d(Ea({
2037
- onKeyDown: ua(w(b, Ma)),
2038
- onFocus: ua(w(W, $a)),
2039
- onBlur: ua(w(S, Ka)),
2040
- onClick: C(w(va, Ha)),
2041
- onDragEnter: ia(w(fa, Sa)),
2042
- onDragOver: ia(w(xa, Ta)),
2043
- onDragLeave: ia(w(na, La)),
2044
- onDrop: ia(w(ga, aa)),
2067
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = e.refKey, m = c === void 0 ? "ref" : c, u = e.role, g = e.onKeyDown, w = e.onFocus, j = e.onBlur, xa = e.onClick, ga = e.onDragEnter, ba = e.onDragOver, oa = e.onDragLeave, ha = e.onDrop, ya = da(e, st);
2068
+ return d(d(Fa({
2069
+ onKeyDown: fa(k(g, $a)),
2070
+ onFocus: fa(k(w, Ka)),
2071
+ onBlur: fa(k(j, Ga)),
2072
+ onClick: L(k(xa, Ha)),
2073
+ onDragEnter: ea(k(ga, Sa)),
2074
+ onDragOver: ea(k(ba, La)),
2075
+ onDragLeave: ea(k(oa, Ma)),
2076
+ onDrop: ea(k(ha, na)),
2045
2077
  role: typeof u == "string" && u !== "" ? u : "presentation"
2046
- }, m, x), !n && !K ? {
2078
+ }, m, b), !n && !H ? {
2047
2079
  tabIndex: 0
2048
- } : {}), ba);
2080
+ } : {}), ya);
2049
2081
  };
2050
- }, [x, Ma, $a, Ka, Ha, Sa, Ta, La, aa, K, V, n]), xi = y(function(e) {
2082
+ }, [b, $a, Ka, Ga, Ha, Sa, La, Ma, na, H, Z, n]), bi = y(function(e) {
2051
2083
  e.stopPropagation();
2052
- }, []), gi = T(function() {
2084
+ }, []), hi = M(function() {
2053
2085
  return function() {
2054
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = e.refKey, m = c === void 0 ? "ref" : c, u = e.onChange, b = e.onClick, W = ra(e, lt), S = Ea({
2055
- accept: N,
2086
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = e.refKey, m = c === void 0 ? "ref" : c, u = e.onChange, g = e.onClick, w = da(e, dt), j = Fa({
2087
+ accept: W,
2056
2088
  multiple: r,
2057
2089
  type: "file",
2058
2090
  style: {
@@ -2067,23 +2099,23 @@ function mi() {
2067
2099
  width: "1px",
2068
2100
  whiteSpace: "nowrap"
2069
2101
  },
2070
- onChange: C(w(u, aa)),
2071
- onClick: C(w(b, xi)),
2102
+ onChange: L(k(u, na)),
2103
+ onClick: L(k(g, bi)),
2072
2104
  tabIndex: -1
2073
2105
  }, m, h);
2074
- return d(d({}, S), W);
2106
+ return d(d({}, j), w);
2075
2107
  };
2076
- }, [h, t, r, aa, n]);
2077
- return d(d({}, ma), {}, {
2078
- isFocused: vi && !n,
2079
- getRootProps: fi,
2080
- getInputProps: gi,
2081
- rootRef: x,
2108
+ }, [h, t, r, na, n]);
2109
+ return d(d({}, va), {}, {
2110
+ isFocused: xi && !n,
2111
+ getRootProps: gi,
2112
+ getInputProps: hi,
2113
+ rootRef: b,
2082
2114
  inputRef: h,
2083
- open: C(q)
2115
+ open: L(S)
2084
2116
  });
2085
2117
  }
2086
- function gt(a, i) {
2118
+ function ht(a, i) {
2087
2119
  switch (i.type) {
2088
2120
  case "focus":
2089
2121
  return d(d({}, a), {}, {
@@ -2094,7 +2126,7 @@ function gt(a, i) {
2094
2126
  isFocused: !1
2095
2127
  });
2096
2128
  case "openDialog":
2097
- return d(d({}, Fa), {}, {
2129
+ return d(d({}, Oa), {}, {
2098
2130
  isFileDialogActive: !0
2099
2131
  });
2100
2132
  case "closeDialog":
@@ -2113,22 +2145,26 @@ function gt(a, i) {
2113
2145
  fileRejections: i.fileRejections,
2114
2146
  isDragReject: i.isDragReject
2115
2147
  });
2148
+ case "setDragGlobal":
2149
+ return d(d({}, a), {}, {
2150
+ isDragGlobal: i.isDragGlobal
2151
+ });
2116
2152
  case "reset":
2117
- return d({}, Fa);
2153
+ return d({}, Oa);
2118
2154
  default:
2119
2155
  return a;
2120
2156
  }
2121
2157
  }
2122
- function ii() {
2158
+ function ni() {
2123
2159
  }
2124
- const bt = "cfxui__InputDropzone__dropzone__bde8d", ht = "cfxui__InputDropzone__text__47997", yt = "cfxui__InputDropzone__disabled__168e8", wt = "cfxui__InputDropzone__focused__0bbd6", kt = "cfxui__InputDropzone__dragActive__096b2", D = {
2125
- dropzone: bt,
2126
- text: ht,
2127
- disabled: yt,
2128
- focused: wt,
2129
- dragActive: kt
2160
+ const yt = "cfxui__InputDropzone__dropzone__bde8d", wt = "cfxui__InputDropzone__text__47997", kt = "cfxui__InputDropzone__disabled__168e8", jt = "cfxui__InputDropzone__focused__0bbd6", Dt = "cfxui__InputDropzone__dragActive__096b2", E = {
2161
+ dropzone: yt,
2162
+ text: wt,
2163
+ disabled: kt,
2164
+ focused: jt,
2165
+ dragActive: Dt
2130
2166
  };
2131
- function jt(a) {
2167
+ function zt(a) {
2132
2168
  const {
2133
2169
  value: i = [],
2134
2170
  rejections: t = [],
@@ -2138,42 +2174,42 @@ function jt(a) {
2138
2174
  rootAriaLabel: l = "",
2139
2175
  onRemoveFile: r,
2140
2176
  onRemoveRejection: v,
2141
- dropzoneItemClassName: k,
2142
- dropzoneClassName: z,
2143
- name: A,
2144
- ...j
2177
+ dropzoneItemClassName: D,
2178
+ dropzoneClassName: A,
2179
+ name: _,
2180
+ ...z
2145
2181
  } = a, {
2146
- isFocused: _,
2147
- isDragActive: E,
2148
- isDragAccept: F,
2149
- isDragReject: M,
2150
- isFileDialogActive: Y,
2151
- getRootProps: G,
2152
- getInputProps: $
2153
- } = mi(j), J = oa.useCallback((f) => {
2182
+ isFocused: F,
2183
+ isDragActive: O,
2184
+ isDragAccept: P,
2185
+ isDragReject: K,
2186
+ isFileDialogActive: V,
2187
+ getRootProps: Q,
2188
+ getInputProps: G
2189
+ } = vi(z), X = la.useCallback((f) => {
2154
2190
  r && r(f);
2155
- }, [r]), K = oa.useCallback((f) => {
2191
+ }, [r]), H = la.useCallback((f) => {
2156
2192
  v && v(f);
2157
- }, [v]), V = Di(D.dropzone, z, {
2158
- [D.disabled]: j.disabled,
2159
- [D.focused]: _,
2160
- [D.dragActive]: E,
2161
- [D.dragAccept]: F,
2162
- [D.dragReject]: M,
2163
- [D.fileDialogActive]: Y
2193
+ }, [v]), Z = Ei(E.dropzone, A, {
2194
+ [E.disabled]: z.disabled,
2195
+ [E.focused]: F,
2196
+ [E.dragActive]: O,
2197
+ [E.dragAccept]: P,
2198
+ [E.dragReject]: K,
2199
+ [E.fileDialogActive]: V
2164
2200
  });
2165
- return /* @__PURE__ */ wa("section", { children: [
2166
- /* @__PURE__ */ wa(
2201
+ return /* @__PURE__ */ ja("section", { children: [
2202
+ /* @__PURE__ */ ja(
2167
2203
  "div",
2168
2204
  {
2169
- className: V,
2170
- ...G({
2205
+ className: Z,
2206
+ ...Q({
2171
2207
  "aria-label": l
2172
2208
  }),
2173
2209
  children: [
2174
- /* @__PURE__ */ B("input", { ...$({ name: A }) }),
2210
+ /* @__PURE__ */ B("input", { ...G({ name: _ }) }),
2175
2211
  /* @__PURE__ */ B(
2176
- ji,
2212
+ zi,
2177
2213
  {
2178
2214
  name: "Upload",
2179
2215
  size: {
@@ -2182,7 +2218,7 @@ function jt(a) {
2182
2218
  }
2183
2219
  }
2184
2220
  ),
2185
- /* @__PURE__ */ wa(Na, { className: D.text, children: [
2221
+ /* @__PURE__ */ ja(Na, { className: E.text, children: [
2186
2222
  p ? `${n} ` : n,
2187
2223
  !!p && /* @__PURE__ */ B(
2188
2224
  Na,
@@ -2202,8 +2238,8 @@ function jt(a) {
2202
2238
  {
2203
2239
  removeAriaLabel: o,
2204
2240
  file: f,
2205
- onRemoveFile: J,
2206
- className: k
2241
+ onRemoveFile: X,
2242
+ className: D
2207
2243
  },
2208
2244
  f.path
2209
2245
  )),
@@ -2215,14 +2251,14 @@ function jt(a) {
2215
2251
  theme: "failed",
2216
2252
  removeAriaLabel: o,
2217
2253
  file: f,
2218
- onRemoveFile: K,
2219
- className: k
2254
+ onRemoveFile: H,
2255
+ className: D
2220
2256
  },
2221
2257
  f.path
2222
2258
  ))
2223
2259
  ] });
2224
2260
  }
2225
- const It = oa.memo(jt);
2261
+ const Tt = la.memo(zt);
2226
2262
  export {
2227
- It as default
2263
+ Tt as default
2228
2264
  };